:root{color-scheme:dark;--bg:#081525;--panel:#0d2335;--panel2:#102a40;--line:#2a4660;--muted:#88a5b8;--text:#eff9fb;--bright:#80ead0;--gold:#f2d59a;--red:#fc786a;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{background:radial-gradient(ellipse 90% 60% at 75% -20%,#16435a 0%,transparent 65%),radial-gradient(ellipse 50% 60% at 10% 60%,#092e35 0%,transparent 80%),var(--bg);color:var(--text);margin:0;min-height:100vh;overflow-x:hidden}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.47}button:focus-visible,.dock-ship:focus-visible{outline:2px solid var(--bright);outline-offset:3px}.ocean-light{position:fixed;pointer-events:none;z-index:0;width:300px;height:300px;border-radius:100%;filter:blur(110px);background:#136d75;opacity:.07}.ocean-light-a{top:6%;left:-15%}.ocean-light-b{right:-15%;bottom:5%}.noise-wash{position:fixed;inset:0;pointer-events:none;background-image:radial-gradient(#b1e9f20d .6px,transparent .6px);background-size:24px 24px;opacity:.2}.app-shell{width:min(100%,1120px);position:relative;z-index:1;padding:25px 24px 40px;margin:0 auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:28px;min-height:42px}.brand{border:0;background:none;padding:0;font-size:17px;font-weight:950;color:#f4fcff;letter-spacing:1.2px;display:flex;align-items:center;gap:4px;white-space:nowrap}.brand span:not(.brand-mark){color:var(--bright)}.brand .brand-mark{font-size:28px;color:var(--bright);margin-right:7px;line-height:1}.topbar-right{display:flex;gap:10px;align-items:center;font-size:13px;font-weight:800;color:var(--muted);font-variant-numeric:tabular-nums}.account-chip{display:flex;gap:9px;align-items:center;background:#102d41;border:1px solid var(--line);border-radius:99px;padding:9px 13px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-chip b{color:var(--gold)}.account-dot,.live-dot,.green-dot{width:7px;height:7px;background:var(--bright);border-radius:50%;box-shadow:0 0 14px var(--bright);display:inline-block}.icon-button,.login-button{height:36px;border:1px solid #36576c;background:#153048;color:#bde5e8;border-radius:11px;padding:0 13px;font-size:13px;font-weight:850}.landing{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(330px,.95fr);gap:70px;align-items:center;min-height:min(670px,78vh);padding:10px 18px}.landing-left{min-width:0}.eyebrow{display:flex;gap:9px;align-items:center;letter-spacing:3px;font-size:11px;color:#a6c4cf;font-weight:850;margin-bottom:22px}.landing h1{font-size:clamp(43px,5vw,72px);letter-spacing:-3.5px;line-height:1.08;margin:0;font-weight:950}.landing h1 em{font-style:normal;color:var(--bright)}.subline{font-size:18px;letter-spacing:.1px;color:#a2bdc8;margin:17px 0 26px}.home-card{padding:20px;background:linear-gradient(150deg,#10263a,#0b2032);border:1px solid #28485d;border-radius:22px;box-shadow:0 28px 65px #0004}.field-label{font-size:11px;font-weight:900;letter-spacing:2px;color:#b3ced9;display:flex;justify-content:space-between;margin:0 2px 11px}.field-label span{font-size:10px;color:#648ea2}.time-selector,.play-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.time-choice{background:#0b2335;color:#f0fcff;border:1px solid #28495e;border-radius:13px;padding:14px 6px 12px;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:21px;font-weight:950;font-variant-numeric:tabular-nums;transition:.18s}.time-choice small{font-size:11px;font-weight:600;color:#8caebc;letter-spacing:0;white-space:nowrap}.time-choice.chosen,.play-choice.chosen{border-color:var(--bright);background:#17423e;box-shadow:inset 0 0 0 1px #80ead022}.time-choice.chosen small{color:#abeade}.opponent-label{margin-top:19px}.play-choice{background:#0b2335;border:1px solid #28495e;padding:12px 5px;color:#c7dfe6;border-radius:12px;font-size:13px;font-weight:850;white-space:nowrap}.play-choice span{font-size:15px;margin-right:5px;color:var(--bright)}.play-choice.ranked-choice span{color:var(--gold)}.main-button,.ready-btn{background:linear-gradient(110deg,#a3ffe7,#65dbc7);color:#062e37;border:0;border-radius:12px;font-weight:950;box-shadow:0 12px 26px #59ddc124;letter-spacing:.5px}.main-button{margin-top:15px;width:100%;min-height:55px;display:flex;justify-content:center;align-items:center;gap:23px;font-size:15px}.main-button span{font-size:23px}.main-button:hover:not(:disabled),.ready-btn:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}.quiet-line{font-size:11px;color:#7196a8;display:block;text-align:center;margin:13px 0 -4px}.ranked-strip,.queue-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#e7d6a1;font-size:12px;font-weight:700;padding:14px 4px 0}.ranked-strip button,.queue-strip button{color:var(--bright);background:none;border:0;font-size:12px;font-weight:900}.queue-strip{color:#f3f8fc}.landing-right{min-width:0}.showcase{background:linear-gradient(155deg,#13354a,#0b2334);border:1px solid #355e70;padding:20px;border-radius:25px;box-shadow:0 45px 80px #0006;transform:perspective(1200px) rotateY(-5deg) rotateX(3deg);transition:transform .25s}.showcase:hover{transform:none}.showcase-header,.showcase-footer,.leader-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#81a8bb;letter-spacing:1.8px;font-weight:900;font-size:10px}.pulse-dot{color:var(--bright);letter-spacing:1px}.showcase-board{margin:18px auto;position:relative;display:grid;grid-template-columns:repeat(7,1fr);aspect-ratio:1;max-width:400px;background:#16455a;border:2px solid #36667a;border-radius:12px;overflow:hidden;box-shadow:inset 0 0 30px #0006}.showcase-cell{border:1px solid #41708878;background:linear-gradient(150deg,#225c74,#164358)}.showcase-cell.preview-track{background:#286a78}.showcase-cell.preview-hit{background:#895d5f;position:relative}.showcase-cell.preview-hit:after,.showcase-cell.preview-miss:after{content:'';display:block;position:absolute;left:40%;top:40%;width:20%;height:20%;background:#ffc793;border-radius:50%}.showcase-cell.preview-miss{position:relative}.showcase-cell.preview-miss:after{background:#a1cbd2}.preview-boat{position:absolute;z-index:4;top:14%;left:14%;width:58%;height:14%;filter:drop-shadow(0 8px 7px #0009)}.preview-boat svg{width:100%;height:100%}.preview-crosshair{position:absolute;top:68%;left:60%;font-size:35px;color:#92ffe2;text-shadow:0 0 20px #80ead0}.showcase-footer{letter-spacing:1.3px}.green-dot{margin-right:6px}.leader-card{margin:18px auto 0;background:#0a1b2c9c;border:1px solid #294459;padding:16px 19px;border-radius:17px;max-width:94%}.leader-head{color:#bcd2df;margin-bottom:12px}.leader-head b{color:#e7c983}.leader-line{display:flex;align-items:center;gap:12px;border-top:1px solid #243e51;color:#c7dae5;font-size:12px;padding:9px 0}.leader-line>span:nth-child(2){flex:1}.leader-line strong{color:#c9ddce}.leader-place{color:#638da3;font-weight:900}.leader-empty{font-size:12px;padding:8px;color:#688fa2;text-align:center}
/* Setup + gameplay */
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;min-height:42px}.match-status{font-size:clamp(13px,1.5vw,17px);font-weight:950;letter-spacing:1px;display:flex;align-items:center;gap:8px}.match-status.your-turn{color:var(--bright)}.status-pip{width:7px;height:7px;background:var(--bright);border-radius:50%}.toolbar-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.mode-tag{font-size:11px;font-weight:850;color:#94b9c6;background:#102c3f;border:1px solid #315367;border-radius:9px;padding:9px;white-space:nowrap}.rank-tag{color:#e4c68b}.tool-btn{min-height:37px;border:1px solid #31546a;background:#133248;color:#cde3e9;border-radius:10px;padding:7px 13px;font-size:12px;font-weight:900;white-space:nowrap}.tool-btn:hover:not(:disabled){border-color:var(--bright)}.ready-btn{min-height:40px;padding:8px 18px;white-space:nowrap;font-size:13px}.setup-tools{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px;background:#102839;border:1px solid #315467;border-radius:15px;margin-bottom:14px;min-width:0}.dock-wrap{flex:1;min-width:0}.dock-title{display:block;color:#84a7b6;font-size:9px;letter-spacing:1.5px;font-weight:900;margin:0 0 7px 3px}.ship-dock{display:grid;grid-template-columns:repeat(var(--fleet-count),minmax(0,1fr));gap:7px;min-width:0;max-width:600px;min-height:67px}.dock-slot{position:relative;min-width:0;height:67px;background:#0b2131;border:1px dashed #426375;border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:border-color .12s}.dock-slot.selected{border-color:var(--bright);background:#12423f}.dock-slot.docked-out{border-color:#2e5161;background:#0d2b39}.dock-ship{width:min(90%,var(--boat-width));height:40px;cursor:grab;touch-action:none;display:flex;justify-content:center;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.dock-ship .boat-svg{width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 5px 4px #0009)}.dock-outline{opacity:.20;cursor:default}.dock-check{position:absolute;right:5px;top:3px;font-size:14px;font-weight:950;color:var(--bright)}.dock-orient{position:absolute;bottom:2px;right:7px;font-size:13px;color:var(--bright);font-weight:900}.dock-number{position:absolute;left:0;top:-4px;font-size:9px;color:#91abb9;font-weight:900}.setup-buttons{display:flex;gap:7px;justify-content:flex-end;align-items:center;flex-wrap:wrap}.setup-buttons .icon-only{font-size:23px;padding:3px 8px}.ship-draggable{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}.ship-draggable:active{cursor:grabbing}.dual-boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.board-card{min-width:0;background:linear-gradient(140deg,#112d41,#0b2334);border:1px solid #2a5066;padding:16px 16px 18px;border-radius:18px;box-shadow:0 16px 35px #0003}.board-card.turn-card{border-color:var(--bright);box-shadow:0 0 0 1px #80ead029,0 16px 35px #0003}.board-caption{display:flex;align-items:center;justify-content:space-between;padding:3px 3px 13px;font-size:13px;font-weight:950;letter-spacing:1.5px}.board-count{font-size:11px;letter-spacing:0;color:#7fa7b8}.board-grid{display:grid;grid-template-columns:repeat(var(--size),minmax(0,1fr));grid-template-rows:repeat(var(--size),minmax(0,1fr));position:relative;width:min(100%,435px);margin:auto;aspect-ratio:1;border:2px solid #2e6077;border-radius:8px;overflow:hidden;isolation:isolate;background:#123f56;touch-action:none;box-shadow:inset 0 8px 24px #0018268a,0 12px 24px #020f1b3d}.sea-cell{min-height:0;min-width:0;padding:0;border-radius:0;border:1px solid #3b6f8755;background:radial-gradient(circle at 15% 18%,#5293b91c,transparent 65%),linear-gradient(148deg,#1b4f6a,#133f57);display:flex;justify-content:center;align-items:center}.sea-cell:disabled{opacity:1;cursor:default}.sea-cell[data-action="place"],.sea-cell.can-fire{cursor:crosshair}.sea-cell.can-fire:hover,.sea-cell[data-action="place"]:hover{background:#277f87}.sea-cell.is-hit{background:linear-gradient(160deg,#795358,#604555)}.sea-cell.is-miss{background:linear-gradient(150deg,#14394d,#102d3e)}.miss-dot{width:23%;height:23%;min-height:4px;min-width:4px;background:#8bb8c7;border-radius:100%;box-shadow:0 0 0 3px #9bc9da19}.ship-piece,.drag-preview{position:absolute;z-index:4;pointer-events:none;display:flex;align-items:stretch;justify-content:stretch;filter:drop-shadow(0 3px 3px #0006)}.ship-piece .boat-svg,.drag-preview .boat-svg{width:100%;height:100%;overflow:visible;display:block;pointer-events:none}.ship-piece.ship-draggable{pointer-events:auto;cursor:grab;touch-action:none}.ship-piece.is-selected .boat-svg{filter:drop-shadow(0 0 7px #7dffdfa6)}.ship-piece.is-sunk{filter:drop-shadow(0 2px 5px #041422d0)}.enemy-card .ship-piece.is-sunk{z-index:7}.hit-marker{position:absolute;z-index:6;pointer-events:none;transform:translate(-50%,-50%);width:13px;height:13px;border-radius:100%;background:#fbc998;border:3px solid #fd8b70;box-shadow:0 0 0 4px #ff806e4a,0 0 14px #fc8775}.hit-marker.sunk-marker{background:#fff0cd;border-color:#e3aa86;box-shadow:0 0 9px #f0b197}.enemy-veil{position:absolute;inset:0;z-index:5;background:#05243885;pointer-events:none;display:grid;place-items:center}.enemy-veil span{color:#95c7c9;opacity:.32;font-size:48px}.drag-ghost{position:fixed;pointer-events:none;z-index:10001;opacity:.86;filter:drop-shadow(0 12px 10px #000a)}.drag-ghost .boat-svg{height:100%;width:100%}.drag-preview{z-index:8;box-shadow:inset 0 0 0 2px #9dfce9;border:1px solid #9dfce9;background:#83f2d22a}.drag-preview.invalid{background:#ff77715b;border-color:#ff756d;box-shadow:inset 0 0 0 2px #ff756d}.drag-preview .boat-svg{opacity:.85}.is-dragging .ship-piece.ship-draggable{opacity:.7}.below-actions{display:flex;justify-content:center;align-items:center;min-height:30px;margin-top:12px}.waiting-dot{color:var(--bright);letter-spacing:7px;animation:pulse 1.2s ease-in-out infinite}@keyframes pulse{50%{opacity:.3}}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,140px);opacity:0;transition:transform .22s,opacity .22s;z-index:11000;pointer-events:none;max-width:90vw;text-align:center;background:#16394a;border:1px solid #6dd6c3;border-radius:11px;padding:12px 19px;font-size:12px;color:#edfffa;font-weight:900;letter-spacing:.6px;box-shadow:0 10px 30px #0008}.toast.show{transform:translate(-50%,0);opacity:1}
@media(max-width:1000px){.landing{gap:25px;padding:10px 4px}.setup-tools{flex-direction:column;align-items:stretch}.setup-buttons{justify-content:center}.ship-dock{max-width:none}}
@media(max-width:690px){.app-shell{padding:13px 12px 20px}.topbar{margin-bottom:14px}.brand{font-size:13px;letter-spacing:.4px}.brand .brand-mark{font-size:21px;margin-right:2px}.account-chip{font-size:11px;padding:7px;max-width:140px}.landing{display:flex;flex-direction:column;gap:20px;min-height:0;padding:22px 0 10px}.landing-left{width:100%;max-width:480px}.landing-right{width:100%;max-width:430px}.landing h1{font-size:clamp(45px,11vw,66px);letter-spacing:-2px}.eyebrow{font-size:10px;margin-bottom:15px}.subline{font-size:15px;margin:13px 0 24px}.home-card{padding:15px}.time-choice{font-size:19px;padding:12px 5px}.time-choice small{font-size:10px}.showcase{transform:none;max-width:380px;margin:auto}.toolbar{margin-bottom:8px}.mode-tag{font-size:10px;padding:6px}.match-status{font-size:12px}.toolbar-right{gap:5px}.tool-btn{padding:7px 9px;font-size:11px;min-height:33px}.ready-btn{min-height:36px;font-size:11px}.setup-tools{padding:9px;margin-bottom:9px;gap:8px;border-radius:12px}.ship-dock{min-height:51px;gap:5px}.dock-slot{height:51px;border-radius:8px}.dock-ship{height:34px}.dock-number{font-size:8px}.dock-check{font-size:11px}.setup-buttons{gap:6px}.setup-buttons .icon-only{font-size:18px}.dual-boards{grid-template-columns:1fr;gap:7px}.board-card{padding:7px 9px 9px;border-radius:12px}.board-caption{padding:1px 3px 5px;font-size:10px}.board-count{font-size:10px}.board-grid{width:min(100%,27dvh,335px);border:1px solid #2e6077;border-radius:5px}.sea-cell{border-width:.6px}.hit-marker{height:10px;width:10px;border-width:2px}.enemy-veil span{font-size:30px}.account-chip{display:none}}
@media(max-width:370px){.brand{font-size:11px}.play-choice{font-size:11px}.board-grid{width:min(100%,26dvh)}.time-choice small{font-size:9px}}
/* v4: uncluttered landing, clear preview, spacing rules & invalid rotations */
.landing h1{font-size:clamp(82px,10vw,152px);letter-spacing:-7px;line-height:.95;margin:2px 0 8px;text-shadow:0 15px 38px #00142270}
.hero-dot{color:var(--bright)}
.how-link{margin:12px 0 27px;padding:7px 0;border:0;background:transparent;color:#b7ddde;font-weight:850;letter-spacing:1.6px;font-size:12px;transition:color .2s}
.how-link:hover{color:var(--bright)}
.spacing-label{margin-top:16px}
.spacing-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.spacing-choice{border:1px solid #28495e;background:#0b2335;border-radius:10px;padding:10px 3px;font-size:11px;font-weight:850;color:#bcd5df;white-space:nowrap}
.spacing-choice.chosen{background:#17423e;color:#e7fff5;border-color:var(--bright)}
.ranked-rule{font-size:12px;color:#d9c186;margin:16px 2px 0}
.showcase{transform:none;padding:19px;border-color:#2c5164}
.showcase:hover{transform:none}
.showcase-board{grid-template-columns:repeat(6,1fr);margin:17px auto;border-radius:11px}
.showcase-cell{position:relative}
.preview-boat{top:33.333333%;left:16.666667%;width:50%;height:16.666667%;z-index:4;filter:drop-shadow(0 4px 4px #00111fc0)}
.demo-hit{position:absolute;z-index:7;transform:translate(-50%,-50%);height:14px;width:14px;border:3px solid #f7ac7f;border-radius:50%;background:#ffe2b4;box-shadow:0 0 0 3px #db6c5580,0 0 11px #ff765b}
.showcase-footer{letter-spacing:.6px;font-size:10px}
.legend-hit,.legend-miss{width:8px;height:8px;display:inline-block;border-radius:50%;background:#f4a77e;margin-right:5px}
.legend-miss{background:#a1cbd2}
.ship-piece.is-invalid{z-index:11!important;background:#ff383e47;border:2px dashed #ff6f70;border-radius:30px;filter:drop-shadow(0 0 6px #ff4034b8)}
.ship-piece.is-invalid .boat-svg{filter:sepia(.6) saturate(2.3) hue-rotate(310deg)}
.ship-piece.is-invalid.is-selected{box-shadow:0 0 0 3px #ff646460}
.lobby-btn{border-color:#7bd4c4;color:#e4fff7;font-weight:950;padding:9px 14px;background:#164c4b}
.help-backdrop{position:fixed;inset:0;z-index:20000;background:#020e19d9;backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:18px}
.help-dialog{background:linear-gradient(145deg,#11354b,#0b2234);border:1px solid #4e8291;border-radius:22px;box-shadow:0 30px 90px #000a;width:min(100%,430px);max-height:90vh;overflow:auto;padding:25px}
.help-heading{display:flex;align-items:center;justify-content:space-between;letter-spacing:1.9px;font-size:15px;margin-bottom:24px}
.help-close{font-size:28px;line-height:1;border:0;color:#c0dfe5;background:transparent}
.help-step{display:flex;align-items:flex-start;gap:16px;font-size:13px;color:#cce0e7;line-height:1.65;margin:0 0 19px}
.help-step strong{font-size:15px;color:var(--bright)}
.help-step b{color:#f3ffff}
.help-note{font-size:12px;color:#88b4c6;background:#0a1f30;border-radius:10px;padding:12px;line-height:1.7}
.help-dialog .main-button{margin-top:18px}
@media(max-width:690px){.landing{padding-top:12px}.landing h1{font-size:clamp(72px,20vw,110px);letter-spacing:-5px}.how-link{margin:11px 0 19px}.showcase{max-width:380px}.spacing-choice{font-size:10px}.demo-hit{width:11px;height:11px;border-width:2px}.lobby-btn{padding:7px 10px}}

/* v5 — minimal lobby and instructional clarity. */
.landing{min-height:min(610px,75vh)}
.landing-quick-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;font-size:12px;font-weight:900;letter-spacing:2.4px;color:#e5f9f5}
.landing-quick-head .how-link{margin:0;padding:10px 1px;font-size:11px;letter-spacing:1.1px;white-space:nowrap}
.help-highlight{display:flex;align-items:center;justify-content:space-between;border:1px solid #407b77;background:#10453f;border-radius:11px;padding:12px 14px;margin:-5px 0 20px;color:#bafce9;font-size:12px;font-weight:900;letter-spacing:1.1px}
.help-highlight b{color:#f0fff6}
.help-note{color:#b5d4df;padding:13px 13px 5px}
.help-note>b{display:block;margin-bottom:8px;color:#ddfbf4;letter-spacing:1.5px;font-size:10px}
.help-rule{display:flex;gap:8px;justify-content:space-between;align-items:flex-start;padding:10px 0;border-top:1px solid #31556770;line-height:1.4}
.help-rule span:first-child{font-weight:850;color:#e4f5fa;white-space:nowrap}
.help-rule span:last-child{text-align:right}
@media(max-width:690px){.landing{padding-top:22px}.landing-quick-head{margin-bottom:14px}.landing-quick-head .how-link{margin:0}}
/* v6 — compact turn-based clocks */
.clock-strip{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 12px}
.player-clock{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #35586a;border-radius:10px;background:#112a3e;color:#8eb4c1;font-size:11px;letter-spacing:1px;font-weight:900;padding:9px 13px;min-width:125px;font-variant-numeric:tabular-nums}
.player-clock b{color:#e9faff;font-size:18px;font-weight:950;letter-spacing:0}
.player-clock.active-clock{border-color:#63cfbb;background:#133c3d;color:#c1fff2}
.player-clock.urgent-clock{border-color:#ed8e77;background:#4c292e;color:#ffc3b0;animation:clock-warning 850ms infinite alternate}
.player-clock.urgent-clock b{color:#ffe2db}
.clock-note{font-size:11px;color:#7aafa7;letter-spacing:1px;font-weight:900}
@keyframes clock-warning{to{filter:brightness(1.35)}}
.resign-btn{border-color:#865458;color:#ffc3be;background:#392831}
@media(max-width:690px){.clock-strip{justify-content:center;gap:7px;margin-bottom:8px}.player-clock{flex:1;min-width:0;max-width:210px;padding:7px 10px;font-size:10px}.player-clock b{font-size:16px}}
/* v6 — two-player rematch negotiation */
.rematch-page{width:min(100%,760px);margin:clamp(28px,7vh,72px) auto 50px;padding:0 4px;color:#f2faff}
.rematch-head{text-align:center;margin-bottom:37px}.rematch-kicker{color:#79cfc1;font-size:11px;letter-spacing:3px;font-weight:900}.rematch-head h1{font-weight:950;font-size:clamp(40px,8vw,65px);letter-spacing:-2.2px;line-height:1.1;margin:8px 0}.rematch-head p{font-size:13px;color:#a8c7d6;margin:13px 0}
.rematch-group{margin:0 0 29px}.rematch-title{font-size:11px;letter-spacing:1.6px;font-weight:950;color:#d5eaf0;display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.rematch-title>span{font-size:9px;color:#7799a9;letter-spacing:.8px}
.rematch-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.rematch-option{appearance:none;display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:108px;border-radius:16px;border:1px solid #335164;background:#0d2838;color:#e0edf2;cursor:pointer;transition:background .16s,border-color .16s,box-shadow .16s;touch-action:manipulation}.rematch-option>b{font-size:clamp(13px,2.3vw,18px);font-weight:900}.rematch-option>small{font-size:10px;color:#9bb8c4}.rematch-vote-label{display:block;height:15px;min-height:15px;font-size:9px;font-weight:950;letter-spacing:1px;margin-top:4px}
.rematch-option.my-vote{background:#18426a;border-color:#49aefa;box-shadow:inset 0 0 0 1px #57b2ff55}.rematch-option.my-vote .rematch-vote-label{color:#92d4ff}
.rematch-option.their-vote{background:#4b3a23;border-color:#e9b66c;box-shadow:inset 0 0 0 1px #e9b66c22}.rematch-option.their-vote .rematch-vote-label{color:#f3cd83}
.rematch-option.both-voted{background:#16443d;border-color:#70e6ae;box-shadow:inset 0 0 0 1px #9cffc955,0 0 25px #53efa011}.rematch-option.both-voted .rematch-vote-label{color:#92f9c9}
.rematch-option:focus-visible{outline:3px solid #f1fff8;outline-offset:2px}.rematch-legend{display:flex;justify-content:center;gap:24px;flex-wrap:wrap;margin:7px 0 34px;color:#afc8d2;font-size:11px}.rematch-legend span{display:flex;align-items:center;gap:7px}.rematch-legend i{width:10px;height:10px;border-radius:3px;display:inline-block}.legend-mine{background:#49aefa}.legend-theirs{background:#e9b66c}.legend-match{background:#70e6ae}.rematch-friendly-note{text-align:center;font-size:12px;color:#e9c983;margin:-13px 0 24px}.rematch-back{display:block;margin:0 auto}
@media(max-width:690px){.rematch-page{margin:26px auto}.rematch-head{margin-bottom:26px}.rematch-head h1{font-size:44px}.rematch-options{gap:6px}.rematch-option{min-height:97px;border-radius:11px;padding:6px 2px}.rematch-option>b{font-size:12px}.rematch-option>small{font-size:9px}.rematch-title>span{font-size:8px}.rematch-group{margin-bottom:24px}}

/* Online friend lobby: small, accessible connection indicator and share CTA. */
.friend-status{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:7px auto 1px;max-width:1180px;padding:5px 14px;font-size:11px;font-weight:750;letter-spacing:.08em;color:#a3bfd0}
.friend-presence{width:8px;height:8px;border-radius:50%;background:#7b91a0;box-shadow:0 0 0 4px rgba(123,145,160,.10)}
.friend-presence.is-online{background:#45e0aa;box-shadow:0 0 0 4px rgba(69,224,170,.12)}
.friend-copy{border:1px solid rgba(104,204,239,.37);border-radius:7px;background:rgba(41,148,182,.12);padding:7px 11px;color:#d9f9ff;font-size:11px;letter-spacing:.03em;font-weight:750;cursor:pointer;margin-left:auto}
.friend-copy:hover{background:rgba(49,168,205,.25)}
@media(max-width:600px){.friend-status{padding:4px 12px}.friend-copy{padding:7px 8px}}

.play-choice[disabled]{opacity:.42;cursor:not-allowed;}

/* FleetSnap 9.0 — lightweight one-tap fleet generation. */
.setup-buttons .random-btn{border-color:#478879;background:#164039;color:#c6fff0}
.setup-buttons .random-btn:hover{background:#1b5348;border-color:#80ead0}
@media(max-width:690px){.setup-buttons .random-btn{padding:7px 8px;font-size:11px}}

/* FleetSnap ranked: discrete post-match points, mode-specific leaderboards */
.rating-result{display:flex;justify-content:center;align-items:center;gap:16px;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.07);font-size:13px;color:#aab9c9}
.rating-result b{font-size:20px;letter-spacing:.015em}
.rating-up{color:#77dec4}.rating-down{color:#ff8b91}
@media(max-width:560px){.rating-result{padding:9px 10px}.rating-result b{font-size:17px}}

/* FleetSnap 12 — full match reveal, polished rating finish, profile + private replays. */
.account-chip{cursor:pointer;color:#dff6f2;font:inherit;font-size:12px;font-weight:780;transition:border-color .18s,background .18s}
.account-chip:hover{border-color:#6cd6be;background:#153d4b}
.cancel-search-button{background:linear-gradient(115deg,#5f2e39,#713949)!important;border-color:#e19eab!important;color:#ffe9e9!important}
.cancel-search-button:hover{filter:brightness(1.14)}
.end-hero{position:relative;overflow:hidden;width:min(100%,1140px);margin:10px auto 16px;padding:27px 16px 24px;border-radius:22px;border:1px solid #538a81;background:radial-gradient(ellipse at 50% -10%,#1d655f 0%,#102f3d 48%,#0a1f30 100%);text-align:center;box-shadow:0 18px 48px #03101b88,inset 0 1px #d4fff71f;animation:fs-enter .48s cubic-bezier(.2,.7,.15,1) both}
.end-hero:before{content:'';position:absolute;left:8%;right:8%;top:0;height:1px;background:linear-gradient(90deg,transparent,#bafde9,transparent)}
.end-loss{border-color:#815d69;background:radial-gradient(ellipse at 50% -10%,#6c353e 0%,#312738 50%,#112132 100%)}
.end-loss:before{background:linear-gradient(90deg,transparent,#ffc4ba,transparent)}
.end-eyebrow{color:#b2dbd3;letter-spacing:2.1px;font-size:10px;font-weight:900}
.end-loss .end-eyebrow{color:#dfb5b8}
.end-result-icon{display:inline-grid;place-items:center;margin:13px auto 0;width:45px;height:45px;border-radius:50%;border:1px solid #86f2c8;color:#abfcd6;background:#2c75603d;font-size:27px;box-shadow:0 0 28px #64e8a531}
.end-loss .end-result-icon{border-color:#efa9b0;color:#f8d4c6;background:#7c3c4e55;box-shadow:none}
.end-hero h2{font-weight:960;letter-spacing:4px;font-size:clamp(30px,6vw,49px);color:#f6fff9;line-height:1;margin:11px 0 9px;text-shadow:0 6px 22px #0006}
.end-hero .end-rating-score{font-size:clamp(37px,8vw,62px);font-weight:960;letter-spacing:-2px;line-height:1.2;font-variant-numeric:tabular-nums;animation:fs-pop .56s .12s both}
.end-rating-score small{font-size:11px;vertical-align:middle;letter-spacing:1.6px;font-weight:900}
.end-rating-path{font-size:14px;font-weight:850;color:#a8c7c9;margin:5px 0 12px;letter-spacing:1px}
.end-rating-path span{color:#619b9b;margin:0 7px}.end-rating-path strong{color:#f1ffff;font-size:17px}
.end-rating-pending{padding:15px;color:#e1d6a7;font-size:12px;font-weight:800}
.end-hero p{color:#c6d7dd;font-size:12px;margin:10px auto 12px}
.end-hero-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px;font-size:10px;font-weight:800;letter-spacing:.8px;color:#8bb7b9}
.end-history-button{padding:9px 14px;border-radius:10px;border:1px solid #63bfaa;color:#c6ffed;background:#1d61504a;font-weight:950;font-size:11px;cursor:pointer}
.end-history-button:hover{background:#1f6755}
@keyframes fs-enter{from{opacity:0;transform:translateY(12px) scale(.987)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes fs-pop{from{opacity:0;transform:translateY(9px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}
.profile-backdrop{position:fixed;inset:0;z-index:20001;padding:16px;background:#020a15dd;backdrop-filter:blur(9px);display:flex;justify-content:center;align-items:center}
.profile-dialog{width:min(100%,830px);max-height:min(94vh,900px);overflow-y:auto;overscroll-behavior:contain;padding:24px;border-radius:22px;border:1px solid #517886;background:linear-gradient(140deg,#123145 0%,#081b2b 86%);box-shadow:0 28px 90px #000b;color:#e5f5f8}
.profile-top{display:flex;align-items:center;justify-content:space-between;color:#84c7bc;font-size:11px;font-weight:900;letter-spacing:1.9px}
.profile-close{background:none;color:#d6ebf4;border:none;font-size:30px;line-height:1;cursor:pointer;padding:3px 7px}
.profile-identity{text-align:center;margin:8px 0 22px}
.profile-avatar{display:grid;place-items:center;width:64px;height:64px;margin:auto;border-radius:50%;font-size:36px;background:#225b55;color:#b4fae4;border:1px solid #5cb2a0}
.profile-identity h2{margin:9px 0 4px;font-size:24px;overflow-wrap:anywhere}.profile-identity small{font-size:10px;letter-spacing:1.8px;color:#78a9b7}
.profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:21px}
.profile-stats>div{border:1px solid #315567;background:#0b273a;border-radius:13px;padding:14px 5px;display:flex;flex-direction:column;gap:6px;text-align:center}
.profile-stats b{font-size:25px;color:#f1fcfc;font-variant-numeric:tabular-nums}
.profile-stats span{font-size:9px;color:#88b1bc;font-weight:900;letter-spacing:1px}
.profile-section-title,.profile-section-heading h3{font-size:11px;letter-spacing:1.4px;margin:0 0 9px;color:#d2e9ef}
.profile-rating-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:27px}
.profile-rating-item{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:12px;border:1px solid #345365;background:#102b3c}
.profile-rating-item span{font-size:11px;color:#a5c3cf;font-weight:800}
.profile-rating-item strong{font-size:24px;color:#bcebd9;font-variant-numeric:tabular-nums}
.profile-rating-item small{font-size:10px;color:#8cb1bc}
.profile-section-heading{display:flex;justify-content:space-between;align-items:center}.profile-section-heading span{font-size:9px;color:#7aa799;letter-spacing:1.1px}
.history-filters{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 12px}
.history-filter{border:1px solid #335465;background:#102938;border-radius:8px;padding:7px 11px;color:#a2c2d0;font-size:10px;font-weight:900;cursor:pointer}
.history-filter.active{background:#1b5149;border-color:#59cdb4;color:#e9fff4}
.history-entries{display:flex;flex-direction:column;gap:7px}
.history-entry{display:flex;align-items:center;gap:12px;text-align:left;padding:11px 12px;background:#0d2a3d;border:1px solid #2a4e62;border-radius:11px;color:#effbff;cursor:pointer;width:100%;transition:border-color .17s,background .17s}
.history-entry:hover{border-color:#75b9b7;background:#113649}
.history-outcome{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;font-size:14px;font-weight:950;flex:none}
.history-outcome.win{background:#175e50;color:#b8ffdc}.history-outcome.loss{background:#583139;color:#ffc0b5}
.history-entry-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.history-entry-main b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-entry-main small{font-size:10px;color:#86aabb}
.history-entry-points{font-size:16px;font-weight:900;font-variant-numeric:tabular-nums}.history-chevron{font-size:22px;color:#9dbbc8;margin-left:3px}
.history-empty{text-align:center;padding:22px 8px;color:#89aeba;font-size:12px;border-radius:11px;background:#0d2a3a}
.history-load,.back-small{display:block;margin:16px auto 0;border:1px solid #427475;background:#183e46;color:#d5faf1;font-size:11px;font-weight:850;padding:10px 18px;border-radius:9px;cursor:pointer}
.replay-detail{margin-top:15px}.history-detail-top{display:flex;align-items:center;justify-content:space-between;color:#96b8c3;font-size:11px}.history-detail-top .back-small{margin:0}
.replay-detail h3{text-align:center;font-size:26px;letter-spacing:1px;margin:14px 0 6px}.replay-detail h3 span{margin-left:8px}.replay-detail>p{text-align:center;color:#9cbcc9;font-size:11px;margin:0 0 18px}
.replay-boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.history-board-card{border-radius:14px;background:#0c293a;border:1px solid #34596c;padding:12px;min-width:0}
.history-board-caption{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:10px;font-weight:950;letter-spacing:1px;margin-bottom:10px;color:#e4f7f7}
.history-board-caption span{font-size:9px;font-weight:600;letter-spacing:0;color:#80abba;text-align:right}
.history-board-grid{width:min(100%,340px)!important;touch-action:auto!important}
.history-board-grid .sea-cell{pointer-events:none}
.replay-miss{position:absolute;z-index:8;width:7px;height:7px;border-radius:50%;background:#b5d5dc;opacity:.95;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #0c3347}
.replay-hit{z-index:9!important;width:11px!important;height:11px!important;background:#ffe1ad!important;border:2px solid #de684d!important;box-shadow:0 0 0 2px #142e3f!important}
@media(max-width:690px){.account-chip{display:flex;max-width:135px;gap:5px;padding:6px 8px;font-size:10px}.account-chip .account-dot{display:none}.end-hero{margin:8px 0 10px;padding:19px 12px}.profile-backdrop{padding:5px;align-items:stretch}.profile-dialog{max-height:100%;padding:17px 13px;border-radius:14px}.profile-stats{gap:5px}.profile-stats>div{padding:10px 3px}.profile-stats b{font-size:19px}.profile-stats span{font-size:8px}.profile-rating-grid{gap:5px}.profile-rating-item{padding:10px 6px}.profile-rating-item strong{font-size:19px}.replay-boards{gap:5px}.history-board-card{padding:6px}.history-board-caption{font-size:9px;display:block}.history-board-caption span{display:block;margin-top:3px}.replay-hit{width:8px!important;height:8px!important}}

/* FleetSnap 13 — compact presence and explicit logout */
.online-presence{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #24614f;border-radius:100px;background:#0d342b;color:#c6ffdd;font-weight:850;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.4px}
.online-dot{display:block;flex:none;width:7px;height:7px;border-radius:50%;background:#42eb92;box-shadow:0 0 0 3px #42eb921c,0 0 9px #36d991}
.online-presence b{color:#e6ffec;font-size:12px}
.logout-button{border:1px solid #426477;border-radius:9px;background:#142d3b;color:#dbe7ec;padding:10px 11px;white-space:nowrap;font-size:10px;font-weight:850;letter-spacing:.5px;cursor:pointer}
.logout-button:hover{background:#254b5a;border-color:#76b8bd}
.friendly-stats{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 14px;border:1px solid #326c63;border-radius:13px;background:#103b38;margin:-6px 0 23px;font-size:11px}
.friendly-stats span:first-child{font-weight:950;color:#a4ebd5;letter-spacing:1.1px}.friendly-stats strong{color:#f2ffff;margin-left:auto}.friendly-stats-wl{color:#b6d2cd;font-size:10px}
.friend-label{color:#8dd5ce;font-size:10px;font-weight:900;letter-spacing:.3px}
.google-backdrop{position:fixed;inset:0;z-index:30000;display:grid;place-items:center;background:#030e1acb;backdrop-filter:blur(11px);padding:18px}
.google-dialog{position:relative;width:min(100%,390px);padding:32px 25px 27px;border-radius:24px;text-align:center;color:#eafff5;border:1px solid #3c756d;background:linear-gradient(145deg,#184541,#0b2533 82%);box-shadow:0 35px 95px #000c}
.google-close{position:absolute;right:13px;top:12px;border:0;background:transparent;color:#c5e6e6;font-size:28px;line-height:1;cursor:pointer;padding:5px 10px}
.google-mark{display:grid;place-items:center;width:57px;height:57px;margin:0 auto 14px;background:#256c5a;border:1px solid #68ceaa;border-radius:17px;font-size:32px;color:#ccffe6}
.google-dialog h2{font-size:25px;margin:0 0 9px;font-weight:900;letter-spacing:-.6px}
.google-dialog p{margin:0 auto 22px;max-width:300px;color:#aac9cb;font-size:13px;line-height:1.6}
.google-official-button{display:flex;justify-content:center;min-height:44px;margin:0 auto 17px}
.google-dialog small{display:block;color:#7ca7aa;font-size:11px}
@media(max-width:590px){.topbar-right{gap:6px}.online-presence{padding:5px 7px;gap:4px;font-size:8px}.online-presence b{font-size:10px}.logout-button{font-size:9px;padding:7px 6px}.account-chip{max-width:115px!important}.online-presence span{display:none}}

/* FleetSnap 13.1 — intentionally styled profile shortcut (fixes browser-default gray button on mobile). */
.profile-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 11px 0 0;
  padding: 11px 15px;
  border: 1px solid #3d6172;
  border-radius: 12px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(120deg, #163347, #102a3b);
  box-shadow: inset 0 1px 0 #ffffff0a;
  color: #d7f6ec;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: left;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.profile-shortcut > span:first-child {
  min-width: 0;
  display: block;
  white-space: nowrap;
}
.profile-shortcut-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #1d4e50;
  color: #9ef1d9;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.profile-shortcut:hover {
  border-color: #66b9ad;
  background: linear-gradient(120deg, #1a3e4a, #123542);
}
.profile-shortcut:active { transform: scale(.995); }
.profile-shortcut:focus-visible { outline: 2px solid #8de9d4; outline-offset: 3px; }
@media (max-width: 690px) {
  .profile-shortcut { min-height: 45px; margin-top: 10px; padding: 9px 12px; font-size: 11px; }
  .profile-shortcut-arrow { width: 26px; height: 26px; }
}

/* FleetSnap 13.2 — readable mobile boards, unmistakable active turn. */
.turn-announcer{display:flex;align-items:center;gap:14px;margin:0 0 15px;padding:14px 18px;border-radius:15px;border:2px solid #5edfc5;background:linear-gradient(110deg,#134b49,#103840);box-shadow:0 9px 28px #00192233}
.turn-announcer.is-opponent-turn{border-color:#d2a661;background:linear-gradient(115deg,#453522,#2c2a2e)}
.turn-orb{width:13px;height:13px;border-radius:50%;flex:none;background:#7dffe2;box-shadow:0 0 0 5px #7dffe125,0 0 20px #7dffe17a}
.is-opponent-turn .turn-orb{background:#edc277;box-shadow:0 0 0 5px #ecc17725,0 0 16px #ecc17777}
.turn-main{display:flex;flex-direction:column;gap:2px}.turn-main strong{font-size:clamp(18px,2.5vw,25px);font-weight:950;letter-spacing:1.3px;color:#dcfff4}
.is-opponent-turn .turn-main strong{color:#ffdda4}.turn-main small{font-size:10px;letter-spacing:1.1px;color:#a4cbbf;font-weight:850}
.is-opponent-turn .turn-main small{color:#dbbd8f}.turn-emblem{margin-left:auto;font-size:26px;color:#91ffdf}.is-opponent-turn .turn-emblem{color:#edc277}
.dual-boards .board-card.is-compact{position:relative}.compact-board-tap{position:absolute;inset:0;z-index:11;cursor:pointer;background:transparent;border:0;padding:0;touch-action:manipulation}
.compact-board-tap:focus-visible{outline:3px solid #80ead0;outline-offset:-3px}
.dual-boards .board-card.is-compact .board-count{font-size:10px}
.external-browser-dialog .embedded-guide{background:#0d3144;border:1px solid #39687b;border-radius:11px;color:#e1f6fd;padding:14px;margin:17px 0;font-size:13px}
.external-copy-button{display:block;width:100%;padding:13px 12px;background:#88efd2;border:0;color:#082e36;border-radius:11px;font-weight:950;font-size:13px;letter-spacing:1px}
@media (max-width:690px){
 .dual-boards{display:flex;flex-direction:column;gap:13px;align-items:stretch}
 .dual-boards .board-card.is-compact{width:min(54vw,216px);align-self:flex-end;padding:7px 8px 9px;border-radius:12px}
 .dual-boards .board-card.is-compact .board-caption{font-size:10px;padding:2px 0 6px;letter-spacing:.5px}
 .dual-boards .board-card.is-compact .board-count{font-size:8px;white-space:nowrap}
 .dual-boards .board-card.is-compact .board-grid{width:100%;max-width:none;border:1px solid #37667c}
 .dual-boards .board-card.is-primary{width:100%;padding:9px 10px 12px;border-radius:14px}
 .dual-boards .board-card.is-primary .board-caption{font-size:13px;padding:3px 2px 10px}
 .dual-boards .board-card.is-primary .board-grid{width:100%;max-width:460px;border:2px solid #3b7991}
 .dual-boards .board-card.is-primary.turn-card{border-width:2px}
 .dual-boards .board-card.is-compact .hit-marker{height:9px;width:9px;border-width:2px}
 .dual-boards .board-card.is-primary .hit-marker{height:15px;width:15px;border-width:3px}
 .turn-announcer{padding:11px 14px;margin-bottom:10px;border-radius:11px}
 .turn-main strong{font-size:20px}.turn-emblem{font-size:24px}
 .clock-strip-setup{justify-content:stretch}.clock-strip-setup .player-clock{flex:1;max-width:none}
}
@media (max-width:370px){
 .dual-boards .board-card.is-compact{width:min(56vw,206px)}
 .dual-boards .board-card.is-primary .board-grid{width:100%;max-width:460px}
 .turn-main strong{font-size:17px}
}

/* FleetSnap 13.2 — readable match-history detail and full-width stacked replay fleets. */
.replay-detail{margin-top:16px}
.replay-result{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid #436172;border-radius:15px;padding:16px;margin:15px 0 12px;background:linear-gradient(110deg,#193445,#102b40)}
.replay-result-win{border-color:#3d9587;background:linear-gradient(110deg,#154a46,#113541)}
.replay-result-loss{border-color:#90606a;background:linear-gradient(110deg,#442d3c,#1d293c)}
.replay-result-icon{width:46px;height:46px;flex:none;display:grid;place-items:center;font-size:31px;color:#a0ffe7;border-radius:12px;background:#74e4c21b}
.replay-result-loss .replay-result-icon{color:#ffc1b1;background:#f4a39a16}
.replay-result-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.replay-result-copy small{font-size:9px;font-weight:900;letter-spacing:1.4px;color:#92b2bf}
.replay-detail .replay-result-copy h3{font-size:clamp(22px,4vw,29px);letter-spacing:1.1px;line-height:1.12;color:#edfff8;margin:0;text-align:left}
.replay-result-loss .replay-result-copy h3{color:#ffe1db}
.replay-mode-badge{padding:8px 11px;border:1px solid #5b8992;border-radius:9px;background:#183c4b;font-size:10px;letter-spacing:.8px;font-weight:950;color:#d3f0f1;white-space:nowrap}
.replay-mode-badge.replay-ranked{color:#f4d99c;border-color:#9c8654;background:#59472845}
.replay-versus{display:flex;align-items:center;gap:11px;flex-wrap:wrap;padding:12px 3px 17px;margin-bottom:11px;border-bottom:1px solid #2d5060}
.replay-versus .replay-vs{font-size:10px;font-weight:950;letter-spacing:1.6px;color:#8aacb9}
.replay-versus strong{font-size:16px;color:#effaff;overflow-wrap:anywhere}
.replay-versus small{font-size:11px;color:#8eafbb;margin-left:auto}
.replay-rating-shift{text-align:center;margin:0 auto 18px;font-size:17px;font-weight:950}
.replay-boards{display:flex;flex-direction:column;align-items:stretch;gap:21px;margin:15px auto 0;width:100%}
.replay-boards .history-board-card{width:100%;max-width:630px;margin:0 auto;padding:15px;border:1px solid #3b6b7d;border-radius:15px;background:linear-gradient(145deg,#12354a,#0a2637)}
.replay-boards .history-board-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 3px 10px;color:#e9fbff;font-size:13px;font-weight:950;letter-spacing:1.2px}
.replay-boards .history-board-caption span{color:#a1c2cd;font-size:10px;font-weight:650;letter-spacing:0;text-align:right}
.replay-boards .history-board-grid{width:min(100%,540px)!important;max-width:100%!important;margin:0 auto;touch-action:auto!important}
@media (max-width:690px){
 .replay-result{padding:12px 10px;gap:9px;border-radius:12px}
 .replay-result-icon{width:36px;height:36px;font-size:23px;border-radius:9px}
 .replay-detail .replay-result-copy h3{font-size:21px}
 .replay-mode-badge{font-size:9px;padding:7px 8px}
 .replay-versus{padding:8px 2px 14px;gap:8px}
 .replay-versus strong{font-size:14px}
 .replay-versus small{flex-basis:100%;margin-left:25px;font-size:10px}
 .replay-boards{gap:17px}
 .replay-boards .history-board-card{padding:9px 9px 12px}
 .replay-boards .history-board-caption{font-size:11px;display:flex;gap:6px}
 .replay-boards .history-board-caption span{display:block;font-size:9px;margin-top:0}
 .replay-boards .history-board-grid{width:100%!important;max-width:540px!important}
}
@media (max-width:350px){
 .replay-mode-badge{width:100%;text-align:center}
 .replay-boards .history-board-caption{flex-direction:column;align-items:flex-start}
}

/* Pending UI update: center the profile shortcut text+arrow as one unit. */
.profile-shortcut { justify-content: center; gap: 12px; }
.profile-shortcut > span:first-child { text-align: center; }
.profile-shortcut-arrow { margin: 0; }

/* FleetSnap 13.3 – intuitive ship placement and a readable battle preview. */
.preview-boat.preview-sunk{top:33.3333%;left:16.6667%;width:50%;height:16.6667%;}
.preview-boat.preview-damaged{top:66.6667%;left:66.6667%;width:16.6667%;height:33.3333%;filter:drop-shadow(0 4px 4px #00111fa0);}
.showcase-cell.preview-miss{background:linear-gradient(150deg,#14394d,#102d3e)!important;display:flex;align-items:center;justify-content:center}
.showcase-cell.preview-miss .miss-dot{width:19%;height:19%;min-width:5px;min-height:5px;background:#8bb8c7;border-radius:50%;box-shadow:0 0 0 2px #9bc9da19}
.dock-slot{cursor:pointer}
.dock-slot:hover{border-color:#70c6bb}
.ship-piece.is-invalid{opacity:1;filter:drop-shadow(0 0 6px #ff3c46d0)}
.ship-piece.is-invalid .boat-svg{filter:sepia(.82) saturate(3) hue-rotate(308deg)}
.cancel-room-btn{border:1px solid #d98d81;color:#ffb8ab;background:#472c3552;white-space:nowrap}
.cancel-room-btn:hover{border-color:#ffb8ab}
.rematch-friendly-note{font-weight:900;letter-spacing:1.1px;color:#f3ca83;text-align:center}
/* The profile shortcut's arrow sits on the centerline of its label. */
.profile-shortcut{justify-content:center;align-items:center}
.profile-shortcut-arrow{align-self:center;display:grid;place-items:center;margin:0}

@media(max-width:690px){
 .dual-boards .board-card.is-primary{}
 .dual-boards .board-card.is-compact{}
}


/* FleetSnap 13.4 – balanced navigation, intuitive board ordering, streamlined setup. */
/* Profile arrow retains its right-aligned square; SVG has no font baseline drift. */
.profile-shortcut{justify-content:space-between;align-items:center;gap:12px}
.profile-shortcut>span:first-child{flex:1;min-width:0;text-align:left}
.profile-shortcut-arrow{margin-left:auto;flex:0 0 27px;display:flex;align-items:center;justify-content:center;width:27px;height:27px;line-height:0;align-self:center}
.profile-shortcut-arrow svg{width:18px;height:18px;display:block;flex:none}
.main-button{justify-content:center;text-align:center;gap:10px}
.play-choice .choice-person{width:18px;height:18px;display:inline-block;vertical-align:middle;color:var(--bright);margin-right:4px}
/* Dock stays stationary; two rows hold the full fleet at any mode size. */
.ship-dock{grid-template-columns:repeat(var(--dock-cols),minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:9px;min-height:128px;max-width:640px}
.dock-slot{height:60px;min-width:0}
.dock-ship{width:min(94%,var(--boat-width));height:43px}
.dock-number{top:3px;left:5px;font-size:9px;background:#0b2537cf;padding:2px 4px;border-radius:4px;z-index:2}
.friend-room-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin:-2px 0 10px}
.friend-room-actions .tool-btn{min-height:35px;padding:7px 12px}
.friend-room-actions .share-btn{background:#153d45;border-color:#3f8e8b;color:#b9ffe8}
/* Misses use exactly the same muted navy water as the landing example. */
.sea-cell.is-miss,.sea-cell.is-miss:disabled{background:linear-gradient(150deg,#14394d,#102d3e)!important}
.sea-cell.is-miss .miss-dot{background:#8bb8c7;box-shadow:0 0 0 2px #9bc9da19}
/* The damaged two-cell ship lies horizontally; its right-hand segment is hit. */
.preview-boat.preview-damaged{top:66.6667%;left:66.6667%;width:33.3333%;height:16.6667%;filter:drop-shadow(0 4px 4px #00111fa0)}
@media(max-width:1000px){
 .setup-tools{gap:12px}
 .setup-buttons{justify-content:center}
}
@media(max-width:690px){
 .dual-boards{display:flex;flex-direction:column;align-items:stretch;gap:14px}
 /* Own above the opponent during both setup and actual turns. */
 .dual-boards .board-card.own-card{}
 .dual-boards .board-card.enemy-card{}
 .dual-boards .board-card.is-compact{width:min(62vw,245px);align-self:flex-start}
 .dual-boards .board-card.is-primary{width:100%;align-self:stretch}
 .ship-dock{grid-template-columns:repeat(var(--dock-cols),minmax(0,1fr));grid-template-rows:repeat(2,58px);min-height:125px;gap:8px}
 .dock-slot{height:58px}
 .dock-ship{height:39px;width:min(96%,var(--boat-width))}
 .setup-tools{gap:10px;padding:11px}
 .setup-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
 .setup-buttons>button{width:100%;min-height:41px;font-size:12px;display:flex;align-items:center;justify-content:center}
 .setup-buttons .icon-only{font-size:22px}
 .setup-buttons .ready-btn{font-size:13px}
 .toolbar{gap:8px}.toolbar-right .mode-tag{font-size:9px;padding:5px 7px}
 .friend-room-actions{justify-content:space-between;flex-wrap:nowrap}
 .friend-room-actions .tool-btn{flex:1;min-width:0;text-align:center;padding:8px 6px}
 .play-choice .choice-person{width:16px;height:16px;margin-right:2px}
}
@media(max-width:370px){
 .dual-boards .board-card.is-compact{width:min(64vw,226px)}
 .dock-number{font-size:8px}
}


/* FleetSnap 13.5 – enemy above (the board we fire at), own fleet below. */
@media(max-width:690px){
 .dual-boards .board-card.enemy-card{}
 .dual-boards .board-card.own-card{}
 .dual-boards .board-card.is-compact{align-self:flex-start}
 /* Restore the original horizontal, wrapping toolbar; the two-row dock stays. */
 .setup-buttons{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px;width:100%}
 .setup-buttons>button{width:auto;flex:0 1 auto;min-height:37px;padding:7px 13px;font-size:12px}
 .setup-buttons .ready-btn{flex:1 1 auto;min-width:80px;max-width:none}
 .setup-buttons .icon-only{font-size:22px;padding:3px 9px}
}
/* Let touch gestures starting on either grid or a ship scroll the page normally.
   Deliberate sideways drag remains possible; tap ship then tap target is always supported. */
.board-grid,.board-card,.sea-cell,.ship-draggable,.ship-piece.ship-draggable,
.ship-dock,.dock-slot,.dock-ship,.compact-board-tap{touch-action:pan-y pinch-zoom!important}
/* Ranked live occupancy is distinct from the site's overall online count. */
.ranked-choice-count{font-size:9px;letter-spacing:.02em;color:#89e6c6;font-weight:850;white-space:nowrap;display:block;line-height:1.1;margin-top:2px}
.ranked-time-live{color:#86e5c9!important;font-size:9px!important;line-height:1.3;white-space:normal}
@media(max-width:420px){.ranked-time-live{font-size:8px!important}.ranked-choice-count{font-size:8px}}

/* FleetSnap 13.6 — always show own fleet first, while keeping enemy enlarged in battle. */
@media(max-width:690px){
  .dual-boards .board-card.own-card{}
  .dual-boards .board-card.enemy-card{}
}
/* Water can scroll; actual ships must remain draggable in every direction. */
.board-grid,.board-card,.sea-cell,.ship-dock,.dock-slot,.compact-board-tap{touch-action:pan-y pinch-zoom!important}
.ship-draggable,.ship-piece.ship-draggable,.dock-ship.ship-draggable{touch-action:none!important;user-select:none!important;-webkit-user-select:none!important}
.ship-draggable .boat-svg,.ship-draggable svg{pointer-events:none}
/* Accessible compact sound switches, never overlapping login or mobile counters. */
.audio-controls{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.audio-controls-home{justify-content:flex-start;margin:12px 3px 0}
.audio-controls-game{gap:5px;margin-right:3px}
.audio-toggle{border:1px solid #37576a;border-radius:9px;padding:8px 11px;background:#0e283a;color:#a0bbc8;font-weight:850;font-size:10px;letter-spacing:.7px;white-space:nowrap;line-height:1.15}
.audio-toggle.audio-on{background:#143f3b;color:#c0ffea;border-color:#3d8b7b}
.audio-toggle:focus-visible{outline:2px solid #87e9d6;outline-offset:2px}
.audio-controls-game .audio-toggle{padding:7px 8px;font-size:9px}
@media(max-width:690px){.audio-controls-home{margin:12px 4px 0}.audio-controls-game{margin-right:0}}

/* FleetSnap 13.7 — the real source order defines board position.
   Never order by "is-primary"/"is-compact": focus controls SIZE only.
   Both during setup and during battle, YOUR FLEET is before OPPONENT FLEET. */
.dual-boards > .board-card {  }
@media (max-width: 690px) {
  .dual-boards {display:flex; flex-direction:column; align-items:stretch;}
  .dual-boards > .board-card {}
}

/* FleetSnap 13.8 — BOARD ORDER IS A FIXED GAME RULE, not a zoom or state side effect.
   Use explicit order in both grid and flex layouts. */
.dual-boards > .board-card.own-card { order: 0 !important; }
.dual-boards > .board-card.enemy-card { order: 1 !important; }

/* The whole parking tile—not just its narrow SVG silhouette—is a valid drag handle.
   On-board ships also take the full gesture. Water outside ship tiles can scroll. */
.ship-dock .dock-slot { touch-action: none !important; cursor: grab; user-select:none; -webkit-user-select:none; }
.ship-dock .dock-slot:active { cursor: grabbing; }
.ship-dock .dock-slot .dock-check,
.ship-dock .dock-slot .dock-orient,
.ship-dock .dock-slot .dock-number { pointer-events: none; }
.ship-dock .dock-slot .dock-ship { pointer-events: none; }
.ship-piece.ship-draggable { touch-action: none !important; }


/* FleetSnap 13.11: game board with targets always first in visual and DOM order. */
.dual-boards[data-board-order="enemy-first"] > .board-card.enemy-card { order:0 !important; }
.dual-boards[data-board-order="enemy-first"] > .board-card.own-card { order:1 !important; }
.dual-boards[data-board-order="own-first"] > .board-card.own-card { order:0 !important; }
.dual-boards[data-board-order="own-first"] > .board-card.enemy-card { order:1 !important; }

/* FleetSnap 13.12: readable 4-mode picker, with ULTRA reserved for casual games. */
.time-selector{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.time-choice{gap:5px;min-width:0;padding:12px 3px 11px}
.time-choice .mode-vibe{font-style:normal;font-size:10px;line-height:1.1;letter-spacing:1.1px;font-weight:900;color:#7ddcca}
.time-choice.ultra-choice:not(.chosen) .mode-vibe{color:#edc48d}
.time-choice.ultra-choice.chosen{border-color:#d2a772;box-shadow:inset 0 0 0 1px #d2a77255;background:#31332d}
.time-choice.ultra-choice.chosen .mode-vibe{color:#ffe0a7}
@media(max-width:690px){
 .time-selector{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .time-choice{min-height:91px;gap:6px;padding:12px 6px}
 .time-choice .mode-vibe{font-size:11px}
}

/* v13.14: Ranked selection matches the same 2x2 layout as the other game modes. */
.time-selector.ranked-time-selector{grid-template-columns:repeat(2,minmax(0,1fr))}
/* All four rating pools remain side by side, including on narrow devices. */
.profile-rating-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.profile-rating-item{min-width:0;padding:11px 7px;gap:5px;text-align:center}
.profile-rating-item span{font-size:10px;overflow-wrap:anywhere}
.profile-rating-item strong{font-size:clamp(14px,2.5vw,22px)}
.profile-rating-item small{font-size:9px;overflow-wrap:anywhere}
/* Compact single-line history entries without start timestamp. */
.history-entry{gap:8px}
.history-entry-main{flex-direction:row;align-items:center;gap:9px;min-width:0}
.history-entry-main b{flex:0 1 auto;min-width:0;max-width:45%;white-space:nowrap;text-overflow:ellipsis}
.history-entry-main small{flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-entry-points{flex:none;white-space:nowrap}
@media(max-width:690px){
 .profile-rating-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 .profile-rating-item{padding:9px 3px}
 .profile-rating-item strong{font-size:clamp(13px,3.7vw,19px)}
 .profile-rating-item span{font-size:9px}
 .profile-rating-item small{font-size:8px}
 .history-entry{gap:6px;padding:9px 7px}
 .history-entry-main{gap:6px}
 .history-entry-main b{font-size:11px;max-width:43%}
 .history-entry-main small{font-size:9px}
 .history-entry-points{font-size:13px}
 .history-chevron{margin-left:0}
}


/* v13.15: four independent Top Captain ladders */
.captain-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.captain-mode-card{min-width:0;border:1px solid #294f60;background:#10283b;border-radius:12px;padding:11px 10px}
.captain-mode-header,.captain-winner{display:flex;justify-content:space-between;align-items:center;gap:6px}
.captain-mode-header{font-size:10px;color:#e4ca91;letter-spacing:.6px}
.captain-mode-header span{color:#8cbbc2}
.captain-winner{margin:10px 0;min-height:24px;flex-wrap:wrap;font-size:11px;color:#91b3c3}
.captain-winner strong{color:#e9f6f8;overflow:hidden;text-overflow:ellipsis}
.captain-winner span{font-size:10px}
.captain-rank-button{cursor:pointer;width:100%;background:#17394b;border:1px solid #396276;border-radius:8px;padding:8px 7px;color:#b3e6da;font-weight:800;font-size:9px;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:6px}
.captain-rank-list{padding-top:8px}.captain-rank-list .leader-line{font-size:10px;gap:6px;padding:7px 0}
.my-captain-rank{color:#c3edcf!important;border-top:1px dashed #68b99b!important}
@media(max-width:520px){.captain-modes{grid-template-columns:repeat(2,minmax(0,1fr))}.captain-mode-card{padding:9px 7px}.captain-rank-button{font-size:8px}}
/* Match history: keep actual local date/time, omit only the START label. */
.history-entry-main small{font-variant-numeric:tabular-nums}

/* FleetSnap 13.16: public captain profiles and weekly board */
.player-name-link{background:transparent;border:0;padding:0;color:inherit;font:inherit;font-weight:700;cursor:pointer;text-align:left;text-decoration:underline;text-decoration-color:rgba(120,180,225,.35);text-underline-offset:3px;min-width:0;overflow-wrap:anywhere}
.player-name-link:hover,.player-name-link:focus-visible{color:#75d4ee;text-decoration-color:currentColor}
.weekly-card{margin-top:14px}.weekly-captains{padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.weekly-captain-card{background:rgba(100,160,210,.07);border:1px solid rgba(100,160,210,.16);border-radius:9px;padding:10px;display:flex;flex-direction:column;gap:5px;font-size:12px}.weekly-captain-card>strong{font-size:11px;letter-spacing:.7px}.weekly-captain-card>span{color:#b9d0dc}
.public-history{display:flex;flex-direction:column;gap:6px;max-height:280px;overflow:auto}.public-history-line{display:flex;align-items:center;gap:10px;padding:9px;border-radius:8px;background:rgba(100,160,210,.08);font-size:12px}.public-history-line span{flex:1}.public-history-line small{color:#91a7b7}.public-privacy-note{font-size:11px;color:#8ba9b8;text-align:center;margin:16px 0 2px}
@media(max-width:480px){.weekly-captains{grid-template-columns:1fr}.public-history-line{flex-wrap:wrap}}

.history-entry-wrap{display:flex;align-items:center;gap:5px}.history-entry-wrap>.history-entry{flex:1;min-width:0}.history-profile-link{flex:none;cursor:pointer;color:#81cadd;background:rgba(80,160,196,.1);border:1px solid rgba(80,160,196,.25);border-radius:6px;padding:6px;font-size:10px;font-weight:700;letter-spacing:.03em}.history-profile-link:hover{background:rgba(80,160,196,.22)}


/* FleetSnap 13.17 — mobile visual QA; components stay legible at 320–430px. */
.rematch-length-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rematch-length-options .rematch-option{min-height:94px}
.rematch-page{width:min(100%,680px)}
.weekly-card{max-width:94%}
.weekly-captains{padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.weekly-captain-card{min-width:0;display:flex;flex-direction:column;gap:10px;justify-content:space-between;padding:12px;border:1px solid #31576b;border-radius:12px;background:#10283b;color:#dceef4}
.weekly-mode-label{display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-width:0}
.weekly-mode-label strong{font-size:12px;color:#edca8c;letter-spacing:.5px}
.weekly-mode-label small{font-size:10px;color:#88b2c3;white-space:nowrap}
.weekly-awaiting{font-size:11px;line-height:1.45;color:#aac5d1;overflow-wrap:anywhere}
.weekly-awaiting small{display:block;margin-top:3px;color:#75a0ad;font-size:9px}
.weekly-winner{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.weekly-winner .player-name-link{display:block;font-size:12px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.weekly-score{font-size:10px;color:#a0cbbf}
.leader-head{flex-wrap:wrap;row-gap:5px}
.leader-head>span{line-height:1.4;font-size:9px;text-align:right}
.profile-backdrop{padding:12px;align-items:center;justify-content:center;overflow:hidden}
.profile-dialog{height:auto;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.profile-dialog-public{width:min(100%,680px)}
.profile-public-link{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;margin:0 0 21px;padding:12px 14px;background:linear-gradient(120deg,#174739,#15364a);border:1px solid #4b817c;border-radius:12px;color:#e0f9ee;text-align:left;font-size:11px;font-weight:900;letter-spacing:.6px;cursor:pointer;appearance:none;-webkit-appearance:none}
.profile-public-link>span:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.profile-public-link small{font-size:10px;color:#98c7bd;font-weight:600;letter-spacing:0}
.profile-public-link>span:last-child{flex:none;color:#b5f8dc;font-size:18px}
.profile-public-link:hover,.profile-public-link:focus-visible{border-color:#9de2c6;background:#1b5548}
.history-entry-wrap{display:flex;align-items:center;gap:8px;width:100%;min-width:0;padding:8px 11px;border:1px solid #2a5062;border-radius:12px;background:#0d2a3d;transition:background .15s,border-color .15s}
.history-entry-wrap:hover{border-color:#4b8793;background:#12354a}
.history-entry-wrap .history-outcome{flex:none}
.history-entry-wrap .history-entry-main{display:flex;flex:1;flex-direction:row;align-items:center;gap:7px;min-width:0}
.history-entry-wrap .history-entry-main b,.history-entry-wrap .history-name-link{min-width:0;max-width:36%;font-size:12px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto}
.history-name-link{border:0;background:transparent;color:#e5faff;padding:0;text-align:left;font-weight:850;cursor:pointer;text-decoration:underline;text-decoration-color:#6fa9bd88;text-underline-offset:3px;appearance:none;-webkit-appearance:none}
.history-name-link:hover,.history-name-link:focus-visible{color:#93e7de;text-decoration-color:currentColor}
.history-entry-wrap .history-entry-main small{flex:1;min-width:0;color:#8cb5c5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-variant-numeric:tabular-nums}
.history-result-button{display:inline-flex;align-items:center;justify-content:flex-end;flex:none;gap:4px;padding:8px 1px 8px 7px;border:0;background:transparent;color:#b7d9e5;font-weight:900;cursor:pointer;appearance:none;-webkit-appearance:none}
.history-result-button .history-entry-points{font-size:14px;white-space:nowrap}
.history-result-button .friend-label{font-size:24px;line-height:1}
.history-result-button:hover,.history-result-button:focus-visible{color:#9af5de}
.replay-player-link{border:0;background:transparent;color:#e6ffff;font-size:16px;font-weight:900;text-decoration:underline;text-decoration-color:#519da866;text-underline-offset:3px;text-align:left;cursor:pointer}
.public-history{display:flex;flex-direction:column;gap:8px;max-height:min(40vh,370px);overflow-y:auto}
.public-history-line{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:12px;min-width:0;padding:11px 13px;background:#102d40;border:1px solid #345569;border-radius:10px}
.public-result-badge{display:inline-flex;justify-content:center;align-items:center;border-radius:7px;padding:6px 5px;font-size:10px;font-weight:900;line-height:1}
.public-result-badge.is-win{color:#bbffe8;background:#1a5e50}
.public-result-badge.is-loss{color:#ffd1d1;background:#5a3340}
.public-result-mode{font-size:11px;font-weight:900;color:#e2f4f7;display:flex;flex-direction:column;min-width:0;gap:3px;overflow-wrap:anywhere}
.public-result-mode small{font-size:9px;font-weight:650;color:#87b5c4}
.public-result-date{white-space:nowrap;color:#8fb4c0;font-size:10px;font-variant-numeric:tabular-nums;text-align:right}
.public-privacy-note{line-height:1.5;text-align:left;padding:12px;background:#0a2a39;border-radius:9px;border:1px solid #2d5364}
@media(max-width:690px){
  .profile-backdrop{padding:max(8px,env(safe-area-inset-top,0px)) 8px max(8px,env(safe-area-inset-bottom,0px));align-items:center}
  .profile-dialog{height:auto;max-height:calc(100dvh - 16px);width:100%;padding:17px 13px;border-radius:15px}
  .profile-dialog-public{max-height:min(90dvh,750px)}
  .weekly-captains{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .weekly-captain-card{padding:10px 8px;gap:9px}
  .weekly-mode-label{flex-wrap:wrap}
  .leader-card{padding:14px 13px;max-width:100%}
  .rematch-page{margin:24px auto 32px;padding:0 2px}
  .rematch-head{margin-bottom:25px}
  .rematch-options.rematch-length-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .rematch-length-options .rematch-option{min-height:99px}
  .history-entry-wrap{padding:8px 8px;gap:6px}
  .history-entry-wrap .history-entry-main{gap:5px}
  .history-entry-wrap .history-entry-main b,.history-entry-wrap .history-name-link{font-size:11px;max-width:38%}
  .history-entry-wrap .history-entry-main small{font-size:9px}
  .history-result-button .history-entry-points{font-size:13px}
  .history-result-button .friend-label{font-size:22px}
  .public-history-line{grid-template-columns:48px minmax(0,1fr) auto;gap:7px;padding:10px 8px}
  .public-result-date{font-size:9px}
  .replay-player-link{font-size:14px}
}
@media(max-width:370px){
  .weekly-captains{gap:6px}
  .weekly-captain-card{padding:9px 7px}
  .history-entry-wrap .history-entry-main b,.history-entry-wrap .history-name-link{max-width:33%}
  .history-entry-wrap .history-entry-main small{font-size:8px}
  .public-history-line{grid-template-columns:43px minmax(0,1fr);row-gap:4px}
  .public-result-date{grid-column:2;text-align:left}
}

/* Narrow phone header: keep login/account and logout usable without horizontal scroll. */
@media(max-width:350px){.topbar-right .online-presence{display:none}.topbar{gap:6px}.brand{flex:none}}


/* v13.18 — rematch emphasis + custom surrender modal */
.rematch-head h1{font-size:clamp(52px,10vw,74px);letter-spacing:-2.6px;text-shadow:0 6px 26px rgba(0,0,0,.28)}
.rematch-head p{font-size:16px;color:#bed4df}
.rematch-title{font-size:13px;letter-spacing:2px;margin-bottom:14px}
.rematch-title>span{font-size:10px;letter-spacing:1px;color:#8aaab7}
.rematch-options{gap:12px}
.rematch-option{min-height:122px;padding:12px 10px;border-radius:18px;background:linear-gradient(180deg,#123347 0%,#0d293a 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.rematch-option>b{font-size:clamp(19px,4vw,26px);line-height:1.05;letter-spacing:-.4px}
.rematch-option>small{font-size:13px;line-height:1.25;color:#acc4cf}
.rematch-vote-label{height:19px;min-height:19px;font-size:11px;letter-spacing:1.2px;margin-top:6px}
.rematch-length-options .rematch-option{min-height:128px}
.rematch-back{margin-top:6px}
.surrender-dialog{width:min(100%,430px);padding:28px 24px 24px;border-radius:26px;border:1px solid #a54a56;background:linear-gradient(180deg,#4b1922 0%,#250d13 100%);box-shadow:0 30px 90px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06)}
.surrender-dialog h2{margin:8px 0 10px;font-size:31px;letter-spacing:-.7px;color:#fff3f4}
.surrender-dialog .surrender-copy{max-width:320px;margin:0 auto 20px;color:#efc8cc;font-size:14px;line-height:1.55}
.surrender-badge{width:68px;height:68px;border-radius:20px;display:grid;place-items:center;margin:2px auto 12px;font-size:31px;font-weight:900;color:#ffe1e4;background:linear-gradient(180deg,#a73d4b 0%,#6b212d 100%);box-shadow:0 12px 40px rgba(166,50,69,.35)}
.surrender-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 12px}
.surrender-cancel-btn,.surrender-confirm-btn{width:100%;justify-content:center}
.surrender-cancel-btn{background:#183243;border-color:#39586b;color:#d9e6ed}
.surrender-confirm-btn{background:linear-gradient(180deg,#d55367 0%,#b23449 100%);border-color:#f08a99;box-shadow:0 10px 30px rgba(195,63,87,.24)}
.surrender-confirm-btn:hover,.surrender-confirm-btn:focus-visible{filter:brightness(1.06);transform:translateY(-1px)}
.surrender-dialog small{color:#d5a8af;font-size:11px;letter-spacing:.2px}
.surrender-close{background:rgba(255,255,255,.06)}
@media(max-width:690px){
  .rematch-head h1{font-size:52px}
  .rematch-head p{font-size:15px}
  .rematch-options{gap:8px}
  .rematch-option{min-height:112px;padding:12px 8px;border-radius:15px}
  .rematch-option>b{font-size:21px}
  .rematch-option>small{font-size:12px}
  .rematch-vote-label{font-size:10px}
  .rematch-length-options .rematch-option{min-height:116px}
  .surrender-dialog{padding:24px 18px 18px;border-radius:22px}
  .surrender-dialog h2{font-size:28px}
}
@media(max-width:460px){
  .surrender-actions{grid-template-columns:1fr}
}

/* v13.19: Rematch MATCH LENGTH follows the lobby cards. SHIP SPACING is unchanged. */
.rematch-length-options .rematch-time-card{
  min-height:125px;
  padding:12px 8px 9px;
  border-radius:15px;
  background:#0b2335;
  border-color:#28495e;
  gap:5px;
}
.rematch-length-options .rematch-time-card>b{
  font-size:clamp(24px,4.4vw,30px);
  font-weight:950;
  letter-spacing:-.6px;
  line-height:1.1;
}
.rematch-length-options .rematch-mode-vibe{
  font-style:normal;
  font-size:12px;
  line-height:1.2;
  letter-spacing:1.5px;
  font-weight:950;
  color:#7ddcca;
}
.rematch-length-options .rematch-time-card[data-value="ultra"] .rematch-mode-vibe{color:#edc48d}
.rematch-length-options .rematch-time-card>small{
  font-size:11px;
  font-weight:650;
  color:#92b5c4;
}
.rematch-length-options .rematch-time-card .rematch-vote-label{
  font-size:10px;
  line-height:1.2;
  margin-top:1px;
  min-height:12px;
  height:12px;
}
/* Retain player-vote meaning over the neutral lobby card color. */
.rematch-length-options .rematch-time-card.my-vote{background:#18426a;border-color:#49aefa}
.rematch-length-options .rematch-time-card.their-vote{background:#4b3a23;border-color:#e9b66c}
.rematch-length-options .rematch-time-card.both-voted{background:#16443d;border-color:#70e6ae}
.rematch-length-options .rematch-time-card.my-vote .rematch-mode-vibe{color:#9ddcff}
.rematch-length-options .rematch-time-card.their-vote .rematch-mode-vibe{color:#f2d19b}
.rematch-length-options .rematch-time-card.both-voted .rematch-mode-vibe{color:#9cffc9}
@media(max-width:690px){
  .rematch-length-options .rematch-time-card{min-height:117px;padding:10px 5px 8px;gap:5px}
  .rematch-length-options .rematch-time-card>b{font-size:26px}
  .rematch-length-options .rematch-mode-vibe{font-size:11px}
  .rematch-length-options .rematch-time-card>small{font-size:10px}
}


/* 13.23 — actionable Android browser handoff for OAuth in Messenger */
.external-browser-dialog .external-open-button{display:flex;align-items:center;justify-content:center;min-height:52px;width:100%;padding:13px 12px;margin:0 0 12px;text-decoration:none;font-size:15px;font-weight:950;letter-spacing:.65px;color:#072e34;background:linear-gradient(115deg,#96f9d9,#60d8c7);border:1px solid #b4ffeb;border-radius:13px;box-shadow:0 8px 25px #43d4b82b;touch-action:manipulation}
.external-browser-dialog .external-open-button:hover,.external-browser-dialog .external-open-button:focus-visible{filter:brightness(1.06);outline:2px solid #effffb;outline-offset:2px}
.external-browser-dialog .external-copy-button{background:#143e4c;border:1px solid #4a8494;color:#e2f6f7;min-height:46px;cursor:pointer;font-size:12px;letter-spacing:.65px}
.external-browser-dialog .embedded-guide{display:flex;flex-direction:column;gap:7px;margin:12px 0;padding:12px 14px;line-height:1.5;text-align:left;color:#d6ecf1}
.external-browser-dialog .embedded-guide strong{color:#b5fbe4;font-size:12px}
.external-browser-dialog .embedded-guide span{font-size:12px}
@media(max-width:410px){.external-browser-dialog{padding:26px 18px 22px}.external-browser-dialog .external-open-button{font-size:14px}}


/* v13.24 — desktop home layout redesign */
.app-shell{width:min(100%,1400px)}
.landing-desktop-v2{display:flex;flex-direction:column;gap:20px;min-height:0;padding:8px 20px 22px;align-items:stretch}
.landing-top-grid{display:grid;grid-template-columns:minmax(560px,1.05fr) minmax(420px,.95fr);gap:24px;align-items:start}
.landing-bottom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.home-primary-panel,.home-preview-panel{min-width:0}
.home-primary-panel{display:flex;flex-direction:column;gap:14px}
.home-preview-panel .version-stamp{margin:0 0 8px 4px}
.home-card{padding:22px 22px 18px;border-radius:24px;box-shadow:0 24px 54px rgba(0,0,0,.26)}
.landing-audio-row{display:flex;justify-content:flex-start}
.landing-audio-row .audio-row{margin-top:0}
.showcase{height:100%;padding:18px 18px 16px;border-radius:24px;box-shadow:0 24px 58px rgba(0,0,0,.30)}
.showcase-board{max-width:100%;width:min(100%,480px);aspect-ratio:1/1;margin:16px auto}
.leader-card{margin:0;max-width:none;padding:18px 18px 16px;border-radius:20px;min-height:100%}
.top-captains-panel .captain-modes,.weekly-captains{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.captain-mode-card,.weekly-captain-card{min-height:138px}
.leader-head{margin-bottom:14px}
.weekly-card{margin-top:0}
@media (min-width:1200px){
  .landing-top-grid{grid-template-columns:minmax(600px,1.08fr) minmax(470px,.92fr);gap:28px}
  .landing-bottom-grid{gap:22px}
  .showcase-board{width:min(100%,520px)}
}
@media (max-width:1100px){
  .app-shell{width:min(100%,1240px)}
  .landing-desktop-v2{padding:8px 10px 18px}
  .landing-top-grid{grid-template-columns:minmax(0,1fr) minmax(380px,.92fr);gap:18px}
  .landing-bottom-grid{gap:16px}
}
@media (max-width:900px){
  .landing-top-grid,.landing-bottom-grid{grid-template-columns:1fr}
  .home-preview-panel{order:2}
}
@media (max-width:690px){
  .landing-desktop-v2{padding:22px 0 10px;gap:18px}
  .landing-top-grid,.landing-bottom-grid{display:block}
  .landing-bottom-grid > * + *{margin-top:14px}
  .landing-audio-row{display:block}
  .home-card{padding:15px}
  .leader-card{padding:14px 13px}
}


/* FleetSnap v13.25 — For Fun quick matchmaking, verified per-mode player counts */
.landing-desktop-v2 .play-choices{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.landing-desktop-v2 .play-choice{min-width:0;white-space:normal;line-height:1.22;min-height:52px;font-size:12px}
.play-choice.fun-choice span{color:#79eed6}
.fun-choice-count{font-size:9px;letter-spacing:.02em;color:#89e6c6;font-weight:850;display:block;margin-top:4px}
.fun-time-selector{grid-template-columns:repeat(2,minmax(0,1fr))}
.fun-time-selector .time-choice{min-height:101px}
.fun-mode-lock{font-size:9px!important;color:#ffd2a0!important;font-weight:850!important}
.fun-rule{color:#a8e7d5;text-align:center;line-height:1.55}
.fun-match-tag{color:#b7ffe7;border-color:#519b87}
@media(max-width:690px){
 .landing-desktop-v2 .play-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
 .landing-desktop-v2 .play-choice{min-height:46px;font-size:12px}
}


/* FleetSnap v13.27 — clear per-mode Ranked sign-in requirement */
.time-choice.time-choice-locked{border-color:#4a5263;background:linear-gradient(155deg,#13293a,#162638);color:#d4e4e9;box-shadow:none;cursor:pointer}
.time-choice.time-choice-locked:hover{border-color:#b3a076;background:linear-gradient(155deg,#1a3343,#25313b)}
.time-choice.time-choice-locked:focus-visible{outline:2px solid #f0cd93;outline-offset:2px}
.time-choice .mode-signin{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:19px;padding:3px 9px;border-radius:100px;border:1px solid rgba(235,199,136,.48);background:rgba(183,138,70,.12);color:#f5d9a2!important;font-size:10px!important;font-weight:950!important;letter-spacing:.6px!important}
.time-choice .mode-signin svg{width:12px;height:12px;flex:none}
.time-choice.time-choice-locked .ranked-time-live{color:#90b2c2}
@media(max-width:420px){.time-choice .mode-signin{font-size:9px!important;padding:3px 7px}}


/* FleetSnap v13.38 — one shared style for Ranked + For Fun ONLINE counters.
   Keep this after all mobile overrides to prevent the labels drifting apart. */
.landing-desktop-v2 .play-choice .ranked-choice-count,
.landing-desktop-v2 .play-choice .fun-choice-count {
  display:block;
  font-size:9px;
  font-weight:850;
  letter-spacing:.02em;
  line-height:1.22;
  margin-top:4px;
}

/* FleetSnap 13.39 — rectangular CRAZY board and simplified FOR FUN card */
.crazy-mode-choice{display:flex;width:100%;align-items:center;text-align:left;gap:13px;margin:11px 0 3px;padding:14px 16px;color:#ffe5b2;border:1px solid #96703d;background:linear-gradient(115deg,#392b27,#1c303b 85%);border-radius:14px;transition:background .16s,border-color .16s;min-height:73px}
.crazy-mode-choice:hover:not(:disabled),.crazy-mode-choice:focus-visible{border-color:#e3b861;background:linear-gradient(115deg,#493328,#20404c)}
.crazy-mode-choice.chosen{border-color:#f7bf55;background:linear-gradient(115deg,#6b4226,#28443e);box-shadow:inset 0 0 0 1px #f7d77c50,0 0 25px #c08a3522}
.crazy-mode-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid #d7a55b80;border-radius:10px;background:#593e2970;color:#ffdc98;font-size:23px}
.crazy-mode-text{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.crazy-mode-text strong{font-size:14px;letter-spacing:1.8px;font-weight:950}
.crazy-mode-text small{font-size:10px;color:#d8b78e;font-weight:800;letter-spacing:.4px}
.crazy-mode-time{display:flex;flex:none;align-items:flex-end;flex-direction:column;gap:4px;color:#ffe5b2;font-size:15px;font-weight:950;white-space:nowrap}
.crazy-mode-time small{font-size:9px;font-weight:800;letter-spacing:1px;color:#bfa689}
.board-grid.board-rect{grid-template-columns:repeat(var(--cols),minmax(0,1fr));grid-template-rows:repeat(var(--rows),minmax(0,1fr));aspect-ratio:var(--cols)/var(--rows);height:auto}
.board-grid.board-crazy{width:min(100%,340px);max-width:340px}
.dual-boards .board-card.is-primary .board-grid.board-crazy{max-width:340px}
.board-grid.board-crazy .sea-cell{border-width:.75px}
@media(max-width:690px){
 .crazy-mode-choice{padding:12px;gap:10px}
 .crazy-mode-icon{width:32px;height:32px;font-size:20px}
 .crazy-mode-text strong{font-size:12px}
 .crazy-mode-text small{font-size:9px}
 .crazy-mode-time{font-size:13px}
 .dual-boards .board-card.is-primary .board-grid.board-crazy{width:min(100%,330px);max-width:330px}
 .dual-boards .board-card.is-compact .board-grid.board-crazy{width:100%;max-width:none}
 .dual-boards .board-card.is-compact:has(.board-crazy){width:min(46vw,170px)}
 .ship-dock[style*="--fleet-count:7"]{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px}
 .ship-dock[style*="--fleet-count:7"] .dock-slot{height:52px}
 .ship-dock[style*="--fleet-count:7"] .dock-ship{height:28px}
 .ship-dock[style*="--fleet-count:7"] .dock-number{font-size:7px}
}
@media(max-width:355px){.crazy-mode-text small{font-size:8px}.crazy-mode-time{font-size:11px}}


/* FleetSnap v13.40 — weekly podium: top 3 per mode, readable on phones */
.weekly-captain-card{justify-content:flex-start;gap:10px}
.weekly-winner.weekly-leaders{width:100%;display:flex;flex-direction:column;align-items:stretch;gap:0}
.weekly-leader-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;border-top:1px solid #36536888;padding:9px 0}
.weekly-leader-row:first-child{border-top:1px solid #36536888}
.weekly-leader-place{font-size:11px;font-weight:900;color:#92aebb;white-space:nowrap}
.weekly-leader-row:first-child .weekly-leader-place{color:#f1cb7f}
.weekly-leader-row:nth-child(2) .weekly-leader-place{color:#c5d1df}
.weekly-leader-row:nth-child(3) .weekly-leader-place{color:#d7a982}
.weekly-leader-row .player-name-link{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.4;display:block}
.weekly-leader-wins{color:#a5dec7;font-weight:850;font-size:10px;white-space:nowrap}
@media(max-width:560px){
  .weekly-leader-row{grid-template-columns:18px minmax(0,1fr);column-gap:5px;row-gap:2px;padding:7px 0}
  .weekly-leader-wins{grid-column:2;font-size:9px}
  .weekly-leader-row .player-name-link{font-size:10px}
}
