.ocean-main{max-width:1120px;margin:auto;padding:18px 18px 28px;color:#163845}.ocean-main nav{font-size:14px}.ocean-main h1{font-size:28px;margin:16px 0 6px}.intro{margin:0 0 14px}.ocean-main a{color:#17688a}#stage{position:relative;background:#9bcde0;border-radius:12px;overflow:hidden;height:min(62vh,620px);min-height:380px}#ocean{display:block;width:100%;height:100%;touch-action:none;cursor:grab}#ocean:active{cursor:grabbing}.top-controls{position:absolute;right:12px;top:12px;display:flex;gap:6px}.ocean-main button,.ocean-main select{font:inherit;border:1px solid #aac3cd;border-radius:7px;background:#fff;color:#163845;padding:8px 11px;cursor:pointer}.ocean-main button:focus-visible,.ocean-main select:focus-visible{outline:3px solid #e9bb48}#position{position:absolute;left:12px;top:16px;font-size:12px;color:#fff;text-shadow:0 1px 3px #143d52;pointer-events:none}#move-pad{position:absolute;bottom:20px;left:20px;width:106px;height:106px;border:1px solid #ffffff8a;background:#ffffff20;border-radius:50%;touch-action:none;user-select:none;display:grid;place-items:center;color:white;font-size:12px}#move-pad i{position:absolute;width:42px;height:42px;border-radius:50%;background:#ffffff66;border:1px solid #ffffffaa;pointer-events:none}#move-pad span{transform:translateY(37px);pointer-events:none}.look-hint{position:absolute;right:18px;bottom:24px;color:#fff;font-size:12px;text-shadow:0 1px 3px #143d52;pointer-events:none}.options{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0;font-size:13px}.instructions,#performance{border-top:1px solid #d3e0e5;padding:12px 0;font-size:14px}.instructions summary,#performance summary{cursor:pointer}#stats{white-space:pre-wrap;font-size:12px}#error{position:absolute;inset:0;background:#eff6f8;padding:55px 25px;line-height:1.8}#stage:fullscreen{height:100vh;border-radius:0}body{background:#f4f8fa}@media(max-width:600px){.ocean-main{padding:12px}.ocean-main h1{font-size:24px}.intro{font-size:14px}#stage{height:62vh;min-height:360px}.top-controls{top:10px;right:8px;gap:4px}.ocean-main button{font-size:12px;padding:7px}#position{top:49px;left:10px;font-size:11px}#move-pad{width:94px;height:94px;left:14px;bottom:18px}.look-hint{right:12px}.options span{font-size:12px}}

.ocean-main .top-controls button{min-height:44px;min-width:44px}

body{margin:0;font-family:Arial,'Noto Sans JP','Yu Gothic',Meiryo,sans-serif}

.fire-controls{position:absolute;right:12px;bottom:14px;text-align:right;color:white;font-size:12px;text-shadow:0 1px 3px #143d52}.fire-controls>div{display:flex;gap:6px;margin-top:6px}.ocean-main .fire-controls button{min-width:80px;min-height:44px;background:#fff;color:#163845}.ocean-main .fire-controls button:disabled{opacity:.65;cursor:default}.look-hint{bottom:91px}@media(max-width:600px){.fire-controls{right:10px;bottom:14px}.ocean-main .fire-controls button{min-width:76px;padding:8px}.look-hint{bottom:92px}}

#ship-health{position:absolute;left:12px;top:48px;width:170px;background:#ffffffd9;border:1px solid #ffffffc0;border-radius:8px;padding:8px 10px;color:#163845;font-size:12px;pointer-events:none}#ship-health>div+div{margin-top:7px}#ship-health progress{display:block;width:100%;height:6px;margin-top:3px;accent-color:#267550}@media(max-width:600px){#ship-health{left:10px;top:76px;width:157px;padding:7px 8px;font-size:11px}}

#view-panel{position:absolute;right:12px;top:64px;color:#163845;font-size:12px;z-index:2}#view-mode{min-height:44px;width:100%}#external-view label{display:flex;justify-content:space-between;margin-top:8px}#external-view input{width:100%;height:44px;margin:0;cursor:pointer}#external-view[hidden]{display:none}@media(max-width:600px){#view-panel{top:60px;right:8px}}

@media(max-width:600px){.top-controls{max-width:calc(100% - 16px)}.ocean-main .top-controls button{white-space:nowrap}}

#aim-panel{position:absolute;right:84px;top:64px;color:#163845;font-size:12px;z-index:3}#aim-panel>div{padding:8px 10px}#aim-panel label{display:flex;justify-content:space-between;margin-top:8px}#aim-side{width:100%;min-height:44px;margin-top:4px}#aim-panel input{width:100%;height:44px;margin:0;cursor:pointer}.aim-directions{font-size:11px;text-align:center}@media(max-width:600px){#aim-panel{top:60px;right:80px}}#aim-panel input{scroll-margin-top:22px;scroll-margin-bottom:8px}@media(max-width:600px){}

#ship-panel{position:absolute;right:156px;top:64px;color:#163845;font-size:12px;z-index:4}#ship-panel summary{box-sizing:border-box;min-width:64px;min-height:44px;display:grid;place-items:center;cursor:pointer;background:#ffffffed;border:1px solid #aac3cd;border-radius:7px;list-style:none}#ship-panel[open]{right:12px;top:112px;width:230px;max-height:calc(100% - 244px);overflow:auto;scroll-padding-top:44px;background:#ffffffed;border:1px solid #aac3cd;border-radius:8px}#ship-panel[open] summary{position:sticky;top:0;z-index:1;border:0;border-bottom:1px solid #d3e0e5;background:#f5f9fa}#ship-panel>div{padding:8px 10px}#ship-panel label{display:block;margin-top:8px}#ship-panel select{width:100%;min-height:44px;scroll-margin-top:22px}#ship-performance{white-space:pre-line;font-size:11px;line-height:1.6;margin:8px 0 0}@media(max-width:600px){#ship-panel{top:108px;right:8px}#ship-panel[open]{top:156px;right:8px;width:204px;max-height:calc(100% - 276px)}}

#aim-panel select{width:100%;min-height:44px;scroll-margin-top:22px;scroll-margin-bottom:8px}

#prepare-cannons{display:block;margin:0 0 5px auto}.look-hint{bottom:142px}@media(max-width:600px){.look-hint{bottom:142px}}
/* Naval campaign screens reuse the game shell colors and spacing. */
body{background:#f2faf5}.ocean-main{color:#203f32}.ocean-main h1{font-size:24px}.ocean-main button,.ocean-main select{min-height:44px;box-sizing:border-box}.ocean-main button:disabled{opacity:.55;cursor:default}.fullscreen-control{position:absolute;right:10px;top:10px;z-index:12}#battle-controls[hidden],#campaign-overlay[hidden],#ship-panel[hidden]{display:none!important}.top-controls{left:10px;right:auto;top:10px}.top-controls button{font-size:12px}#position{top:auto;bottom:136px;left:12px}#battle-status{position:absolute;left:12px;top:61px;right:82px;color:white;font-size:12px;text-shadow:0 1px 3px #143d52;pointer-events:none}#ship-health{top:88px;width:160px;max-height:calc(100% - 245px);overflow:auto}#view-panel,#aim-panel{top:88px}#campaign-overlay{position:absolute;inset:0;z-index:10;background:#16384566;overflow:auto;overscroll-behavior:contain;padding:64px 16px 20px;box-sizing:border-box;touch-action:pan-y}.campaign-card{box-sizing:border-box;max-width:700px;margin:auto;padding:20px;background:#f8fcf9;border:1px solid #c9decf;border-radius:10px;box-shadow:0 3px 12px #17372730;color:#203f32;overflow-wrap:anywhere}.campaign-card h2{font-size:22px;margin:0 0 12px}.campaign-card h3{font-size:17px;margin:18px 0 8px}.campaign-card h4{font-size:15px;margin:0 0 6px}.campaign-card p{font-size:14px;line-height:1.6}.campaign-card label{display:block;margin:8px 0 5px}.campaign-card select{width:100%}.campaign-card button{margin:5px 6px 5px 0}.campaign-card button.primary{background:#267550;border-color:#267550;color:#fff;font-weight:bold;width:100%;margin:8px 0}.campaign-card fieldset{border:1px solid #c9decf;border-radius:7px;margin:14px 0;padding:8px 12px}.campaign-card fieldset label{min-height:44px;display:flex;align-items:center;gap:6px;margin:0}.future{color:#64716a}.setting-help{margin:5px 0 12px;color:#53685d}.reward{font-weight:bold}.departure{background:#e5f3e9;border:1px solid #bdd7c5;padding:4px 12px 10px;border-radius:8px}.shop-list,.mount-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-list article,.mount-list article{border:1px solid #c9decf;padding:12px;border-radius:8px;min-width:0}.shop-list p{margin:5px 0}.shop-list button,.mount-list button{width:100%;margin:5px 0}.mount-list label{margin-top:0}.cannon-description{font-size:12px!important}#campaign-error{color:#a52e25;border:1px solid #dfb5ae;background:#fff3ee;padding:10px}#error{z-index:20}.howto-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.howto-cards article{background:#eaf5ed;border:1px solid #d0e2d5;border-radius:8px;padding:12px}.instructions h2{font-size:18px;margin:0 0 12px}.instructions h3{font-size:15px;margin:0 0 8px}.instructions p{line-height:1.7}.instructions details{margin-top:14px}.instructions summary{min-height:44px;display:flex;align-items:center}#stage:fullscreen #campaign-overlay{padding-top:64px;padding-bottom:max(20px,env(safe-area-inset-bottom))}@media(max-width:600px){.ocean-main h1{font-size:22px}#stage{height:72vh;min-height:460px}.campaign-card{padding:14px}#campaign-overlay{padding:64px 10px 16px}.shop-list,.mount-list,.howto-cards{grid-template-columns:1fr}.campaign-card h2{font-size:20px}.top-controls{gap:4px}.top-controls button{padding:7px;font-size:11px}#battle-status{left:10px;top:61px;right:10px;font-size:11px}#ship-health{left:10px;top:86px;width:142px}#view-panel,#aim-panel{top:86px}.look-hint{display:none}#position{font-size:10px;bottom:124px}#move-pad{left:10px;bottom:16px;width:88px;height:88px}.fire-controls{right:8px}.ocean-main .fire-controls button{min-width:72px;padding:8px}.campaign-card button{font-size:14px}.campaign-card select{font-size:14px}}

#campaign-overlay.menu-screen{padding-top:60px}.menu-screen .campaign-card{max-width:620px;padding:14px 18px}.menu-screen h2{margin-bottom:6px;font-size:20px}.menu-screen p{margin:6px 0;font-size:13px}.menu-screen fieldset{margin:10px 0;padding:4px 10px;display:flex;flex-wrap:wrap;gap:4px 16px}.menu-screen fieldset label{display:inline-flex;margin:0}.menu-screen .menu-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px}.menu-screen .menu-settings label{margin:0 0 4px}.menu-screen .setting-help{font-size:12px;margin:5px 0}.menu-screen button.primary{margin:8px 0 0}@media(max-width:600px){#campaign-overlay.menu-screen{padding-top:60px}.menu-screen .campaign-card{padding:12px}.menu-screen fieldset{gap:0 10px}.menu-screen fieldset label{font-size:12px}.menu-screen .menu-settings{gap:10px}}

#stage.menu-background{background-color:#9bcde0;background-image:url("assets/menu-sea.webp");background-size:cover;background-position:center}#stage.menu-background #ocean{visibility:hidden}
#stage.menu-background[data-menu-scene="port"]{background-image:url("assets/menu-port.webp")}#stage.menu-background[data-menu-scene="quests"]{background-image:url("assets/menu-quests.webp")}#stage.menu-background[data-menu-scene="shop"]{background-image:url("assets/menu-shop.webp")}#stage.menu-background[data-menu-scene="maintenance"]{background-image:url("assets/menu-maintenance.webp")}

.fire-controls .broadside-controls{align-items:flex-end;gap:6px}.broadside{width:128px;min-width:0}.reload-panel{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;height:44px;margin-bottom:5px;padding:4px;background:#123c4ade;border-radius:5px;text-align:center;text-shadow:none}.reload-panel:empty{display:none}.mount-reload{display:grid;grid-template-rows:12px 22px;justify-items:center;gap:2px;font-size:11px;line-height:12px;min-width:0}.reload-bar{position:relative;display:block;width:10px;height:22px;background:#577481;border-radius:2px;overflow:hidden}.reload-fill{position:absolute;inset:0;display:block;background:#eabf58;transform:scaleY(0);transform-origin:center bottom}.mount-reload.ready{color:#b7f5c4}.mount-reload.ready .reload-fill{background:#69dc8d}.broadside>button{width:100%;min-height:44px}.fire-controls #cannon-status{display:block;margin-top:4px}#position{bottom:184px;right:12px}.look-hint{bottom:184px}#ship-health{max-height:max(72px,calc(100% - 325px))}
@media(max-width:600px){.fire-controls{width:calc(100% - 110px);max-width:262px}.broadside{flex:1;width:auto}.ocean-main .broadside>button{min-width:0;font-size:11px;padding:8px 2px;min-height:44px}.fire-controls #cannon-status{font-size:11px}#position{bottom:184px;right:10px;font-size:11px}}
#stage:fullscreen{min-height:0}
@media(min-width:700px) and (max-height:520px){
 #stage:fullscreen .fire-controls{width:262px;right:12px;bottom:14px}
 #stage:fullscreen .broadside{width:auto;flex:1}
 #stage:fullscreen #ship-health{top:88px;max-height:110px;width:160px}
 #stage:fullscreen #position{left:12px;right:auto;top:auto;bottom:136px;width:186px;font-size:11px}
 #stage:fullscreen .look-hint{display:none}
}
@media(max-width:360px){#ship-health{width:min(142px,calc(100% - 180px))}}

#stage .right-controls{position:absolute;right:10px;top:10px;z-index:12;display:flex;gap:6px}#stage .right-controls button{position:static;flex:none;white-space:nowrap;font-size:12px;padding:8px}@media(max-width:380px){#stage .top-controls{gap:3px;left:6px}#stage .top-controls button{padding:4px;font-size:11px}#stage .right-controls{right:6px}#stage .right-controls button{padding:6px;font-size:11px}}
/* Harbor menus and local cooperative controls. */
.port-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}.port-tabs button[aria-pressed=true]{background:#267550;color:white;border-color:#267550}.campaign-card .menu-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.campaign-card .save-status{font-size:12px;color:#53685d}.campaign-card select{max-width:100%}.campaign-card form{margin:0}.campaign-card{max-width:850px}.campaign-card nav button{margin:0}.shop-list article{display:flex;flex-direction:column}.shop-list article button{margin-top:auto}.shop-list article button+button{margin-top:5px}#coop-controls[hidden]{display:none!important}#coop-controls{position:absolute;inset:0 0 0 50%;pointer-events:none;color:#fff;font-size:12px;border-left:1px solid #fff8}#coop-controls button,#coop-controls select,#coop-controls input,#coop-controls details{pointer-events:auto}.gunner-heading{position:absolute;left:10px;right:10px;top:62px;text-shadow:0 1px 3px #143d52}.gunner-heading span{display:block;margin-top:4px}#gunner-stations{position:absolute;left:14px;bottom:18px;width:72px;display:grid;gap:6px}#gunner-stations button{width:100%;min-height:44px;padding:8px 6px;touch-action:manipulation}#gunner-stations button[aria-pressed=true]{background:#267550;color:#fff;border-color:#267550}.gunner-actions{position:absolute;right:10px;bottom:18px;display:grid;gap:6px;max-width:calc(100% - 120px)}.gunner-actions button{min-height:44px;min-width:88px}#gunner-aim-panel{position:absolute;right:10px;top:110px;color:#163845;font-size:12px;z-index:4;max-width:calc(100% - 20px)}#gunner-aim-panel summary{min-width:88px;min-height:44px;display:grid;place-items:center;cursor:pointer;background:#ffffffed;border:1px solid #aac3cd;border-radius:7px}#gunner-aim-panel[open]{width:220px;background:#ffffffed;border-radius:7px;max-height:calc(100% - 230px);overflow:auto}#gunner-aim-panel>div{padding:8px 10px}#gunner-aim-panel label{display:flex;justify-content:space-between;margin-top:8px}#gunner-aim-panel input,#gunner-aim-panel select{width:100%;min-height:44px;margin:0}.coop-active .fire-controls,.coop-active #aim-panel,.coop-active .look-hint{display:none!important}.coop-active #view-panel{right:calc(50% + 10px)}.coop-active #ship-health{max-width:calc(50% - 30px)}.coop-active #battle-status{right:calc(50% + 10px)}.coop-active #position{right:calc(50% + 10px);bottom:120px}.coop-active.facing-mode #coop-controls{inset:0 0 50%;transform:rotate(180deg);border-left:0;border-top:1px solid #fff8}.coop-active.facing-mode #move-pad{bottom:12px}.coop-active.facing-mode #view-panel{top:calc(50% + 12px);right:10px}.coop-active.facing-mode #ship-health{top:calc(50% + 62px);max-height:calc(50% - 178px);max-width:calc(100% - 120px);width:160px}.coop-active.facing-mode #battle-status{top:calc(50% + 12px);right:90px}.coop-active.facing-mode #position{left:115px;bottom:18px;right:10px}.coop-active.facing-mode .gunner-heading{top:12px}.coop-active.facing-mode #gunner-aim-panel{top:62px}.coop-active.facing-mode #gunner-aim-panel[open]{left:100px;right:110px;width:auto;max-width:none;max-height:calc(100% - 76px)}.coop-active.facing-mode .top-controls{top:calc(50% - 22px);z-index:5}.coop-active.facing-mode #gunner-stations{bottom:12px}.coop-active.facing-mode .gunner-actions{bottom:12px}
@media(max-width:600px){.campaign-card .menu-settings{grid-template-columns:1fr}.port-tabs button{flex:1 1 100px}.coop-active #ship-health{width:calc(50% - 40px);max-height:calc(100% - 300px)}.coop-active #view-panel{top:110px}.coop-active #move-pad{width:72px;height:72px;left:8px;bottom:12px}#gunner-stations{left:8px;bottom:12px;width:72px}.gunner-actions{max-width:calc(100% - 86px);right:6px;bottom:12px}.gunner-actions button{min-width:0;font-size:11px;padding:6px}.gunner-heading{font-size:11px;left:8px}.coop-active #gunner-aim-panel{right:6px}.coop-active.facing-mode #view-panel{top:calc(50% + 10px)}.coop-active.facing-mode #ship-health{width:142px;max-height:calc(50% - 155px)}.coop-active.facing-mode #position{left:90px;font-size:10px}.coop-active.facing-mode #gunner-aim-panel[open]{left:90px;right:90px;width:auto}}
@media(min-width:601px) and (max-height:550px){#stage{height:82vh;min-height:400px}.coop-active.facing-mode #ship-health{top:calc(50% + 55px);max-height:calc(50% - 125px)}}
.shop-list input[data-ammo-quantity]{box-sizing:border-box;width:100%;min-height:44px;border:1px solid #aac3cd;border-radius:7px;background:#fff;color:#163845;padding:8px 11px;font:inherit;margin-bottom:8px}
/* Screen filling mode for browsers without native fullscreen. */
#stage.fullscreen-fallback{position:fixed;inset:0;width:100vw;width:100dvw;height:100vh;height:100dvh;min-height:0;max-height:none;border-radius:0;z-index:10000;margin:0}
#stage.fullscreen-fallback #campaign-overlay{padding-top:64px;padding-bottom:max(20px,env(safe-area-inset-bottom))}
#stage.coop-active.facing-mode #battle-status{top:calc(50% + 28px);left:12px;right:90px;line-height:16px}
#stage.coop-active.facing-mode #ship-health{box-sizing:border-box;top:calc(50% + 50px);width:174px;max-width:calc(100% - 110px);height:38px;max-height:38px;padding:5px 8px;overflow:hidden;font-size:11px;line-height:13px}
#stage.coop-active.facing-mode #enemy-health{display:none}
#stage.coop-active.facing-mode #ship-health progress{margin-top:3px;height:6px}
#stage.coop-active.facing-mode #view-panel{top:calc(50% + 28px);right:10px}
#stage.coop-active.facing-mode #move-pad{box-sizing:border-box;width:90px;height:90px;bottom:12px}
#stage.coop-active.facing-mode #move-pad span{transform:translateY(31px)}

#stage.coop-active.facing-mode .right-controls{top:calc(50% - 22px);right:10px}
#stage.coop-active.facing-mode .gunner-heading{top:30px}
/* Keep the facing aim panel beside the action buttons. */
@media(min-width:601px){
 #stage.coop-active.facing-mode #gunner-aim-panel,
 #stage.coop-active.facing-mode #gunner-aim-panel[open]{right:126px}
}
@media(max-width:600px){
 #stage.coop-active.facing-mode #gunner-aim-panel[open]{left:96px;right:106px;width:auto}
}

#gunner-actions .reload-panel{margin-bottom:0}


/* Facility panels keep the harbor visible and scroll only their contents. */
#campaign-overlay{background:#38271818}
#campaign-overlay .campaign-card{background:#f7ebd6f2;border:1px solid #795b37;color:#382b20;box-shadow:0 3px 16px #24170d55}
#campaign-overlay h2,#campaign-overlay h3,#campaign-overlay h4{font-family:Georgia,"Times New Roman",serif;color:#4d351d}
#campaign-overlay button,#campaign-overlay select,#campaign-overlay input[type=number]{background:#f4e6cc;color:#382b20;border:1px solid #806544;border-radius:5px}
#campaign-overlay button.primary{background:#664527;border-color:#4b301a;color:#fff6e5}
#campaign-overlay fieldset,#campaign-overlay article{border-color:#b69b72}
#campaign-overlay .departure{background:#ead8b780;border-color:#b69b72}
#campaign-overlay .setting-help,#campaign-overlay .future{color:#6c5940}
#campaign-overlay.port-screen{background:transparent;display:flex;align-items:flex-start;padding:58px 16px 16px;overflow:hidden}
#campaign-overlay.port-screen .campaign-card{width:min(400px,46%);max-width:400px;height:100%;max-height:520px;margin:0;padding:12px;display:flex;flex-direction:column;min-height:0}
.port-screen #campaign-content{display:flex;flex-direction:column;min-height:0;flex:1}
.port-screen .port-summary{flex:none}
.port-screen .port-summary h2{font-size:21px;margin:0 0 4px}
.port-screen .port-summary p{font-size:12px;line-height:1.4;margin:3px 0}
.port-screen .port-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0;flex:none}
.port-screen .port-tabs button{flex:1 1 auto;min-height:44px;margin:0;padding:5px 7px;font-size:12px}
#campaign-overlay.port-screen .port-tabs button[aria-pressed="true"]{background:#664527;color:#fff6e5;border-color:#4b301a}
.port-screen .port-body{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;padding-right:4px;scrollbar-color:#a28760 #eadcc2}
.port-screen .port-body h3{font-size:16px;margin:10px 0 6px}
.port-screen .port-body p{font-size:13px;line-height:1.5;margin:6px 0}
.port-screen .shop-list,.port-screen .mount-list{grid-template-columns:1fr;gap:7px}
.port-screen .shop-list article,.port-screen .mount-list article{padding:9px;background:#fff4de66}
.port-screen .port-footer{flex:none;border-top:1px solid #b69b72;margin-top:8px;padding-top:4px}
.port-screen .port-footer button{font-size:12px;width:100%;margin:0;min-height:44px}
.port-screen #campaign-error{flex:none;max-height:70px;overflow:auto;font-size:12px;margin:6px 0 0;padding:6px}
@media(max-width:600px){
#stage.menu-background[data-menu-scene]{background-size:cover;background-repeat:no-repeat}
#stage.menu-background[data-menu-scene=port]{background-position:60% center}
#stage.menu-background[data-menu-scene=quests]{background-position:70% center}
#stage.menu-background[data-menu-scene=shop]{background-position:10% center}
#stage.menu-background[data-menu-scene=maintenance]{background-position:5% center}
#stage #campaign-overlay.port-screen,#stage:fullscreen #campaign-overlay.port-screen,#stage.fullscreen-fallback #campaign-overlay.port-screen{padding:0 8px 8px;align-items:flex-end}
#campaign-overlay.port-screen .campaign-card{width:100%;max-width:none;height:54%;max-height:none;padding:9px}
.port-screen .port-summary h2{font-size:18px;display:inline;margin-right:8px}
.port-screen .port-summary .reward{display:inline;font-size:11px}
.port-screen .port-summary .save-status{font-size:10px;margin:3px 0 0}
.port-screen .port-tabs{flex-wrap:nowrap;gap:3px;margin:5px 0}
.port-screen .port-tabs button{flex:1;min-width:0;font-size:11px;padding:4px 2px;white-space:nowrap}
.port-screen .port-footer{margin-top:5px;padding-top:4px}
.port-screen .port-footer button{font-size:11px}
}
@media(min-width:601px) and (max-height:520px){
#stage #campaign-overlay.port-screen,#stage:fullscreen #campaign-overlay.port-screen,#stage.fullscreen-fallback #campaign-overlay.port-screen{padding:10px}
#campaign-overlay.port-screen .campaign-card{width:min(350px,44%);max-height:none;padding:9px}
.port-screen .port-summary h2{font-size:18px}
.port-screen .port-summary p{font-size:11px}
.port-screen .port-tabs{gap:3px;margin:5px 0}
.port-screen .port-tabs button{padding:4px;font-size:11px}
.port-screen .port-footer{margin-top:5px;padding-top:4px}
}

/* Separate button navigation and facility contents. */
#campaign-overlay.port-split .campaign-card{position:relative;width:100%;max-width:none;height:100%;max-height:520px;margin:0;padding:0;background:transparent;border:0;box-shadow:none;display:block}
#campaign-overlay.port-split #campaign-content{height:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:12px;min-height:0}
.port-split .port-nav,.port-split .port-detail{box-sizing:border-box;background:#f7ebd6f2;border:1px solid #795b37;border-radius:10px;box-shadow:0 3px 16px #24170d55;color:#382b20;padding:10px;min-height:0}
.port-split .port-nav{width:130px;flex:none;max-height:100%;overflow:auto;overscroll-behavior:contain}
#campaign-overlay.port-split .port-tabs{display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;margin:0}
#campaign-overlay.port-split .port-tabs button{flex:none;width:100%;min-width:0;min-height:44px;margin:0;font-size:12px;padding:6px 3px;white-space:normal}
#campaign-overlay.port-split .port-tabs button[data-action=menu]{margin-top:8px;border-top:2px solid #806544}
.port-split .port-detail{width:min(420px,46%);height:100%;display:flex;flex-direction:column}
.port-split .port-summary{padding-bottom:8px;border-bottom:1px solid #b69b72;margin-bottom:7px}
.port-split .port-body{padding-right:4px}
#campaign-overlay.port-split #campaign-error{position:absolute;left:152px;right:auto;bottom:10px;box-sizing:border-box;width:calc(min(420px,46%) - 20px);max-height:70px;margin:0;padding:6px;overflow:auto;z-index:1}
.port-split.has-campaign-error .port-detail{padding-bottom:86px}
@media(max-width:600px){
#campaign-overlay.port-split .campaign-card{height:57%;max-height:none;padding:0}
#campaign-overlay.port-split #campaign-content{gap:7px;align-items:stretch}
.port-split .port-nav{width:84px;padding:6px}
.port-split .port-detail{width:auto;flex:1;min-width:0;padding:8px}
#campaign-overlay.port-split .port-tabs{gap:5px}
#campaign-overlay.port-split .port-tabs button{font-size:11px;padding:5px 1px}
.port-split .port-summary h2{display:block;margin:0 0 3px;font-size:18px}
.port-split .port-summary .reward{display:block;font-size:11px}
.port-split .port-summary .save-status{font-size:10px}
.port-split .campaign-card .menu-settings{grid-template-columns:1fr}
#campaign-overlay.port-split #campaign-error{left:99px;right:auto;bottom:8px;width:calc(100% - 107px)}
.port-split.has-campaign-error .port-detail{padding-bottom:86px}
}
@media(min-width:601px) and (max-height:520px){
#campaign-overlay.port-split .campaign-card{height:100%;max-height:none;padding:0}
.port-split .port-nav{width:104px;padding:7px}
.port-split .port-detail{width:46%;max-width:420px;padding:8px;margin-top:54px;height:calc(100% - 54px)}
#campaign-overlay.port-split .port-tabs{gap:5px}
#campaign-overlay.port-split .port-tabs button{font-size:11px}
#campaign-overlay.port-split #campaign-error{left:124px;right:auto;bottom:8px;width:calc(min(420px,46%) - 16px)}
.port-split.has-campaign-error .port-detail{padding-bottom:86px}
}

#campaign-overlay .shop-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:auto}
#campaign-overlay .shop-actions>button,#campaign-overlay .shop-actions>button+button{width:100%;min-width:0;min-height:44px;margin:0}

#campaign-overlay .shop-categories{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;background:#f7ebd6;margin:0 0 8px;padding:0 0 6px}
#campaign-overlay .shop-categories button{width:100%;min-width:0;min-height:44px;margin:0;padding:5px 2px;font-size:12px}
#campaign-overlay .shop-categories button[aria-pressed="true"]{background:#664527;color:#fff6e5;border-color:#4b301a}
@media(max-width:600px){#campaign-overlay .shop-categories{grid-template-columns:repeat(2,minmax(0,1fr))}}

#campaign-overlay .shop-actions>button{white-space:pre-line;line-height:1.4;min-height:58px;padding:7px 3px;opacity:1}
#campaign-overlay .shop-actions>button[data-action^="buy"]{background:#285d45;border-color:#214936;color:#fff8e6}
#campaign-overlay .shop-actions>button[data-action^="sell"]{background:#81442c;border-color:#65321f;color:#fff8e6}
#campaign-overlay .shop-actions>button[data-action^="buy"]:disabled{background:#cfdecf;border-color:#9cab90;color:#53604a}
#campaign-overlay .shop-actions>button[data-action^="sell"]:disabled{background:#ead6c6;border-color:#a98d77;color:#745847}

#stage[data-menu-scene="shop"] .shop-list{gap:4px}
#stage[data-menu-scene="shop"] .shop-list article{padding:6px}
#stage[data-menu-scene="shop"] .shop-list article h4{margin:0 0 3px}
#stage[data-menu-scene="shop"] .shop-list article p{margin:2px 0;line-height:1.35}
#stage[data-menu-scene="shop"] .shop-list article label{margin:3px 0 2px}
#stage[data-menu-scene="shop"] .shop-list article input[type="number"]{box-sizing:border-box;width:100%;max-width:100%;height:32px;min-height:32px;margin:2px 0;padding:4px 6px;font:inherit}
#stage[data-menu-scene="shop"] .shop-actions{margin-top:4px}
#stage[data-menu-scene="shop"] .shop-actions>button,#stage[data-menu-scene="shop"] .shop-actions>button+button{min-height:44px;padding:3px 2px;line-height:1.1;margin:0}
.port-split .port-status{box-sizing:border-box;flex:none;width:clamp(148px,20%,190px);max-height:100%;margin-left:auto;min-height:0;padding:8px;background:#f7ebd6f2;border:1px solid #795b37;border-radius:10px;box-shadow:0 3px 16px #24170d55;color:#382b20;display:flex;flex-direction:column;overflow:hidden}
.port-status .port-status-summary{flex:none}
#campaign-overlay .port-status p{font-size:12px;line-height:1.4;margin:3px 0;overflow-wrap:anywhere}
.port-status .port-loadout{min-height:0;overflow:auto;overscroll-behavior:contain;margin-top:5px}
.port-status .port-loadout summary{position:sticky;top:0;min-height:44px;display:flex;align-items:center;background:#f7ebd6;cursor:pointer;font-size:13px;font-weight:bold;border-top:1px solid #b69b72}
.port-status .port-loadout-body{padding-top:3px}
#campaign-overlay .port-status h4{font-size:12px;margin:6px 0 2px}
.port-status ul{list-style:none;padding:0;margin:0;font-size:12px;line-height:1.4}
.port-status li{overflow-wrap:anywhere;margin:2px 0}
@media(max-width:600px){
.port-split .port-status{position:absolute;right:0;top:calc(-75.4386% + 64px);width:min(210px,calc(100% - 96px));max-height:calc(75.4386% - 72px);margin:0;padding:6px}
#campaign-overlay .port-status p{font-size:11px;margin:2px 0}
.port-status .port-loadout{margin-top:3px}
}
@media(min-width:601px) and (max-height:520px){
.port-split .port-status{width:clamp(148px,26%,180px);margin-top:54px;max-height:calc(100% - 54px);padding:7px}
}

.port-status .port-loadout summary::before{content:"▸";display:inline-block;margin-right:6px;transition:transform .15s}
.port-status .port-loadout[open] summary::before{transform:rotate(90deg)}

#stage[data-menu-scene="maintenance"] .port-body .shop-list,#stage[data-menu-scene="maintenance"] .port-body .mount-list{gap:4px}
#stage[data-menu-scene="maintenance"] .port-body .shop-list article,#stage[data-menu-scene="maintenance"] .port-body .mount-list article{padding:6px}
#stage[data-menu-scene="maintenance"] .port-body h4{margin:0 0 3px}
#stage[data-menu-scene="maintenance"] .port-body p{margin:2px 0;line-height:1.35}
#stage[data-menu-scene="maintenance"] .port-body label{margin:3px 0 2px}
#stage[data-menu-scene="maintenance"] .port-body select{height:36px;min-height:36px;padding:4px 6px;margin:2px 0}
#stage[data-menu-scene="maintenance"] .port-body button:not([data-action="maintenanceCategory"]){min-height:44px;padding:3px 6px;line-height:1.2;margin:2px 0}
#campaign-content .quest-environment{margin:0 0 12px;padding:10px;border:1px solid #9b8057;border-radius:6px;background:#f5ead3;color:#30261c}
#campaign-content .quest-environment label{display:block;margin-bottom:4px;font-weight:700}
#campaign-content .quest-environment select{width:100%;max-width:100%;min-height:44px;font:inherit;box-sizing:border-box}
#campaign-content .quest-environment p{margin:6px 0 0;line-height:1.45}

#escort-distance{display:block;font-size:11px;line-height:1.3;color:#4b3422}

.battle-report{margin:12px 0;padding:10px;border:1px solid #9b7444;border-radius:8px;background:#f4e2bd;color:#3c2816}.battle-report h3,.battle-report h4{margin:6px 0}.battle-report dl{margin:0}.battle-report dl>div{display:flex;justify-content:space-between;gap:10px;padding:3px 0}.battle-report dt,.battle-report dd{margin:0;overflow-wrap:anywhere}.battle-report dd{text-align:right}.battle-report p{font-size:12px;line-height:1.4;margin:8px 0 0}

@media(max-width:600px){#stage.practice-active.coop-active:not(.facing-mode) #view-panel{top:170px}}

.loadout-list .loadout-missing{color:#7b281c;font-weight:600}.loadout-list p{overflow-wrap:anywhere}

/* LAN roles keep one full viewport and inherit the existing game controls. */
.lan-panel{max-width:100%;padding:12px;margin:12px 0;border:1px solid #b4cbc3;border-radius:10px;background:#f4faf7}.lan-panel button,.lan-panel input{max-width:100%;margin:4px;padding:8px}.lan-panel input{width:12ch}.lan-panel h2{font-size:1.1rem}.lan-panel p{margin:8px 0}
#stage.lan-pilot #coop-controls,#stage:is(.lan-pilot,.lan-gunner) .fire-controls,#stage:is(.lan-pilot,.lan-gunner) #aim-panel{display:none!important}
#stage.lan-gunner #move-pad,#stage.lan-gunner #view-panel,#stage:is(.lan-pilot,.lan-gunner) #aim-panel,#stage:is(.lan-pilot,.lan-gunner) .fire-controls,#stage.lan-guest .top-controls{display:none!important}
#stage.lan-gunner #coop-controls{inset:auto 12px 12px auto;box-sizing:border-box;width:min(420px,calc(100% - 24px));height:auto;max-height:calc(100% - 110px);overflow:auto;transform:none;z-index:10;display:grid;gap:8px;padding:10px;border:1px solid #aac3cd;border-radius:8px;background:rgba(244,250,247,.94);color:#163845;pointer-events:auto}
#stage.lan-guest #campaign-content,#stage.lan-guest #campaign-error{display:none!important}
#lan-guest-summary{display:none}#stage.lan-guest #lan-guest-summary{display:block;padding:20px}
#stage.lan-gunner .gunner-heading{font-size:0}#stage.lan-gunner .gunner-heading::before{content:'LAN 砲手 ';font-size:14px}#stage.lan-gunner .gunner-heading span{font-size:14px}
@media(max-width:600px){.lan-panel button{display:inline-block;font-size:14px}#stage.lan-gunner #coop-controls{right:8px;bottom:8px;width:calc(100% - 16px)}}

#lan-toolbar{position:absolute;z-index:22;left:10px;top:54px;display:flex;flex-wrap:wrap;gap:5px;max-width:calc(100% - 20px);padding:5px;border-radius:7px;background:rgba(244,250,247,.94);font-size:12px}#lan-toolbar[hidden]{display:none}#lan-toolbar button{font-size:12px;padding:5px}#lan-stage-status{align-self:center}

#stage.lan-gunner .gunner-heading,#stage.lan-gunner #gunner-stations,#stage.lan-gunner .gunner-actions,#stage.lan-gunner #gunner-aim-panel{position:static;inset:auto;max-width:none;width:auto;transform:none}
#stage.lan-gunner .gunner-heading{text-shadow:none}#stage.lan-gunner .gunner-heading span{display:inline-block;margin:0 0 0 5px}
#stage.lan-gunner #gunner-stations{grid-template-columns:1fr 1fr}#stage.lan-gunner .gunner-actions{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end}
#stage.lan-gunner #gunner-aim-panel[open]{width:auto;max-width:none;max-height:none;overflow:visible}#stage.lan-gunner #gunner-aim-panel summary{border:1px solid #aac3cd}

/* LAN reserves separate vertical bands for session actions and battle HUD. */
#stage.lan-host #lan-toolbar,#stage.lan-guest #lan-toolbar{top:54px;min-height:44px;box-sizing:border-box;max-width:calc(100% - 20px)}
#stage.lan-host #lan-toolbar button,#stage.lan-guest #lan-toolbar button{min-height:44px}
#stage.lan-host #battle-status,#stage.lan-guest #battle-status{top:128px;right:auto;max-width:calc(100% - 460px)}
#stage.lan-host #ship-health,#stage.lan-guest #ship-health{top:154px;max-height:110px;pointer-events:auto}
#stage.lan-host #position,#stage.lan-guest #position{top:280px;bottom:auto;left:12px;right:auto;box-sizing:border-box;width:min(380px,calc(100% - 460px));padding:5px 7px;border-radius:5px;background:rgba(18,60,74,.85);white-space:pre-line}
@media(max-width:600px){
 #stage.lan-host,#stage.lan-guest{height:max(72vh,620px);min-height:620px}
 #stage.lan-host:fullscreen,#stage.lan-guest:fullscreen,#stage.lan-host.fullscreen-fallback,#stage.lan-guest.fullscreen-fallback{height:100dvh;min-height:0}
 #stage.lan-host #lan-toolbar,#stage.lan-guest #lan-toolbar{top:58px;right:10px;left:10px;width:auto;max-width:none;min-height:70px;padding:5px;align-content:start}
 #stage.lan-host #lan-stage-status,#stage.lan-guest #lan-stage-status{flex-basis:100%;line-height:16px}
 #stage.lan-host #battle-status,#stage.lan-guest #battle-status{top:140px;left:10px;right:10px;max-width:none;font-size:10px}
 #stage.lan-host #ship-health,#stage.lan-guest #ship-health{box-sizing:border-box;top:166px;left:10px;width:calc(50% - 15px);max-width:none;max-height:72px;margin:0;padding:5px 7px;font-size:10px}
 #stage.lan-host #position,#stage.lan-guest #position{top:248px;left:10px;right:10px;width:auto;max-width:none;font-size:10px;line-height:15px;max-height:54px;overflow:auto;pointer-events:auto}
 #stage.lan-gunner #coop-controls{max-height:min(45%,calc(100% - 320px));padding:8px;gap:6px}
 #stage.lan-gunner .gunner-actions button,#stage.lan-gunner #gunner-stations button,#stage.lan-gunner #gunner-aim-panel summary,#stage.lan-gunner #gunner-aim-panel input,#stage.lan-gunner #gunner-aim-panel select{min-height:44px}
}

@media(max-width:600px){#stage.lan-pilot #view-panel{top:166px;right:10px}}

.lan-panel [hidden]{display:none!important}

/* Shared LAN target: bottom HUD remains visible in normal and fullscreen views. */
#lan-target-panel{position:absolute;z-index:13;bottom:0;left:0;right:0;box-sizing:border-box;max-width:100%;max-height:25%;overflow:auto;margin:0;padding:4px 8px;border:1px solid #aac3cd;border-radius:7px;background:#f4faf7;color:#163845;overflow-wrap:anywhere}
#lan-target-panel[hidden],#lan-target-panel [hidden],#lan-target-marker[hidden]{display:none!important}
#lan-target-panel p{margin:0 0 4px;font-weight:bold}
#lan-target-panel>div{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
#lan-target-select{box-sizing:border-box;flex:1;min-width:100px;max-width:100%;min-height:44px}
#lan-target-clear{min-height:44px;max-width:100%}
#lan-target-marker{position:absolute;z-index:12;pointer-events:none;transform:translate(-50%,-100%);white-space:nowrap;padding:3px 6px;border-radius:4px;background:#f8e7a2;color:#322709;border:2px solid #80601d;font-size:12px;font-weight:bold;text-shadow:none}#stage:is(.lan-pilot,.lan-gunner) #move-pad{bottom:calc(20px + var(--lan-target-space,0px))}
#stage.lan-gunner #coop-controls{bottom:calc(12px + var(--lan-target-space,0px));max-height:calc(100% - 110px - var(--lan-target-space,0px))}
@media(max-width:600px){#stage.lan-gunner #coop-controls{max-height:max(70px,calc(100% - 320px - var(--lan-target-space,0px)))}#lan-target-panel{font-size:12px}#lan-target-panel p{margin-bottom:4px}#lan-target-panel>div{gap:4px}}
/* Leave the LAN pilot pad's 20..128px lane clear on PC widths. */
@media(min-width:601px){#stage.lan-pilot #position{left:142px;width:min(380px,calc(100% - 162px));max-width:calc(100% - 162px)}}
#lan-signal-controls{display:flex;flex-wrap:wrap;gap:6px}
#lan-signal-controls button{min-height:44px;max-width:100%;flex:1}
#lan-target-panel #lan-signal-status{font-size:12px;font-weight:normal;line-height:16px;margin:2px 0}
/* PC LAN pilot information must clear the measured shared HUD height. */
@media(min-width:601px){#stage.lan-pilot #position{top:auto;bottom:max(20px,calc(var(--lan-target-space,0px) + 12px))}}
#lan-target-panel #lan-readouts{gap:4px 12px;align-items:center}
#lan-gunner-status{font-size:12px;line-height:16px;overflow-wrap:anywhere}
#lan-target-panel #lan-readouts #lan-signal-status{margin:2px 0}
#stage.lan-pilot #lan-target-panel{max-height:max(25%,132px)}

/* Pilot target controls and three fixed signals share a wrapping action row. */
#lan-target-panel #lan-target-status{font-size:12px;line-height:16px;margin-bottom:2px}
#lan-target-panel #lan-target-actions{display:flex;flex-wrap:wrap;gap:4px 10px}
#lan-target-controls,#lan-pilot-signal-controls{display:flex;gap:4px;align-items:center;flex:1 1 280px;min-width:0}
#lan-pilot-signal-controls button{min-height:44px;min-width:0;max-width:100%;flex:1;font-size:12px;padding:6px;white-space:nowrap}
#lan-pilot-signal-status{font-size:12px;line-height:16px;overflow-wrap:anywhere}
#stage.lan-pilot #lan-target-panel{max-height:max(25%,168px)}
#position{display:flex;align-items:center;gap:8px}
#position .position-text{min-width:0;white-space:pre-line}
#nearby-map-dock{position:absolute;z-index:14;pointer-events:none}
#nearby-map-dock[hidden]{display:none!important}
#nearby-map-dock .nearby-map-toggle{position:absolute;z-index:15;top:0;right:0;width:auto;box-sizing:border-box;height:44px;min-height:44px;padding:0 4px;pointer-events:auto;color:#163845;text-shadow:none}
#nearby-map-dock #nearby-map-panel{position:relative;left:auto;top:auto}
.nearby-map-toggle{min-height:44px;min-width:56px;font-size:12px;white-space:nowrap}
#nearby-map-dock .nearby-map-toggle[aria-expanded=true]{width:44px;min-width:44px;background:transparent;border:0;font-size:0}
#nearby-map-dock .nearby-map-toggle[aria-expanded=true]::after{content:"×";position:absolute;top:0;right:0;box-sizing:border-box;width:22px;height:22px;display:grid;place-items:center;border:1px solid #80601d;border-radius:4px;background:#e8cf82;color:#163845;font-size:18px;line-height:1}
.nearby-map-toggle[hidden],#nearby-map-panel[hidden]{display:none!important}
#nearby-map-panel{position:absolute;z-index:14;border:1px solid #c6dddd;border-radius:4px;line-height:0;pointer-events:none;overflow:hidden;box-sizing:content-box}
#nearby-map-canvas{display:block;pointer-events:none}/* Mouse aiming markers are runtime geometry and never intercept existing controls. */
#gunner-mouse-aim{min-height:44px;width:100%;font-size:13px}
#gunner-mouse-aim[aria-pressed=true]{background:#e8cf82;border-color:#80601d}
#gunner-mouse-status{font-size:12px;line-height:1.4;margin:6px 0}
#mouse-aim-overlay{position:absolute;z-index:13;pointer-events:none}
#mouse-aim-overlay[hidden]{display:none!important}

/* Closed LAN entry and 1P settings use only the space their controls need. */
.lan-panel:has(> #lan-lobby[hidden]){width:fit-content;box-sizing:border-box;padding:4px}
.campaign-card .menu-settings:has(> [data-coop-only][hidden]){grid-template-columns:minmax(0,1fr)}
.port-mobile-menu{display:none}
@media(max-width:600px){
#campaign-overlay.port-split #campaign-content{flex-direction:column}
.port-split .port-nav{width:100%;max-height:none;overflow:visible;padding:6px;flex:none}
#campaign-overlay.port-split .port-tabs{display:none}
.port-mobile-menu{display:flex;gap:6px;align-items:center}
#campaign-overlay .port-mobile-menu select{flex:1;min-width:0;width:auto;min-height:44px;margin:0}
#campaign-overlay .port-mobile-menu button{flex:none;min-height:44px;margin:0;white-space:nowrap;padding:6px 9px}
.port-split .port-detail{width:100%;flex:1;min-height:0;height:auto}
#campaign-overlay.port-split #campaign-error{left:8px;width:calc(100% - 16px)}
}

/* Reserve the departure row inside the existing port card without moving status geometry. */
#campaign-overlay.port-split #campaign-content{box-sizing:border-box;padding-bottom:80px}
#campaign-overlay.port-split .port-departure{position:absolute;right:0;bottom:0;box-sizing:border-box;width:min(460px,100%);height:72px;display:flex;align-items:center;gap:10px;padding:8px 10px;background:#f7ebd6f2;border:1px solid #795b37;border-radius:10px;color:#382b20;box-shadow:0 3px 16px #24170d55}
.port-split .port-departure-summary{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:13px;line-height:19px}
.port-split .port-departure-summary strong,.port-split .port-departure-summary span{display:block;overflow-wrap:anywhere}
#campaign-overlay.port-split .port-departure button{flex:none;width:auto;min-width:68px;min-height:44px;margin:0;white-space:nowrap}
#campaign-overlay.port-split #campaign-error{bottom:90px}
@media(max-width:600px){
#campaign-overlay.port-split .port-departure{width:100%;gap:6px;padding:6px 8px}
.port-split .port-departure-summary{font-size:11px;line-height:17px;gap:2px}
#campaign-overlay.port-split #campaign-error{bottom:88px}
}

/* Shop presentation is scoped to its facility; catalog and other lists stay unchanged. */
#campaign-overlay.port-shop .shop-products{gap:6px}
#campaign-overlay.port-shop .shop-products .shop-product{display:grid;grid-template-columns:minmax(0,1fr) 86px 224px;grid-template-rows:auto auto;gap:4px 10px;align-items:center;padding:9px}
#campaign-overlay.port-shop .shop-product h4{grid-column:1;grid-row:1;font-size:14px}
#campaign-overlay.port-shop .shop-product .shop-description{grid-column:1;grid-row:2;font-size:12px}
#campaign-overlay.port-shop .shop-product .shop-owned{grid-column:2;grid-row:1;font-size:12px}
#campaign-overlay.port-shop .shop-product .shop-quantity{grid-column:2;grid-row:2;min-width:0;font-size:12px}
#campaign-overlay.port-shop .shop-product .shop-quantity input{min-height:44px;height:44px}
#campaign-overlay.port-shop .shop-product .shop-actions{grid-column:3;grid-row:1 / 3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0;align-self:center}
#campaign-overlay.port-shop .shop-product .shop-actions>button{width:100%;min-height:44px;margin:0;font-size:11px;line-height:1.25;padding:5px 2px}
#campaign-overlay.port-shop .shop-product-info .shop-description{grid-column:1 / -1}
#campaign-overlay.port-shop .shop-help{font-size:12px}
@media(min-width:601px){
#campaign-overlay.port-shop .port-detail{width:auto;max-width:none;min-width:0;flex:1}
}
@media(max-width:600px){
#campaign-overlay.port-shop .shop-categories{grid-template-columns:repeat(4,minmax(0,1fr))}
#campaign-overlay.port-shop .shop-products .shop-product{grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:5px;padding:9px}
#campaign-overlay.port-shop .shop-product h4,#campaign-overlay.port-shop .shop-product .shop-description,#campaign-overlay.port-shop .shop-product .shop-owned,#campaign-overlay.port-shop .shop-product .shop-quantity,#campaign-overlay.port-shop .shop-product .shop-actions{grid-column:1;grid-row:auto}
#campaign-overlay.port-shop .shop-product .shop-quantity{display:flex;gap:8px;align-items:center}
#campaign-overlay.port-shop .shop-product .shop-quantity label{flex:none}
#campaign-overlay.port-shop .shop-product .shop-quantity input{width:90px;margin:0}
#campaign-overlay.port-shop .shop-product .shop-actions>button{font-size:12px}
}

/* Keep shop totals readable when desktop space is narrower than the comparison rows. */
@media(min-width:601px) and (max-width:1000px){
#campaign-overlay.port-shop .shop-products .shop-product{grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:5px}
#campaign-overlay.port-shop .shop-product h4,#campaign-overlay.port-shop .shop-product .shop-description,#campaign-overlay.port-shop .shop-product .shop-owned,#campaign-overlay.port-shop .shop-product .shop-quantity,#campaign-overlay.port-shop .shop-product .shop-actions{grid-column:1;grid-row:auto}
#campaign-overlay.port-shop .shop-product .shop-quantity{display:flex;gap:8px;align-items:center}
#campaign-overlay.port-shop .shop-product .shop-quantity label{flex:none}
#campaign-overlay.port-shop .shop-product .shop-quantity input{width:90px;margin:0}
}

/* Give the first product priority within the existing short phone panel. */
@media(max-width:600px){
#campaign-overlay.port-shop .port-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:4px;margin-bottom:4px}
#campaign-overlay.port-shop .port-summary h2{font-size:18px;line-height:21px;margin:0}
#campaign-overlay.port-shop .port-summary .save-status{font-size:10px;line-height:16px;margin:0}
#campaign-overlay.port-shop .port-body{display:flex;flex-direction:column}
#campaign-overlay.port-shop .port-body>*{flex:none}
#campaign-overlay.port-shop .shop-help{order:1}
#campaign-overlay.port-shop .shop-products .shop-product{grid-template-columns:minmax(0,1fr) auto;gap:4px 6px;padding:6px}
#campaign-overlay.port-shop .shop-product h4{grid-column:1;grid-row:1}
#campaign-overlay.port-shop .shop-product .shop-owned{grid-column:2;grid-row:1}
#campaign-overlay.port-shop .shop-product .shop-description,#campaign-overlay.port-shop .shop-product .shop-quantity,#campaign-overlay.port-shop .shop-product .shop-actions{grid-column:1 / -1;grid-row:auto}
}

/* Maintenance uses its own comparison rows and never changes shop or quest layout. */
#campaign-overlay:is(.port-maintenance,.port-quests,.port-practice,.port-settings,.port-home) .port-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:4px;margin-bottom:4px}
#campaign-overlay:is(.port-maintenance,.port-quests,.port-practice,.port-settings,.port-home) .port-summary h2{font-size:18px;line-height:21px;margin:0}
#campaign-overlay:is(.port-maintenance,.port-quests,.port-practice,.port-settings,.port-home) .port-summary .save-status{font-size:10px;line-height:16px;margin:0}
#campaign-overlay.port-maintenance .maintenance-categories{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin-bottom:4px;padding-bottom:4px}
#campaign-overlay.port-maintenance .maintenance-categories button{white-space:nowrap;font-size:12px}
#campaign-overlay.port-maintenance .maintenance-intro{font-size:12px;margin:0 0 5px}
#campaign-overlay.port-maintenance .maintenance-ships,#campaign-overlay.port-maintenance .maintenance-sets,#campaign-overlay.port-maintenance .maintenance-mounts,#campaign-overlay.port-maintenance .maintenance-parts{grid-template-columns:1fr;gap:6px}
#campaign-overlay.port-maintenance .maintenance-ship{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:4px 12px;align-items:center;padding:9px}
#campaign-overlay.port-maintenance .maintenance-ship h4{grid-column:1;margin:0;font-size:14px}
#campaign-overlay.port-maintenance .maintenance-ship p{grid-column:1;font-size:12px}
#campaign-overlay.port-maintenance .maintenance-ship button{grid-column:2;grid-row:1 / 3}
#campaign-overlay.port-maintenance .maintenance-mounts article,#campaign-overlay.port-maintenance .maintenance-parts article,#campaign-overlay.port-maintenance .maintenance-ammo{display:grid;grid-template-columns:96px minmax(0,1fr) 110px;gap:8px;align-items:center;padding:9px}
#campaign-overlay.port-maintenance .port-body select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;height:44px;margin:0;font-size:13px}
#campaign-overlay.port-maintenance .port-body button{min-height:44px;margin:0}
#campaign-overlay.port-maintenance .maintenance-set{padding:9px;display:flex;flex-direction:column;gap:4px}
#campaign-overlay.port-maintenance .maintenance-item-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
#campaign-overlay.port-maintenance .maintenance-item-heading h3{font-size:14px;margin:0}
#campaign-overlay.port-maintenance .maintenance-item-heading span{font-size:11px;white-space:nowrap}
#campaign-overlay.port-maintenance .maintenance-set p{font-size:12px}
#campaign-overlay.port-maintenance .loadout-missing{color:#8b3023;font-weight:bold}
#campaign-overlay.port-maintenance .maintenance-save{width:auto;max-width:100%;padding:6px 10px;margin-bottom:6px}
#campaign-overlay.port-maintenance .maintenance-help{font-size:12px;margin-top:8px}
#campaign-overlay.port-maintenance .maintenance-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
@media(min-width:601px){
#campaign-overlay.port-maintenance .port-detail{width:auto;max-width:none;min-width:0;flex:1}
#campaign-overlay.port-maintenance .maintenance-set{display:grid;grid-template-columns:minmax(0,1fr) 160px;column-gap:12px}
#campaign-overlay.port-maintenance .maintenance-set>*{grid-column:1}
#campaign-overlay.port-maintenance .maintenance-set>button{grid-column:2;grid-row:1 / 8;align-self:center}
}
@media(max-width:1000px){
#campaign-overlay.port-maintenance .maintenance-ship{grid-template-columns:minmax(0,1fr)}
#campaign-overlay.port-maintenance .maintenance-ship button{grid-column:1;grid-row:auto}
#campaign-overlay.port-maintenance .maintenance-mounts article,#campaign-overlay.port-maintenance .maintenance-parts article,#campaign-overlay.port-maintenance .maintenance-ammo{grid-template-columns:minmax(0,1fr);gap:5px}
#campaign-overlay.port-maintenance .maintenance-set{display:flex}
#campaign-overlay.port-maintenance .maintenance-categories button{font-size:11px;padding:4px 1px}
}

/* Quest comparisons stay local to the mission facility. */
#campaign-overlay.port-quests .quest-list{grid-template-columns:1fr;gap:7px}
#campaign-overlay.port-quests .quest-card{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:12px;padding:10px;align-items:start}
#campaign-overlay.port-quests .quest-card.quest-selected{border:2px solid #664527;background:#f0dfb9;box-shadow:inset 3px 0 #664527}
#campaign-overlay.port-quests .quest-card-main{min-width:0}
#campaign-overlay.port-quests .quest-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#campaign-overlay.port-quests .quest-card-heading h4{margin:0;font-size:14px;line-height:20px}
#campaign-overlay.port-quests .quest-card-state{flex:none;font-size:11px;color:#664527;font-weight:bold}
#campaign-overlay.port-quests .quest-card p{font-size:12px;line-height:1.4;margin:4px 0}
#campaign-overlay.port-quests .quest-card-environment{font-weight:bold}
#campaign-overlay.port-quests .quest-card-action{min-width:0;display:flex;flex-direction:column;gap:6px;align-items:stretch}
#campaign-overlay.port-quests .quest-card-reward strong{display:block;font-size:15px;line-height:22px}
#campaign-overlay.port-quests .quest-card-action button{min-height:44px;margin:0;width:100%;font-size:12px;padding:6px}
#campaign-overlay.port-quests .quest-card-details,#campaign-overlay.port-quests .quest-list-help{font-size:12px}
#campaign-overlay.port-quests .quest-card-details summary,#campaign-overlay.port-quests .quest-list-help>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#664527;text-decoration:underline}
#campaign-overlay.port-quests .quest-card-details[open]{border-top:1px solid #b69b72;margin-top:5px}
#campaign-overlay.port-quests .quest-list-help{margin-top:8px}
@media(min-width:601px){
#campaign-overlay.port-quests .port-detail{width:auto;max-width:none;min-width:0;flex:1}
}
@media(max-width:1000px){
#campaign-overlay.port-quests .quest-card{grid-template-columns:minmax(0,1fr);gap:5px;padding:9px}
#campaign-overlay.port-quests .quest-card-action{display:grid;grid-template-columns:minmax(0,1fr);gap:5px}
#campaign-overlay.port-quests .quest-card-reward strong{display:inline;font-size:14px}
#campaign-overlay.port-quests .quest-card-heading{align-items:flex-start}
#campaign-overlay.port-quests .quest-card-heading h4{font-size:13px}
}

/* On narrow quest cards, keep reward and selection ahead of optional details. */
@media(max-width:1000px){
#campaign-overlay.port-quests .quest-card-main{display:contents}
#campaign-overlay.port-quests .quest-card-details{order:1}
}

/* Practice selection only: keep the two starts visible and explanations compact. */
#campaign-overlay.port-practice .practice-intro{font-size:12px;line-height:1.4;margin:0 0 6px}
#campaign-overlay.port-practice .practice-list{grid-template-columns:1fr;gap:7px}
#campaign-overlay.port-practice .practice-card{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:12px;padding:10px;align-items:center}
#campaign-overlay.port-practice .practice-card-info{min-width:0}
#campaign-overlay.port-practice .practice-card h3{font-size:14px;line-height:20px;margin:0 0 4px}
#campaign-overlay.port-practice .practice-card p{font-size:12px;line-height:1.4;margin:0}
#campaign-overlay.port-practice .practice-card button{width:100%;min-height:44px;margin:0;padding:6px;font-size:12px;white-space:normal}
#campaign-overlay.port-practice .practice-help{font-size:12px;margin-top:8px}
#campaign-overlay.port-practice .practice-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#664527;text-decoration:underline}
#campaign-overlay.port-practice .practice-help p{font-size:12px;line-height:1.4}
@media(min-width:601px){
#campaign-overlay.port-practice .port-detail{width:auto;max-width:none;min-width:0;flex:1}
}
@media(max-width:1000px){
#campaign-overlay.port-practice .practice-card{grid-template-columns:minmax(0,1fr);gap:6px;padding:9px}
}

/* Port settings only; title-menu settings keep their existing markup and layout. */
#campaign-overlay.port-settings .port-settings-panel{padding:10px;border:1px solid #b69b72;border-radius:7px;background:#fff4de66}
#campaign-overlay.port-settings .port-settings-panel .menu-settings{gap:12px}
#campaign-overlay.port-settings .port-settings-panel .menu-settings>div{min-width:0}
#campaign-overlay.port-settings .port-settings-panel label{display:block;font-size:13px;font-weight:bold;margin:0 0 5px}
#campaign-overlay.port-settings .port-settings-panel select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:6px;font-size:13px}
#campaign-overlay.port-settings .port-settings-panel .setting-help{font-size:12px;line-height:1.4;margin:8px 0}
#campaign-overlay.port-settings .port-settings-actions{display:flex;align-items:center;gap:12px;padding-top:8px;border-top:1px solid #b69b72}
#campaign-overlay.port-settings .port-settings-actions button{width:auto;flex:none;min-width:130px;min-height:44px;margin:0;padding:6px 12px}
#campaign-overlay.port-settings .port-settings-actions p{font-size:12px;line-height:1.4;margin:0}
#campaign-overlay.port-settings .menu-settings:has(>[data-coop-only][hidden]){grid-template-columns:minmax(0,1fr)}
@media(min-width:601px){
#campaign-overlay.port-settings .port-detail{width:auto;max-width:none;min-width:0;flex:1}
}
@media(max-width:1000px){
#campaign-overlay.port-settings .port-settings-panel{padding:8px}
#campaign-overlay.port-settings .port-settings-panel .menu-settings{grid-template-columns:minmax(0,1fr);gap:8px}
#campaign-overlay.port-settings .port-settings-actions{flex-direction:column;align-items:stretch;gap:6px}
#campaign-overlay.port-settings .port-settings-actions button{width:100%}
}

/* Lobby layout only; stage toolbar and connection behavior are untouched. */
#lan-panel{box-sizing:border-box;min-width:0}
#lan-panel button,#lan-panel input{box-sizing:border-box;min-height:44px}
#lan-panel #lan-lobby{min-width:0}
#lan-panel .lan-lobby-heading{padding-bottom:8px;border-bottom:1px solid #b4cbc3;margin-bottom:10px}
#lan-panel .lan-lobby-heading h2{margin:0 0 5px}
#lan-panel .lan-lobby-heading p{margin:4px 0;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
#lan-panel .lan-lobby-heading p:empty{display:none}
#lan-panel .lan-lobby-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#lan-panel .lan-lobby-card{min-width:0;padding:12px;border:1px solid #b4cbc3;border-radius:8px;background:#fff}
#lan-panel .lan-lobby-card h3{font-size:14px;margin:0 0 10px}
#lan-panel .lan-lobby-card button{width:100%;margin:0;white-space:normal;overflow-wrap:anywhere}
#lan-panel .lan-lobby-join{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center}
#lan-panel .lan-lobby-join label{font-size:13px}
#lan-panel .lan-lobby-join input{width:100%;min-width:0;margin:0;font-size:16px}
#lan-panel .lan-lobby-join button{grid-column:1 / -1}
#lan-panel .lan-lobby-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #b4cbc3}
#lan-panel .lan-lobby-actions button{flex:0 1 auto;margin:0;white-space:normal;overflow-wrap:anywhere}
#lan-panel .lan-lobby-help{font-size:13px;margin-top:8px}
#lan-panel .lan-lobby-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer;text-decoration:underline}
#lan-panel .lan-lobby-help p{line-height:1.5;overflow-wrap:anywhere}
@media(max-width:600px){
#lan-panel .lan-lobby-choices{grid-template-columns:minmax(0,1fr);gap:8px}
#lan-panel .lan-lobby-card{padding:10px}
#lan-panel .lan-lobby-actions button{flex:1 1 140px}
}

/* The home viewer fills only its existing central slot; navigation/status/footer stay put. */
#campaign-overlay.port-home .port-body{display:flex;overflow:hidden;padding:0}
#campaign-overlay.port-home .harbor-ship-view{position:relative;min-width:0;min-height:0;width:100%;flex:1;overflow:hidden;border-radius:6px;background:#dceae9a6}
#campaign-overlay.port-home .harbor-ship-view canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline-offset:-3px}
#campaign-overlay.port-home .harbor-ship-view canvas:active{cursor:grabbing}
#campaign-overlay.port-home .harbor-ship-hint{position:absolute;left:6px;bottom:4px;margin:0;font-size:11px;line-height:16px;pointer-events:none;color:#213d42;background:#f7ebd6d9;padding:1px 4px;border-radius:3px}
#campaign-overlay.port-home .harbor-ship-message{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:10px;font-size:12px;color:#213d42;pointer-events:none}
#campaign-overlay.port-home .harbor-ship-message[hidden]{display:none}
@media(min-width:601px){
#campaign-overlay.port-home .port-detail{width:auto;max-width:none;min-width:0;flex:1}
}

/* Preserve the existing harbor scene behind the home ship instead of a pale overlay. */
#campaign-overlay.port-home .port-detail{background:transparent}
#campaign-overlay.port-home .port-summary{background:#f7ebd6e8;border-radius:4px;padding:3px 5px}
#campaign-overlay.port-home .harbor-ship-view{background:transparent}

/* A temporary accepted-departure scene stays inside the existing stage. */
#stage .harbor-departure-sequence{position:absolute;inset:0;z-index:30;overflow:hidden;touch-action:none;background:#9bcde0 url("assets/menu-port.webp") center/cover no-repeat}
#stage .harbor-departure-vessel{position:absolute;inset:5% 5% 7%;pointer-events:none}
#stage .harbor-departure-vessel canvas{display:block;width:100%;height:100%}
#stage .harbor-departure-vessel .harbor-ship-message{display:none}
#stage .harbor-departure-fade{position:absolute;inset:0;background:#000;opacity:0;pointer-events:none}

/* Direct HUD switches reserve one stable aim footprint in both modes. */
#view-panel button{width:112px;min-height:44px;white-space:nowrap;margin:0}
#aim-panel{right:12px;top:auto;bottom:204px;width:262px;height:220px;max-height:calc(100% - 344px);display:flex;flex-direction:column;pointer-events:none}
.fire-controls>#solo-fire-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;height:44px;margin:0 0 5px}
.ocean-main #solo-fire-actions>button{min-width:0;width:100%;height:44px;margin:0;padding:8px 5px;white-space:nowrap;font-size:12px}
#aim-panel>.aim-inputs{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:5px 0;scrollbar-width:thin;pointer-events:auto}
#aim-manual-controls[hidden]{display:none!important}
#aim-panel label{font-size:11px;margin-top:3px}
#aim-panel select{min-height:44px;font-size:12px;margin:0}
#aim-panel input{min-height:44px}
#aim-panel #gunner-mouse-status{font-size:10px;line-height:1.3;margin:0 0 4px}
#aim-panel .aim-directions{font-size:10px}
@media(max-width:600px){#aim-panel{right:8px;width:calc(100% - 110px);max-width:262px}}

#aim-panel>.aim-inputs>*{pointer-events:auto}
#aim-manual-controls{padding:4px 7px;background:#ffffffed;border:1px solid #aac3cd;border-radius:6px}
#aim-panel #gunner-mouse-status{background:#ffffffed;border-radius:4px;padding:2px 4px}
#aim-panel label[for=solo-ammo]{background:#ffffffed;border-radius:4px;padding:2px 4px}

/* Keep solo status text clear of the aim column without shrinking its inputs. */
#stage:not(.coop-active):not(.lan-pilot):not(.lan-gunner) #position{right:290px}
@media(max-width:600px){#stage:not(.coop-active):not(.lan-pilot):not(.lan-gunner) #position{right:10px}#aim-panel{bottom:226px}}

/* Solo compact aiming keeps all manual inputs in two stable rows. */
#aim-panel{bottom:186px;height:120px;max-height:none}
#aim-panel>.aim-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:58px 58px;gap:4px 6px;flex:none;padding:0;overflow:visible}
#aim-manual-controls{display:contents}
#aim-panel .solo-aim-field{min-width:0;background:#ffffffed;border-radius:5px;padding:0 4px;box-sizing:border-box}
#aim-panel .solo-aim-side{grid-area:1/1}
#aim-panel .solo-aim-ammo{grid-area:2/1}
#aim-panel .solo-aim-horizontal{grid-area:1/2}
#aim-panel .solo-aim-elevation{grid-area:2/2}
#aim-panel .solo-aim-field label{height:14px;line-height:14px;margin:0;padding:0;font-size:10px;white-space:nowrap;gap:2px}
#aim-panel .solo-aim-field select,#aim-panel .solo-aim-field input{display:block;width:100%;height:44px;min-height:44px;margin:0;padding:0;font-size:11px}
#aim-panel #gunner-mouse-status{display:none}
@media(max-width:600px){#aim-panel{bottom:226px}}

#stage:not(.coop-active):not(.lan-pilot):not(.lan-gunner) #aim-panel:not([inert]) ~ .look-hint{display:none}

/* Ammo and information keep the same positions in both aiming modes. */
#aim-panel .solo-aim-ammo{position:absolute;left:0;bottom:0;width:calc((100% - 6px)/2);height:58px}
@media(max-width:600px){
 #aim-panel .solo-aim-ammo{bottom:-40px}
 #stage:not(.coop-active):not(.lan-pilot):not(.lan-gunner) #position{height:32px}
 #stage:not(.coop-active):not(.lan-pilot):not(.lan-gunner) #position .position-text{position:absolute;left:90px;right:0;bottom:168px;font-size:10px;line-height:14px}
}

/* Separate immediate controls from voyage-ending actions; retain the existing obstacle host. */
#stage .top-controls{align-items:flex-start}
#stage .battle-exit{position:relative;z-index:20;text-shadow:none;color:#163845;font-size:12px;background:#f3f8f6;border-radius:6px}
#stage .battle-exit>summary{box-sizing:border-box;min-height:44px;padding:12px 8px;border:1px solid #aac3cd;border-radius:6px;background:#f3f8f6;cursor:pointer;white-space:nowrap}
#stage .battle-exit>div{display:grid;gap:6px;padding:6px;background:#f3f8f6;border:1px solid #aac3cd;border-radius:6px}
#stage .battle-exit button{width:100%;margin:0}
.display-options{margin:12px 0;padding:0 12px;border:1px solid #b8ccc2;border-radius:8px;background:#f8fcf9}
.display-options>summary,.instructions>details>summary{box-sizing:border-box;min-height:44px;padding:11px 0;display:list-item;cursor:pointer;font-weight:bold}
.display-options .options{margin:0;padding:0 0 10px}
.first-steps{padding-left:24px;line-height:1.65}.first-steps li{margin:6px 0}
.current-control-guide{padding:10px 12px;background:#e4f1ea;border-left:4px solid #267550;line-height:1.6}

/* Keep the entrance inside the fixed battle viewport; long help remains scrollable. */
#campaign-overlay.menu-screen{padding:56px 12px 10px}
.menu-screen .campaign-card{padding:10px 14px}
.menu-screen h2{margin-bottom:4px}
.menu-screen p{margin:4px 0;line-height:1.5}
.menu-screen .menu-settings{gap:8px}
.menu-screen button.primary{margin-top:6px}
@media(max-width:600px){#campaign-overlay.menu-screen{padding:56px 8px 10px}.menu-screen .campaign-card{padding:10px}}

@media(min-width:601px) and (max-height:520px){.menu-screen .campaign-card{padding-top:8px;padding-bottom:8px}.menu-screen p{margin-top:3px;margin-bottom:3px}}
