:root{color:#1f2937;--bg-top:#eef2ff;--bg-mid:#f8fafc;--bg-bottom:#f4f6fb;--text-primary:#1f2937;--text-title:#0f172a;--text-secondary:#334155;--text-muted:#64748b;--text-disabled:#6b7280;--surface:#fff;--surface-soft:#f8fafc;--surface-muted:#f1f5f9;--border:#e5e7eb;--border-soft:#e2e8f0;--border-strong:#cbd5e1;--accent:#3b82f6;--accent-ring:#3b82f626;--accent-ring-soft:#3b82f624;--accent-hover:#93c5fd;--status-info:#1d4ed8;--status-fallback:#92400e;--error-fg:#991b1b;--error-bg:#fee2e2;--error-border:#fecaca;--live-badge-bg:#dcfce7;--live-badge-fg:#166534;--planned-badge-bg:#e2e8f0;--planned-badge-fg:#475569;--chess-light:#f4e6cc;--chess-dark:#b78660;--ghost-light:#f8ead2;--ghost-dark:#b78a67;--gomoku-board-light:#d8b67a;--gomoku-board-dark:#c9924b;--gomoku-grid-line:#5a391857;--board-border:#cbd5e1;--board-shadow-1:#0f172a2e;--board-shadow-2:#0f172a1a;--move-last:#facc15bf;--move-target:#22c55ed9;--move-target-soft:#22c55e14;--move-selected:#2563ebe6;--exit-ring:#1e40af73;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}:root[data-theme=forest]{--bg-top:#e5f3e8;--bg-mid:#f4fbf4;--bg-bottom:#edf7ef;--text-primary:#1f2f26;--text-title:#153220;--text-secondary:#2f4c3c;--text-muted:#557064;--surface-soft:#f4faf4;--surface-muted:#e8f3e9;--border:#d6e4d9;--border-soft:#cbe0d0;--border-strong:#b7d0bf;--accent:#2f855a;--accent-ring:#2f855a33;--accent-ring-soft:#2f855a26;--accent-hover:#68d391;--status-info:#276749;--status-fallback:#975a16;--live-badge-bg:#d1fae5;--live-badge-fg:#065f46;--chess-light:#e9dcc3;--chess-dark:#7d9a73;--ghost-light:#e8ddc8;--ghost-dark:#8ca07e}:root[data-theme=midnight]{--bg-top:#0f172a;--bg-mid:#111827;--bg-bottom:#0b1220;--text-primary:#e2e8f0;--text-title:#f8fafc;--text-secondary:#cbd5e1;--text-muted:#93a4bd;--text-disabled:#8ca0bb;--surface:#111c2f;--surface-soft:#162338;--surface-muted:#23324a;--border:#22314a;--border-soft:#2b3f5e;--border-strong:#3d5477;--accent:#60a5fa;--accent-ring:#60a5fa3d;--accent-ring-soft:#60a5fa33;--accent-hover:#93c5fd;--status-info:#93c5fd;--status-fallback:#fbbf24;--error-fg:#fecaca;--error-bg:#7f1d1d4d;--error-border:#f8717199;--live-badge-bg:#10b98138;--live-badge-fg:#a7f3d0;--planned-badge-bg:#94a3b83d;--planned-badge-fg:#cbd5e1;--chess-light:#d3c7b2;--chess-dark:#7f6a57;--ghost-light:#d8cfbe;--ghost-dark:#7d6d5f;--gomoku-board-light:#d4b47f;--gomoku-board-dark:#b98446;--gomoku-grid-line:#49311875;--board-shadow-1:#02061794;--board-shadow-2:#02061757;--move-last:#facc15d6;--move-target:#4ade80eb;--move-target-soft:#4ade801f;--move-selected:#60a5faf0;--exit-ring:#93c5fdb8}:root[data-theme=paper]{--bg-top:#f7f3ea;--bg-mid:#fbf8f1;--bg-bottom:#f2ece2;--text-primary:#2f2a25;--text-title:#1f1a15;--text-secondary:#54483e;--text-muted:#726357;--surface:#fffef9;--surface-soft:#f8f2e7;--surface-muted:#f1eadf;--border:#dbcdb9;--border-soft:#d1c2ad;--border-strong:#bfae95;--accent:#a85523;--accent-ring:#a8552338;--accent-ring-soft:#a8552329;--accent-hover:#d97745;--status-info:#9a3412;--status-fallback:#7c2d12;--planned-badge-bg:#e7dccd;--planned-badge-fg:#6b5a49;--chess-light:#efe1ca;--chess-dark:#b9956d;--ghost-light:#f3e7d2;--ghost-dark:#ba9a77}:root[data-theme=ocean]{--bg-top:#d9f3ff;--bg-mid:#eaf8ff;--bg-bottom:#e1f3fd;--text-primary:#0f2940;--text-title:#082033;--text-secondary:#1d4a67;--text-muted:#3f6f8e;--surface:#f9fdff;--surface-soft:#eef8fc;--surface-muted:#e4f1f8;--border:#c4deed;--border-soft:#b5d3e5;--border-strong:#8eb7ce;--accent:#0f7bb9;--accent-ring:#0f7bb933;--accent-ring-soft:#0f7bb929;--accent-hover:#37a7e8;--status-info:#0b5f91;--status-fallback:#9a580c}:root[data-theme=sunset]{--bg-top:#ffe7db;--bg-mid:#fff1e8;--bg-bottom:#fde8dc;--text-primary:#3c1f1a;--text-title:#29120f;--text-secondary:#70342b;--text-muted:#8f5348;--surface:#fffaf6;--surface-soft:#fff2ea;--surface-muted:#fde8dc;--border:#f0cabb;--border-soft:#e7baa8;--border-strong:#dd9f88;--accent:#d9480f;--accent-ring:#d9480f33;--accent-ring-soft:#d9480f26;--accent-hover:#f97316;--status-info:#c2410c;--status-fallback:#7c2d12}:root[data-theme=sakura]{--bg-top:#ffeaf2;--bg-mid:#fff4f8;--bg-bottom:#fdebf3;--text-primary:#3a2132;--text-title:#251120;--text-secondary:#6b3a59;--text-muted:#8a5a76;--surface:#fffafc;--surface-soft:#fff0f6;--surface-muted:#fce7ef;--border:#eec8d8;--border-soft:#e4b8cb;--border-strong:#d999b8;--accent:#db2777;--accent-ring:#db277730;--accent-ring-soft:#db277726;--accent-hover:#f472b6;--status-info:#be185d;--status-fallback:#9d174d}:root[data-theme=cyber]{--bg-top:#081019;--bg-mid:#0a1320;--bg-bottom:#040b13;--text-primary:#d7efff;--text-title:#f0fbff;--text-secondary:#93cde9;--text-muted:#69a7c8;--text-disabled:#6287a1;--surface:#0e1928;--surface-soft:#122136;--surface-muted:#172d45;--border:#1d3550;--border-soft:#244462;--border-strong:#2f638e;--accent:#00d4ff;--accent-ring:#00d4ff3d;--accent-ring-soft:#00d4ff33;--accent-hover:#67e8f9;--status-info:#67e8f9;--status-fallback:#fbbf24;--error-fg:#fecaca;--error-bg:#7f1d1d4d;--error-border:#f8717199;--live-badge-bg:#14b8a638;--live-badge-fg:#99f6e4;--planned-badge-bg:#94a3b83d;--planned-badge-fg:#c7d2fe;--board-shadow-1:#02061799;--board-shadow-2:#0206175c}*{box-sizing:border-box}body{color:var(--text-primary);background:radial-gradient(circle at top, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom) 100%);margin:0;overflow-x:hidden}#root{min-height:100svh}.app{width:min(1360px,100%);min-height:100dvh;padding:10px;padding-bottom:max(10px, env(safe-area-inset-bottom));margin:0 auto}.appLayout{grid-template-columns:74px minmax(0,1fr);align-items:start;gap:12px;min-height:calc(100dvh - 20px);display:grid}.mainPanel{gap:10px;display:grid}.mobileTopBar{justify-content:space-between;align-items:center;gap:10px;display:none}.mobileTopBar h1{color:var(--text-title);margin:0;font-size:1.2rem}.mobileTopBar p{color:var(--text-muted);margin:4px 0 0;font-size:.84rem}.leftRail{background:var(--surface);border:1px solid var(--border);border-radius:16px;flex-direction:column;align-items:center;gap:8px;height:calc(100dvh - 20px);padding:8px;display:flex;position:sticky;top:10px}.appMark{border-radius:12px;justify-content:center;align-items:center;width:40px;height:40px;display:inline-flex;overflow:hidden;box-shadow:inset 0 1px #ffffff59}.appMarkTile{border:1px solid var(--border-strong);width:100%;height:100%;color:var(--accent);letter-spacing:.08em;text-indent:.08em;background:linear-gradient(135deg,#ffffffe6,#f1f5f9e6),linear-gradient(135deg,#3b82f624,#0ea5e929);border-radius:12px;justify-content:center;align-items:center;font-size:.78rem;font-weight:800;display:inline-flex}.railActionButton{border:1px solid var(--border-strong);background:var(--surface);width:40px;height:40px;color:var(--text-secondary);cursor:pointer;border-radius:10px;justify-content:center;align-items:center;font-size:1.08rem;display:inline-flex}.railActionButton:hover{background:var(--surface-soft)}.railActionButton.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-ring-soft)}.gamesToggleButton{border:1px solid var(--border-strong);background:var(--surface);color:var(--text-secondary);cursor:pointer;border-radius:10px;font-weight:700}.gamesToggleButton:hover{background:var(--surface-soft)}.gamesToggleButton.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-ring-soft)}.gamesToggleButton.compact{padding:8px 10px;font-size:.9rem}.themeControl{color:var(--text-secondary);gap:4px;margin-top:0;font-size:.86rem;display:grid}.themeControl select{border:1px solid var(--border-strong);background:var(--surface);color:var(--text-primary);border-radius:10px;padding:8px 10px;font-size:.9rem}.themeControl.mobile{min-width:128px;margin-top:0}.mobileTopActions{align-items:center;gap:8px;display:inline-flex}.panelOverlay{z-index:20;pointer-events:none;position:fixed;inset:0}.panelOverlay.open{pointer-events:auto}.panelBackdrop{appearance:none;opacity:0;background:#0f172a52;border:none;transition:opacity .14s;position:absolute;inset:0}.panelOverlay.open .panelBackdrop{opacity:1}.sidePanel{background:var(--surface);border:1px solid var(--border);border-radius:16px;align-content:start;gap:10px;width:min(320px,100vw - 20px);padding:12px;transition:transform .16s;display:grid;position:absolute;top:10px;bottom:10px;left:10px;overflow:auto;transform:translate(-106%)}.panelOverlay.open .sidePanel{transform:translate(0)}.sidePanelHeader{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}.sidePanelHeader h2{color:var(--text-secondary);margin:0;font-size:1rem}.sidePanelHeader p{color:var(--text-muted);margin:4px 0 0;font-size:.82rem}.appearanceGrid{gap:10px;display:grid}.panelSection{border:1px solid var(--border-soft);background:var(--surface-soft);border-radius:12px;gap:8px;padding:10px;display:grid}.panelSection h3{letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin:0;font-size:.84rem}.panelControl{margin-top:0}.drawerCloseButton{border:1px solid var(--border-strong);background:var(--surface);color:var(--text-secondary);cursor:pointer;border-radius:10px;padding:7px 10px}.drawerCloseButton:hover{background:var(--surface-soft)}.gameNavList{gap:10px;display:grid}.gameNavItem{border:1px solid var(--border-soft);text-align:left;background:var(--surface);border-radius:12px;gap:8px;width:100%;padding:10px 12px;display:grid}.gameNavItem.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-ring)}.gameNavItem.inactive{cursor:pointer}.gameNavItem.disabled{color:var(--text-disabled);background:var(--surface-soft);cursor:not-allowed}.gameNavItem:not(:disabled):hover{border-color:var(--accent-hover)}.gameNavName{font-weight:600;line-height:1.2}.badge{border-radius:999px;width:fit-content;padding:3px 10px;font-size:.78rem;display:inline-flex}.badge-live{background:var(--live-badge-bg);color:var(--live-badge-fg)}.badge-planned{background:var(--planned-badge-bg);color:var(--planned-badge-fg)}.gamePanel{background:var(--surface);border:1px solid var(--border);border-radius:16px;min-width:0;padding:14px}.chessWrap,.ghostWrap{gap:12px;min-width:0;display:grid}.chessLayout,.ghostLayout{grid-template-columns:minmax(0,340px) minmax(0,1fr);align-items:start;gap:16px;min-width:0;display:grid}.chessSidebar,.ghostSidebar{align-content:start;gap:10px;min-width:0;display:grid}.chessBoardColumn,.ghostBoardColumn{align-content:start;justify-items:end;min-width:0;display:grid}.chessHeader,.ghostHeaderBar{grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px 12px;display:grid}.chessHeaderCopy,.ghostHeaderRow>div{gap:4px;min-width:0;display:grid}.chessHeaderCopy h2,.ghostHeaderRow h2{margin:0;font-size:1.3rem}.chessHeaderCopy p,.ghostHeaderRow p{color:var(--text-secondary);margin:0;font-size:.9rem}.difficultyRow{color:var(--text-secondary);justify-self:end;gap:6px;min-width:132px;font-size:.9rem;display:grid}.difficultyRow select{border:1px solid var(--border-strong);background:var(--surface);color:var(--text-primary);border-radius:10px;padding:8px 10px;font-size:.95rem}.difficultyRow select:disabled{border-color:var(--border);background:var(--surface-muted);color:var(--text-disabled);cursor:not-allowed}.difficultyHelp{color:var(--text-muted);margin:-6px 0 0;font-size:.82rem}.difficultyHelp.locked{color:var(--text-secondary)}.statusGrid{border:1px solid var(--border-soft);background:var(--surface-soft);border-radius:12px;gap:6px;padding:12px;display:grid}.statusLine,.thinkingLine{margin:0}.statusEngine{color:var(--status-info);font-weight:600}.statusEngine.fallback{color:var(--status-fallback)}.info{color:var(--status-info)}.statusPlaceholder{visibility:hidden}.error{color:var(--error-fg);background:var(--error-bg);border:1px solid var(--error-border);border-radius:8px;margin:0;padding:8px}.messageSlot{min-height:44px}.errorHidden{visibility:hidden}.boardShell,.ghostBoardShell{justify-content:flex-end;width:100%;display:flex;position:relative}.gameEndOverlay{z-index:6;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);pointer-events:none;background:linear-gradient(#0f172a29,#0f172a57);justify-content:center;align-items:center;padding:14px;display:flex;position:absolute;inset:0}.gameEndOverlay.win{background:linear-gradient(#16a34a24,#0f172a47)}.gameEndOverlay.lose{background:linear-gradient(#dc262624,#0f172a47)}.gameEndOverlay.draw{background:linear-gradient(#64748b24,#0f172a3d)}.gameEndCard{pointer-events:auto;border:1px solid var(--border-strong);background:var(--surface);text-align:center;border-radius:18px;gap:10px;width:min(100%,320px);padding:16px 18px 18px;display:grid;box-shadow:0 18px 36px #0f172a47}.gameEndCard.win{border-color:#22c55ecc}.gameEndCard.lose{border-color:#f87171d1}.gameEndCard.draw{border-color:var(--border-strong)}.gameEndKicker{color:var(--text-muted);letter-spacing:.14em;text-transform:uppercase;margin:0;font-size:.74rem;font-weight:800}.gameEndCard h3{color:var(--text-title);margin:0;font-size:1.45rem}.gameEndReason{color:var(--text-secondary);margin:0;line-height:1.45}.gameEndAction{border:1px solid var(--border-strong);background:var(--accent);color:#fff;cursor:pointer;border-radius:12px;justify-self:center;min-width:170px;padding:10px 16px;font-weight:700}.gameEndAction:hover{background:var(--accent-hover)}.gameEndAction:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.board{--chess-board-light:var(--chess-light);--chess-board-dark:var(--chess-dark);aspect-ratio:1;border:1px solid var(--board-border);width:100%;max-width:min(640px,100dvh - 190px);box-shadow:0 10px 25px var(--board-shadow-1), 0 3px 8px var(--board-shadow-2);border-radius:16px;grid-template-rows:repeat(8,1fr);grid-template-columns:repeat(8,1fr);display:grid;overflow:hidden}.board.chessBoardTheme-wood{--chess-board-light:#f2e2c7;--chess-board-dark:#b88860}.board.chessBoardTheme-green{--chess-board-light:#e4edd4;--chess-board-dark:#769b67}.board.chessBoardTheme-blue{--chess-board-light:#dde7f6;--chess-board-dark:#6487b3}.board.chessBoardTheme-mono{--chess-board-light:#edf1f5;--chess-board-dark:#94a3b8}.board.chessBoardTheme-walnut{--chess-board-light:#e8d7bf;--chess-board-dark:#7c5237}.board.chessBoardTheme-marble{--chess-board-light:#f3f4f6;--chess-board-dark:#9ca3af}.board.chessBoardTheme-tournament{--chess-board-light:#f0d9b5;--chess-board-dark:#b58863}.board.chessBoardTheme-neon{--chess-board-light:#10213a;--chess-board-dark:#132d52}.chessControls{flex-wrap:wrap;gap:8px;display:flex}.square{appearance:none;aspect-ratio:1;cursor:pointer;border:none;justify-content:center;align-items:center;width:100%;height:100%;margin:0;padding:0;line-height:1;display:flex;position:relative}.chessPieceFrame{--piece-bg:transparent;--piece-border:transparent;--piece-shadow:0 2px 6px #0f172a33;--piece-filter:brightness(0) invert(1);--piece-radius:18%;--piece-scale:1;--piece-sheen:.45;border-radius:var(--piece-radius);background:var(--piece-bg);border:1px solid var(--piece-border);width:78%;height:78%;box-shadow:var(--piece-shadow);transform:scale(var(--piece-scale));isolation:isolate;place-items:center;display:grid;position:relative}.chessPieceFrame:before{content:"";border-radius:inherit;background:radial-gradient(circle at 30% 24%, rgba(255, 255, 255, var(--piece-sheen)), transparent 52%);pointer-events:none;position:absolute;inset:10%}.chessPieceIcon{pointer-events:none;-webkit-user-select:none;user-select:none;z-index:1;width:84%;height:84%;filter:var(--piece-filter);display:block;position:relative}.chessPieceFrame.piece-classic .chessPieceIcon{width:90%;height:90%}.chessPieceFrame.white{--piece-bg:linear-gradient(145deg, #ffffffe6, #e2e8f0d1);--piece-border:#0f172a29;--piece-shadow:0 2px 6px #0f172a38;--piece-filter:brightness(0) invert(1) drop-shadow(0 1px 1px #0f172a73)}.chessPieceFrame.black{--piece-bg:linear-gradient(145deg, #0f172af5, #334155e6);--piece-border:#ffffff1a;--piece-shadow:0 3px 8px #0f172a59;--piece-filter:brightness(.08) drop-shadow(0 1px 1px #0f172a8c)}.chessPieceFrame.piece-minimal{--piece-bg:transparent;--piece-border:#ffffff14;--piece-shadow:0 1px 4px #0f172a33;--piece-radius:18%;--piece-scale:.98;--piece-sheen:.18}.chessPieceFrame.piece-contrast{--piece-radius:24%;--piece-scale:.96;--piece-shadow:0 3px 10px #0f172a47;--piece-sheen:.62}.chessPieceFrame.piece-filled{--piece-radius:999px;--piece-scale:.94;--piece-shadow:0 4px 12px #0f172a4d;--piece-sheen:.76}.chessPieceFrame.piece-rounded{--piece-radius:30% 30% 28% 28% / 18% 18% 34% 34%;--piece-scale:1.08;--piece-bg:linear-gradient(180deg, #fffbf5f5, #e8ecf4e6);--piece-border:#3341552e;--piece-shadow:0 5px 12px #0f172a42, 0 1px 0 #ffffff7a inset;--piece-filter:none;--piece-sheen:.82}.chessPieceFrame.piece-rounded.white{--piece-bg:linear-gradient(180deg, #fffbf5fa, #e7eef8eb);--piece-border:#4755693d;--piece-shadow:0 6px 14px #0f172a38, 0 1px 0 #ffffff80 inset}.chessPieceFrame.piece-rounded.black{--piece-bg:linear-gradient(180deg, #111827f5, #313a49eb);--piece-border:#ffffff24;--piece-shadow:0 7px 16px #0f172a5c, 0 1px 0 #ffffff14 inset;--piece-sheen:.36}.chessPieceFrame.piece-rounded:before{background:radial-gradient(circle at 30% 24%,#fffc,#ffffff2e 40%,#0000 66%);inset:8%}.chessPieceFrame.piece-rounded .chessPieceIcon{filter:drop-shadow(0 1px 1px #0f172a29);width:92%;height:92%}.chessPieceFrame.piece-classic{--piece-radius:22% 22% 26% 26% / 16% 16% 34% 34%;--piece-scale:1.02;--piece-bg:transparent;--piece-border:transparent;--piece-shadow:0 2px 8px #0f172a2e;--piece-filter:none;--piece-sheen:0}.chessPieceFrame.piece-classic.white,.chessPieceFrame.piece-classic.black{--piece-bg:transparent;--piece-border:transparent;--piece-shadow:0 2px 8px #0f172a2e;--piece-filter:none;--piece-sheen:0}.square.light{background:var(--chess-board-light)}.square.dark{background:var(--chess-board-dark)}.square.lastMove{box-shadow:inset 0 0 0 3px var(--move-last)}.square.target{box-shadow:inset 0 0 0 4px var(--move-target), inset 0 0 0 999px var(--move-target-soft)}.square.selected{box-shadow:inset 0 0 0 4px var(--move-selected)}.square:disabled{cursor:not-allowed}.controls,.ghostControls{flex-wrap:wrap;gap:8px;display:flex}.controls button,.ghostControls button{border:1px solid var(--border-strong);background:var(--surface);cursor:pointer;color:var(--text-secondary);border-radius:10px;padding:9px 14px;font-weight:600}.controls button:hover,.ghostControls button:hover:not(:disabled){background:var(--surface-soft)}.captureToast{z-index:5;border:1px solid var(--border-strong);max-width:min(90%,420px);color:var(--text-secondary);pointer-events:none;background:#ffffffeb;border-radius:999px;align-items:center;gap:8px;padding:9px 12px;display:inline-flex;position:absolute;top:12px;left:50%;transform:translate(-50%);box-shadow:0 12px 26px #0f172a33}.captureToast-good{color:#14532d;background:#dcfce7f5;border-color:#22c55e9e}.captureToast-bad{color:#7f1d1d;background:#fee2e2f5;border-color:#ef444494}.captureToast-player{box-shadow:0 12px 26px #15803d29}.captureToast-computer{box-shadow:0 12px 26px #7f1d1d29}.captureToast .ghostToken.compact{flex-shrink:0}.captureToast span:last-child{font-weight:700}.ghostLegend{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.legendItem{color:var(--text-secondary);align-items:center;gap:6px;font-size:.84rem;display:inline-flex}.setupHelp{color:var(--text-muted);margin:-4px 0 0;font-size:.82rem}.setupHelp.locked{color:var(--text-secondary)}.ghostStatusGrid{background:var(--surface-soft)}.ghostBoardShell{justify-content:flex-end;display:flex}.ghostBoard{aspect-ratio:1;border:1px solid var(--board-border);width:100%;max-width:min(600px,100dvh - 210px);box-shadow:0 12px 28px var(--board-shadow-1), 0 3px 10px var(--board-shadow-2);border-radius:16px;grid-template-rows:repeat(6,1fr);grid-template-columns:repeat(6,1fr);display:grid;overflow:hidden}.gomokuBoard{aspect-ratio:1;border:1px solid var(--board-border);background:radial-gradient(circle at 38% 24%, #ffffff2e, transparent 34%), linear-gradient(135deg, var(--gomoku-board-light), var(--gomoku-board-dark));width:100%;max-width:min(100%,720px,100dvw - 20px,100dvh - 150px);box-shadow:0 12px 28px var(--board-shadow-1), 0 3px 10px var(--board-shadow-2);border-radius:18px;grid-template-rows:repeat(15,1fr);grid-template-columns:repeat(15,1fr);display:grid;overflow:hidden}.gomokuCell{appearance:none;cursor:pointer;border:none;border-right:1px solid var(--gomoku-grid-line);border-bottom:1px solid var(--gomoku-grid-line);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;background:0 0;justify-content:center;align-items:center;margin:0;padding:0;display:flex;position:relative}.gomokuCell:hover:not(:disabled){background:#ffffff0a}.gomokuCell:disabled{cursor:not-allowed}.gomokuCell.lastMove:after{content:"";border:3px solid var(--move-last);pointer-events:none;border-radius:50%;position:absolute;inset:6%;box-shadow:0 0 0 2px #ffffff2e}.gomokuStone{aspect-ratio:1;border-radius:50%;width:clamp(.95rem,2vw,2.05rem);position:relative;box-shadow:0 1px 4px #0f172a52,inset 0 1px #ffffff4d}.gomokuStone.black{background:radial-gradient(circle at 34% 28%,#ffffff38,#ffffff0a 18%,#404040 46%,#050505 100%);border:1px solid #ffffff14}.gomokuStone.white{background:radial-gradient(circle at 34% 28%,#fff,#fbfbfb 52%,#d7d7d7 100%);border:1px solid #0f172a33}.legendItem .gomokuStone{width:1.08rem;min-width:1.08rem}.ghostSquare{appearance:none;cursor:pointer;border:none;justify-content:center;align-items:center;margin:0;padding:0;display:flex;position:relative}.ghostSquare.light{background:var(--ghost-light)}.ghostSquare.dark{background:var(--ghost-dark)}.ghostSquare.lastMove{box-shadow:inset 0 0 0 3px var(--move-last)}.ghostSquare.target{box-shadow:inset 0 0 0 4px var(--move-target), inset 0 0 0 999px var(--move-target-soft)}.ghostSquare.selected{box-shadow:inset 0 0 0 4px var(--move-selected)}.ghostSquare:disabled{cursor:not-allowed}.ghostSquare.exit:after{content:"";border:2px dashed var(--exit-ring);pointer-events:none;border-radius:50%;width:28%;height:28%;position:absolute}.ghostToken{--token-bg:linear-gradient(135deg, #e6ffef, #c5f7da);--token-border:#22c55e;--token-ink:#166534;--token-shadow:0 2px 6px var(--board-shadow-1);--token-radius:999px;--token-sheen:.42;--token-glow:transparent;--token-glow-opacity:0;--token-clip:none;border-radius:var(--token-radius);background:var(--token-bg);border:1px solid var(--token-border);width:clamp(1.6rem,4vw,2.15rem);height:clamp(1.6rem,4vw,2.15rem);color:var(--token-ink);box-shadow:var(--token-shadow);isolation:isolate;clip-path:var(--token-clip);justify-content:center;align-items:center;font-size:clamp(.82rem,2.4vw,1.12rem);font-weight:700;display:flex;position:relative}.ghostToken:before{content:"";border-radius:inherit;background:radial-gradient(circle at 30% 24%, rgba(255, 255, 255, var(--token-sheen)), transparent 52%);pointer-events:none;z-index:0;position:absolute;inset:11%}.ghostToken:after{content:"";border-radius:inherit;background:radial-gradient(circle, var(--token-glow) 0%, transparent 72%);opacity:var(--token-glow-opacity);filter:blur(5px);pointer-events:none;z-index:-1;position:absolute;inset:-10%}.ghostSigil{min-width:42%;height:18%;color:var(--token-ink);z-index:2;background:#ffffffc7;border:1px solid #0f172a1f;border-radius:999px;justify-content:center;align-items:center;padding:0 .2rem;font-size:.64rem;font-weight:900;line-height:1;display:flex;position:absolute;top:61%;left:50%;transform:translate(-50%,-50%);box-shadow:0 1px 2px #0f172a2e}.ghostToken.token-good .ghostSigil{box-shadow:0 1px 2px #0f172a2e,0 0 0 1px #22c55e3d,0 0 8px #4ade8029}.ghostToken.token-bad .ghostSigil{border-radius:7px;transform:translate(-50%,-50%)skew(-8deg);box-shadow:0 1px 2px #0f172a2e,0 0 0 1px #f8717129}.ghostToken.token-unknown .ghostSigil{border-style:dashed;box-shadow:0 1px 2px #0f172a2e,0 0 0 1px #64748b2e}.ghostToken.compact{width:1.2rem;height:1.2rem}.ghostToken.compact .ghostBadge{min-width:.72rem;height:.72rem;font-size:.52rem;bottom:-3px;right:-2px}.ghostToken.token-good{--token-bg:linear-gradient(135deg, #effdf4, #c8f4d7);--token-border:#16a34a;--token-ink:#166534;--token-glow:#4ade8057}.ghostToken.token-bad{--token-bg:linear-gradient(135deg, #ffe3e3, #ffcad5);--token-border:#ef4444;--token-ink:#991b1b;--token-glow:#f8717157}.ghostToken.token-unknown{--token-bg:linear-gradient(135deg, #e2e8f0, #cbd5e1);--token-border:#64748b;--token-ink:#334155;--token-glow:#94a3b84d}.ghostToken.token-style-cute{--token-radius:38% 38% 42% 42% / 28% 28% 58% 58%;--token-shadow:0 2px 6px var(--board-shadow-1), inset 0 1px 0 #fff6;--token-sheen:.56}.ghostToken.token-style-cute .ghostIcon{filter:brightness(0)saturate()drop-shadow(0 1px 1px #0f172a2e);width:82%;height:82%}.ghostToken.token-style-cute:before{background:radial-gradient(circle at 30% 22%,#ffffff85,#0000 48%);inset:10%}.ghostToken.token-style-cute .ghostSigil{top:61%}.ghostToken.token-style-mystic{--token-shadow:0 0 0 1px #7c3aed47, 0 0 16px #7c3aed57;--token-sheen:.72;--token-clip:polygon(50% 0, 78% 10%, 94% 32%, 88% 74%, 50% 100%, 12% 74%, 6% 32%, 22% 10%)}.ghostToken.token-style-mystic.token-good{--token-bg:linear-gradient(135deg, #eefdf7, #b9f3d7);--token-border:#34d399;--token-ink:#14532d;--token-glow:#6ee7b78c;--token-glow-opacity:.45;--token-clip:polygon(50% 0, 76% 12%, 92% 34%, 84% 78%, 50% 100%, 16% 78%, 8% 34%, 24% 12%)}.ghostToken.token-style-mystic.token-bad{--token-bg:linear-gradient(135deg, #ffe0ea, #b83280);--token-border:#f472b6;--token-ink:#fff1f2;--token-glow:#f472b68c;--token-glow-opacity:.48;--token-clip:polygon(50% 0, 72% 8%, 90% 22%, 100% 50%, 86% 86%, 50% 100%, 14% 86%, 0 50%, 10% 22%, 28% 8%)}.ghostToken.token-style-mystic.token-unknown{--token-bg:linear-gradient(135deg, #edf2ff, #a5b4fc);--token-border:#818cf8;--token-ink:#1e293b;--token-glow:#818cf866;--token-glow-opacity:.38;--token-clip:polygon(50% 0, 81% 10%, 94% 34%, 88% 72%, 50% 100%, 12% 72%, 6% 34%, 19% 10%)}.ghostToken.token-style-mystic .ghostSigil{min-width:46%;height:20%;font-size:.67rem;top:60%}.ghostToken.token-style-mystic .ghostIcon{filter:brightness(0)saturate()drop-shadow(0 2px 3px #0f172a3d);width:86%;height:86%}.ghostToken.token-style-mystic.token-good .ghostSigil{color:#14532d;background:#ffffffe0;border-color:#22c55e47}.ghostToken.token-style-mystic.token-bad .ghostSigil{color:#fff1f2;background:#7f1d1ddb;border-color:#f871714d}.ghostToken.token-style-mystic.token-unknown .ghostSigil{color:#f8fafc;background:#1e293bc2;border-color:#ffffff38}.ghostToken.token-style-minimal{--token-bg:linear-gradient(135deg, #f8fafc, #eef2f7);--token-border:#94a3b8;--token-ink:#0f172a;--token-radius:16%;--token-shadow:0 1px 3px #0f172a29;--token-sheen:.24}.ghostToken.token-style-minimal.token-good,.ghostToken.token-style-minimal.token-bad,.ghostToken.token-style-minimal.token-unknown{--token-bg:linear-gradient(135deg, #f8fafc, #eef2f7);--token-ink:#0f172a}.ghostToken.token-style-minimal .ghostIcon{opacity:.78;filter:grayscale()contrast(1.1);width:72%;height:72%}.ghostToken.token-style-minimal .ghostBadge{background:#0f172a;border-radius:6px}.ghostToken.token-style-minimal .ghostSigil{color:#0f172a;background:#ffffffe0}.ghostToken.token-style-neon{--token-radius:30%;--token-shadow:0 0 0 1px #22d3ee5c, 0 0 16px #3b82f675;--token-sheen:.62;--token-clip:polygon(50% 0, 90% 20%, 100% 50%, 90% 80%, 50% 100%, 10% 80%, 0 50%, 10% 20%)}.ghostToken.token-style-neon.token-good{--token-bg:linear-gradient(135deg, #34d399, #06b6d4);--token-border:#67e8f9;--token-ink:#ecfeff;--token-glow:#22d3ee99;--token-glow-opacity:.45}.ghostToken.token-style-neon.token-bad{--token-bg:linear-gradient(135deg, #f43f5e, #a855f7);--token-border:#f9a8d4;--token-ink:#fff1f2;--token-glow:#f43f5e94;--token-glow-opacity:.45}.ghostToken.token-style-neon.token-unknown{--token-bg:linear-gradient(135deg, #38bdf8, #6366f1);--token-border:#93c5fd;--token-ink:#eff6ff;--token-glow:#6366f194;--token-glow-opacity:.45}.ghostToken.token-style-neon .ghostSigil{color:#ecfeff;background:#080f19e6;border-color:#7dd3fc70}.ghostToken.token-style-neon .ghostIcon{filter:drop-shadow(0 0 4px #7dd3fc47);width:78%;height:78%}.ghostToken.token-style-paper{--token-radius:12% 18% 16% 12% / 10% 14% 18% 12%;--token-shadow:0 1px 2px #0f172a29, inset 0 1px 0 #ffffff85;--token-sheen:.5;--token-clip:polygon(8% 12%, 92% 12%, 96% 18%, 94% 86%, 84% 94%, 16% 94%, 6% 88%, 4% 18%)}.ghostToken.token-style-paper.token-good{--token-bg:linear-gradient(135deg, #f4efdd, #d9cfb3), repeating-linear-gradient(135deg, #ffffff2e 0 2px, transparent 2px 6px);--token-border:#bfae95;--token-ink:#4d3a21}.ghostToken.token-style-paper.token-bad{--token-bg:linear-gradient(135deg, #f5e8df, #d8baa2), repeating-linear-gradient(135deg, #ffffff24 0 2px, transparent 2px 6px);--token-border:#c89b82;--token-ink:#5a2f21}.ghostToken.token-style-paper.token-unknown{--token-bg:linear-gradient(135deg, #f2ece4, #d2c2b1), repeating-linear-gradient(135deg, #ffffff1f 0 2px, transparent 2px 6px);--token-border:#bfae95;--token-ink:#4b3f35}.ghostToken.token-style-paper .ghostSigil{color:#4d3a21;background:#fff8ece6;border-color:#7c5c3e33}.ghostToken.token-style-paper .ghostIcon{width:76%;height:76%}.ghostToken.token-style-shadow{--token-radius:40% 40% 44% 44% / 26% 26% 58% 58%;--token-shadow:0 3px 10px #0206176b, inset 0 1px 0 #ffffff2e;--token-sheen:.26;--token-clip:polygon(50% 0, 72% 8%, 90% 25%, 96% 52%, 86% 84%, 50% 100%, 14% 84%, 4% 52%, 10% 25%, 28% 8%)}.ghostToken.token-style-shadow.token-good{--token-bg:linear-gradient(135deg, #14532d, #22c55e);--token-border:#86efac;--token-ink:#dcfce7}.ghostToken.token-style-shadow.token-bad{--token-bg:linear-gradient(135deg, #7f1d1d, #ef4444);--token-border:#fca5a5;--token-ink:#fee2e2}.ghostToken.token-style-shadow.token-unknown{--token-bg:linear-gradient(135deg, #334155, #64748b);--token-border:#94a3b8;--token-ink:#e2e8f0}.ghostToken.token-style-shadow .ghostSigil{color:#e2e8f0;background:#0f172ad1;border-color:#ffffff2e}.ghostToken.token-style-shadow .ghostIcon{filter:drop-shadow(0 1px 2px #02061747);width:80%;height:80%}.ghostToken.token-style-mask{--token-radius:16%;--token-shadow:0 3px 10px #0f172a4d, inset 0 1px 0 #ffffff2e;--token-sheen:.52;--token-clip:polygon(18% 12%, 82% 12%, 91% 28%, 86% 78%, 50% 94%, 14% 78%, 9% 28%)}.ghostToken.token-style-mask.token-good{--token-bg:linear-gradient(135deg, #f8edd6, #cbb07d);--token-border:#9a7b42;--token-ink:#4d371d}.ghostToken.token-style-mask.token-bad{--token-bg:linear-gradient(135deg, #ffd9d2, #d28a73);--token-border:#b56b54;--token-ink:#5f231d}.ghostToken.token-style-mask.token-unknown{--token-bg:linear-gradient(135deg, #e7eef4, #94a3b8);--token-border:#64748b;--token-ink:#1e293b}.ghostToken.token-style-mask .ghostSigil{color:#1e293b;background:#ffffffbd;border-radius:6px}.ghostToken.token-style-mask .ghostIcon{filter:brightness(0)saturate()drop-shadow(0 1px 2px #0f172a33);width:88%;height:88%}.ghostToken.token-style-spirit{--token-radius:52% 52% 42% 42% / 38% 38% 62% 62%;--token-shadow:0 0 0 1px #ffffff24, 0 0 18px #38bdf838;--token-sheen:.78;opacity:.97;--token-clip:polygon(50% 0, 76% 10%, 93% 32%, 88% 70%, 70% 92%, 50% 100%, 30% 92%, 12% 70%, 7% 32%, 24% 10%)}.ghostToken.token-style-spirit.token-good{--token-bg:linear-gradient(135deg, #dbffeceb, #aaf3d0e6);--token-border:#5eead4c2;--token-ink:#125d3a}.ghostToken.token-style-spirit.token-bad{--token-bg:linear-gradient(135deg, #ffe3ebeb, #f9a8d4e6);--token-border:#f472b6c7;--token-ink:#7f1d5f}.ghostToken.token-style-spirit.token-unknown{--token-bg:linear-gradient(135deg, #e2e8f0eb, #c7d2fee6);--token-border:#818cf8b3;--token-ink:#334155}.ghostToken.token-style-spirit .ghostSigil{color:var(--token-ink);background:#ffffff80;border-color:#ffffff61}.ghostToken.token-style-spirit .ghostIcon{filter:brightness(0)saturate()drop-shadow(0 2px 4px #0f172a2e);width:90%;height:90%}.ghostToken.token-style-lantern{--token-radius:22% 22% 32% 32% / 16% 16% 60% 60%;--token-shadow:0 0 0 1px #f59e0b3d, 0 0 18px #fbbf2447;--token-sheen:.62;--token-clip:polygon(50% 0, 76% 8%, 92% 32%, 88% 78%, 50% 100%, 12% 78%, 8% 32%, 24% 8%)}.ghostToken.token-style-lantern .ghostSigil{border-radius:6px;width:44%;height:18%}.ghostToken.token-style-lantern .ghostBadge{clip-path:polygon(50% 0,82% 18%,82% 82%,50% 100%,18% 82%,18% 18%)}.ghostToken.token-style-lantern .ghostIcon{width:78%;height:78%}.ghostToken.token-style-phantom{--token-radius:54% 54% 36% 36% / 28% 28% 72% 72%;--token-shadow:0 0 0 1px #94a3b838, 0 0 16px #e2e8f03d;--token-sheen:.72;--token-clip:polygon(50% 0, 72% 8%, 86% 24%, 95% 48%, 88% 76%, 72% 92%, 50% 100%, 28% 92%, 12% 76%, 5% 48%, 14% 24%, 28% 8%)}.ghostToken.token-style-phantom .ghostSigil{border-radius:999px;width:42%;height:18%}.ghostToken.token-style-phantom .ghostBadge{border-radius:999px}.ghostToken.token-style-phantom .ghostIcon{opacity:.95;width:88%;height:88%}.ghostToken.token-style-skull{--token-radius:18%;--token-shadow:0 0 0 1px #94a3b847, 0 0 12px #0f172a38;--token-sheen:.48;--token-clip:polygon(50% 0, 78% 10%, 94% 32%, 88% 74%, 68% 92%, 32% 92%, 12% 74%, 6% 32%, 22% 10%)}.ghostToken.token-style-skull .ghostSigil{border-radius:4px;width:46%;height:19%;transform:translate(-50%,-50%)skew(-5deg)}.ghostToken.token-style-skull .ghostBadge{clip-path:polygon(50% 0,84% 18%,84% 82%,50% 100%,16% 82%,16% 18%)}.ghostToken.token-style-skull .ghostIcon{filter:brightness(1.05)drop-shadow(0 2px 3px #0f172a33);width:76%;height:76%}.ghostToken.token-style-wisp{--token-radius:48% 48% 40% 40% / 26% 26% 72% 72%;--token-shadow:0 0 0 1px #2dd4bf38, 0 0 18px #2dd4bf3d;--token-sheen:.8;--token-clip:polygon(50% 0, 70% 10%, 86% 28%, 95% 50%, 88% 74%, 70% 92%, 50% 100%, 30% 92%, 12% 74%, 5% 50%, 14% 28%, 30% 10%)}.ghostToken.token-style-wisp .ghostSigil{border-radius:999px;width:40%;height:17%;transform:translate(-50%,-50%)rotate(-4deg)}.ghostToken.token-style-wisp .ghostBadge{border-radius:999px}.ghostToken.token-style-wisp .ghostIcon{opacity:.96;width:86%;height:86%}.ghostToken.token-style-rune{--token-radius:14%;--token-shadow:0 0 0 1px #64748b47, 0 0 14px #64748b33;--token-sheen:.52;--token-clip:polygon(26% 0, 74% 0, 100% 26%, 100% 74%, 74% 100%, 26% 100%, 0 74%, 0 26%)}.ghostToken.token-style-rune .ghostSigil{letter-spacing:.03em;border-radius:3px;width:44%;height:18%}.ghostToken.token-style-rune .ghostBadge{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.ghostToken.token-style-rune .ghostIcon{width:82%;height:82%}.ghostIcon{z-index:1;filter:drop-shadow(0 1px 1px #0f172a33);width:74%;height:74%;display:block;position:relative}.ghostBadge{background:var(--text-title);min-width:.95rem;height:.95rem;color:var(--surface);z-index:2;border:1px solid #ffffffbf;border-radius:999px;justify-content:center;align-items:center;font-size:.62rem;font-weight:800;line-height:1;display:flex;position:absolute;bottom:-4px;right:-3px}.ghostToken.token-good .ghostBadge{background:#15803d}.ghostToken.token-bad .ghostBadge{background:#b91c1c}.ghostToken.token-unknown .ghostBadge{background:#334155}.ghostToken.token-style-cute .ghostBadge{border-radius:999px}.ghostToken.token-style-mystic .ghostBadge{background:#581c87f0;border-color:#c4b5fde0;box-shadow:0 0 0 1px #ffffff1a}.ghostToken.token-style-minimal .ghostBadge{border-radius:6px}.ghostToken.token-style-neon .ghostBadge{background:#080f19eb;border-color:#22d3ee9e;box-shadow:0 0 0 1px #22d3ee33,0 0 8px #22d3ee42}.ghostToken.token-style-paper .ghostBadge{background:#7c5c3ef0;border-radius:6px}.ghostToken.token-style-shadow .ghostBadge{background:#0f172a}.ghostToken.token-style-mask .ghostBadge{background:#4e3c26f5;border-radius:4px;bottom:1px;right:1px}.ghostToken.token-style-spirit .ghostBadge{background:#0f172ab8;border-color:#ffffff57}.exitDot{border:2px dashed var(--exit-ring);border-radius:50%;width:.8rem;height:.8rem}.ghostControls button:disabled{color:var(--text-disabled);cursor:not-allowed}.ghostCapturedGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.ghostCapturedCard{background:var(--surface-soft);border:1px solid var(--border-soft);border-radius:12px;padding:10px}.ghostCapturedCard h3{margin:0 0 8px;font-size:.95rem}.ghostCapturedList{flex-wrap:wrap;gap:6px;display:flex}.capturedTag{border:1px solid #0000;border-radius:999px;align-items:center;gap:6px;padding:2px 8px;font-size:.78rem;display:inline-flex}.capturedTag.good{color:#166534;background:#dcfce7;border-color:#86efac}.capturedTag.bad{color:#991b1b;background:#fee2e2;border-color:#fca5a5}.capturedEmpty{color:var(--text-muted);font-size:.85rem}.ghostRules{border:1px solid var(--border-soft);background:var(--surface-soft);border-radius:12px;padding:10px 12px}.ghostRules h3{margin:0 0 6px;font-size:.95rem}.ghostRules ul{color:var(--text-secondary);gap:4px;margin:0;padding-left:18px;font-size:.85rem;display:grid}@media (width<=920px){.app{min-height:100svh;padding:8px}.appLayout{grid-template-columns:1fr;min-height:auto}.leftRail{display:none}.mobileTopBar{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:8px 10px;display:flex}.sidePanel{width:min(320px,100vw - 16px);top:8px;bottom:8px;left:8px}.gamePanel{padding:10px}.chessLayout,.ghostLayout{grid-template-columns:1fr;gap:12px}.chessBoardColumn,.ghostBoardColumn{justify-items:stretch}.boardShell,.ghostBoardShell{justify-content:center}.chessHeader,.ghostHeaderBar{grid-template-columns:1fr}.difficultyRow{justify-self:start}.ghostCapturedGrid{grid-template-columns:1fr}.ghostBoard{max-width:min(100%,520px)}.gomokuBoard{max-width:min(100%,100dvw - 16px,100dvh - 150px)}}@media (width<=640px){.mobileTopBar h1{font-size:1.08rem}.mobileTopActions{align-items:center}.board,.ghostBoard{max-width:min(100vw - 40px,520px)}.gomokuBoard{max-width:min(100%,100dvw - 16px,100dvh - 150px)}}
