:root{--color-x: #2563eb;--color-o: #e11d48;--color-win: #fde047;--color-grid: #c7bfe6;--color-bg: #ffffff;--color-text: #1f2033;--app-bg: linear-gradient(165deg, #dbeafe 0%, #ede9fe 46%, #fce7f3 100%);--board-panel: rgba(255, 255, 255, .55);--cell-bg: #ffffff;--tile-shadow: 0 6px 0 rgba(99, 91, 160, .12), 0 10px 22px rgba(99, 91, 160, .14);--tile-shadow-press: 0 2px 0 rgba(99, 91, 160, .14), 0 4px 10px rgba(99, 91, 160, .16);--font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Baloo 2", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--pill-x: #2563eb;--pill-o: #e11d48}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--app-bg);background-attachment:fixed;color:var(--color-text);font-family:var(--font-round);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.app{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,2.4vh,26px);padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-left)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-right))}@media (max-height: 720px),(max-width: 519px){.app{justify-content:flex-start}}.scorebar{display:flex;justify-content:center;align-items:center;gap:clamp(6px,2.4vw,14px);font-size:clamp(16px,2.4vh,20px);font-weight:800;padding:6px 10px;background:var(--board-panel);border-radius:999px}.score{display:inline-flex;align-items:baseline;gap:5px;padding:2px 10px;border-radius:999px}.score b{font-weight:900;font-variant-numeric:tabular-nums;color:var(--color-text)}.score--x{color:var(--color-x)}.score--o{color:var(--color-o)}.score--d{color:var(--color-text)}.status{min-height:1.5em;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.15}.turn{font-size:clamp(18px,2.8vh,24px);font-weight:800;padding:8px 20px;border-radius:999px;color:#fff}.turn--x{background:var(--pill-x)}.turn--o{background:var(--pill-o)}.banner{font-size:clamp(30px,5.4vh,46px);font-weight:900;padding:4px 8px;animation:banner-bounce .62s cubic-bezier(.34,1.56,.64,1) both}@keyframes banner-bounce{0%{opacity:0;transform:scale(.4) rotate(-6deg)}55%{transform:scale(1.12) rotate(2deg)}to{opacity:1;transform:scale(1) rotate(0)}}.banner--x{color:var(--color-x)}.banner--o{color:var(--color-o)}.banner--draw{color:var(--color-text)}.board{--board-size: min(94vw, 66vh, 560px);width:var(--board-size);height:var(--board-size);display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:clamp(8px,2.4vw,14px);padding:clamp(8px,2.4vw,14px);background:var(--board-panel);border-radius:clamp(20px,6vw,32px);box-shadow:0 10px 30px #635ba02e}.cell{min-width:44px;min-height:44px;border:0;margin:0;padding:0;background:var(--cell-bg);color:var(--color-text);font-family:inherit;font-size:min(17vw,12vh,116px);font-weight:900;line-height:1;border-radius:clamp(14px,4vw,22px);box-shadow:var(--tile-shadow);cursor:pointer;transition:transform .11s ease,box-shadow .11s ease,background-color .11s ease;-webkit-user-select:none;user-select:none}@media (hover: hover){.cell:hover:enabled{transform:translateY(-2px)}}.cell .mark{display:inline-block;animation:mark-pop .3s cubic-bezier(.34,1.56,.64,1) both}@keyframes mark-pop{0%{opacity:0;transform:scale(.2) rotate(-12deg)}60%{transform:scale(1.18) rotate(4deg)}to{opacity:1;transform:scale(1) rotate(0)}}.cell--x{color:var(--color-x)}.cell--o{color:var(--color-o)}.cell:active:enabled{transform:translateY(2px) scale(.97);box-shadow:var(--tile-shadow-press)}.cell:disabled{cursor:default}.cell--win{background:var(--color-win);animation:win-cheer .9s ease-in-out 0s 2 both}.cell--win .mark{color:#1f2033}@keyframes win-cheer{0%,to{transform:scale(1)}40%{transform:scale(1.08) rotate(-2deg)}70%{transform:scale(1.04) rotate(2deg)}}.cell--win:active:enabled{background:var(--color-win)}.new-game{min-height:56px;min-width:220px;padding:14px 34px;font-family:inherit;font-size:22px;font-weight:900;letter-spacing:.01em;color:#fff;background:linear-gradient(180deg,#8b5cf6,#7c3aed);border:0;border-radius:999px;box-shadow:0 6px #5b21b6,0 12px 20px #5b21b652;cursor:pointer;transition:transform 90ms ease,box-shadow 90ms ease}.new-game:active{transform:translateY(4px);box-shadow:0 2px #5b21b6,0 5px 12px #5b21b64d}.new-game--online{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;min-width:220px;padding:14px 34px;font-family:var(--font-round);font-size:20px;font-weight:900;color:var(--color-text);background:var(--color-surface);border:2px solid var(--color-border-strong);border-radius:999px;text-decoration:none;cursor:pointer;transition:transform 90ms ease,background-color 90ms ease}.new-game--online:active{transform:translateY(2px);background:var(--color-surface-sunken)}@media (orientation: landscape) and (max-height: 500px){.new-game--online{min-height:48px}}@media (orientation: landscape){.board{--board-size: min(66vh, 72vw, 520px)}}@media (orientation: landscape) and (max-height: 500px){.app{display:grid;grid-template-columns:auto minmax(190px,320px);grid-template-rows:auto auto auto 1fr;justify-content:center;align-content:center;column-gap:clamp(12px,3vw,28px);row-gap:6px}.board{--board-size: min(82vh, 42vw, 340px);grid-column:1;grid-row:1 / -1;align-self:center}.topbar{grid-column:2;grid-row:1}.seat-rail{grid-column:2;grid-row:2;margin:0}.status{grid-column:2;grid-row:3}.new-game{grid-column:2;grid-row:4;min-height:48px}}@media (prefers-reduced-motion: reduce){.cell .mark,.banner,.cell--win{animation:none}}:root{--color-surface: #ffffff;--color-surface-sunken: #f3f4f6;--color-border: #d1d5db;--color-border-strong: #787e88;--color-text-secondary: #4b5563;--color-text-muted: #5b616b;--color-primary: #1f2937;--color-on-primary: #ffffff;--color-danger: #b91c1c;--color-danger-fill: #b91c1c;--color-focus: #2563eb;--color-scrim: rgba(17, 24, 39, .45);--pw-weak: #b91c1c;--pw-fair: #b45309;--pw-strong: #15803d}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--color-bg: #0f1419;--color-text: #f1f5f9;--color-x: #6ba3de;--color-o: #f0836f;--color-grid: #33404f;--color-surface: #1a2230;--color-surface-sunken: #10161f;--color-border: #33404f;--color-border-strong: #71808f;--color-text-secondary: #c2cdda;--color-text-muted: #9aa7b4;--color-primary: #e8eef5;--color-on-primary: #0f1419;--color-danger: #f87171;--color-danger-fill: #dc2626;--color-focus: #60a5fa;--color-scrim: rgba(0, 0, 0, .6);--pw-weak: #f87171;--pw-fair: #fbbf24;--pw-strong: #4ade80}}[data-theme=dark]{--color-bg: #0f1419;--color-text: #f1f5f9;--color-x: #6ba3de;--color-o: #f0836f;--color-grid: #33404f;--color-surface: #1a2230;--color-surface-sunken: #10161f;--color-border: #33404f;--color-border-strong: #71808f;--color-text-secondary: #c2cdda;--color-text-muted: #9aa7b4;--color-primary: #e8eef5;--color-on-primary: #0f1419;--color-danger: #f87171;--color-danger-fill: #dc2626;--color-focus: #60a5fa;--color-scrim: rgba(0, 0, 0, .6);--pw-weak: #f87171;--pw-fair: #fbbf24;--pw-strong: #4ade80}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--color-x: #7cb2f5;--color-o: #ff8fa3;--color-win: #facc15;--app-bg: linear-gradient(165deg, #131a2e 0%, #191325 52%, #0f1419 100%);--board-panel: rgba(255, 255, 255, .05);--cell-bg: #1a2230;--tile-shadow: 0 6px 0 rgba(0, 0, 0, .28), 0 10px 22px rgba(0, 0, 0, .4);--tile-shadow-press: 0 2px 0 rgba(0, 0, 0, .3), 0 4px 10px rgba(0, 0, 0, .42)}}[data-theme=dark]{--color-x: #7cb2f5;--color-o: #ff8fa3;--color-win: #facc15;--app-bg: linear-gradient(165deg, #131a2e 0%, #191325 52%, #0f1419 100%);--board-panel: rgba(255, 255, 255, .05);--cell-bg: #1a2230;--tile-shadow: 0 6px 0 rgba(0, 0, 0, .28), 0 10px 22px rgba(0, 0, 0, .4);--tile-shadow-press: 0 2px 0 rgba(0, 0, 0, .3), 0 4px 10px rgba(0, 0, 0, .42)}[data-theme=dark] .cell--win .mark,:root:not([data-theme=light]) .cell--win .mark{color:#1f2033}:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}.topbar{width:100%;max-width:640px;min-height:56px;display:flex;align-items:center;gap:8px}.topbar .scorebar{flex:1 1 auto}.topbar-slot{flex:0 0 auto;display:flex;align-items:center;min-width:44px}.topbar-left{justify-content:flex-start}.topbar-right{justify-content:flex-end}.account{position:relative}.account-chip{min-height:44px;min-width:44px;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--color-border);border-radius:999px;background:var(--color-surface);color:var(--color-text);font-family:inherit;font-size:15px;font-weight:600;cursor:pointer}.account-chip--loading{background:var(--color-surface-sunken);border-style:dashed}.account-chip:active{background:var(--color-surface-sunken)}.account-glyph{font-size:20px;line-height:1;color:var(--color-text-secondary)}.account-avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--color-surface-sunken);color:var(--color-text);font-size:14px;font-weight:700}.account-name{max-width:10ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-caret{font-size:12px;color:var(--color-text-secondary)}.account-menu-scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20}.account-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:21;min-width:220px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;box-shadow:0 12px 32px #0000002e;overflow:hidden}.account-menu-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--color-border)}.account-menu-id{display:flex;flex-direction:column;line-height:1.25}.account-menu-name{font-size:16px;font-weight:700;color:var(--color-text)}.account-menu-sub{font-size:13px;color:var(--color-text-secondary)}.account-menu-row{width:100%;min-height:48px;padding:0 14px;display:flex;align-items:center;border:0;background:var(--color-surface);color:var(--color-text);font-family:inherit;font-size:16px;font-weight:600;text-align:left;cursor:pointer}.account-menu-row:active{background:var(--color-surface-sunken)}.account-menu-row--danger{color:var(--color-danger)}.auth-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;background:var(--color-scrim);display:flex;align-items:center;justify-content:center;padding:16px}.auth-sheet{width:100%;max-width:400px;background:var(--color-surface);color:var(--color-text);border-radius:16px;padding:20px;box-shadow:0 20px 48px #00000047;animation:auth-pop .15s ease-out}@keyframes auth-pop{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}.auth-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.auth-title{margin:0;font-size:22px;font-weight:800}.auth-close{width:44px;height:44px;border:0;background:transparent;color:var(--color-text-secondary);font-size:20px;cursor:pointer;border-radius:8px}.auth-close:active{background:var(--color-surface-sunken)}.auth-form{display:flex;flex-direction:column}.auth-label{font-size:14px;font-weight:600;color:var(--color-text-secondary);margin:12px 0 6px}.auth-input{height:48px;width:100%;padding:12px 16px;font-family:inherit;font-size:16px;color:var(--color-text);background:var(--color-surface-sunken);border:1px solid var(--color-border-strong);border-radius:8px}.auth-password{position:relative;display:flex;align-items:center}.auth-password .auth-input{padding-right:64px}.auth-show{position:absolute;right:4px;height:44px;min-width:56px;border:0;background:transparent;color:var(--color-focus);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;border-radius:8px}.auth-hint{margin:6px 0 0;font-size:13px;color:var(--color-text-muted)}.auth-field-err{margin:6px 0 0;font-size:13px;font-weight:600;color:var(--color-danger)}.pw-strength{display:flex;align-items:center;gap:10px;margin-top:8px}.pw-strength-bars{display:flex;gap:4px;flex:0 0 auto}.pw-seg{width:40px;height:6px;border-radius:3px;background:var(--color-border)}.pw-seg--on.pw-seg--1{background:var(--pw-weak)}.pw-seg--on.pw-seg--2{background:var(--pw-fair)}.pw-seg--on.pw-seg--3{background:var(--pw-strong)}.pw-strength-label{font-size:13px;font-weight:600;color:var(--color-text-secondary)}.auth-banner{margin:14px 0 0;padding:10px 12px;font-size:14px;font-weight:600;color:var(--color-danger);background:var(--color-surface-sunken);border-radius:8px}.auth-primary{height:48px;margin-top:18px;border:0;border-radius:8px;background:var(--color-primary);color:var(--color-on-primary);font-family:inherit;font-size:16px;font-weight:600;cursor:pointer}.auth-primary:disabled{opacity:.6;cursor:default}.auth-footer{margin:16px 0 0;text-align:center;font-size:14px;color:var(--color-text-secondary)}.auth-link{min-height:44px;padding:0 4px;border:0;background:transparent;color:var(--color-focus);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer}@media (max-width: 519px){.account-signin-label{display:none}.account-name{max-width:8ch}.auth-backdrop{align-items:flex-end;padding:0}.auth-sheet{max-width:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:max(20px,env(safe-area-inset-bottom));animation:auth-slide .16s ease-out}@keyframes auth-slide{0%{transform:translateY(100%)}to{transform:translateY(0)}}}@media (prefers-reduced-motion: reduce){.auth-sheet{animation:none}}.seat-rail{width:100%;max-width:640px;display:flex;gap:10px;margin:4px 0 2px}.seat-plate{position:relative;flex:1 1 0;min-width:0;min-height:60px;display:flex;align-items:stretch;background:var(--color-surface);border:2px solid var(--color-border);border-radius:16px;box-shadow:0 4px 12px #635ba01a;overflow:hidden}.seat-plate--x{border-color:color-mix(in srgb,var(--color-x) 45%,var(--color-border))}.seat-plate--o{border-color:color-mix(in srgb,var(--color-o) 45%,var(--color-border))}.seat-accent{flex:0 0 5px;align-self:stretch}.seat-plate--x .seat-accent{background:var(--color-x)}.seat-plate--o .seat-accent{background:var(--color-o)}.seat-body{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px;padding:8px 10px;border:0;background:transparent;color:var(--color-text);font-family:inherit;text-align:left;cursor:pointer}.seat-body:disabled{cursor:default}.seat-glyph{flex:0 0 auto;font-size:24px;font-weight:700;line-height:1}.seat-plate--x .seat-glyph{color:var(--color-x)}.seat-plate--o .seat-glyph{color:var(--color-o)}.seat-avatar{flex:0 0 auto;width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--color-surface-sunken);color:var(--color-text);font-size:14px;font-weight:700;border:1.5px solid var(--color-border-strong)}.seat-avatar--transient{border-style:dashed}.seat-id{display:flex;flex-direction:column;min-width:0;line-height:1.2}.seat-name{font-size:16px;font-weight:700;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.seat-body:disabled .seat-name,.seat-plate--locked .seat-name{font-weight:700}.seat-sub{font-size:12px;font-weight:600;color:var(--color-text-muted)}.seat-hint{font-size:13px;color:var(--color-text-muted)}.seat-lock{margin-left:auto;font-size:14px}.seat-plate--locked .seat-hint{color:var(--color-text-muted)}.seat-pill{align-self:center;margin-right:8px;min-height:44px;padding:0 12px;border:1px solid var(--color-border-strong);border-radius:8px;background:var(--color-surface);color:var(--color-text);font-family:inherit;font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer}.seat-pill:active{background:var(--color-surface-sunken)}.seat-release{align-self:center;margin-right:6px;width:44px;height:44px;flex:0 0 44px;border:0;border-radius:8px;background:transparent;color:var(--color-text-secondary);font-size:20px;cursor:pointer}.seat-release:active{background:var(--color-surface-sunken)}.seat-sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;background:var(--color-scrim);display:flex;align-items:flex-end;justify-content:center}.seat-sheet{width:100%;max-width:520px;background:var(--color-surface);color:var(--color-text);border-top-left-radius:18px;border-top-right-radius:18px;padding:12px 20px max(20px,env(safe-area-inset-bottom));box-shadow:0 -12px 40px #00000047;animation:seat-slide-up .16s ease-out}@keyframes seat-slide-up{0%{transform:translateY(100%)}to{transform:translateY(0)}}.seat-sheet-grab{display:block;width:40px;height:4px;margin:4px auto 10px;border-radius:2px;background:var(--color-border-strong)}.seat-sheet-head{display:flex;align-items:center;justify-content:space-between}.seat-sheet-title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px}.seat-sheet-glyph{font-weight:700}.seat-sheet-glyph--x{color:var(--color-x)}.seat-sheet-glyph--o{color:var(--color-o)}.seat-sheet-sub{margin:4px 0 0;font-size:14px;color:var(--color-text-secondary)}.seat-sheet-foot{margin:14px 0 0;font-size:13px;color:var(--color-text-muted)}.stats-sheet{width:100%;max-width:460px;max-height:84vh;overflow-y:auto;background:var(--color-surface);color:var(--color-text);border-radius:16px;padding:20px;box-shadow:0 20px 48px #00000047;animation:auth-pop .15s ease-out}.stats-wells{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:8px}.stats-well{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 4px;background:var(--color-surface-sunken);border-radius:12px}.stats-num{font-size:32px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--color-text)}.stats-label{font-size:13px;font-weight:600;color:var(--color-text-secondary)}.stats-section{margin:18px 0 8px;font-size:14px;font-weight:700;color:var(--color-text)}.stats-h2h-head,.stats-h2h-row{display:grid;grid-template-columns:1fr 40px 40px 40px 56px;align-items:center;gap:4px}.stats-h2h-head{padding:0 8px 6px;font-size:13px;font-weight:600;color:var(--color-text-secondary)}.stats-h2h-head span:not(:first-child),.stats-h2h-row span:not(.stats-opp){text-align:right;font-variant-numeric:tabular-nums}.stats-h2h-rows{list-style:none;margin:0;padding:0}.stats-h2h-row{width:100%;min-height:44px;padding:0 8px;border:0;border-top:1px solid var(--color-border);background:transparent;color:var(--color-text);font-family:inherit;font-size:15px;cursor:pointer}.stats-h2h-row:active{background:var(--color-surface-sunken)}.stats-opp{text-align:left;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stats-back{min-height:44px;padding:0 4px;border:0;background:transparent;color:var(--color-focus);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer}.stats-focus-line{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--color-text)}.stats-empty{text-align:center;padding:24px 8px}.stats-empty-title{margin:0;font-size:16px;font-weight:700;color:var(--color-text)}.stats-empty-sub{margin:6px 0 0;font-size:14px;color:var(--color-text-secondary)}.stats-error{text-align:center;padding:20px 8px}.stats-error-msg{font-size:15px;color:var(--color-text)}.stats-skeleton{display:flex;flex-direction:column;gap:10px;margin-top:16px}.stats-skel-row{height:44px;border-radius:8px;background:var(--color-surface-sunken);animation:stats-shimmer 1.2s ease-in-out infinite}@keyframes stats-shimmer{0%,to{opacity:1}50%{opacity:.55}}@media (orientation: landscape) and (min-width: 720px){.seat-rail{max-width:640px}}@media (prefers-reduced-motion: reduce){.seat-sheet,.stats-sheet,.stats-skel-row{animation:none}}.route{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-left)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-right));background:var(--app-bg)}.route-card{position:relative;width:100%;max-width:420px;background:var(--color-surface);color:var(--color-text);border-radius:16px;padding:20px;box-shadow:0 20px 48px #00000047}.route-head{display:flex;align-items:center;gap:6px;margin-bottom:4px}.route-back{flex:0 0 auto;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:var(--color-text-secondary);font-size:24px;line-height:1;text-decoration:none;border-radius:8px;cursor:pointer}.route-back:active{background:var(--color-surface-sunken)}.route-title{margin:0}.route-sub{margin:4px 0 0;font-size:14px;color:var(--color-text-secondary)}@media (max-width: 519px){.route{align-items:flex-end;padding:0}.route-card{max-width:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:max(20px,env(safe-area-inset-bottom))}}.btn-busy{display:inline-flex;align-items:center;gap:8px}.btn-spinner{width:16px;height:16px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:btn-spin .7s linear infinite}@keyframes btn-spin{to{transform:rotate(360deg)}}.route-error{text-align:center}.route-error-glyph{font-size:48px;line-height:1}.route-error-title{margin:12px 0 0;font-size:22px;font-weight:800;color:var(--color-text)}.route-error-body{margin:8px 0 0;font-size:16px;color:var(--color-text-secondary)}.route-error .auth-primary,.route-error .route-home{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 24px;margin-top:20px;border-radius:8px;background:var(--color-primary);color:var(--color-on-primary);font-size:16px;font-weight:600;text-decoration:none}.route-skel{height:48px;border-radius:8px;background:var(--color-surface-sunken);animation:stats-shimmer 1.2s ease-in-out infinite;margin-top:16px}@media (prefers-reduced-motion: reduce){.btn-spinner,.route-skel{animation:none}}.auth-primary--big{min-height:56px;font-size:18px}.online{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:clamp(10px,2vh,18px);padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-left)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-right))}.online-topbar{width:100%;max-width:640px;min-height:56px;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:8px}.online-home{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:var(--color-text);font-size:24px;text-decoration:none}.online-home:active{background:var(--color-surface-sunken)}.online-account{justify-self:end}.code-chip{justify-self:center;min-height:44px;display:inline-flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--color-border);border-radius:999px;background:var(--color-surface);color:var(--color-text);font-family:inherit;cursor:pointer}.code-chip:active{background:var(--color-surface-sunken)}.code-chip-code{font-size:17px;font-weight:800;letter-spacing:.1em;font-variant-numeric:tabular-nums}.code-chip-glyph{font-size:16px;color:var(--color-text-secondary)}.versus-bar{width:100%;max-width:640px;display:flex;gap:10px}.vs-plate{flex:1 1 0}.vs-body{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px;padding:8px 12px}.vs-plate--open{border-style:dashed}.you-chip{margin-left:8px;padding:1px 8px;border-radius:999px;background:var(--color-surface-sunken);color:var(--color-text-secondary);font-size:12px;font-weight:700;vertical-align:middle}.presence{display:inline-flex;align-items:center;gap:6px}.presence-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto}.presence-dot--online{background:var(--pw-strong)}.presence-dot--reconnecting{background:var(--pw-fair)}.presence-dot--waiting{background:transparent;border:2px solid var(--color-text-muted)}.presence-label{font-size:12px;font-weight:600;color:var(--color-text-secondary)}.online-waiting{font-size:clamp(16px,2.4vh,20px);font-weight:700;color:var(--color-text-secondary)}.thinking-dots{display:inline-block;animation:thinking-cycle 1.4s ease-in-out infinite}@keyframes thinking-cycle{0%,to{opacity:.35}50%{opacity:1}}.presence-note{width:100%;max-width:640px;margin:0;padding:8px 12px;border-radius:10px;font-size:14px;font-weight:600;text-align:center;background:var(--color-surface-sunken)}.presence-note--amber{color:var(--pw-fair)}.presence-note--green{color:var(--pw-strong)}.board-gate--locked .cell{pointer-events:none}.online-footer{width:100%;max-width:420px;display:flex;flex-direction:column}.share-panel{display:flex;flex-direction:column;gap:10px;padding:16px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:16px}.share-ready{margin:0;font-size:15px;font-weight:700;color:var(--color-text);text-align:center}.code-display{font-size:40px;font-weight:900;letter-spacing:.12em;font-variant-numeric:tabular-nums;text-align:center;color:var(--color-text);background:var(--color-surface-sunken);border-radius:12px;padding:16px}.share-code-only{min-height:44px;border:0;background:transparent;color:var(--color-focus);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer}.share-url{margin:0;font-size:12px;color:var(--color-text-muted);text-align:center;word-break:break-all}.reconnect-banner{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 12px;font-size:13px;font-weight:600;color:var(--pw-fair);background:var(--color-surface-sunken)}.route-lost{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;font-size:14px;font-weight:600;color:var(--color-danger);background:var(--color-surface-sunken)}.lost-retry{min-height:36px;padding:0 14px;border:1px solid var(--color-border-strong);border-radius:8px;background:var(--color-surface);color:var(--color-text);font-family:inherit;font-weight:700;cursor:pointer}.game-over-actions{align-items:stretch;gap:8px;text-align:center}.online-again{text-align:center}.online-back{min-height:44px;display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-secondary);font-weight:600;text-decoration:none}.online-again-hint{margin:2px 0 0;font-size:13px;color:var(--color-text-muted)}@media (prefers-reduced-motion: reduce){.thinking-dots{animation:none}}:root{--color-surface-2: #ffffff;--color-accent: #1e3a5f;--color-on-accent: #ffffff}[data-theme=dark]{--color-surface-2: #262f3b;--color-accent: #8cb8f0;--color-on-accent: #14171c}.settings-gear{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;border-radius:12px;background:transparent;color:var(--color-text-muted);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color .12s ease,background-color .12s ease,transform .12s ease}.settings-gear:hover{color:var(--color-text)}.settings-gear:active{transform:scale(.92);background:var(--color-surface-sunken)}.settings-gear--open{position:relative;z-index:60;color:var(--color-text);background:var(--color-surface-sunken)}.settings-gear-glyph{display:block}.settings-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:var(--color-scrim);display:flex;align-items:flex-start;justify-content:flex-end;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 16px 16px;animation:settings-scrim-in .16s ease-out}.settings-panel{width:min(340px,90vw);margin-top:56px;background:var(--color-surface-2);color:var(--color-text);border-radius:20px;box-shadow:0 14px 44px #0000004d;padding:16px 16px 20px;animation:settings-panel-in .16s ease-out}.settings-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.settings-title{margin:0;font-size:20px;font-weight:700;color:var(--color-text)}.settings-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin-right:-8px;padding:0;border:none;border-radius:12px;background:transparent;color:var(--color-text-muted);font-size:20px;line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent}.settings-close:hover{color:var(--color-text)}.settings-close:active{background:var(--color-surface-sunken)}.settings-list{list-style:none;margin:0;padding:0;min-height:132px}.settings-item{padding:14px 0;border-bottom:1px solid var(--color-border)}.settings-item-label{display:block;margin-bottom:10px;font-size:15px;font-weight:600;color:var(--color-text)}.segmented{display:flex;gap:4px;padding:4px;border-radius:12px;background:var(--color-surface-sunken)}.segment{flex:1 1 0;min-height:44px;padding:0 8px;border:none;border-radius:9px;background:transparent;color:var(--color-text);font-family:inherit;font-size:15px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease,color .12s ease}.segment--selected{background:var(--color-accent);color:var(--color-on-accent);font-weight:700}@keyframes settings-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes settings-panel-in{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion: reduce){.settings-backdrop,.settings-panel{animation:none}.settings-gear,.segment{transition:none}}
