@font-face { font-family:'Bree Serif'; src:url('assets/ui-v2/fonts/BreeSerif-Regular.ttf') format('truetype'); font-style:normal; font-weight:400 900; font-display:swap; }
@font-face { font-family:'Libre Baskerville'; src:url('assets/ui-v2/fonts/LibreBaskerville-Italic.ttf') format('truetype'); font-style:italic; font-weight:400 700; font-display:swap; }
:root {
  font-family:'Bree Serif', Georgia, serif;
  color: #163d57;
  background: #e9f7f7;
  color-scheme: light;
  --app-height: 100vh;
  --ink:#163d57;
  --muted-ink:#527276;
  --teal:#167f8e;
  --gold:#bd8d3e;
  --paper:#fff5df;
  --paper-texture:url('assets/ui-v15/paper.png');
}
* { box-sizing: border-box; }
html, body.android-player { width:100%; height:100%; margin:0; overflow:hidden; overscroll-behavior:none; -webkit-tap-highlight-color:transparent; }
button { font-family:inherit; cursor:pointer; -webkit-user-select:none; user-select:none; touch-action:manipulation; -webkit-appearance:none; appearance:none; background:transparent; }
.phone { width:100%; height:var(--app-height); margin:0; position:relative; isolation:isolate; overflow-y:auto; overscroll-behavior:contain; background:#e9f7f7; }
.icon { width:20px; height:20px; display:inline-block; vertical-align:middle; flex:none; pointer-events:none; }
.game, .asset-screen { background-color:#eef9f7; background-image:var(--ui-gameBackground); background-position:center; background-size:cover; }
.game { min-width:296px; min-height:var(--app-height); padding:8px 16px 15px; display:flex; flex-direction:column; align-items:center; position:relative; }
.screen-rim { display:none; }
.top { width:100%; height:40px; flex:none; display:grid; grid-template-columns:44px 1fr 44px; align-items:center; gap:26px; z-index:2; }
.icon-button { width:44px; height:44px; padding:10px; display:grid; place-items:center; border:0; color:#163d57; background:var(--ui-navButton) center/100% 100% no-repeat; filter:drop-shadow(0 2px 1px #244e5d28); }
.icon-button .icon { width:23px; height:23px; stroke-width:2.4; }
.brand { min-width:0; height:39px; padding:4px 9px; display:flex; align-items:center; justify-content:center; gap:6px; font-size:20px; font-weight:bold; white-space:nowrap; border:1.5px solid var(--gold); border-radius:20px; background:var(--paper) var(--paper-texture) center/420px auto; box-shadow:inset 0 0 0 2px #fffcf1,0 2px 1px #244e5d20; color:var(--ink); text-shadow:0 1px #ffffff; }
.brand span { font-variant-numeric:tabular-nums; }
.brand:is([data-digits="7"],[data-digits="8"],[data-digits="9"]) { font-size:16px; }
.counter { width:282px; max-width:90%; height:64px; flex:none; margin-top:8px; display:flex; justify-content:center; align-items:center; gap:16px; color:#fff4d5; border:solid transparent; border-width:13px 18px; border-image:var(--ui-counter) 22 30 fill / 13px 18px / 0 stretch; filter:drop-shadow(0 2px 1px #244e5d36); z-index:2; }
.counter .cannon { width:36px; height:36px; color:#f6c056; transform:rotate(-8deg); filter:drop-shadow(0 1px #3b210f); }
.counter-copy { display:flex; align-items:center; gap:8px; font-weight:bold; white-space:nowrap; text-shadow:0 2px 1px #092732; }
.counter-copy .label, .counter-copy .moves { font-size:16px; }
.counter-copy strong { font-size:45px; line-height:1; color:#ffd064; font-variant-numeric:tabular-nums; }
.counter.danger strong { color:#ffb07c; }
.threat-hud { width:100%; height:76px; margin-top:8px; flex:none; position:relative; z-index:3; }
.admiral-portrait { position:absolute; left:-1px; top:-4px; width:86px; height:86px; background-position:center bottom; background-size:contain; background-repeat:no-repeat; filter:drop-shadow(0 0 1px #fffef5) drop-shadow(0 2px 2px #244e5d45); pointer-events:none; }
.threat-hud .counter { position:absolute; left:84px; top:0; width:calc(100% - 86px); max-width:none; height:50px; margin:0; gap:9px; border-width:9px 13px; border-image-width:9px 13px; }
.threat-hud .counter .cannon { width:28px; height:28px; }
.threat-hud .counter-copy { gap:6px; }.threat-hud .counter-copy .label,.threat-hud .counter-copy .moves { font-size:15px; }.threat-hud .counter-copy strong { font-size:37px; }
.cannon-charge { position:absolute; left:12px; right:12px; bottom:4px; height:3px; display:flex; align-items:stretch; gap:1px; pointer-events:none; }
.cannon-charge>i,.cannon-charge>span { flex:1; min-width:0; border-radius:1px; background:#7da3b84a; }
.cannon-charge>.filled,.cannon-charge>.charged { background:#f7ce68; box-shadow:0 0 2px #ffd78680; }
.threat-1 .cannon-charge>.filled,.threat-0 .cannon-charge>.filled,.threat-1 .cannon-charge>.charged,.threat-0 .cannon-charge>.charged { background:#ff8950; }
.navy-taunt { position:absolute; left:85px; top:53px; width:calc(100% - 92px); height:24px; padding:0 6px; display:flex; justify-content:center; align-items:center; border:solid transparent; border-width:4px 8px; border-image:var(--ui-secondary) 16 24 fill / 4px 8px / 0 stretch; color:#163d57; font-family:'Libre Baskerville',Georgia,serif; font-size:13px; line-height:1.05; font-weight:700; font-style:italic; white-space:nowrap; }
.navy-taunt::before { content:''; position:absolute; left:-13px; bottom:4px; width:10px; height:8px; background:#fff9eb; clip-path:polygon(100% 0,100% 100%,0 0); }
.last-move-ribbon { position:absolute; left:50%; bottom:-9px; transform:translateX(-50%); padding:1px 12px 2px; background:#a22e1d; border-top:1px solid #edba62; border-bottom:1px solid #edba62; clip-path:polygon(0 0,100% 0,94% 50%,100% 100%,0 100%,6% 50%); color:#fff0c2; font-size:11px; line-height:14px; white-space:nowrap; text-shadow:0 1px #5f190d; z-index:4; }
.navy-strip { width:324px; max-width:100%; height:48px; margin-top:5px; flex:none; position:relative; border-radius:18px; background:linear-gradient(#c7f2f0cf,#a7e3e0cf); box-shadow:inset 0 1px 0 #ffffffc9,0 1px 2px #5b9eaa38; z-index:2; }
.navy { position:absolute; top:1px; width:68px; height:44px; pointer-events:none; filter:drop-shadow(0 3px 2px #190b06a0); transform-origin:center bottom; }
.navy-left { left:-3px; transform:translateX(var(--approach)) scale(var(--navy-scale)); }.navy-right { right:-3px; transform:translateX(calc(-1 * var(--approach))) scale(var(--navy-scale)); }
.navy canvas { width:100%; height:100%; }
.navy-cannon { position:absolute; top:0; width:59px; height:48px; background-position:center bottom; background-size:contain; background-repeat:no-repeat; transform-origin:center bottom; pointer-events:none; filter:drop-shadow(0 2px 1px #244e5d38); }
.cannon-left { left:65px; }.cannon-right { right:65px; }
.armed .navy-cannon::after { content:''; position:absolute; top:70%; width:12px; height:13px; border-radius:50%; background:radial-gradient(ellipse,#fff7c5 0 8%,#ffae35 30%,#ed5d1d80 58%,transparent 73%); opacity:.7; pointer-events:none; }
.armed .cannon-left::after { left:65%; }.armed .cannon-right::after { right:65%; }
.threat-1 .navy-cannon::after,.threat-0 .navy-cannon::after { opacity:1; background:radial-gradient(ellipse,#fff8c2 0 17%,#ffca46 27%,#ff6a16 48%,#f3330b80 64%,transparent 76%); box-shadow:0 0 5px 2px #ff4a1880; }
.exit { position:absolute; left:50%; top:16px; transform:translateX(-50%); display:flex; align-items:center; gap:3px; color:#163d57; font-size:13px; font-weight:bold; text-shadow:0 1px #ffffffa8; }
.exit::before, .exit::after { content:''; width:8px; height:1px; position:absolute; top:50%; background:#458896; }.exit::before{right:calc(100% + 4px)}.exit::after{left:calc(100% + 4px)}
.exit .icon { width:17px; height:17px; }
.board-wrap { width:min(324px,max(264px,calc((var(--app-height) - 412px) * .75))); max-width:100%; margin:9px auto 0; flex:none; position:relative; z-index:1; }
.board-wrap::before { content:''; position:absolute; inset:-10px; border:solid transparent; border-width:10px; border-image:var(--ui-boardFrame) 30 fill / 10px / 0 stretch; pointer-events:none; z-index:6; filter:drop-shadow(0 2px 2px #244e5d40); }
.board-stage { --cell-size:54px; width:min(324px,max(264px,calc((var(--app-height) - 412px) * .75))); max-width:100%; margin:9px auto 0; flex:none; position:relative; z-index:1; }
.board-stage>.board-viewport { width:100%; height:100%; overflow:visible; position:relative; }
.board-stage .board-wrap { width:100%; max-width:none; margin:0; }
.board-stage.pan-harbor { --cell-size:44px; width:342px; height:432px; }
.board-stage.pan-harbor[data-columns="7"] { --cell-size:48px; }
.board-stage.pan-harbor>.board-viewport { overflow:auto; overscroll-behavior:contain; touch-action:pan-x pan-y; border-radius:8px; scrollbar-width:thin; scrollbar-color:#65aebb #e2f3f3; box-shadow:0 1px 4px #245c7038; }
.board-stage.pan-harbor .board-wrap { width:max-content; min-width:100%; padding:22px; background:#e8f7f0; }
.board-stage.pan-harbor .board-wrap::before { inset:12px; z-index:0; }
.board { position:relative; width:100%; aspect-ratio:var(--board-columns,6)/var(--board-rows,8); isolation:isolate; background:#37a8a0; overflow:visible; border-radius:5px; }
.board-stage.pan-harbor .board { width:calc(var(--board-columns,6) * var(--cell-size)); height:calc(var(--board-rows,8) * var(--cell-size)); aspect-ratio:auto; z-index:1; }
.board::before { content:''; position:absolute; inset:0; border-radius:5px; background:url('assets/harbor-water.png') center/cover; z-index:-1; }
.board::after { content:''; position:absolute; inset:0; border-radius:5px; background-image:linear-gradient(90deg,#e7f4cd33 1px,transparent 1px),linear-gradient(#e7f4cd33 1px,transparent 1px); background-size:calc(100% / var(--board-columns,6)) calc(100% / var(--board-rows,8)); pointer-events:none; z-index:0; }
.harbor-port { position:absolute; min-width:54px; height:20px; padding:2px 5px; border:solid transparent; border-width:3px 5px; border-image:var(--ui-secondary) 18 24 fill / 3px 5px / 0 stretch; display:flex; align-items:center; justify-content:center; gap:3px; color:#143d55; font-size:11px; line-height:1; font-weight:bold; white-space:nowrap; pointer-events:none; z-index:12; }
.harbor-port .icon { width:12px; height:12px; }
.harbor-port.port-up { transform:translate(-50%,calc(-100% - 2px)); }
.harbor-port.port-down { transform:translate(-50%,2px); }
.harbor-port.port-left,.harbor-port.port-right { writing-mode:vertical-rl; min-width:20px; width:20px; height:54px; padding:4px 2px; border-width:5px 3px; border-image-width:5px 3px; }
.harbor-port.port-left { transform:translate(calc(-100% - 2px),-50%); }
.harbor-port.port-right { transform:translate(2px,-50%); }
.board-stage.single-exit:not(.pan-harbor) .harbor-port.port-up { display:none; }
.board-pan-hint { position:absolute; left:50%; bottom:-17px; transform:translateX(-50%); max-width:100%; min-height:17px; padding:1px 9px; display:flex; align-items:center; justify-content:center; gap:4px; background:#fffbed; border:1px solid #d9c38d; border-radius:10px; color:#17495c; font-size:10px; font-weight:bold; line-height:13px; white-space:nowrap; pointer-events:none; z-index:8; }
.corridor { position:absolute; left:33.3333%; top:0; width:33.3333%; height:37.5%; background:linear-gradient(#e7e8b720,#fbf0aa12); border-left:1px dashed #f8e6a955; border-right:1px dashed #f8e6a955; pointer-events:none; z-index:1; }
.corridor::before { content:''; position:absolute; left:50%; top:14%; height:58%; width:0; border-left:2px dashed #fff6b950; }
.corridor-left,.corridor-right { border-left:0; border-right:0; border-top:1px dashed #f8e6a940; border-bottom:1px dashed #f8e6a940; }
.corridor-left::before,.corridor-right::before { left:14%; top:50%; width:58%; height:0; border-left:0; border-top:2px dashed #fff6b950; }
.corridor.hinted { background:#ffe99532; border-color:#fff0a9a0; }.corridor.hinted::before { border-color:#fff0aaa8; }
.piece, .flagship { position:absolute; margin:0; padding:0; display:block; border:0; background:transparent; color:#fff9df; z-index:3; min-width:0; min-height:0; }
.piece canvas, .flagship canvas { display:block; width:100%; height:100%; pointer-events:none; filter:drop-shadow(0 3px 2px #214c4f60); }
.piece.long-horizontal canvas { position:absolute; left:0; top:-8px; height:calc(100% + 16px); width:100%; }
.piece-label { position:absolute; left:2px; top:2px; font-size:12px; line-height:19px; min-width:19px; height:19px; text-align:center; background:#fff9e8; color:#163d57; border:1px solid #ddbf7c; border-radius:50%; font-weight:bold; pointer-events:none; box-shadow:0 1px 2px #315a4860; z-index:3; }
.heading-arrow { position:absolute; font-family:Georgia,serif; font-size:14px; font-weight:bold; line-height:1; pointer-events:none; color:#fff4c3; text-shadow:0 1px 2px #2f261c; z-index:4; }
.dir-up .heading-arrow { top:2px; left:50%; transform:translateX(-50%); }.dir-down .heading-arrow { bottom:2px; left:50%; transform:translateX(-50%); }.dir-left .heading-arrow { left:2px; top:50%; transform:translateY(-50%); }.dir-right .heading-arrow { right:2px; top:50%; transform:translateY(-50%); }
.piece.glow { outline:3px solid #fff3ab; outline-offset:-3px; border-radius:12px; background:#fff4bf45; }.piece.blocked { animation:blocked .23s ease-out; }.piece:disabled { opacity:1; cursor:default; }
.flagship { z-index:4; pointer-events:none; }.captain-label { position:absolute; bottom:-8px; left:50%; transform:translateX(-50%); min-width:58px; height:17px; padding:1px 6px 2px; background:var(--ui-captainLabel) center/100% 100% no-repeat; color:#fff0bd; font-size:9px; font-weight:bold; line-height:13px; white-space:nowrap; pointer-events:none; text-shadow:0 1px #172b31; }
.flagship-art-status { position:absolute; inset:18% 8%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border:1px solid #e6ce86; border-radius:18px; color:#fff7dc; background:#145467d9; text-align:center; }
.flagship-art-status .icon { width:28px; height:28px; }.flagship-art-status small { font-size:8px; }
.flagship.escaping { animation:escape .65s ease-in forwards; }.ghost { pointer-events:none; z-index:7; animation:depart .32s ease-in forwards; }
.flagship.escaping.escape-up { animation-name:escape-up; }.flagship.escaping.escape-right { animation-name:escape-right; }.flagship.escaping.escape-down { animation-name:escape-down; }.flagship.escaping.escape-left { animation-name:escape-left; }
.tools { width:342px; max-width:100%; height:56px; margin-top:18px; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:6px; border:0; background:none; z-index:2; flex:none; }
.tool { min-height:45px; min-width:0; padding:0 4px; margin:0; -webkit-appearance:none; appearance:none; border:solid transparent; border-width:9px 11px; border-image:var(--ui-secondary) 17 24 fill / 9px 11px / 0 stretch; background:transparent; color:#163d57; display:flex; align-items:center; justify-content:center; gap:5px; font-size:15px; line-height:1.12; font-weight:bold; text-shadow:0 1px #ffffff; filter:drop-shadow(0 2px 1px #244e5d28); }
.tool.primary { border-image-source:var(--ui-primary); color:#fff8da; text-shadow:0 1px 1px #155a66; }
.tool.long-label { font-size:15px; }
.tools .tool { min-height:44px; padding:0; border-width:7px; border-image-width:7px; gap:4px; font-size:14px; }
.tools .tool span { white-space:nowrap; }
.tool span { display:block; }.tool .icon { width:19px; height:19px; stroke-width:2; }
.tool:disabled { opacity:.54; cursor:default; filter:saturate(.5); }.tool:not(:disabled):active, .icon-button:active, .route-medal:not(:disabled):active { transform:translateY(1px); filter:brightness(1.06); }
.crew-band { width:100%; height:110px; margin-top:9px; flex:none; position:relative; z-index:2; }
.crew-portrait { position:absolute; bottom:0; width:96px; height:106px; background-position:center bottom; background-size:contain; background-repeat:no-repeat; filter:drop-shadow(0 0 1px #fffef5) drop-shadow(0 2px 2px #244e5d45); pointer-events:none; z-index:2; }
.crew-captain { left:-9px; }.crew-mate { right:-9px; }
.crew-speech { position:absolute; left:77px; top:9px; width:calc(100% - 154px); min-height:76px; padding:4px 7px; border:solid transparent; border-width:10px 12px 12px 16px; border-image:var(--ui-speech) 28 28 36 40 fill / 10px 12px 12px 16px / 0 stretch; display:flex; align-items:center; justify-content:center; text-align:center; color:#163d57; font-family:'Libre Baskerville',Georgia,serif; font-size:15px; line-height:1.23; font-weight:700; font-style:italic; filter:drop-shadow(0 2px 1px #244e5d26); }
.threat-2 .counter { filter:drop-shadow(0 0 4px #faaa26aa); }.threat-1 .counter,.threat-0 .counter { filter:drop-shadow(0 0 4px #ed4c22dd); }.threat-1 .counter-copy strong,.threat-0 .counter-copy strong { color:#ffb17a; }
.threat-2 .board-wrap::before { filter:drop-shadow(0 0 4px #e8a620b0); }
.threat-1 .board-wrap::after,.threat-0 .board-wrap::after { content:''; position:absolute; inset:-7px; border:2px solid #ff5738; border-radius:6px; box-shadow:0 0 7px 2px #ff351d90,inset 0 0 5px #ffc27860; pointer-events:none; z-index:7; }
.threat-1 .pan-harbor .board-wrap::after,.threat-0 .pan-harbor .board-wrap::after { inset:15px; z-index:0; }
.threat-1 .navy-cannon,.threat-0 .navy-cannon { filter:drop-shadow(0 1px 2px #f3511c); }.threat-safe .navy-strip { opacity:.65; }
.threat-step .admiral-portrait { animation:admiral-taunt .32s ease-out; }.threat-step .crew-portrait { animation:crew-flinch .32s ease-out; }.threat-step .navy-cannon { animation:cannon-ready .32s ease-out; }.threat-step .navy { animation:navy-advance .32s ease-out; }
.threat-paused *, .threat-paused *::before, .threat-paused *::after { animation-play-state:paused!important; }
.home-screen { width:100%; height:var(--app-height); min-width:296px; min-height:0; padding:12px 16px 10px; gap:8px; position:relative; display:flex; flex-direction:column; align-items:center; background:#158f9d url('assets/shipyard-v6/home-harbor-empty.png') center 46%/cover no-repeat; }
.home-header { width:100%; max-width:380px; min-height:34px; flex:none; display:grid; grid-template-columns:minmax(0,1fr) 36px; align-items:center; gap:10px; z-index:2; }
.home-info { width:36px; height:36px; min-height:36px; padding:7px; }
.home-info .icon { width:21px; height:21px; }
.home-logo { width:min(240px,72%); height:auto; aspect-ratio:344/208; flex:none; padding:0; margin:0; background:var(--ui-logo) center/contain no-repeat; filter:drop-shadow(0 3px 2px #244e5d40); z-index:2; }
.home-vessel { width:100%; max-width:320px; min-height:150px; flex:1 1 260px; position:relative; display:flex; align-items:center; justify-content:center; }
.home-vessel canvas { position:absolute; left:50%; bottom:0; transform:translateX(-50%); height:100%; width:auto; max-height:330px; max-width:88%; aspect-ratio:2/3; object-fit:contain; filter:drop-shadow(0 4px 3px #0b486059); }
.home-panel { width:100%; max-width:380px; min-height:0; margin:0; padding:11px 12px 10px; border:2px solid var(--gold); border-radius:25px; background:var(--paper) var(--paper-texture) center/420px auto; box-shadow:inset 0 0 0 2px #fffaf0,0 3px 2px #244e5d30; display:flex; flex-direction:column; align-items:center; position:relative; flex:none; z-index:2; }
.home-panel h2 { font-size:19px; line-height:1.15; text-align:center; margin:0; white-space:nowrap; font-weight:400; color:var(--ink); text-shadow:0 1px #ffffff; }
.route-divider { width:84%; height:9px; background:var(--ui-divider) center/100% 100% no-repeat; margin:4px auto 2px; }
.campaign-row { display:grid; grid-template-columns:38px repeat(3,64px) 38px; align-items:center; justify-content:center; gap:4px; width:100%; }
.route-page-button { width:38px; height:42px; padding:4px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; }
.route-page-button .icon { width:18px; height:18px; }.route-page-button span { font-size:8px; line-height:9px; font-weight:bold; }
.route-page-button:disabled { opacity:.4; cursor:default; }
.route-medal { width:64px; height:64px; flex:none; padding:0; border:0; position:relative; color:#fff6d6; background:var(--ui-routeOpen) center/100% 100% no-repeat; display:flex; flex-direction:column; justify-content:center; align-items:center; text-shadow:0 2px 2px #145566; }
.route-medal.locked { background-image:var(--ui-routeLocked); }
.route-medal span { font-size:28px; line-height:1; font-weight:bold; margin-top:0; font-variant-numeric:tabular-nums; }.route-medal .route-state { width:13px; height:13px; color:#ffe2a0; margin:-2px 0 1px; stroke-width:2.4; }.route-medal:disabled { cursor:default; }
.route-medal.current { filter:drop-shadow(0 0 2px #fff9cf); }
.route-medal.route-number-long span { font-size:22px; }.route-medal:is([data-digits="6"],[data-digits="7"]) span { font-size:15px; }.route-medal:is([data-digits="8"],[data-digits="9"]) span { font-size:11px; }
.home-progress { display:flex; align-items:center; justify-content:center; gap:8px; margin:7px 0 0; color:#17475d; font-family:'Libre Baskerville',Georgia,serif; font-size:12px; line-height:1.2; font-weight:700; font-style:italic; text-align:center; }
.home-footer { width:100%; display:flex; align-items:center; justify-content:center; margin-top:0; }
.home-footer .home-progress { min-width:0; overflow-wrap:anywhere; }
.overlay { position:absolute; inset:0; min-height:0; height:var(--app-height); background:#12384e80; z-index:20; display:flex; align-items:center; justify-content:center; padding:20px; }
.dialog { width:340px; max-width:100%; flex:none; margin:0; color:var(--ink); text-align:center; }
.dialog:not(.loss-dialog) { max-height:calc(var(--app-height) - 40px); overflow-y:auto; padding:20px 18px 16px; border:2px solid var(--gold); border-radius:24px; background:var(--paper) var(--paper-texture) center/420px auto; box-shadow:inset 0 0 0 2px #fffaf0,0 7px 14px #12384e45; }
.dialog h2 { font-size:27px; font-weight:400; line-height:1.1; margin:0 0 2px; text-transform:uppercase; text-shadow:0 1px #ffffff; }
.dialog-divider { width:88%; height:10px; margin:7px auto 8px; background:var(--ui-divider) center/100% 100% no-repeat; }
.dialog p { font-family:'Libre Baskerville',Georgia,serif; font-size:15px; line-height:1.4; font-weight:600; font-style:italic; margin:9px 0 17px; }
.dialog-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:center; gap:8px; }.dialog-actions .tool { width:100%; min-height:44px; font-size:13px; padding:1px 3px; }.dialog-actions .tool.primary { grid-column:1/-1; min-height:50px; font-size:20px; }.dialog-actions .tool:last-child:nth-child(2) { grid-column:1/-1; }.dialog-actions .tool.long-label { font-size:13px; }.dialog-actions .tool .icon { width:20px; height:20px; }
.info-overlay { position:fixed; min-height:0; height:var(--app-height); padding:16px; }
.info-dialog { height:min(700px,calc(var(--app-height) - 32px)); max-height:calc(var(--app-height) - 32px); display:flex; flex-direction:column; }
.info-dialog h2 { flex:none; font-size:23px; line-height:1.15; }.info-dialog>.dialog-divider,.info-dialog>.dialog-actions { flex:none; }
.info-content { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 6px 8px 2px; text-align:left; color:#163d57; -webkit-user-select:text; user-select:text; scrollbar-width:thin; scrollbar-color:#65aebb #e2f3f3; }
.info-content h3 { font-size:17px; line-height:1.2; margin:18px 0 6px; font-weight:400; }
.info-content p { margin:0 0 10px; font-family:'Bree Serif',Georgia,serif; font-size:15px; line-height:1.45; font-weight:400; font-style:normal; overflow-wrap:anywhere; }
.info-content .info-game { font-size:18px; line-height:1.25; margin-top:3px; }.info-content .info-date { font-size:12px; line-height:1.45; color:#416477; }
.info-content .info-contact { -webkit-user-select:text; user-select:text; }.info-dialog>.dialog-actions { padding-top:9px; }.info-dialog>.dialog-actions .tool.primary { font-size:20px; }
.asset-screen { min-height:var(--app-height); display:flex; align-items:center; justify-content:center; padding:20px; }.asset-screen .dialog h2 { font-size:26px; }.loading-compass { width:68px; height:68px; background:var(--ui-compass) center/contain no-repeat; }
.game.battle-running .board-viewport { pointer-events:none; animation:harbor-impact-jolt .56s .25s ease-out both; }
.game.battle-running .flagship { animation:flagship-hit-hide .001s .25s linear forwards; }
.battle-sequence { position:absolute; inset:0; pointer-events:none; z-index:11; overflow:visible; }
.battle-shot { position:absolute; left:var(--impact-x,50%); top:0; width:15px; height:15px; border-radius:50%; background:radial-gradient(circle at 28% 24%,#e3c989,#3d4148 32%,#101b26 72%); border:1px solid #f5d68f; box-shadow:0 0 5px #ffe39899; opacity:0; z-index:5; }
.battle-shot::before { content:''; position:absolute; left:6px; bottom:70%; width:3px; height:66px; background:linear-gradient(transparent,#fff4b7); opacity:.85; transform-origin:center bottom; transform:rotate(var(--trail-turn,0deg)); }
.battle-shot.left { --launch-x:-55px; --trail-turn:-12deg; }.battle-shot.right { --launch-x:55px; --trail-turn:12deg; }
.battle-live .battle-shot.left { animation:battle-shot-flight .235s .015s ease-in both; }.battle-live .battle-shot.right { animation:battle-shot-flight .24s .055s ease-in both; }
.battle-blast,.battle-splash,.battle-smoke,.battle-wreck,.battle-splinter { position:absolute; left:var(--impact-x,50%); top:var(--impact-y,55%); background-position:center; background-size:contain; background-repeat:no-repeat; transform:translate(-50%,-50%); opacity:0; }
.battle-blast { width:calc(var(--ship-width,33.333%) * 2.8); height:calc(var(--ship-height,37.5%) * 1.8); max-width:310px; max-height:310px; background-image:var(--ui-battleImpact); z-index:7; }
.battle-live .battle-blast { animation:battle-impact-bloom 1.22s .24s ease-out both; }
.battle-splash { width:calc(var(--ship-width,33.333%) * 3.2); height:calc(var(--ship-height,37.5%) * 1.9); max-width:350px; max-height:330px; background-image:var(--ui-battleSplash); z-index:6; }
.battle-live .battle-splash { animation:battle-water-burst 1.42s .42s ease-out both; }
.hull-fragment { position:absolute; top:var(--ship-top,37.5%); left:var(--ship-left,33.333%); width:calc(var(--ship-width,33.333%) * .5); height:var(--ship-height,37.5%); background-position:center; background-size:contain; background-repeat:no-repeat; opacity:0; z-index:10; transform-origin:center 60%; }
.hull-left { background-image:var(--ui-battleShipLeft); --hull-x:-55px; --hull-y:26px; --hull-turn:-31deg; }
.hull-right { left:calc(var(--ship-left,33.333%) + var(--ship-width,33.333%) * .5); background-image:var(--ui-battleShipRight); --hull-x:55px; --hull-y:34px; --hull-turn:35deg; }
.battle-live .hull-fragment { animation:battle-hull-split 1.12s .55s ease-out both; }
.battle-splinter { width:66px; height:90px; background-image:var(--ui-battleSplinters); z-index:8; }
.battle-live .battle-splinter { animation:battle-debris-flight 1.18s .54s ease-out both; }
.splinter-1,.battle-splinter1 { --debris-x:-108px; --debris-y:-54px; --debris-turn:-74deg; }
.splinter-2,.battle-splinter2 { --debris-x:112px; --debris-y:-65px; --debris-turn:83deg; }
.splinter-3,.battle-splinter3 { --debris-x:-82px; --debris-y:64px; --debris-turn:-124deg; animation-delay:.59s!important; }
.splinter-4,.battle-splinter4 { --debris-x:88px; --debris-y:76px; --debris-turn:132deg; animation-delay:.63s!important; }
.splinter-5,.battle-splinter5 { --debris-x:-28px; --debris-y:-98px; --debris-turn:-42deg; animation-delay:.57s!important; }
.splinter-6,.battle-splinter6 { --debris-x:34px; --debris-y:98px; --debris-turn:165deg; animation-delay:.66s!important; }
.battle-smoke { width:calc(var(--ship-width,33.333%) * 2.5); height:calc(var(--ship-height,37.5%) * 1.7); max-width:290px; max-height:290px; background-image:var(--ui-battleSmoke); z-index:9; }
.battle-live .battle-smoke { animation:battle-smoke-rise 1.92s .56s ease-out both; }
.battle-wreck { width:calc(var(--ship-width,33.333%) * 1.25); aspect-ratio:367/325; background-image:var(--ui-battleWreck); z-index:3; }
.battle-live .battle-wreck { animation:battle-wreck-settle 1.05s 1.45s ease-out both; }
.wreck-only .battle-wreck { opacity:1; }.wreck-only>*:not(.battle-wreck) { display:none; }
.muzzle-flash { position:absolute; left:76%; top:78%; width:96px; height:84px; background:var(--ui-battleMuzzle) center/contain no-repeat; transform-origin:right center; transform:translate(-100%,-50%) rotate(var(--muzzle-angle,-124deg)) scale(.4); opacity:0; pointer-events:none; z-index:12; animation:battle-muzzle-flare .42s .01s ease-out both; }
.cannon-left .muzzle-flash { --muzzle-angle:-124deg; }.cannon-right .muzzle-flash { left:24%; --muzzle-angle:-56deg; animation-delay:.055s; }
.loss-dialog { width:330px; max-height:calc(var(--app-height) - 36px); overflow-y:auto; border:solid transparent; border-width:58px 20px 24px; border-image:var(--ui-battleLossFrame) 70 25 30 fill / 58px 20px 24px / 0 stretch; color:#173b50; padding:0 3px 8px; display:flex; flex-direction:column; filter:drop-shadow(0 7px 8px #0c314d70); }
.loss-dialog>* { flex:none; }
.loss-dialog h2 { order:0; margin:-2px 0 0; font-size:64px; line-height:.98; font-weight:900; letter-spacing:1px; color:#a33e29; background:linear-gradient(#15374b 12%,#1a394a 36%,#ad3924 66%,#d65024 90%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; text-shadow:0 1px 1px #a9653c22; }
.loss-wreck-badge { order:1; width:100%; height:220px; margin:1px auto 0; background:var(--ui-battleLossHero) center/contain no-repeat; }
.loss-dialog .dialog-divider { height:10px; margin:4px auto; }
.loss-dialog p { order:2; margin:6px 0 10px; font-size:14px; line-height:1.35; }
.loss-dialog .dialog-actions { order:3; gap:8px; }.loss-dialog .dialog-actions .tool.primary { font-size:23px; min-height:56px; }
.loss-crew { display:none; }
button:focus-visible { outline:3px solid #fff0a7; outline-offset:3px; }
@keyframes depart { to { transform:translate(var(--dx),var(--dy)); opacity:0; } }
@keyframes escape { to { transform:translateY(-400px); opacity:0; } }
@keyframes escape-up { to { transform:translateY(-650px); opacity:0; } }
@keyframes escape-right { 0% { transform:translateX(0) rotate(0); } 20% { transform:translateX(48px) rotate(0); } 42% { transform:translateX(100px) rotate(90deg); } 100% { transform:translateX(650px) rotate(90deg); opacity:0; } }
@keyframes escape-left { 0% { transform:translateX(0) rotate(0); } 20% { transform:translateX(-48px) rotate(0); } 42% { transform:translateX(-100px) rotate(-90deg); } 100% { transform:translateX(-650px) rotate(-90deg); opacity:0; } }
@keyframes escape-down { 0% { transform:translateY(0) rotate(0) scale(1); } 18% { transform:translateY(36px) rotate(0) scale(.65); } 30% { transform:translateY(64px) rotate(180deg) scale(.65); } 45% { transform:translateY(100px) rotate(180deg) scale(1); } 100% { transform:translateY(650px) rotate(180deg); opacity:0; } }
@keyframes blocked { 25% { transform:translateX(-3px); } 75% { transform:translateX(3px); } }
@keyframes admiral-taunt { 35% { transform:translateY(-2px) rotate(-1deg); } }
@keyframes crew-flinch { 30% { transform:translateY(3px) rotate(1deg); } }
@keyframes cannon-ready { 0% { transform:translateY(-3px) scale(.96); } 100% { transform:translateY(0) scale(1); } }
@keyframes navy-advance { 0% { margin-top:-3px; } 100% { margin-top:0; } }
@keyframes flagship-hit-hide { to { opacity:0; } }
@keyframes harbor-impact-jolt { 0%,100% { transform:translate(0,0); } 12% { transform:translate(-5px,3px); } 28% { transform:translate(6px,-3px); } 44% { transform:translate(-4px,2px); } 62% { transform:translate(3px,-1px); } 80% { transform:translate(-1px,1px); } }
@keyframes battle-shot-flight { 0% { transform:translateX(var(--launch-x)) scale(.7); top:0; opacity:0; } 4% { opacity:1; } 97% { transform:translateX(0) scale(1.1); top:var(--impact-y,55%); opacity:1; } 100% { transform:translateX(0); top:var(--impact-y,55%); opacity:0; } }
@keyframes battle-impact-bloom { 0% { opacity:0; transform:translate(-50%,-50%) scale(.3); } 10% { opacity:1; transform:translate(-50%,-50%) scale(.78); } 35% { opacity:1; transform:translate(-50%,-50%) scale(1); } 70% { opacity:.85; transform:translate(-50%,-50%) scale(1.14); } 100% { opacity:0; transform:translate(-50%,-50%) scale(1.2); } }
@keyframes battle-water-burst { 0% { opacity:0; transform:translate(-50%,-40%) scale(.3); } 18% { opacity:1; transform:translate(-50%,-46%) scale(.82); } 50% { opacity:1; transform:translate(-50%,-50%) scale(1); } 100% { opacity:0; transform:translate(-50%,-43%) scale(1.2); } }
@keyframes battle-hull-split { 0% { opacity:1; transform:translate(0,0) rotate(0); } 72% { opacity:1; transform:translate(var(--hull-x),var(--hull-y)) rotate(var(--hull-turn)); } 100% { opacity:0; transform:translate(var(--hull-x),calc(var(--hull-y) + 12px)) rotate(var(--hull-turn)); } }
@keyframes battle-debris-flight { 0% { opacity:0; transform:translate(-50%,-50%) scale(.38) rotate(0); } 8% { opacity:1; } 74% { opacity:1; transform:translate(calc(-50% + var(--debris-x)),calc(-50% + var(--debris-y))) scale(.82) rotate(var(--debris-turn)); } 100% { opacity:0; transform:translate(calc(-50% + var(--debris-x)),calc(-50% + var(--debris-y) + 12px)) scale(.75) rotate(var(--debris-turn)); } }
@keyframes battle-smoke-rise { 0% { opacity:0; transform:translate(-50%,-50%) scale(.55); } 24% { opacity:.88; transform:translate(-50%,-62%) scale(.96); } 66% { opacity:.7; transform:translate(-50%,-73%) scale(1.15); } 100% { opacity:0; transform:translate(-50%,-83%) scale(1.28); } }
@keyframes battle-wreck-settle { 0% { opacity:0; transform:translate(-50%,-42%) scale(.88); } 55% { opacity:1; transform:translate(-50%,-50%) scale(1.03); } 100% { opacity:1; transform:translate(-50%,-50%) scale(1); } }
@keyframes battle-muzzle-flare { 0% { opacity:0; transform:translate(-100%,-50%) rotate(var(--muzzle-angle)) scale(.28); } 15% { opacity:1; transform:translate(-100%,-50%) rotate(var(--muzzle-angle)) scale(.75); } 50% { opacity:1; transform:translate(-100%,-50%) rotate(var(--muzzle-angle)) scale(1.1); } 100% { opacity:0; transform:translate(-100%,-50%) rotate(var(--muzzle-angle)) scale(1.17); } }
@media (max-height:760px) {
  .game { padding-top:8px; }
  .top { height:40px; }.brand { height:35px; font-size:18px; }
  .threat-hud { margin-top:6px; height:70px; }.admiral-portrait { height:77px; }.threat-hud .counter { height:47px; }.threat-hud .counter-copy strong { font-size:34px; }.navy-taunt { top:50px; }
  .navy-strip { margin-top:3px; height:44px; }.navy { height:41px; }.navy-cannon { height:44px; }.exit { top:14px; }
  .board-wrap { margin-top:7px; }.tools { margin-top:16px; }.crew-band { margin-top:8px; }
}
@media (max-width:350px) {
  .top { gap:12px; }.counter { gap:9px; }.counter-copy .label,.counter-copy .moves { font-size:14px; }
  .admiral-portrait { left:-3px; width:70px; }.threat-hud .counter { left:72px; width:calc(100% - 74px); gap:5px; }.threat-hud .counter-copy { gap:4px; }.threat-hud .counter-copy .label,.threat-hud .counter-copy .moves { font-size:12px; }.threat-hud .counter .cannon { width:24px; height:24px; }.navy-taunt { left:73px; width:calc(100% - 77px); font-size:10px; }
  .navy { width:58px; }.navy-cannon { width:49px; }.cannon-left { left:54px; }.cannon-right { right:54px; }.crew-portrait { width:78px; height:92px; }.crew-captain { left:-7px; }.crew-mate { right:-7px; }.crew-speech { left:64px; width:calc(100% - 128px); padding:3px; font-size:13px; }
  .tool { gap:3px; font-size:12px; border-left-width:7px; border-right-width:7px; }.tool .icon { width:16px; height:16px; }
  .overlay { padding:17px; }.dialog:not(.loss-dialog) { padding-left:14px; padding-right:14px; }.dialog:not(.loss-dialog) h2 { font-size:24px; }.dialog-actions .tool { font-size:13px; }.dialog:not(.loss-dialog) .dialog-actions .tool.primary { font-size:20px; }.dialog-actions .tool.long-label { font-size:13px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none!important; transition:none!important; } .game.battle-running .flagship { opacity:0; }.battle-live .battle-wreck { opacity:1; transform:translate(-50%,-50%); }.battle-live>*:not(.battle-wreck),.muzzle-flash { display:none!important; } }

/* Home, Shipyard and Shop share one compact wallet and navigation. */
.wallet-strip { width:100%; display:flex; justify-content:center; align-items:center; gap:6px; flex:none; z-index:2; }
.wallet-chip { min-width:76px; min-height:30px; padding:3px 8px; display:flex; justify-content:center; align-items:center; gap:5px; border:1px solid #b8c5b6; border-radius:8px; background:#fff8e6ed; box-shadow:inset 0 1px #fffdf5; color:var(--ink); font-size:14px; font-variant-numeric:tabular-nums; }
.wallet-chip .icon { width:17px; height:17px; }
.wallet-coins .icon { color:#b48124; }
.wallet-gems .icon { color:#1c94ad; }
.wallet-scrap .icon { color:#798c93; }
.home-header .wallet-strip { justify-content:flex-start; }
.home-header .wallet-chip { min-width:0; flex:1; padding:4px 5px; }
.meta-navigation { width:100%; max-width:380px; height:70px; flex:0 0 70px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr); align-items:end; gap:6px; padding:0; z-index:3; }
/* The source art has alpha corners; transparent native button backgrounds matter. */
.meta-nav-button { min-height:60px; height:60px; min-width:0; margin:0; padding:0 3px; position:relative; appearance:none; background:transparent; color:#1a485c; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:12px; line-height:1.08; border:solid transparent; border-width:7px 10px; border-image:var(--ui-secondary) 16 24 fill / 7px 10px / 0 stretch; text-shadow:0 1px #fffaf0; }
.meta-nav-button .icon { width:22px; height:22px; }
.meta-nav-button.selected:not(.meta-nav-main) { color:#126f7d; }
.meta-nav-button.meta-nav-main { height:70px; min-height:70px; border-image-source:var(--ui-primary); color:#fff5d7; font-size:18px; text-shadow:0 1px #14495e; gap:1px; }
.meta-nav-main .icon { width:24px; height:24px; }
.meta-nav-main small { font-size:10px; line-height:1.1; letter-spacing:.4px; }
.meta-nav-button:not(:disabled):active { transform:translateY(1px); filter:brightness(1.06); }

/* This window sits above the live Home. Only its body is paper; navigation stays
   on the harbor beneath it. Loading, empty and ready states keep these bounds. */
.meta-overlay { padding:10px; background:#153a505c; min-height:0; }
.meta-screen { color:var(--ink); display:flex; flex-direction:column; }
.meta-window { width:min(440px,100%); height:calc(var(--app-height) - 20px); max-height:940px; min-height:0; min-width:0; margin:0; padding:12px 12px 0; gap:6px; position:relative; isolation:isolate; border:0; background:none; }
.meta-window::before { content:''; position:absolute; inset:0 0 82px; z-index:-1; border:2px solid var(--gold); border-radius:26px; background:var(--paper) var(--paper-texture) center/420px auto; box-shadow:inset 0 0 0 2px #fffaf0,0 4px 12px #12384e40; pointer-events:none; }
.meta-window>.meta-navigation { width:calc(100% + 16px); max-width:none; margin:12px -8px 0; }
.meta-heading { width:100%; min-height:36px; flex:none; display:grid; grid-template-columns:minmax(0,1fr) 36px; align-items:center; gap:8px; }
.meta-heading h1 { min-width:0; margin:0; text-align:center; font-size:24px; line-height:1.1; font-weight:400; text-shadow:0 1px #fff; }
.meta-heading .meta-close { width:36px; height:36px; padding:8px; }
.meta-heading .meta-close .icon { width:20px; height:20px; }
.meta-window>.wallet-strip { min-height:28px; }
.meta-window .wallet-chip { min-height:28px; padding-top:2px; padding-bottom:2px; }
.vessel-preview { min-height:0; width:100%; position:relative; }
.vessel-canvas { position:absolute; pointer-events:none; }
.preview-caption { position:absolute; font-size:10px; letter-spacing:.6px; z-index:2; color:#34647a; }
.vessel-slot { min-width:0; color:#24546a; }
.ship-art-status { position:absolute; display:grid; place-items:center; text-align:center; font-size:13px; pointer-events:none; }
.theme-selector,.shop-tabs { display:flex; gap:5px; width:100%; flex:none; }
.theme-chip { min-height:36px; flex:1; min-width:0; padding:5px 3px; font-size:12px; line-height:1.1; color:#2b5969; border:1px solid #b9c5b6; background:#fff7e5; border-radius:8px; display:flex; align-items:center; justify-content:center; gap:3px; }
.theme-chip.selected { background:var(--teal); color:#fff7e0; border-color:var(--teal); box-shadow:inset 0 1px #ffffff24; }
.theme-chip .icon { width:12px; height:12px; }
.part-grid { min-height:0; }
.part-card { min-width:0; color:#20475a; }
.part-card.selected { outline:2px solid #2e92a0; outline-offset:-2px; }
.part-card.owned .part-status { color:#217c71; }
.part-selection>div { min-width:0; display:flex; flex-direction:column; gap:3px; }
.part-selection strong { font-weight:400; }
.part-cost { display:flex; align-items:center; gap:4px; }

/* Compact store cards use the same paper and restrained gold edge. */
.shop-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:3px 1px 8px; scrollbar-width:thin; scrollbar-color:#9bbeb6 transparent; }
.shop-explainer { font-size:11px; text-align:center; line-height:1.35; margin:3px 5px 10px; color:var(--muted-ink); }
.store-card { display:grid; grid-template-columns:46px minmax(0,1fr); align-items:center; gap:7px; padding:10px; margin:0 0 9px; border:1px solid #c5a86b; border-radius:15px; color:#1f4c61; background:#fff9ece0; box-shadow:inset 0 0 0 1px #fffdf5,0 1px 1px #a87d3420; }
.store-copy { min-width:0; }
.store-copy h3 { margin:0 0 3px; font-size:17px; line-height:1.15; font-weight:400; }
.store-copy p { margin:0; font-size:11px; line-height:1.35; color:#426574; }
.owned-badge { display:inline-block; margin-left:4px; padding:1px 7px; border-radius:10px; background:#d8ebe1; font-size:13px; color:#216e6f; }
.product-emblem { width:44px; height:44px; display:grid; place-items:center; color:#b28a2d; background:#fff0c8; border-radius:50%; border:1px solid #dfc889; }
.product-emblem>.icon { width:29px; height:29px; }
.booster-buy-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; grid-column:1/-1; margin-top:2px; }
.store-card .tool { min-height:42px; font-size:11px; padding:1px; gap:4px; }
.product-card>.tool { grid-column:1/-1; }
.product-card .part-thumbnail { width:48px; height:62px; }
.set-thumbnail { width:50px; height:92px; }
.product-card:has(.set-thumbnail) { grid-template-columns:55px minmax(0,1fr); }
.product-card:has(.workshop-set-thumbnail) { grid-template-columns:104px minmax(0,1fr); }
.product-card>.workshop-set-thumbnail { width:104px; height:92px; }
.supply-card { grid-template-columns:minmax(0,1fr) 152px; }
.supply-card .store-copy,.supply-card>.tool { grid-column:auto; }
.supply-card .store-copy h3 { font-size:15px; }
.supply-card .store-copy p { font-size:10px; }
.supply-card>small { grid-column:1/-1; font-size:9px; text-align:center; color:#467781; }
.shop-section-title { font-size:18px; font-weight:400; margin:16px 4px 9px; }
.exchange-card { grid-template-columns:36px minmax(0,1fr) 108px; }
.exchange-card .product-emblem { width:35px; height:35px; }
.exchange-card .product-emblem .icon { width:23px; height:23px; }
.store-availability { text-align:center; font-size:11px; line-height:1.35; color:#577883; margin:12px 8px; }
.shop-support { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.shop-support .tool { min-height:42px; font-size:10px; padding:1px; gap:3px; }

.booster-tools { height:66px; }
.booster-tools .tool { display:flex; flex-direction:column; gap:0; min-height:57px; font-size:11px; }
.booster-tools .tool>span { display:flex; align-items:center; gap:5px; }
.booster-tools .tool .icon { width:17px; height:17px; }
.booster-tools .stock { font-size:13px; }
.booster-tools .empty-stock { color:#ba753e; }
.booster-tools .tool>small { font-size:8px; opacity:.76; }
.custom-hull { background-image:none!important; }
.custom-hull canvas { display:block; width:100%; height:100%; }
.clear-rewards { display:flex; justify-content:center; gap:14px; flex-wrap:wrap; margin:14px 0; }
.clear-rewards>span { display:flex; align-items:center; gap:4px; font-size:19px; color:#217b80; }
.clear-rewards .icon { width:23px; height:23px; color:#b78b30; }
.new-part-reward { display:grid; grid-template-columns:74px minmax(0,1fr); align-items:center; gap:7px; padding:8px; margin:9px 0; border:1px solid #c3d5bd; border-radius:10px; background:#f0f5db; text-align:left; }
.new-part-reward canvas { width:70px; height:80px; }
.new-part-reward>div { display:flex; flex-direction:column; gap:5px; }
.new-part-reward span { font-size:10px; letter-spacing:.5px; color:#377c7e; }
.new-part-reward strong { font-size:15px; font-weight:400; }
.new-part-reward small { font-size:10px; color:#547278; }
.part-progress,.replay-note { font-size:12px!important; line-height:1.35!important; margin:8px 0 14px!important; }
.win-dialog .dialog-actions { gap:7px; }
.win-dialog .dialog-actions .tool { font-size:12px; }
.win-dialog .dialog-actions .tool.primary { font-size:20px; }
.win-dialog .dialog-actions .reward-ad { grid-column:1/-1; }
.economy-notice p { font-size:14px; font-style:normal; }
.economy-notice .dialog-actions .tool { font-size:12px; }
.economy-notice .dialog-actions .tool.primary { font-size:18px; }
@media(max-height:760px) {
  .home-screen { padding-top:9px; gap:6px; }
  .home-logo { width:min(210px,66%); }
  .home-vessel { min-height:120px; }
  .home-vessel canvas { max-height:270px; }
  .home-panel { padding:9px 10px 8px; }
  .home-panel h2 { font-size:18px; }
  .route-medal { width:58px; height:58px; }
  .campaign-row { grid-template-columns:36px repeat(3,58px) 36px; }
  .home-progress { margin-top:5px; font-size:11px; }
  .meta-navigation { height:66px; flex-basis:66px; }
  .meta-nav-button { height:56px; min-height:56px; }
  .meta-nav-button.meta-nav-main { height:66px; min-height:66px; }
  .meta-window { padding-top:10px; gap:4px; }
  .meta-window::before { bottom:78px; }
  .meta-window>.meta-navigation { margin-top:12px; }
  .store-card { padding:8px; margin-bottom:8px; gap:6px; }
}
@media(max-height:660px) {
  .meta-navigation { height:60px; flex-basis:60px; }
  .meta-nav-button { height:52px; min-height:52px; }
  .meta-nav-button.meta-nav-main { height:60px; min-height:60px; font-size:16px; }
  .meta-nav-main .icon { width:21px; height:21px; }
  .meta-window::before { bottom:72px; }
  .home-logo { width:min(180px,58%); }
  .home-vessel { min-height:92px; }
  .home-panel { padding-top:7px; padding-bottom:7px; }
  .home-panel h2 { font-size:16px; }
  .route-divider { height:6px; margin-top:2px; }
  .campaign-row { grid-template-columns:34px repeat(3,52px) 34px; gap:3px; }
  .route-medal { width:52px; height:52px; }
  .route-medal span { font-size:23px; }
}
@media(max-width:350px) {
  .home-screen { padding-left:10px; padding-right:10px; }
  .home-header { gap:6px; }
  .home-panel h2 { font-size:17px; }
  .campaign-row { grid-template-columns:32px repeat(3,minmax(0,1fr)) 32px; gap:3px; }
  .route-page-button { width:32px; }
  .route-medal { width:100%; height:auto; min-height:44px; aspect-ratio:1; }
  .route-medal span { font-size:25px; }
  .route-medal[data-digits="3"] span { font-size:19px; }
  .route-medal.route-number-long span { font-size:16px; }
  .route-medal:is([data-digits="6"],[data-digits="7"]) span { font-size:12px; }
  .route-medal:is([data-digits="8"],[data-digits="9"]) span { font-size:9px; }
  .wallet-chip { min-width:68px; padding-left:5px; padding-right:5px; font-size:13px; }
  .wallet-chip .icon { width:15px; height:15px; }
  .meta-window { padding-left:10px; padding-right:10px; }
  .meta-nav-button { font-size:10px; border-left-width:8px; border-right-width:8px; }
  .meta-nav-button.meta-nav-main { font-size:17px; }
  .meta-nav-main small { font-size:9px; }
  .theme-chip { font-size:10px; }
  .store-copy h3 { font-size:15px; }
  .store-card .tool { font-size:10px; gap:3px; }
  .supply-card { grid-template-columns:1fr; }
  .supply-card .store-copy,.supply-card>.tool { grid-column:1/-1; }
  .product-card:has(.workshop-set-thumbnail) { grid-template-columns:90px minmax(0,1fr); }
  .product-card>.workshop-set-thumbnail { width:90px; height:84px; }
}
