@import "https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap";:root{--bg:#d6d8de;--panel:#f7f8fb;--text:#1f232b;--text-muted:#5a6475;--accent:#f2c94c;--blue:#2f6bd6;--orange:#d26a2f;--stem:#a7aab4;--shadow-soft:0 12px 30px #10141f1f;--shadow-strong:0 18px 40px #10141f38;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;font-family:Space Grotesk,system-ui,sans-serif}*{box-sizing:border-box}body{min-height:100vh;margin:0}#root{min-height:100vh}h1{margin:0 0 12px;font-size:clamp(32px,4vw,56px);font-weight:700}h2{font-weight:700}p{margin:0}button{font-family:inherit}.app{flex-direction:column;gap:32px;min-height:100vh;padding:104px clamp(20px,4vw,56px) 64px;display:flex}.app.home{gap:32px}.toolbar{z-index:20;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#f7f8fbe6;border-bottom:1px solid #14182114;justify-content:space-between;align-items:center;padding:14px clamp(20px,4vw,56px);display:flex;position:fixed;top:0;left:0;right:0}.toolbar-left,.toolbar-right{flex-wrap:wrap;align-items:center;gap:14px;display:flex}.brand{letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:700}.brand-logo{width:auto;height:auto;display:block}.toolbar-logo{height:22px}.toolbar-link{color:var(--text);cursor:pointer;background:0 0;border:none;border-radius:999px;align-items:center;gap:8px;padding:6px 10px;font-weight:600;display:inline-flex}.toolbar-link:hover{background:#0000000f}.toolbar-sign-in{flex:none}.gsi-material-button{-webkit-user-select:none;user-select:none;appearance:none;box-sizing:border-box;color:#1f1f1f;cursor:pointer;letter-spacing:.25px;text-align:center;vertical-align:middle;white-space:nowrap;background-color:#fff;background-image:none;border:1px solid #747775;border-radius:4px;outline:none;width:auto;min-width:min-content;max-width:400px;height:40px;padding:0 12px;font-family:Roboto,Arial,sans-serif;font-size:14px;transition:background-color .218s,border-color .218s,box-shadow .218s;position:relative;overflow:hidden}.gsi-material-button .gsi-material-button-icon{width:20px;min-width:20px;height:20px;margin-right:10px}.gsi-material-button .gsi-material-button-content-wrapper{flex-flow:row;justify-content:space-between;align-items:center;width:100%;height:100%;display:flex;position:relative}.gsi-material-button .gsi-material-button-contents{text-overflow:ellipsis;vertical-align:top;flex-grow:1;font-family:Roboto,Arial,sans-serif;font-weight:500;overflow:hidden}.gsi-material-button .gsi-material-button-state{opacity:0;transition:opacity .218s;position:absolute;inset:0}.gsi-material-button:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.gsi-material-button:disabled .gsi-material-button-contents,.gsi-material-button:disabled .gsi-material-button-icon{opacity:.38}.gsi-material-button:not(:disabled):active .gsi-material-button-state,.gsi-material-button:not(:disabled):focus .gsi-material-button-state{opacity:.12;background-color:#303030}.gsi-material-button:not(:disabled):hover{transform:none;box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.gsi-material-button:not(:disabled):hover .gsi-material-button-state{opacity:.08;background-color:#303030}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.icon-close{color:#14182194;cursor:pointer;background:0 0;border:none;justify-content:center;align-self:flex-start;align-items:center;width:44px;height:44px;margin-top:2px;padding:0;display:inline-flex;transform:translateY(-8px)}.icon-close:hover{color:var(--text)}.icon-close svg{stroke:currentColor;stroke-width:2.4px;stroke-linecap:round;fill:none;width:36px;height:36px}.home-content{flex-direction:column;gap:40px;display:flex}.home-header{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:center;gap:36px;display:grid}.home-header.simple{grid-template-columns:minmax(0,1fr)}.home-actions{flex-wrap:wrap;gap:12px;margin-top:24px;display:flex}.home-actions.stacked{flex-direction:column;align-items:stretch}.home-actions.stacked .btn,.matches-group>.btn,.button-with-note>.btn,.profile-section>.btn{justify-content:center;width:100%}.home-preview{flex-direction:column;gap:16px;display:flex}.auth-status{color:var(--text-muted);align-items:center;font-size:13px;display:flex}.avatar-button{cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.avatar-button:hover .avatar,.avatar-button:focus-visible .avatar{box-shadow:0 0 0 3px #1418211a}.avatar{object-fit:cover;border:1px solid #0000001a;border-radius:50%;width:28px;height:28px}.avatar-fallback{color:var(--text);background:#00000014;justify-content:center;align-items:center;font-size:12px;font-weight:700;display:inline-flex}.home-main{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;display:grid}.home-layout{grid-template-columns:400px 600px;justify-content:center;align-items:start;gap:24px;display:grid}.home-card{flex-direction:column;gap:8px;display:flex}.action-panel,.matches-panel{gap:20px;width:100%}.play-section{flex-direction:column;gap:8px;display:flex}.play-section-header h3{margin:0;font-size:16px}.button-with-note{flex-direction:column;gap:4px;display:flex}.play-note{color:var(--text-muted);text-align:center;margin:2px 0 0;font-size:13px}.play-section+.play-section{margin-top:18px}.play-section .home-actions{margin-top:0}.secondary-actions{margin-top:32px}.action-panel-header h2,.action-panel-header p{margin:0}.action-panel-header p{color:var(--text-muted)}.leaderboard-header h2,.leaderboard-header h3,.leaderboard-header p{margin:0}.leaderboard-header p{color:var(--text-muted)}.leaderboard-list{flex-direction:column;gap:10px;display:flex}.leaderboard-row{background:#ffffff9e;border:1px solid #14182114;border-radius:16px;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;display:grid}.leaderboard-button{text-align:left;width:100%;color:var(--text);cursor:pointer}.leaderboard-button:hover{box-shadow:var(--shadow-soft);transform:translateY(-1px)}.leaderboard-rank{color:var(--text-muted);font-weight:700}.leaderboard-player{align-items:center;gap:12px;min-width:0;display:flex}.leaderboard-player strong,.leaderboard-player p{margin:0}.leaderboard-player p{color:var(--text-muted)}.leaderboard-avatar{width:36px;height:36px}.leaderboard-pct{font-size:20px;font-weight:700}.note,.inline-message{color:var(--text-muted);margin:0}.inline-message{margin-top:14px}.inline-message.error{color:#9b4026}.matches-panel{flex-direction:column;gap:16px;display:flex}.matches-group{flex-direction:column;gap:12px;display:flex}.matches-group h3{margin:0;font-size:16px}.profile-card{width:min(900px,94vw);max-height:min(82vh,860px);padding:0;overflow:hidden}.modal-card.history-card{width:min(500px,92vw);max-width:500px}.profile-header{justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 14px 0 24px;display:flex}.profile-identity{align-items:center;gap:16px;display:flex}.profile-identity h2{margin:0;font-size:28px}.profile-identity p{color:var(--text-muted);margin:4px 0 0}.profile-avatar{object-fit:cover;border-radius:50%;width:56px;height:56px}.profile-body{flex-direction:column;gap:22px;padding:20px 24px 24px;display:flex;overflow:auto}.profile-section{flex-direction:column;gap:14px;display:flex}.profile-actions{padding-top:4px}.profile-section-header{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:10px;display:flex}.profile-section-header h3{margin:0;font-size:20px}.profile-section-header p{color:var(--text-muted);margin:0}.profile-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;display:grid}.profile-stats .profile-stat{grid-column:1/-1}.profile-stat{background:#ffffff9e;border:1px solid #14182114;border-radius:16px;flex-direction:column;gap:6px;padding:14px 16px;display:flex}.profile-stat strong{font-size:24px}.profile-stat-label{text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);font-size:12px}.profile-list{flex-direction:column;gap:10px;display:flex}.profile-row{background:#ffffff9e;border:1px solid #14182114;border-radius:16px;justify-content:space-between;align-items:center;gap:16px;padding:14px 16px;display:flex}.match-history-row{text-align:left;width:100%;color:var(--text);cursor:pointer}.profile-row strong{margin-bottom:4px;display:block}.profile-row p{color:var(--text-muted);margin:0}.profile-row-meta{color:var(--text-muted);text-align:right;flex-direction:column;align-items:flex-end;gap:8px;font-size:13px;display:flex}.matches-header{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:12px;display:flex}.matches-header h2,.game-heading,.matches-header p{margin:0}@media (width<=960px){.home-layout{grid-template-columns:1fr;justify-items:center}.action-panel,.matches-panel{max-width:400px}}.match-list{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;display:grid}.match-list.compact{grid-template-columns:1fr}.match-card{text-align:left;color:var(--text);cursor:pointer;background:#ffffff9e;border:1px solid #14182114;border-radius:16px;flex-direction:column;gap:10px;padding:16px;display:flex}.match-card:hover{box-shadow:var(--shadow-soft);transform:translateY(-1px)}.match-card-top,.match-card-bottom,.match-meta{justify-content:space-between;align-items:center;gap:10px;display:flex}.match-card-bottom,.match-meta{color:var(--text-muted);font-size:13px}.match-card-identity{align-items:center;gap:10px;min-width:0;display:inline-flex}.match-card-identity strong{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.match-card-status{color:var(--text-muted);white-space:nowrap;margin-left:auto;font-size:13px}.match-card-status.your-turn{color:#8a6a10;background:#f2c94c3d;border:1px solid #f2c94c6b;border-radius:999px;padding:4px 10px;font-weight:700}.match-avatar{width:24px;height:24px}.match-badge{text-transform:uppercase;letter-spacing:.08em;background:#0000000f;border-radius:999px;align-items:center;padding:5px 10px;font-size:12px;font-weight:700;display:inline-flex}.match-badge.waiting{color:#8a6021;background:#ba904629}.match-badge.active{color:#265cb8;background:#2f6bd624}.match-badge.finished{color:#4d5667;background:#1418211a}.app-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:24px;display:flex}.eyebrow{text-transform:uppercase;letter-spacing:.2em;color:var(--text-muted);margin:0 0 12px;font-size:12px;font-weight:700}.subhead{max-width:480px;color:var(--text-muted)}.status-card{background:var(--panel);box-shadow:var(--shadow-soft);border-radius:18px;grid-template-columns:repeat(2,minmax(160px,1fr));gap:16px;padding:18px 20px;display:grid}.label{text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted);margin:0 0 6px;font-size:12px}.value{align-items:center;gap:8px;margin:0;font-size:18px;font-weight:600;display:flex}.app-main{grid-template-columns:minmax(0,1.25fr) minmax(240px,.65fr);gap:32px;display:grid}.board-panel{flex-direction:column;flex:1;gap:12px;min-height:0;display:flex}.score-bar{flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;display:flex}.score-summary-label{text-align:center;letter-spacing:.16em;text-transform:uppercase;width:100%;color:var(--text-muted);visibility:hidden;margin:0 0 4px;font-size:12px;font-weight:700}.score-summary-label.visible{visibility:visible}.score-player{align-items:center;gap:8px;display:inline-flex}.score-player-orange{justify-content:flex-end}.score-avatar-wrap{justify-content:center;align-items:center;display:inline-flex;position:relative}.score{background:var(--panel);border:2px solid #14182124;border-radius:16px;justify-content:center;align-items:center;gap:12px;width:fit-content;padding:14px 18px;font-weight:600;transition:border-color .2s,transform .2s;display:inline-flex}.score strong{font-size:24px}.score-avatar{flex:none;width:40px;height:40px}.score-avatar-placeholder{background:#ffffff47;border:2px dotted #14182138;border-radius:50%;flex:none;width:40px;height:40px}.score-avatar-button{flex:none}.score-you-pill{color:#2a313b;letter-spacing:.16em;text-transform:uppercase;background:#d9dde4;border-radius:4px;justify-content:center;align-items:center;padding:4px;font-size:11px;font-weight:800;line-height:1;display:inline-flex;position:absolute;bottom:-6px;right:-8px;box-shadow:0 2px 5px #10141f80}.dot{background:var(--blue);border-radius:50%;width:26px;height:26px;display:inline-flex}.dot.orange{background:var(--orange)}.dot.blue{background:var(--blue)}.score.orange .dot{background:var(--orange)}.score.orange{flex-direction:row-reverse}.score.active{border-color:var(--accent);transform:translateY(-1px)}.score.orange.active{border-color:var(--accent)}.board{--size:10;grid-template-columns:repeat(var(--size), minmax(0, 1fr));aspect-ratio:1;background-color:#d7dbe3;background-image:none;border-radius:4px;flex:none;gap:3px;padding:8px;display:grid;position:relative}.cell{cursor:pointer;background:#bec3cdb3;border:1px solid #0000000d;border-radius:2px;transition:box-shadow .2s,transform .2s;position:relative;overflow:visible}.cell:hover:not(.occupied):not(.selected):not(.disabled){transform:translateY(-1px);box-shadow:inset 0 0 0 2px #ffffff73}.cell.selected{animation-duration:1.4s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.cell.selected-blue{background:#769add57;animation-name:selectedCellPulseBlue}.cell.selected-orange{background:#df976e4d;animation-name:selectedCellPulseOrange}.cell.occupied,.cell.disabled{cursor:default}.cell.last-move{background:#b2b8c3cc}.piece{aspect-ratio:1;place-items:center;animation:.4s popIn;display:grid;position:absolute;inset:0;overflow:visible}.piece .core{background:var(--blue);z-index:2;border-radius:50%;width:80%;height:80%;position:relative}.piece.orange .core{background:var(--orange)}.score-dot{z-index:3;width:28%;height:28%;opacity:var(--score-opacity,1);background:#ffffffe6;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.stem{background:var(--stem);opacity:.7;transform-origin:50%;z-index:1;border-radius:999px;width:30%;height:100%;animation-fill-mode:forwards;position:absolute;top:50%;left:50%}.stem.up{animation:.15s ease-out stemUp;transform:translate(-50%,-100%)scaleY(1)}.stem.down{animation:.15s ease-out stemDown;transform:translate(-50%)scaleY(1)}.stem.left{width:100%;height:30%;animation:.15s ease-out stemLeft;transform:translate(-100%,-50%)scaleX(1)}.stem.right{width:100%;height:30%;animation:.15s ease-out stemRight;transform:translateY(-50%)scaleX(1)}.node{background:var(--stem);z-index:1;opacity:1;border-radius:50%;width:40%;height:40%;animation:.14s ease-out .15s forwards nodePopIn;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)scale(0)}.node.up{top:-55%;left:50%}.node.down{top:155%;left:50%}.node.left{top:50%;left:-55%}.node.right{top:50%;left:155%}.action-row{flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;display:flex}.action-row-main{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.action-row-controls{margin-left:auto;display:none;position:relative}.controls-menu-toggle{justify-content:center;min-width:56px;min-height:56px;padding:0}.controls-icon{width:32px;height:32px}.controls-icon svg{stroke-width:1.8px}.controls-menu-sheet{background:var(--panel);min-width:188px;box-shadow:var(--shadow-soft);z-index:2;border:1px solid #00000014;border-radius:18px;flex-direction:column;gap:8px;padding:10px;display:flex;position:absolute;bottom:calc(100% + 12px);right:0}.controls-menu-btn{justify-content:center;width:100%}.game-footer-actions{justify-content:space-between;align-items:center;gap:16px;margin-top:16px;display:flex}.game-side-action{flex:1;justify-content:flex-end;display:flex}.game-side-action.left{justify-content:flex-start}.btn{cursor:pointer;border:none;border-radius:999px;align-items:center;gap:8px;padding:12px 20px;font-size:16px;font-weight:600;transition:transform .2s,box-shadow .2s;display:inline-flex}.btn.primary{background:var(--accent);color:#1a1207;box-shadow:var(--shadow-soft)}.btn.secondary{background:var(--panel);color:var(--text);border:1px solid #00000014}.btn.ghost{color:var(--text);background:0 0;border:1px dashed #0003}.btn:hover{transform:translateY(-2px)}.btn:disabled{cursor:not-allowed;transform:none}.btn.secondary:disabled{color:#14182161;box-shadow:none;background:#1418210f;border-color:#14182114}.btn:disabled:hover{box-shadow:none;transform:none}.icon{color:currentColor;width:16px;height:16px;display:inline-flex}.icon svg{fill:none;stroke:currentColor;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;width:100%;height:100%}.icon.bookmark{opacity:.7;width:21px;height:21px}.icon-action-btn{justify-content:center;min-width:120px;min-height:56px;padding:0}.confirm-btn{color:#fff;box-shadow:var(--shadow-soft);background:#2f9e44}.clear-btn{color:#fff;box-shadow:var(--shadow-soft);background:#d64545}.confirm-btn:disabled,.clear-btn:disabled{color:#fff;box-shadow:none}.inactive-action{opacity:.5}.action-icon{width:33px;height:33px}.action-icon svg{stroke-width:2.8px}.icon.bookmark svg{fill:currentColor;stroke:none}.side-panel{flex-direction:column;gap:18px;display:flex}.panel{background:var(--panel);border-radius:18px;padding:18px 20px}.panel h2{margin:0 0 8px;font-size:18px}.panel p{color:var(--text-muted);margin:0 0 12px}.panel .play-note{text-align:center;margin:2px 0 0}.pill-row{flex-wrap:wrap;gap:8px;display:flex}.toggle-row{flex-wrap:wrap;gap:12px;display:flex}.pill{background:#0000000d;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:600}.list{color:var(--text-muted);margin:0;padding-left:18px}@keyframes popIn{0%{opacity:.4;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes stemUp{0%{opacity:.2;transform:translate(-50%,-50%)scaleY(.1)}to{opacity:.7;transform:translate(-50%,-100%)scaleY(1)}}@keyframes stemDown{0%{opacity:.2;transform:translate(-50%,-50%)scaleY(.1)}to{opacity:.7;transform:translate(-50%)scaleY(1)}}@keyframes stemLeft{0%{opacity:.2;transform:translate(-50%,-50%)scaleX(.1)}to{opacity:.7;transform:translate(-100%,-50%)scaleX(1)}}@keyframes stemRight{0%{opacity:.2;transform:translate(-50%,-50%)scaleX(.1)}to{opacity:.7;transform:translateY(-50%)scaleX(1)}}@keyframes nodePopIn{0%{transform:translate(-50%,-50%)scale(0)}to{transform:translate(-50%,-50%)scale(1)}}@keyframes selectedCellPulseBlue{0%,to{background:#769add3d}50%{background:#769add66}}@keyframes selectedCellPulseOrange{0%,to{background:#df976e33}50%{background:#df976e5c}}@keyframes stemGrow{0%{opacity:.4;transform:scale(.6)}to{opacity:1;transform:scale(1)}}@media (width<=960px){.app{padding:92px 20px 48px}.toolbar{padding:12px 20px}.toolbar-sign-in{max-width:none}.gsi-material-button{padding:0 10px}.home-header,.home-main{grid-template-columns:1fr}.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.game-overlay-panel{padding:56px 20px 36px}.score{border-radius:14px;gap:10px;padding:10px 14px}.score strong{font-size:20px}.dot{width:22px;height:22px}.score-avatar,.score-avatar-placeholder{width:34px;height:34px}.score-you-pill{padding:3px 4px;font-size:10px;bottom:-4px;right:-6px}.icon-action-btn{min-width:96px;min-height:48px}.action-icon{width:28px;height:28px}.action-row{flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:16px}.action-row-main{flex-wrap:nowrap;justify-content:flex-start}.action-row-controls{flex:none;display:flex}.controls-menu-toggle{min-width:48px;min-height:48px}.controls-icon,.icon-close svg{width:30px;height:30px}.game-footer-actions{display:none}}.game-overlay{z-index:10;position:fixed;inset:0}.game-overlay-backdrop{background:#0e111899;position:absolute;inset:0}.game-overlay-panel{background:var(--panel);width:100%;height:100%;box-shadow:var(--shadow-strong);padding:72px clamp(20px,4vw,56px) 48px;position:relative;overflow:hidden}.modal-overlay{z-index:30;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal-backdrop{background:#0e11188c;position:absolute;inset:0}.modal-card{background:var(--panel);width:min(420px,90vw);box-shadow:var(--shadow-strong);border-radius:20px;flex-direction:column;gap:12px;padding:24px;display:flex;position:relative}.modal-card h2{margin:0;font-size:20px}.modal-card p{color:var(--text-muted);margin:0}.how-to-card{width:min(760px,92vw);max-height:min(78vh,720px);padding:0;overflow:hidden}.how-to-header{justify-content:space-between;align-items:center;gap:16px;padding:24px 24px 0;display:flex}.how-to-header h2{margin:0;font-size:32px}.how-to-body{flex-direction:column;gap:18px;padding:20px 24px 24px;display:flex;overflow:auto}.how-to-body h3{margin:8px 0 0;font-size:22px}.how-to-body p{line-height:1.6}@media (width<=640px){.profile-header,.profile-row{flex-direction:column;align-items:flex-start}.modal-overlay{padding:16px}.how-to-card{width:min(760px,100vw - 32px)}.how-to-header{flex-direction:row;align-items:flex-start}.profile-row-meta{text-align:left;align-items:flex-start}.profile-stats{grid-template-columns:1fr}}.modal-actions{flex-wrap:wrap;gap:10px;margin-top:8px;display:flex}.game-shell{grid-template-rows:auto minmax(0,1fr) auto auto;gap:24px;width:100%;max-width:1100px;height:100%;min-height:0;margin:0 auto;display:grid}.game-header{justify-content:space-between;align-items:center;display:flex}.board-wrap{place-items:center;width:100%;max-width:600px;min-height:0;margin-inline:auto;display:grid;overflow:visible}@media (width<=960px){.game-shell{gap:0}.board-wrap{aspect-ratio:1;place-self:center}}
