.fleet-pips{margin-top:5px;color:#f8e7ba;font:12px Arial;letter-spacing:1px;white-space:nowrap}
.fleet-pips img{width:20px;height:9px;object-fit:contain;margin-right:1px;filter:brightness(1.8) sepia(.3) drop-shadow(0 1px 1px #000)}
.portrait{width:76px;height:76px;object-fit:contain;flex:none}
.board{grid-template-columns:34px repeat(10,1fr);grid-template-rows:34px repeat(10,1fr);aspect-ratio:1;margin:8px 18px 18px;background:transparent;border:0;overflow:visible}
.coord{display:grid;place-items:center;color:#fff8e9;font-size:clamp(13px,1.55vw,21px);font-weight:bold;text-shadow:0 2px 2px #001b2c}
.water-layer{grid-column:2/12;grid-row:2/12;z-index:0;background-image:linear-gradient(#00678333,#00345444),url('assets/water-texture.png');background-position:center;background-size:cover;background-repeat:no-repeat;border:1px solid #c8eaf5}
.title h1{white-space:nowrap;font-size:clamp(34px,4.2vw,66px)}
.cell{z-index:1;background:transparent;border-right:1px solid #d7f4f0cc;border-bottom:1px solid #d7f4f0cc;min-width:0;min-height:0}
.ship-slot{position:relative;z-index:2;pointer-events:none;min-width:0;min-height:0;filter:drop-shadow(0 3px 3px #001c)}
.ship-slot img{position:absolute;inset:5%;width:90%;height:90%;object-fit:contain}
.ship-slot.length-4 img{inset:0;width:100%;height:100%}
.ship-slot.length-3 img{inset:0;width:100%;height:100%}
.ship-slot.length-2 img{inset:-3%;width:106%;height:106%}
.ship-slot.length-1 img{inset:-24%;width:148%;height:148%}
.ship-slot.vertical img{width:calc(90% * var(--length));height:90%;left:50%;top:50%;transform:translate(-50%,-50%) rotate(90deg)}
.ship-slot.vertical.length-4 img{width:calc(100% * var(--length));height:100%}
.ship-slot.vertical.length-3 img{width:calc(100% * var(--length));height:100%}
.ship-slot.vertical.length-2 img{width:calc(106% * var(--length));height:106%}
.ship-slot.vertical.length-1 img{width:148%;height:148%}
.board-panel{padding-bottom:5px}.board-title{min-height:54px}.boards{align-items:start}
@media(max-width:800px){.board{grid-template-columns:28px repeat(10,1fr);grid-template-rows:28px repeat(10,1fr)}.fleet-pips{display:none}}

.prebattle-screen{min-height:100vh;padding:34px;background:linear-gradient(#77c2ec44,#062d49cc),url('assets/sea-background.png') center/cover fixed;display:grid;place-items:center;color:#f8f1df}
.prebattle-screen[hidden]{display:none}.prebattle-card{width:min(1120px,96vw);padding:34px;border:3px solid #c99743;border-radius:24px;background:linear-gradient(145deg,#0b3b61f2,#031c34f4);box-shadow:0 18px 55px #00121dcc}.prebattle-kicker{margin:0;color:#f3cc76;font:700 14px Arial;letter-spacing:.22em}.welcome-card{text-align:center}.welcome-card>h1,.placement-heading h1{margin:6px 0;color:#fff7e8;font-size:clamp(44px,7vw,88px);letter-spacing:.04em;text-shadow:0 4px 0 #081a2b}.welcome-copy{font-size:22px}.setup-columns{display:grid;grid-template-columns:1fr 1.2fr;gap:20px;margin:28px 0;text-align:left}.setup-columns fieldset{border:1px solid #d4a85f88;border-radius:16px;padding:16px}.setup-columns legend{padding:0 8px;color:#f4d185;font-weight:bold}.choice-card{display:block;margin:9px 0;padding:14px 16px;border:1px solid #9ebcd1;border-radius:12px;background:#ffffff0c;cursor:pointer}.choice-card.selected{border-color:#ffd77e;background:#e9b95022;box-shadow:inset 0 0 0 2px #d69d3b}.choice-card input{position:absolute;opacity:0}.choice-card strong,.choice-card span{display:block}.choice-card span{margin-top:4px;color:#bcd0dc;font:14px Arial}.captain-choice{display:inline-grid;grid-template-columns:76px auto;grid-template-rows:auto auto;align-items:center;text-align:left;column-gap:12px}.captain-choice img{grid-row:1/3;width:72px;height:72px;object-fit:contain}.captain-choice span{font:12px Arial;color:#c9d8e2;text-transform:uppercase;letter-spacing:.12em}.captain-choice strong{font-size:22px}.sound-choice{display:block;margin:18px}.primary-nautical,.placement-actions button{min-height:52px;border:2px solid #e1b35e;border-radius:13px;padding:0 24px;color:white;background:linear-gradient(#165681,#062c4b);font:700 17px Georgia;cursor:pointer;box-shadow:0 5px 12px #0018}.primary-nautical:disabled{opacity:.4;cursor:not-allowed}.placement-heading{display:flex;justify-content:space-between;align-items:center}.placement-heading h1{font-size:46px}.placement-heading p{margin:5px 0}.placement-heading>strong{color:#f5d284;font-size:20px}.placement-layout{display:grid;grid-template-columns:minmax(460px,1fr) 320px;gap:28px;margin-top:20px}.placement-board-wrap{padding:12px;border:1px solid #d3a75466;border-radius:16px;background:#00182c66}.placement-board{width:100%;margin:0}.fleet-dock h2{margin-top:0}.fleet-dock>p{min-height:44px;color:#d6e3e9;font:15px Arial}.fleet-dock #fleet-tray{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dock-ship{display:flex;align-items:center;gap:7px;min-height:54px;padding:6px;border:1px solid #6f94ac;border-radius:10px;color:#eff8fb;background:#ffffff0a;cursor:pointer}.dock-ship.selected{border-color:#ffd473;box-shadow:inset 0 0 0 2px #dba142}.dock-ship.placed{background:#1b765755}.dock-ship img{width:70px;height:30px;object-fit:contain}.dock-ship span{font:12px Arial}.placement-actions{display:grid;gap:8px;margin-top:14px}.placement-actions button{min-height:42px;font-size:13px}.placement-footer{display:flex;justify-content:space-between;margin-top:22px}
.placement-actions .rotate-icon{width:78px;height:78px;min-height:78px;margin:0 auto;padding:7px;border-radius:50%;background:linear-gradient(#195c87,#062b4a)}.rotate-icon svg{width:100%;height:100%}.rotate-arrow{fill:none;stroke:#f7d37f;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.rotate-boat{fill:#f5f1df;stroke:#d5a74d;stroke-width:2}
@media(max-width:800px){.prebattle-screen{padding:10px}.prebattle-card{padding:18px}.setup-columns,.placement-layout{grid-template-columns:1fr}.placement-heading{display:block}.placement-layout{gap:16px}.fleet-dock #fleet-tray{grid-template-columns:repeat(2,1fr)}.portrait{width:58px;height:58px}}
/* Visual fleet picker for young players */
.fleet-dock #fleet-tray{display:grid;grid-template-columns:1fr;gap:10px}.dock-ship{position:relative;display:grid;grid-template-columns:86px 1fr 42px;align-items:center;gap:8px;min-height:68px;padding:7px 12px;border:2px solid #6f94ac;border-radius:12px;color:#eff8fb;background:#ffffff0a;cursor:grab}.dock-ship.selected{border-color:#ffd473;box-shadow:inset 0 0 0 2px #dba142}.dock-ship.empty{opacity:.42;cursor:default}.dock-ship img{width:100%;height:42px;object-fit:contain}.dock-ship b{font:700 22px Arial;color:#f7d47d}.deck-cells{display:grid!important;grid-auto-flow:column;grid-auto-columns:1fr;gap:3px}.deck-cells i{display:block;width:17px;height:24px;border:2px solid #d8f4ff;background:#09769c;border-radius:3px;box-shadow:inset 0 0 7px #002c45}.icon-actions{grid-template-columns:1fr 1fr!important}.placement-actions .round-action{width:76px;height:76px;min-height:76px;margin:auto;padding:8px;border-radius:50%;background:linear-gradient(#195c87,#062b4a)}.round-action svg{width:100%;height:100%}.trash-action svg{fill:none;stroke:#f5f1df;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.fleet-dock .random-button{display:block;width:100%;margin-top:9px;min-height:46px;border:2px solid #e1b35e;border-radius:13px;color:#fff;background:linear-gradient(#165681,#062c4b);font:700 13px Georgia}

.turn-button{width:76px!important;height:76px!important;min-height:76px!important;margin:auto;border-radius:50%!important;padding:0!important;color:#fff8df!important;background:linear-gradient(#1c6d9e,#073353)!important}.turn-button span{display:block;font:700 58px/68px Arial,sans-serif;transform:translateY(-2px)}.placement-board .ship-slot{pointer-events:auto;cursor:grab;touch-action:none}.dock-ship{touch-action:none;user-select:none}.ship-drag-ghost{position:fixed;z-index:9999;pointer-events:none;width:170px;height:70px;object-fit:contain;transform:translate(-50%,-50%);filter:drop-shadow(0 8px 8px #001a);opacity:.92}.dragging-ship{opacity:.45}

.placement-board .ship-slot.selected-ship{border:3px solid #ffd15c;border-radius:10px;box-shadow:0 0 0 2px #704600,0 0 18px 5px #ffc94f99;background:#ffd15c20;z-index:4}.placement-board .ship-slot.selected-ship img{filter:drop-shadow(0 0 5px #ffe69a)}
.typing-answer{max-width:650px;margin:12px auto}.typing-answer label{display:block;margin-bottom:8px;color:#123c57;font-weight:bold}.typing-answer div{display:grid;grid-template-columns:1fr auto;gap:8px}.typing-answer input{min-width:0;padding:13px 16px;border:2px solid #b78332;border-radius:11px;font:700 22px Georgia}.typing-answer button,.battle-result button{border:2px solid #d7a54e;border-radius:11px;padding:10px 22px;color:white;background:#073a61;font:700 17px Georgia}.battle-result{max-width:440px;padding:34px;text-align:center;border:3px solid #d5a34e;border-radius:20px;color:#fff6df;background:#062c4a;box-shadow:0 20px 80px #000b}.battle-result::backdrop{background:#0019}
.orientation-lock{display:none;position:fixed;inset:0;z-index:100000;padding:28px;place-content:center;text-align:center;color:#fff6df;background:radial-gradient(circle at 50% 38%,#145a85,#031c32 72%)}.orientation-lock h1{margin:10px 0 5px;font-size:clamp(30px,9vw,54px);letter-spacing:.06em}.orientation-lock p{margin:0;font:18px/1.4 Arial}.rotate-phone-art svg{width:180px;height:150px;fill:none;stroke:#f4cb6c;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 6px 10px #001)}
.fullscreen-toggle{position:fixed;z-index:9000;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:grid;place-items:center;width:48px;height:48px;padding:10px;border:2px solid #efc56f;border-radius:12px;color:#fff;background:#063454e8;box-shadow:0 4px 15px #001a;cursor:pointer}.fullscreen-toggle svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.collapse-icon{display:none}.is-fullscreen .expand-icon{display:none}.is-fullscreen .collapse-icon{display:block}.fullscreen-fallback body{position:fixed;inset:0;overflow:hidden}.fullscreen-fallback .collapse-icon{display:block}.fullscreen-fallback .expand-icon{display:none}
@media (orientation:portrait) and (max-width:900px){.orientation-lock{display:grid}.fullscreen-toggle{display:none}body{overflow:hidden}}
@media (orientation:landscape){
  body:has(#game-screen:not([hidden])){overflow:hidden}.game-shell:not([hidden]){height:100dvh;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:max(6px,1.4vh) max(10px,2vw);gap:clamp(4px,1vh,10px)}
  .game-shell .masthead{width:min(1400px,100%);max-height:clamp(54px,11vh,92px);gap:clamp(7px,1.4vw,18px)}.game-shell .player-card{min-height:0;height:100%;padding:clamp(3px,.8vh,9px) clamp(7px,1.3vw,18px);border-radius:clamp(9px,1.5vw,18px)}.game-shell .portrait{width:clamp(38px,7vh,72px);height:clamp(38px,7vh,72px)}.game-shell .player-card small{font-size:clamp(11px,2.2vh,18px)}.game-shell .player-card strong{font-size:clamp(9px,1.8vh,15px);margin-top:1px}.game-shell .fleet-pips{margin-top:1px;line-height:8px}.game-shell .fleet-pips img{width:clamp(10px,2vh,18px);height:clamp(5px,1vh,8px)}.game-shell .title span{display:none}.game-shell .title h1{font-size:clamp(22px,5.4vh,52px);line-height:.95;margin:0}.game-shell .title p{font-size:clamp(8px,1.5vh,13px)}
  .game-shell .boards{width:min(1220px,100%);height:100%;min-height:0;margin:0 auto;gap:clamp(8px,2vw,28px);align-items:stretch}.game-shell .board-panel{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);padding:0;overflow:hidden}.game-shell .board-title{min-height:0;height:clamp(25px,5vh,48px);padding:2px clamp(8px,1.4vw,20px)}.game-shell .board-title h2{font-size:clamp(12px,2.8vh,22px)}.game-shell .board-title span{font-size:clamp(9px,1.8vh,14px)}.game-shell .board{height:calc(100% - 8px);width:auto;max-width:calc(100% - 12px);min-height:0;margin:4px auto;aspect-ratio:1;grid-template-columns:clamp(18px,4vh,32px) repeat(10,1fr);grid-template-rows:clamp(18px,4vh,32px) repeat(10,1fr)}.game-shell .coord{font-size:clamp(8px,2vh,17px)}
  .game-shell .lesson-panel{width:min(1320px,100%);margin:0 auto;padding:clamp(4px,.8vh,10px) clamp(10px,2vw,25px);border-width:2px;border-radius:clamp(8px,1.5vw,16px)}.game-shell .turn{font-size:clamp(8px,1.5vh,12px)}.game-shell .lesson-panel h2{margin:clamp(2px,.5vh,6px) 0;font-size:clamp(13px,3vh,27px);line-height:1}.game-shell .answers{gap:clamp(5px,1vw,12px);max-width:900px}.game-shell .answers button{min-height:clamp(28px,6vh,48px);font-size:clamp(12px,2.8vh,20px);border-radius:9px}.game-shell .result-row{grid-template-columns:clamp(90px,12vw,150px) 1fr clamp(90px,12vw,150px);gap:8px;margin-top:clamp(3px,.7vh,8px)}.game-shell .result-row button{min-height:clamp(27px,5.5vh,45px);font-size:clamp(11px,2.4vh,18px)}.game-shell .result-row p{margin:0;font-size:clamp(10px,2.1vh,17px)}.game-shell .typing-answer{margin:3px auto}.game-shell .typing-answer label{display:none}.game-shell .typing-answer input{padding:5px 10px;font-size:clamp(13px,2.8vh,20px)}.game-shell .typing-answer button{padding:5px 14px;font-size:clamp(12px,2.5vh,17px)}
}
@media (orientation:landscape) and (max-height:520px){.game-shell:not([hidden]){grid-template-rows:48px minmax(0,1fr) 100px}.game-shell .player-card{padding:2px 7px}.game-shell .title p,.game-shell .fleet-pips{display:none}.game-shell .portrait{width:38px;height:38px}.game-shell .lesson-panel h2{font-size:15px}.game-shell .turn{display:none}.fullscreen-toggle{width:39px;height:39px;padding:8px}.game-shell .board-title{height:25px}.game-shell .result-row{margin-top:2px}}
/* Phone and tablet landscape: preserve the complete desktop composition and fit it as one canvas. */
.desktop-fit body{width:100vw;height:100dvh;min-height:0;overflow:hidden;background:linear-gradient(#0c456d55,#031d35aa),url('assets/sea-background.png') center/cover no-repeat fixed}.desktop-fit body>.prebattle-screen:not([hidden]),.desktop-fit body>.game-shell:not([hidden]){position:fixed!important;z-index:1;left:50%!important;top:50%!important;width:var(--stage-width)!important;height:var(--stage-height)!important;min-width:var(--stage-width)!important;min-height:var(--stage-height)!important;max-width:none!important;max-height:none!important;margin:0!important;transform:translate(-50%,-50%) scale(var(--stage-scale))!important;transform-origin:center center!important;overflow:hidden!important}
.desktop-fit .game-shell:not([hidden]){display:block!important;padding:18px 64px 24px!important}.desktop-fit .game-shell .masthead{display:grid!important;grid-template-columns:1fr 1.35fr 1fr!important;gap:18px!important;align-items:center!important;width:auto!important;max-width:1400px!important;height:auto!important;max-height:none!important;margin:0 auto!important}.desktop-fit .game-shell .title span{display:block!important}.desktop-fit .game-shell .title h1{margin:-4px 0 0!important;font-size:66px!important;line-height:normal!important}.desktop-fit .game-shell .title p{display:block!important;font-size:16px!important}.desktop-fit .game-shell .player-card{height:auto!important;padding:10px 18px!important;border-radius:18px!important}.desktop-fit .game-shell .player-card small{font-size:20px!important}.desktop-fit .game-shell .player-card strong{font-size:16px!important;margin-top:5px!important}.desktop-fit .game-shell .portrait{width:76px!important;height:76px!important}.desktop-fit .game-shell .fleet-pips{display:block!important;margin-top:5px!important;line-height:normal!important}.desktop-fit .game-shell .fleet-pips img{width:20px!important;height:9px!important}
.desktop-fit .game-shell .boards{display:grid!important;grid-template-columns:1fr 1fr!important;gap:28px!important;width:auto!important;max-width:1220px!important;height:auto!important;min-height:0!important;margin:22px auto!important;align-items:start!important}.desktop-fit .game-shell .board-panel{display:block!important;min-height:0!important;padding-bottom:5px!important}.desktop-fit .game-shell .board-title{height:auto!important;min-height:54px!important;padding:12px 22px!important}.desktop-fit .game-shell .board-title h2{font-size:24px!important}.desktop-fit .game-shell .board-title span{font-size:16px!important}.desktop-fit .game-shell .board{display:grid!important;width:auto!important;height:auto!important;max-width:none!important;aspect-ratio:1!important;margin:8px 18px 18px!important;grid-template-columns:34px repeat(10,1fr)!important;grid-template-rows:34px repeat(10,1fr)!important}.desktop-fit .game-shell .coord{font-size:21px!important}
.desktop-fit .game-shell .lesson-panel{width:auto!important;max-width:1320px!important;margin:0 auto!important;padding:18px 28px!important;border-width:3px!important;border-radius:18px!important}.desktop-fit .game-shell .turn{display:block!important;font-size:16px!important}.desktop-fit .game-shell .lesson-panel h2{margin:8px 0 16px!important;font-size:34px!important;line-height:normal!important}.desktop-fit .game-shell .answers{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:14px!important}.desktop-fit .game-shell .answers[hidden],.desktop-fit .game-shell .typing-answer[hidden]{display:none!important}.desktop-fit .game-shell .answers button{min-height:54px!important;font-size:22px!important}.desktop-fit .game-shell .result-row{grid-template-columns:170px 1fr 170px!important;gap:20px!important;margin-top:16px!important}.desktop-fit .game-shell .result-row button{min-height:54px!important;font-size:22px!important}.desktop-fit .game-shell .result-row p{margin:1em 0!important;font-size:19px!important}.desktop-fit .game-shell .typing-answer{margin:12px auto!important}.desktop-fit .game-shell .typing-answer label{display:block!important}.desktop-fit .fullscreen-toggle{z-index:9000}
.desktop-fit .prebattle-screen:not([hidden]){display:grid!important;place-items:center!important;padding:24px!important;background:transparent!important}.desktop-fit .prebattle-card{width:1120px;height:872px;max-height:872px;overflow:hidden}.desktop-fit .placement-card{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.desktop-fit .placement-heading{min-height:88px}.desktop-fit .placement-heading h1{font-size:42px}.desktop-fit .placement-layout{grid-template-columns:minmax(0,1fr) 300px!important;min-height:0;height:100%;gap:22px;margin-top:10px}.desktop-fit .placement-board-wrap{height:100%;min-height:0;display:grid;place-items:center;padding:8px}.desktop-fit .placement-board{height:100%;width:auto;max-width:100%;margin:0!important}.desktop-fit .fleet-dock{min-height:0;overflow:hidden}.desktop-fit .fleet-dock #fleet-tray{gap:5px}.desktop-fit .dock-ship{min-height:51px;height:51px;grid-template-columns:74px 1fr 36px;padding:3px 8px}.desktop-fit .dock-ship img{height:34px}.desktop-fit .fleet-dock>p{min-height:26px;margin:7px 0}.desktop-fit .placement-actions{margin-top:5px}.desktop-fit .placement-actions .round-action,.desktop-fit .placement-actions .turn-button{width:58px!important;height:58px!important;min-height:58px!important}.desktop-fit .turn-button span{font-size:46px;line-height:52px}.desktop-fit .fleet-dock .random-button{min-height:38px;margin-top:5px}.desktop-fit .placement-footer{height:56px;margin-top:10px;align-items:center}.desktop-fit .placement-footer button{min-height:46px}.desktop-fit .setup-columns{grid-template-columns:1fr 1.2fr!important}

/* Phone welcome: one compact, non-scrolling screen. */
.phone-welcome-fit .welcome-card{width:1050px!important;height:650px!important;max-height:650px!important;padding:24px 42px!important}.phone-welcome-fit .welcome-card>h1{font-size:62px!important;margin:2px 0!important}.phone-welcome-fit .welcome-copy{margin:2px 0 10px;font-size:18px}.phone-welcome-fit .setup-columns{margin:12px 0!important;gap:14px}.phone-welcome-fit .setup-columns fieldset{padding:9px 14px}.phone-welcome-fit .choice-card{margin:5px 0;padding:8px 12px}.phone-welcome-fit .captain-choice img{width:58px;height:58px}.phone-welcome-fit .sound-choice{margin:8px}.phone-welcome-fit .primary-nautical{min-height:44px}

/* Phone battle: tablet composition, enlarged boards and side player cards. */
.phone-battle-fit .game-shell:not([hidden]){position:fixed!important;padding:0!important;background:linear-gradient(180deg,#ffffff16,#00182738)!important}.phone-battle-fit .game-shell .masthead{position:absolute!important;inset:0!important;display:block!important;width:auto!important;max-width:none!important;height:auto!important;margin:0!important}.phone-battle-fit .game-shell .title{position:absolute;z-index:4;top:4px;left:50%;width:660px;transform:translateX(-50%)}.phone-battle-fit .game-shell .title span,.phone-battle-fit .game-shell .title p{display:none!important}.phone-battle-fit .game-shell .title h1{font-size:54px!important;line-height:64px!important}.phone-battle-fit .game-shell .player-card{position:absolute;z-index:5;top:118px;display:flex!important;flex-direction:column;width:128px;height:auto!important;min-height:190px;padding:12px 5px!important;gap:5px!important;text-align:center!important;justify-content:flex-start!important;border-radius:16px!important}.phone-battle-fit .game-shell .player-card:first-child{left:8px}.phone-battle-fit .game-shell .player-card.computer{right:8px}.phone-battle-fit .game-shell .player-card .portrait{order:-1;width:70px!important;height:70px!important}.phone-battle-fit .game-shell .player-card small{font-size:19px!important}.phone-battle-fit .game-shell .player-card strong{font-size:13px!important}.phone-battle-fit .game-shell .fleet-pips{display:none!important}.phone-battle-fit .game-shell .boards{position:absolute!important;inset:72px 148px 8px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:18px!important;width:auto!important;max-width:none!important;height:auto!important;margin:0!important;align-items:stretch!important}.phone-battle-fit .game-shell .board-panel{display:grid!important;grid-template-rows:46px minmax(0,1fr)!important;height:100%!important;min-height:0!important}.phone-battle-fit .game-shell .board-title{height:46px!important;min-height:46px!important;padding:6px 14px!important}.phone-battle-fit .game-shell .board-title h2{font-size:20px!important}.phone-battle-fit .game-shell .board-title span{font-size:12px!important}.phone-battle-fit .game-shell .board{height:calc(100% - 8px)!important;width:auto!important;max-width:calc(100% - 8px)!important;margin:4px auto!important;grid-template-columns:28px repeat(10,1fr)!important;grid-template-rows:28px repeat(10,1fr)!important}.phone-battle-fit .game-shell .coord{font-size:15px!important}.phone-battle-fit .game-shell .lesson-panel{position:absolute!important;z-index:30;left:50%;bottom:10px;width:920px!important;max-width:920px!important;margin:0!important;padding:9px 18px!important;border-radius:16px!important;transform:translateX(-50%);transition:opacity .22s ease,transform .22s ease;box-shadow:0 12px 35px #001c}.phone-battle-fit .game-shell .lesson-panel h2{margin:2px 0 7px!important;font-size:24px!important}.phone-battle-fit .game-shell .turn{font-size:11px!important}.phone-battle-fit .game-shell .answers{grid-template-columns:repeat(3,1fr)!important;gap:8px!important}.phone-battle-fit .game-shell .answers button{min-height:38px!important;font-size:17px!important}.phone-battle-fit .game-shell .result-row{grid-template-columns:120px 1fr!important;margin-top:6px!important}.phone-battle-fit .game-shell .result-row p{font-size:13px!important}.phone-battle-fit .game-shell .fire-button{display:none!important}.phone-battle-fit .game-shell.question-dismissed .lesson-panel{opacity:0;pointer-events:none;transform:translate(-50%,125%)}
.phone-side-menu{display:none}.phone-battle-fit .phone-side-menu{position:absolute;z-index:40;left:32px;bottom:22px;display:grid;place-items:center;width:80px;height:80px;padding:16px;border:3px solid #e8bd68;border-radius:18px;color:#fff7df;background:linear-gradient(#165681,#062c4b);box-shadow:0 8px 20px #001b;cursor:pointer}.phone-battle-fit .phone-side-menu svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round}.phone-battle-fit .lesson-panel .game-menu{display:none!important}

.desktop-fit .game-shell .boards{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.desktop-fit .game-shell .board{grid-template-columns:34px repeat(10,minmax(0,1fr))!important;grid-template-rows:34px repeat(10,minmax(0,1fr))!important}.desktop-fit .game-shell .board>*{min-width:0;min-height:0}

/* Feedback occupies the whole question width, never a narrow menu column. */
.game-shell .result-row,.desktop-fit .game-shell .result-row,.phone-battle-fit .game-shell .result-row{display:flex!important;flex-wrap:wrap!important;justify-content:center;align-items:center;gap:8px!important}
.game-shell .result-row #message,.desktop-fit .game-shell .result-row #message,.phone-battle-fit .game-shell .result-row #message{order:-1;flex:0 0 100%;width:100%;min-width:0;margin:3px 0!important;line-height:1.3;text-align:center}
.result-row #message:empty{display:none}.phone-battle-fit .result-row #message{font-size:16px!important}
.placement-board .ship-slot.selected-ship{filter:drop-shadow(0 0 6px #68ffe0);outline:3px solid #68ffe0;outline-offset:-2px;border-radius:8px}
.placement-board .cell.snap-preview{background:#5eebbf88;box-shadow:inset 0 0 0 2px #aaffdf}
.placement-board,.dock-ship,.ship-slot{touch-action:none}
.ship-drag-ghost{pointer-events:none!important;filter:drop-shadow(0 0 6px #69ffdb)}

/* The cabinet supplies one fullscreen control for the whole player. */
.cabinet-game .fullscreen-toggle{display:none!important}

/* Keep navigation out of the vocabulary question. */
.game-shell .phone-side-menu{position:fixed;z-index:40;left:max(10px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));display:grid;place-items:center;width:54px;height:54px;padding:13px;border:2px solid #e8bd68;border-radius:15px;color:#fff7df;background:linear-gradient(#165681,#062c4b);box-shadow:0 6px 18px #0018;cursor:pointer}
.game-shell .phone-side-menu svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round}
.desktop-fit .game-shell .phone-side-menu{position:absolute;left:14px;bottom:22px}
.phone-battle-fit .game-shell .phone-side-menu{width:80px;height:80px;left:24px;bottom:22px}

@media(orientation:portrait) and (max-width:900px){.orientation-lock{display:none}body{overflow:auto}.fullscreen-toggle{display:block}.game-shell{padding:12px}.game-shell .boards{grid-template-columns:1fr}.game-shell .board-panel:first-child{display:block}.game-shell .answers{grid-template-columns:1fr}.game-shell .masthead{grid-template-columns:1fr 1fr}.game-shell .title{grid-column:1/-1;grid-row:1}.game-shell .title h1{font-size:32px}.game-shell .portrait{width:40px;height:40px}.game-shell .player-card{padding:8px;gap:6px}.game-shell .player-card strong{font-size:12px}.game-shell .board-title{padding:8px 12px}.game-shell .board-title h2{font-size:18px}}

/* Explicit light input colors: the surrounding game uses a dark theme. */
.typing-answer input{color:#142332;background:#fffaf0;caret-color:#142332;-webkit-text-fill-color:#142332;color-scheme:light;opacity:1}
.typing-answer input::placeholder{color:#5a6470;-webkit-text-fill-color:#5a6470;opacity:1}
.typing-answer input:disabled{color:#334155;-webkit-text-fill-color:#334155;background:#f2eadb;opacity:1}
.typing-answer input:focus{outline:3px solid #073a61;outline-offset:2px}
.board>.fleet-effect{z-index:8;pointer-events:none;object-fit:contain}
