#hud{position:absolute;left:40px;top:800px;width:1840px;height:266px;padding:12px 14px;display:grid;grid-template-columns:minmax(0,1fr) 390px minmax(0,1fr) 110px;gap:12px;align-items:center;background-color:var(--paper);background-image:var(--paper-image);border:3px double #87643a;border-radius:22px 22px 6px 6px;box-shadow:0 4px 25px #0007,inset 0 0 0 3px #d7b57d;color:var(--ink);pointer-events:auto}
.hud-wing{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-self:stretch;gap:8px}.hud-wing .post{position:relative!important;inset:auto!important;width:auto;height:auto;min-width:0;border-right:1px solid #9f7a4944;padding:8px 4px}.hud-wing .post:last-child{border:0}
#hud .post-name{position:absolute;left:0;top:0;width:100%;font-size:20px;line-height:23px;text-align:center;background:none}.officer-name{position:absolute!important;left:0!important;top:27px!important;width:100%!important;height:40px;font-size:17px;line-height:19px;text-align:center;background:none!important;white-space:normal}
#hud .portrait{position:absolute;left:6px;top:82px;width:82px;height:111px;border:2px solid #8e683d;box-shadow:inset 0 0 0 2px #dac18a;overflow:hidden}#hud .portrait img{object-fit:cover;object-position:center 24%}#hud .portrait .sigil{display:none}
#hud .ability-column{position:absolute;left:100px;right:auto;top:72px;display:flex;flex-direction:column;gap:10px;width:68px}.ability-column .ability{position:relative!important;inset:auto!important;width:66px;height:66px;margin:0;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:31px;border:2px solid #8b6537}.ability-column .ability svg{width:36px;height:36px}.ability-column .slot-cost{position:absolute;bottom:2px;left:0;width:100%;font:11px Georgia;text-align:center}.ability-column .cooldown-counter{display:none;position:absolute;inset:0;align-items:center;justify-content:center;font:bold 33px Georgia;background:#362a22a8;color:#fff0c2;padding-bottom:9px}.ability.recovering .cooldown-counter{display:flex}.ability.recovering .slot-cost{z-index:2;color:#ffedc5}.ability.recovering:disabled{opacity:.85!important}
#hudCore{position:relative;align-self:stretch;min-width:0;border-left:1px solid #8c6b4366;border-right:1px solid #8c6b4366;padding:0 5px}#hudCore>div,#hudCore>button{position:relative!important;inset:auto!important}#hud #resources{height:26px;display:flex;justify-content:center;gap:20px;font-size:15px;width:auto;line-height:20px}#hud #resources b{font-size:20px}#hud #moveMode{display:flex;width:166px;height:27px;align-items:center;justify-content:center;gap:8px;margin:0 auto 2px;font-size:17px}#moveMode small{font-size:12px!important}
#batteryPanel{position:relative!important;height:112px;width:100%}#hud #batteryPanel .weapon{position:absolute!important;width:60px;height:45px;display:grid;grid-template-columns:30px 18px;grid-template-rows:25px 12px;align-content:center;justify-content:center;gap:0;padding:2px;line-height:12px}#batteryPanel .weapon .hud-art{width:29px!important;height:24px!important;margin:0!important}#batteryPanel .weapon b{font-size:17px;align-self:center}#batteryPanel .weapon small{grid-column:1/-1;font-size:10px!important;line-height:12px!important}#hud #bowFire{left:calc(50% - 30px);top:0}#hud #sternFire{left:calc(50% - 30px);top:67px}#hud #portFire{left:2px;top:34px}#hud #starboardFire{right:2px;left:auto;top:34px}
#hud #coreArmor{position:absolute!important;left:68px;top:28px;width:242px;height:63px}#coreArmor .hull-diagram{height:63px!important;margin:0}#coreArmor .horizontal-hull{position:absolute;width:100%;height:34px;left:0;top:13px}#coreArmor .hull-facet{display:none}#coreArmor figcaption{display:none}#hud #ammoStatus{height:20px;line-height:20px;width:auto;font-size:12px;text-align:center;white-space:nowrap}
#coreVitals{display:flex;justify-content:center;gap:10px;align-items:center;height:27px}#hud #coreStatus{position:static;width:auto;height:auto;background:none;border:0;padding:0;line-height:18px;font-size:13px}#hud #coreName,#hud #coreBar{display:none}#hud #coreHull{font-size:13px}#hud #coreCrew{position:static!important;width:auto;height:auto;padding:0;line-height:18px;background:transparent!important}#hud #coreCrew .part-meter{display:flex;align-items:center;gap:6px;margin:0}#coreCrew .part-meter>i{display:none}#hud #coreCrew .part-meter b,#hud #coreCrew .part-meter span{font-size:13px;line-height:18px}#hud #inspectSelf{position:static;width:26px;height:23px;font-size:23px;line-height:18px}
#hud #coreMasts{height:34px;width:100%;display:flex;justify-content:center}#coreMasts .mast-diagram{display:flex;justify-content:center;gap:14px;margin:0;width:auto;height:34px}#coreMasts .mast-condition{display:grid;grid-template-columns:22px 57px;grid-template-rows:14px 17px;align-items:center;gap:0 3px;text-align:left}#coreMasts svg{width:20px;height:31px;grid-row:1/-1}#coreMasts small{font-size:10px}#coreMasts b{font-size:12px;line-height:14px}#coreMasts b em{font-size:10px}#coreMasts figcaption{display:none}#hud #turnStat{font-size:11px;text-align:center;width:100%;height:16px;line-height:16px;background:none;padding:0;border:0}
#hud #endTurn{position:relative!important;inset:auto!important;width:103px;height:103px;align-self:center;font-size:14px;line-height:18px;border-radius:50%;border:4px double #927043;box-shadow:inset 0 0 0 4px #c7a870,0 1px 8px #583b2633}#endTurn span{font-size:27px;line-height:29px}#endTurn kbd{font-size:10px;color:var(--ink)}
#initiative{left:640px;top:40px;width:640px;height:90px;text-align:center}.queue-caption{display:none}.queue-line{display:flex;justify-content:center;align-items:center;gap:12px}.initiative-unit{position:relative;width:63px;height:63px;padding:2px;background-color:var(--paper);background-image:var(--paper-image);border:2px solid #b29459;clip-path:none;border-radius:4px;display:block;box-shadow:none}.initiative-unit img{width:100%;height:100%;object-fit:contain;filter:none}.initiative-unit.enemy{border:3px solid #ba4a3d}.initiative-unit.current{box-shadow:0 0 0 2px #e8c26c,0 0 12px #dcb35399}.initiative-unit.current:before{content:'▼';position:absolute;top:-23px;left:calc(50% - 8px);font-size:19px;color:#edc775}.initiative-unit.passed{opacity:.5;filter:grayscale(.6)}.queue-number{position:absolute;left:2px;top:0;font:10px Arial;color:#523824}.queue-arrow{font-size:22px;color:#dac188}.next-round{font-size:22px;color:#c7b687;padding:0;width:auto}.initiative-unit span:not(.queue-number){display:none}
#round{display:block!important;position:fixed;top:99px;left:50%;transform:translateX(-50%);font-size:11px;letter-spacing:1.5px;color:#d9c48c}#modeHint{top:771px;font-size:16px}#log{top:610px;left:1600px;width:285px;max-height:130px;overflow:hidden}
#hud .weapon:disabled{opacity:.45}#hud .ability:focus-visible,#hud .weapon:focus-visible,.initiative-unit:focus-visible{outline:3px solid #a23e25;outline-offset:3px}#hud .ability.active,#hud .weapon.active{border-color:#346865;box-shadow:inset 0 0 0 2px #7daa92}

#hud #resources{height:22px;font-size:14px}#hud #moveMode{height:23px;margin-bottom:0}#batteryPanel{height:105px!important}#hud #ammoStatus{height:15px;line-height:15px;font-size:11px}#coreVitals{height:20px}#hud #coreMasts{height:29px}#coreMasts .mast-diagram{height:29px}#coreMasts svg{height:27px}#hud #turnStat{height:13px;line-height:13px;font-size:10px}#hud #batteryPanel .weapon{width:73px;height:41px}#hud #bowFire,#hud #sternFire{left:calc(50% - 36px)}#hud #sternFire{top:64px}#hud #portFire,#hud #starboardFire{top:31px}#batteryPanel .weapon small{font-size:9px!important}#hud #coreArmor{left:80px;top:25px;width:216px;height:63px}

#hud #batteryPanel .weapon small{position:static!important;inset:auto!important;display:block;white-space:nowrap;width:100%;overflow:visible;letter-spacing:0;font:9px/12px Georgia!important;align-self:center}.initiative-unit.passed{opacity:.8;filter:none}.initiative-unit.passed img{filter:grayscale(.75)}

#hud{border:0;border-radius:0;background:none;box-shadow:none;isolation:isolate}#hud:before{content:'';position:absolute;inset:0;background:url('assets/hud-frame-v8.svg') center/100% 100% no-repeat;z-index:-1;pointer-events:none;filter:drop-shadow(0 3px 8px #0005)}

#hud #batteryPanel .weapon{overflow:visible}#hud #batteryPanel .weapon:before{content:'';position:absolute;inset:-12px 0;z-index:1}.queue-caption{display:block;position:absolute;left:0;top:72px;width:100%;height:17px;font:14px Georgia;letter-spacing:1.4px;color:#d3be91;background:none;border:0;padding:0}#round{display:none!important}#hud #inspectSelf{position:relative}#inspectSelf:before{content:'';position:absolute;inset:-18px -20px}

#hud .post-name{top:12px}.officer-name{top:39px!important}#hud .portrait{top:90px}#hud .ability-column{top:84px}

/* Ship pictogram faces right: align all four battery controls with its local directions. */
#hud #portFire{left:calc(50% - 36px);right:auto;top:0}#hud #starboardFire{left:calc(50% - 36px);right:auto;top:64px}#hud #bowFire{left:auto;right:2px;top:31px}#hud #sternFire{left:2px;right:auto;top:31px}

#hud #turnStat{display:flex;justify-content:center;gap:12px;white-space:nowrap}#turnStat span{display:inline-block}#turnStat b{font-size:inherit}

/* Sailing orders share the movement row; the centre stays inside the parchment frame. */
#hud{top:748px;height:318px}#modeHint{top:719px}
#hud #navCommands{height:74px;display:flex;justify-content:center;align-items:flex-start;gap:9px;padding:2px 0}
#hud #navCommands #moveMode{position:relative!important;inset:auto!important;width:120px;height:58px;flex:0 0 120px;flex-direction:column;gap:4px;font-size:25px;margin:0}
#hud #navCommands #moveMode small{font-size:10px!important}
#hud #sailControl{width:234px;min-width:0}#sailChoices{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
#sailChoices button{width:100%;height:58px;padding:2px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;position:relative;border:2px solid #9b784a;color:var(--ink);background-color:var(--paper);background-image:var(--paper-image)}
#sailChoices img{width:25px;height:23px;object-fit:contain}#sailChoices b{font:bold 9px/11px Georgia}#sailChoices small{font:9px/11px Georgia;white-space:nowrap}
#sailChoices .rig-half{clip-path:inset(0 0 35% 0)}#sailChoices .rig-stowed{opacity:.45;filter:grayscale(1)}
#sailChoices button.current{border-color:#8a532c}#sailChoices button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #4a8078;border-color:#436963}#sailChoices button.queued:after{content:'↻';position:absolute;top:0;right:2px;font-size:12px;color:#9d3c28}
#sailChoices button:disabled{opacity:.6}#sailChoices button:focus-visible{outline:3px solid #a23e25;outline-offset:2px}
#sailOrder{height:13px;line-height:13px;font-size:9px;text-align:center;white-space:nowrap}
#hud .post-name{top:22px}.officer-name{top:49px!important}#hud .portrait{top:115px}#hud .ability-column{top:109px}
@media(pointer:coarse){#hud{top:740px;height:326px}#modeHint{top:711px}#hud #navCommands{height:82px}#sailChoices button{height:66px}#hud #navCommands #moveMode{height:66px}}

#hud #boardingAction{position:absolute!important;left:4px!important;right:4px!important;top:auto!important;bottom:0!important;width:calc(100% - 8px);height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:2px;border:2px solid #806039;font:bold 12px Georgia;background-color:var(--paper);background-image:var(--paper-image);color:var(--ink)}
#boardingAction img{width:30px;height:30px;object-fit:contain}#boardingAction small{display:block;font:9px Georgia;margin-top:3px}#boardingAction:disabled{opacity:.45}#boardingAction.active{border-color:#49736b}
@media(pointer:coarse){#hud #boardingAction{height:66px}}
#boardingScene{position:fixed;top:18px;left:50%;transform:translateX(-50%);width:min(680px,calc(100vw - 32px));padding:14px 24px;z-index:95;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:7px;color:var(--ink);background-color:var(--paper);background-image:var(--paper-image);border:4px double #8a6339;box-shadow:0 5px 22px #0007;clip-path:polygon(2% 0,98% 0,100% 10%,100% 90%,98% 100%,2% 100%,0 90%,0 10%)}
#boardingScene[hidden]{display:none!important}#boardingScene h2{font:bold 24px Georgia;letter-spacing:3px;margin:0}#boardingNames{font:18px Georgia}#boardingCrews{font:18px Georgia;color:#543926}#boardingProgress{font:12px Georgia}

#coursePreview.ram-preview{width:360px;border:2px solid #9c493a;text-align:left;padding:12px;pointer-events:none}#coursePreview.ram-preview span,#coursePreview.ram-preview small{display:block;margin-top:5px}#coursePreview.ram-preview b{color:#793d2f}#coursePreview.ram-preview small{font-size:11px}
