:root{--ink:#30251b;--muted-ink:#6d573b;--paper:#edddb7;--paper-dark:#dcc49b;--paper-border:#967147;--paper-image:url("assets/parchment-grain.svg");--ruby:#8d3e2c}
.paper,dialog,#hover,#target,#coursePreview,#toast,.initiative-unit{color:var(--ink);background-color:var(--paper);background-image:var(--paper-image);border:1px solid var(--paper-border);box-shadow:inset 0 0 17px #714b262a,0 4px 14px #0005}
button{color:var(--ink);background:linear-gradient(135deg,#f4e5c6,#d7bb8d);border-color:var(--paper-border);box-shadow:inset 0 0 0 2px #f9edcf55}
button:hover,button:focus-visible{filter:brightness(1.06);outline:2px solid #965c37;outline-offset:-3px}button.active{border-color:#9c5635;box-shadow:inset 0 0 0 2px #bd8454}
dialog{background-image:var(--paper-image);background-color:var(--paper);border:4px double var(--paper-border);color:var(--ink)}dialog p,dialog .eyebrow,dialog small{color:var(--muted-ink)}dialog h1,dialog h2{color:var(--ink)}
.dialog-close,.close-inspect{color:var(--ink)!important;background:#d9bc8d!important;border-color:#a5794c!important}
header nav button{color:var(--ink);background:linear-gradient(#f0dfbc,#caae7f);border-color:#75542f}
.hud-frame{opacity:1}.hud-frame path:first-of-type{fill:url(#paperHud);stroke:#8f6739;stroke-width:4}.hud-frame path:nth-of-type(2){stroke:#b29163}.hud-frame path:nth-of-type(3){stroke:#a48552}.hud-frame path:nth-of-type(4){stroke:#926b42}.hud-frame path:nth-of-type(5){stroke:#80613c}.hud-frame path:nth-of-type(6){stroke:#c9aa75}
#resources,#resources b,#mp,#coreHull,#coreName,#coreCrew,#ammoStatus,#coreArmor{color:var(--ink);text-shadow:none}
.order-pip{background:#eadab9;border-color:#76552c}.order-pip.full{background:#966534;box-shadow:none}
.ability,.weapon,#endTurn{background-color:var(--paper);background-image:var(--paper-image);color:var(--ink);border-color:#856134;box-shadow:inset 0 0 0 2px #c4a570}
.ability.active,.weapon.active{background:#e7c893;color:#4b2416;border-color:#9b5030}.ability .slot-cost{color:#4b3524;background:#e4cba1}.weapon small,.weapon kbd,.weapon em{color:#68482c}
.officer-name,.post-name{color:var(--ink);text-shadow:none;background:#e6d0a9c9;padding:2px 0}.portrait{background-image:none!important;background:#d5bb8b;border-color:#8c693c}.portrait img{width:100%;height:100%;object-fit:cover;object-position:50% 20%}.portrait .sigil{background:#e6d0a9;color:#4c3520}
#coreStatus{color:var(--ink);background:#e9d5b0;border-color:#8e6b40}#coreBar{display:none}#coreCrew .part-meter i{display:none}#coreCrew .part-meter{color:var(--ink)}#coreCrew .part-meter span,#coreCrew .part-meter b{color:var(--ink)}
#coreArmor{left:840px;top:905px;width:242px;height:110px}#coreMasts{position:absolute;left:789px;top:1018px;width:185px;height:53px;color:var(--ink)}#coreCrew{left:985px;top:1024px;width:150px;height:44px}#coreStatus{top:1064px;height:16px;line-height:14px;font-size:12px}#coreHull{font-size:13px}#coreName{margin-right:10px}
#bowFire{left:787px;top:878px;width:50px;height:45px}#sternFire{left:1085px;top:878px;width:50px;height:45px}#moveMode{top:864px;height:40px}#portFire{left:790px;top:939px;width:45px;height:50px}#starboardFire{left:1085px;top:939px;width:45px;height:50px}#ammoStatus{top:891px;left:849px;width:215px;font-size:11px}
#turnStat{position:absolute;left:812px;top:814px;width:290px;text-align:center;font-size:11px;color:var(--ink);background:#e9d9b8;padding:3px 7px;border:1px solid #a27f4e}
#endTurn{border-color:#8f6d3f;box-shadow:0 0 0 5px #c2a06b,0 0 0 7px #88613d,0 6px 10px #0007}#endTurn kbd{color:#60432c}
.initiative-unit,.initiative-unit.current{background-image:var(--paper-image);background-color:var(--paper);border-color:#8b6a42;color:var(--ink)}.initiative-unit strong,.initiative-unit small,.queue-number{color:var(--ink)}.queue-caption{background:#ead6b7;padding:4px 9px;color:#4c3824;letter-spacing:1px}.initiative-unit.current{border:2px solid #994d2d}.queue-arrow{color:#d8bc88}
.shipLabel{background:#eddcb9e8;color:var(--ink);text-shadow:none;border-color:#9d7951}.shipLabel small,.world-status{color:#5c4229}.shipLabel.highlight{color:#3c2714;border-color:#ba743d}.inspect-world{color:#3b2b1d;background:#ddc198}
#hover h3,#target h3,#hover p,#target p,.tooltip-head h2,.tooltip-head h3,.tooltip-head small,.tooltip-stats span,.tooltip-stats b,.tooltip-footer,.tooltip-head,.paper-crest{color:var(--ink)}.tooltip-warning{background:#dfb097;color:#65351d}.tooltip-footer{border-color:#a88b5f}.tooltip-stats{border-color:#a88b5f}.part-meter span,.part-meter b,#inspect .eyebrow{color:var(--ink)}#instructions p,#ammoMenu p,#ammoMenu .eyebrow{color:var(--muted-ink)}
#start{background-color:#ddc298;background-image:var(--paper-image)}.fleet-heading h1,.fleet-heading p,.fleet-values span,.fleet-values b,.fleet-card h2,.fleet-card p,.fleet-select,#fleetStats,#fleetStats b,#fleetStats span{color:var(--ink)}.fleet-card{background:#e9d7b2;border-color:#987246}.fleet-card.active{background:#f0e1bd;border-color:#a05a32}.fleet-model{background:radial-gradient(ellipse,#d9c599,#c5ad87)}#sail,#continue{background:linear-gradient(#edd9b3,#c6a06b);color:#382515}.fleet-select{border-color:#a38454}
#preparation[hidden]{display:none!important}#preparation{position:absolute;inset:0;z-index:40;display:grid;grid-template-rows:126px minmax(0,1fr) 168px;padding:18px 28px 22px;gap:14px;background:#102c35;color:var(--ink);touch-action:none}
body.preparing>header,body.preparing>#ui,body.preparing>#shipLabels{visibility:hidden}body.preparing>#sea{visibility:hidden}
.prep-top{position:relative;display:grid;grid-template-columns:1fr 2fr 1fr;align-items:start}.prep-location{color:#e1cda3;font-size:17px;letter-spacing:2px;text-shadow:0 2px 4px #000}.prep-heading{text-align:center;color:#f0dfb7;text-shadow:0 2px 5px #000}.prep-heading>span{font-size:17px;letter-spacing:4px}.prep-heading h1{font-size:46px;line-height:1.1;font-weight:normal;letter-spacing:3px;margin:5px 0 10px}.prep-heading button{padding:9px 22px;font-size:14px;letter-spacing:1px;min-height:40px;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 50%,calc(100% - 12px) 100%,12px 100%,0 50%)}#prepResume{justify-self:end;min-height:44px;padding:8px 14px}
.prep-main{display:grid;grid-template-columns:minmax(260px,19%) minmax(0,1fr) minmax(315px,21%);gap:22px;min-height:0}
.prep-equipment,.prep-posts{padding:12px 14px 9px;position:relative;border:4px double #9b7645;box-shadow:inset 0 0 32px #8b572129,0 6px 25px #0006;display:flex;flex-direction:column;min-height:0}
.prep-equipment h2,.prep-posts h2{font-size:21px;line-height:1.2;font-weight:normal;letter-spacing:1px;margin:0 0 10px;padding-bottom:8px;border-bottom:1px solid #997445}.prep-posts h2{display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:20px}.prep-posts h2 small{font-size:16px;white-space:nowrap}
#prepEquipment{display:grid;grid-template-rows:repeat(8,minmax(0,1fr));flex:1;min-height:0}#prepOfficers{display:grid;grid-template-rows:repeat(6,minmax(0,1fr));flex:1;min-height:0}
.equipment-slot,.prep-officer{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:0;border-bottom:1px solid #ad8f5e;background:none;box-shadow:none;padding:6px 1px;min-height:0;position:relative;color:var(--ink)}
.equipment-slot>img{width:66px;height:66px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 1px 1px #65482155)}.equipment-slot>div,.prep-officer>div{min-width:0;flex:1}.equipment-slot small,.prep-officer small{display:block;font-size:13px;text-transform:uppercase;letter-spacing:.6px;color:#6b4e30;margin-bottom:4px}.equipment-slot b{display:block;font-size:18px;font-weight:normal;line-height:1.1}.equipment-slot span{display:block;font-size:12px;margin-top:4px;color:#755535}.swap-cue{font-style:normal;font-size:25px;color:#7a532c;margin-left:4px}
.prep-officer .officer-mini{width:76px;height:88px;object-fit:cover;object-position:50% 15%;background:#cbb083;box-shadow:inset 0 0 0 2px #95724a;border:2px solid #a17d4d;flex-shrink:0}.prep-officer b{display:block;font-size:21px;font-weight:normal;line-height:1.1}.prep-officer span{display:block;font:10px Arial;letter-spacing:1px;color:#725531;margin:5px 0}.prep-officer em{display:block;font-size:13px;font-style:normal;color:#5b3a24;line-height:1.2}.panel-hint{display:block;text-align:center;font-size:12px;color:#74583b;padding-top:8px;flex-shrink:0}
.prep-preview{position:relative;min-width:0;min-height:0}#prepCanvas{width:100%;height:100%;outline:none;touch-action:none;display:block;background:transparent}.preview-controls{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;gap:10px;align-items:center;white-space:nowrap;color:#ebd5a8;text-shadow:0 2px 5px #000;font:10px Arial;letter-spacing:.5px;pointer-events:none}.preview-controls button{width:42px;height:42px;font-size:28px;pointer-events:auto}#prepModelLoading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#edd9b0;font-size:22px;text-shadow:0 2px 5px #000}#prepModelLoading[hidden]{display:none}
.prep-bottom{display:grid;grid-template-columns:.65fr 1.1fr 1.7fr 1fr .4fr 1fr;align-items:center;gap:20px;padding:8px 24px;border:4px double #916d41;min-height:0}
#prepVital{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}#prepVital span{font-size:12px;color:#755835}#prepVital b{font-size:27px;font-weight:normal}.prep-orders{display:flex;flex-direction:column;gap:10px;align-items:center;font-size:12px}.prep-orders b{font-size:30px;font-weight:normal}
#prepMovement{display:flex;flex-direction:column;gap:14px}.speed-stat,.maneuver-stat{display:flex;flex-direction:column;gap:3px}.speed-stat>span,.maneuver-stat>span{font-size:11px;letter-spacing:1px;color:#725634}.speed-stat>b,.maneuver-stat>b{font-size:26px;font-weight:normal;white-space:nowrap}.speed-stat b small,.maneuver-stat b small{font-size:12px;font-weight:normal;color:#705437}
.battle-launch{position:relative;min-height:72px;padding:12px 15px;font-size:21px;letter-spacing:1px;background:linear-gradient(#a75435,#773821);border:3px double #b79056;color:#f2dfb6;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)}.battle-launch span{display:block;font-size:11px;letter-spacing:0;margin-top:7px;color:#e2d09f}
.hull-diagram{position:relative;width:100%;height:136px;margin:0;min-width:220px}.horizontal-hull{position:absolute;left:20%;top:36%;width:60%;height:28%}.hull-facet{position:absolute;text-align:center;line-height:1.1;color:var(--ink);min-width:66px}.hull-facet small{display:block;font-size:11px;font-weight:normal;white-space:nowrap;color:#755739}.hull-facet span{display:block;margin-top:4px;font-size:15px;white-space:nowrap}.hull-facet b{font-weight:normal}.hull-facet i{font-size:12px;font-style:normal}.stat-armour{color:#735037}.stat-guns{color:#333434}.facet-0{right:0;top:43%}.facet-2{left:0;top:43%}.facet-3{left:50%;top:2px;transform:translateX(-50%)}.facet-1{left:50%;bottom:14px;transform:translateX(-50%)}.hull-diagram figcaption{position:absolute;bottom:-4px;left:0;right:0;font-size:9px;text-align:center;color:#785b3b;letter-spacing:.4px}.hull-diagram.compact{height:110px;min-width:0}.compact .hull-facet{min-width:51px}.compact .hull-facet small{font-size:8px}.compact .hull-facet span{font-size:13px;margin-top:2px}.compact .hull-facet i{font-size:9px}.compact .horizontal-hull{left:23%;width:54%}.compact .facet-1{bottom:12px}.compact figcaption{font-size:8px}
.mast-diagram{display:flex;justify-content:center;gap:12px;position:relative;min-width:125px;height:133px;margin:0;padding-bottom:12px}.mast-condition{display:flex;flex-direction:column;align-items:center;min-width:49px;gap:3px;justify-content:center}.mast-condition svg{height:60px;width:50px;flex-shrink:0}.mast-condition small{font-size:10px;color:#775a3b}.mast-condition b{font-size:18px;font-weight:normal;white-space:nowrap}.mast-condition em{font-style:normal;font-size:12px;color:#7e6343}.mast-condition.destroyed svg{opacity:.45}.mast-condition.destroyed b{color:#8e4031}.mast-diagram figcaption{position:absolute;left:0;right:0;bottom:0;text-align:center;font-size:10px;letter-spacing:1px;color:#775a3b}.mast-diagram.compact{height:49px;min-width:0;gap:5px;padding-bottom:0}.compact .mast-condition{display:grid;grid-template-columns:22px 48px;gap:0 1px;min-width:0}.compact .mast-condition svg{width:21px;height:40px;grid-row:1/3}.compact .mast-condition small{font-size:8px}.compact .mast-condition b{font-size:11px}.compact .mast-condition em{font-size:8px}.mast-diagram.compact figcaption{display:none}
.hull-diagram:not(.compact){max-width:420px;margin:auto}.hull-diagram:not(.compact) .horizontal-hull{left:50%;transform:translateX(-50%);top:34px;width:62%;height:65px;max-width:245px}
#prepPopover[hidden]{display:none}#prepPopover{position:absolute;z-index:20;padding:18px;border:4px double #936b3b;max-height:calc(100% - 255px);overflow:auto;touch-action:pan-y;box-shadow:0 15px 45px #0009,inset 0 0 24px #7c4d2022}
#prepPopover h3{margin:0 20px 12px 0;font-size:18px;font-weight:normal;letter-spacing:.5px;border-bottom:1px solid #a78655;padding-bottom:10px}.popover-close{position:absolute;right:6px;top:5px;width:30px;height:30px;font-size:23px;padding:0}
.officer-candidate,.equipment-candidate{display:flex;align-items:center;gap:12px;width:100%;min-height:100px;margin-bottom:8px;padding:10px;text-align:left;background:#f3e4c244;border:1px solid #a17b47;box-shadow:none}
.officer-candidate.assigned,.equipment-candidate.assigned{border:2px solid #9b5031;background:#dbbb8344}
.officer-candidate img{width:70px;height:85px;object-fit:cover;object-position:50% 20%;flex-shrink:0;border:1px solid #9f7845;background:#d8bd8c}.equipment-candidate img{width:62px;height:62px;object-fit:contain;flex-shrink:0}.officer-candidate>div,.equipment-candidate>div{min-width:0}.officer-candidate b,.equipment-candidate b{font-size:19px;display:block;font-weight:normal}.officer-candidate small{font:10px Arial;color:#80613b;letter-spacing:1px;display:block;margin:5px 0}.officer-candidate strong{display:block;font-size:13px;color:#6c3d25;margin:7px 0 3px}.officer-candidate span,.equipment-candidate span{display:block;font-size:12px;line-height:1.35;color:#61452e}.officer-candidate em,.equipment-candidate em{display:block;font-size:12px;font-style:normal;color:#92492b;margin-top:9px;letter-spacing:.8px}
@media(min-width:2200px){#preparation{padding:24px 38px 26px;grid-template-rows:145px minmax(0,1fr) 190px;gap:20px}.prep-main{gap:30px}.equipment-slot>img{width:84px;height:84px}.equipment-slot small{font-size:16px}.equipment-slot b{font-size:23px}.prep-officer .officer-mini{width:95px;height:115px}.prep-officer b{font-size:26px}.prep-officer small{font-size:17px}.prep-officer em{font-size:16px}.prep-heading h1{font-size:58px}.hull-facet span{font-size:20px}.hull-facet small{font-size:13px}.mast-condition b{font-size:22px}.speed-stat>b,.maneuver-stat>b{font-size:32px}.battle-launch{font-size:26px}#prepPopover{padding:22px}.officer-candidate b{font-size:23px}.officer-candidate span,.equipment-candidate span{font-size:14px}}
@media(max-width:1500px){#preparation{padding:12px 16px 15px;grid-template-rows:102px minmax(0,1fr) 145px;gap:10px}.prep-main{grid-template-columns:minmax(215px,20%) minmax(0,1fr) minmax(250px,22%);gap:12px}.prep-heading h1{font-size:35px}.prep-heading>span{font-size:12px}.prep-heading button{font-size:11px;padding:6px 16px;min-height:34px}.prep-location{font-size:12px}.prep-equipment,.prep-posts{padding:9px 10px}.prep-equipment h2,.prep-posts h2{font-size:15px;padding-bottom:5px;margin-bottom:5px}.prep-posts h2 small{font-size:12px}.equipment-slot{gap:6px;padding:4px 0}.equipment-slot>img{width:48px;height:48px}.equipment-slot small{font-size:10px;margin-bottom:3px}.equipment-slot b{font-size:14px}.equipment-slot span{font-size:10px;margin-top:2px}.prep-officer{gap:7px;padding:4px 0}.prep-officer .officer-mini{width:56px;height:64px}.prep-officer b{font-size:16px}.prep-officer small{font-size:10px;margin-bottom:3px}.prep-officer em{font-size:10px}.prep-officer span{font-size:8px;margin:3px 0}.panel-hint{font-size:10px;padding-top:5px}.preview-controls span{display:none}.prep-bottom{padding:7px 13px;gap:10px;grid-template-columns:.6fr 1fr 1.8fr 1fr .4fr .95fr}.hull-diagram{height:115px;min-width:185px}.hull-facet{min-width:51px}.hull-facet small{font-size:9px}.hull-facet span{font-size:12px}.hull-facet i{font-size:10px}.hull-diagram figcaption{font-size:8px}.mast-diagram{height:117px;gap:6px;min-width:110px}.mast-condition{min-width:40px}.mast-condition svg{height:45px;width:35px}.mast-condition b{font-size:15px}.mast-condition em{font-size:10px}.speed-stat>b,.maneuver-stat>b{font-size:20px}.speed-stat>span,.maneuver-stat>span{font-size:9px;letter-spacing:.3px}.speed-stat b small,.maneuver-stat b small{font-size:10px}#prepVital span{font-size:9px}#prepVital b{font-size:20px}#prepVital{gap:7px}.battle-launch{font-size:17px;min-height:65px;padding:9px}.battle-launch span{font-size:10px}.prep-orders{font-size:9px}.prep-orders b{font-size:25px}#prepMovement{gap:10px}}
@media(max-height:760px){#preparation{grid-template-rows:90px minmax(0,1fr) 130px;padding-top:8px;padding-bottom:8px}.prep-heading h1{font-size:31px;margin:3px 0 6px}.equipment-slot>img{height:40px;width:40px}.prep-officer .officer-mini{height:56px;width:50px}.prep-officer em{font-size:9px}.prep-equipment h2,.prep-posts h2{font-size:14px}.panel-hint{font-size:9px}.prep-bottom{gap:8px}}
/* Final parchment contrast and schematic registration at real viewport sizes. */
.prep-equipment,.prep-posts{clip-path:polygon(1px 0,25% 1px,51% 0,78% 2px,calc(100% - 2px) 0,100% 22%,calc(100% - 1px) 49%,100% 77%,calc(100% - 2px) 100%,75% calc(100% - 1px),50% 100%,23% calc(100% - 2px),0 100%,1px 74%,0 51%,2px 27%)}
#coreCrew,#coreCrew .part-meter{background:transparent!important;background-image:none!important;color:var(--ink)!important;box-shadow:none!important}
#hud #coreCrew .part-meter span,#hud #coreCrew .part-meter b{color:var(--ink)!important}
.ability-tags{font:10px Arial!important;letter-spacing:.3px!important;color:#7b5a32!important;margin:4px 0!important}
#hud .ability,#hud .weapon,#hud #endTurn{background-color:var(--paper);background-image:var(--paper-image);color:var(--ink);border-color:#856134;box-shadow:inset 0 0 0 2px #c4a570}
#hud button:disabled{filter:none;opacity:.45}#hud .part-meter{background:transparent;border:0;box-shadow:none}
#hud .ability img.hud-art{display:block;width:40px;height:38px;object-fit:contain;margin:auto}
#hud .weapon img.hud-art{display:block;width:31px;height:24px;object-fit:contain;margin:auto}
.hull-diagram:not(.compact) .horizontal-hull{top:32px;height:53px}
.hull-diagram:not(.compact) .facet-1{bottom:12px}
.mast-diagram.compact .mast-condition{grid-template-columns:17px 40px}.mast-diagram.compact .mast-condition svg{width:17px;height:34px}
@media(min-width:2200px){.hull-diagram:not(.compact){height:150px}.hull-diagram:not(.compact) .horizontal-hull{top:42px;height:60px}.hull-diagram:not(.compact) .facet-1{bottom:9px}}
@media(max-width:1500px){.hull-diagram:not(.compact) .horizontal-hull{top:31px;height:40px}.hull-diagram:not(.compact) .facet-1{bottom:11px}}
