:root{color-scheme:dark;--bg:#09171c;--surface:#11212a;--line:#293c45;--text:#f4f2ed;--muted:#a0b0ba;--accent:#ffa365;font-family:'Noto Sans KR','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 45% 0%,#10242b,#0b1b21 45%,#08151a);background-attachment:fixed}button,select{font:inherit}button,summary,select{cursor:pointer}button,a,summary{-webkit-tap-highlight-color:transparent}button{transition:background .15s,border-color .15s;color:inherit}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:4px}[hidden]{display:none!important}.skip{position:fixed;top:-80px;left:16px;z-index:99;padding:12px;background:var(--accent);color:#102029}.skip:focus{top:8px}.app-shell{max-width:1240px;padding:0 48px;margin:auto}.header{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;gap:10px;align-items:center;font-size:19px;letter-spacing:-.05em;color:var(--text);text-decoration:none}.brand strong{font-weight:800}.brand-mark{display:block;width:36px;height:36px;flex:none;filter:drop-shadow(0 2px 3px #0003)}.header-tools{display:flex;align-items:center;gap:20px}.header-note{font-size:13px;color:var(--muted)}.icon-button{width:42px;height:42px;display:grid;place-items:center;border:1px solid #3b505b;border-radius:50%;color:#ebdbca;background:#11232c}.icon-button:hover{background:#30434c}.icon-button svg{width:21px;height:21px}main{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:34px;padding:37px 0 32px}.board-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:21px}.eyebrow{margin:0 0 9px;font-size:11px;font-weight:600;letter-spacing:.16em;color:var(--muted)}h1{margin:0;font-size:29px;line-height:1.4;letter-spacing:-.055em}h2{font-size:21px;letter-spacing:-.04em;line-height:1.5;margin:7px 0}.rule-tag{color:#c4cfd4;font-size:12px;white-space:nowrap;padding-bottom:4px}.rule-tag span{display:block;text-align:right;margin-top:6px;font-family:ui-monospace,monospace;color:var(--muted)}.match-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;margin-bottom:13px;min-height:24px}.match-strip>span:first-child{display:flex;align-items:center;gap:8px}.match-strip strong{font-size:13px;color:#e5e4db;font-weight:500}.turn-dot{width:15px;height:15px;border-radius:50%;border:1px solid #5a6669}.turn-dot.black{background:#0a0d0e}.turn-dot.white{background:#f5eee4}.board-frame{padding:14px;background:linear-gradient(135deg,#fff0c17a,transparent 15%,#5a301c44 85%),url('./assets/kaya-wood.png') center/cover;border:1px solid #dfb77f;border-radius:5px;box-shadow:0 8px 0 #6b482d,0 12px 3px #0b0c0e50,0 22px 40px #0005,inset 3px 3px 2px #ffe4b8,inset -3px -4px 2px #805530}.board{position:relative;aspect-ratio:1;background:linear-gradient(110deg,#fff2d52b,#b7833820),url('./assets/kaya-wood.png') center/cover;box-shadow:inset 0 0 0 1px #7c542a88,inset 0 0 24px #9d6d2920;color:#5f442a;touch-action:manipulation;--cell-size:4.83%}.board-lines{position:absolute;inset:6.5%;width:87%;height:87%;overflow:visible;pointer-events:none}.coordinates{position:absolute;font:11px ui-monospace,monospace;color:#604628;pointer-events:none}.horizontal{left:6.5%;right:6.5%;bottom:1.8%;height:14px}.horizontal span{position:absolute;transform:translateX(-50%)}.vertical{top:6.5%;bottom:6.5%;left:.6%;width:19px}.vertical span{position:absolute;transform:translateY(-50%);width:100%;text-align:center}.board-cells{position:absolute;inset:0}.cell{position:absolute;width:var(--cell-size);height:var(--cell-size);transform:translate(-50%,-50%);border:0;background:transparent;padding:0;border-radius:50%;display:grid;place-items:center;z-index:1;outline-offset:0!important}.cell:focus-visible{outline:2px solid #9b4928;z-index:3}.cell[data-color='0']{cursor:crosshair}.cell .stone{display:none;position:relative;width:94%;height:94%;border-radius:50%;pointer-events:none}.cell[data-color='1'] .stone,.cell[data-color='2'] .stone{display:block}.stone.black,.stone.white,.player-stone{background-image:url('./assets/stones-shell-slate.png');background-size:227.44% 113.72%;background-repeat:no-repeat;filter:drop-shadow(1px 3px 2px #37230c75)}.stone.white,.player-stone.white{background-position:6% 50%}.stone.black,.player-stone.black{background-position:94.4% 50%}.cell.placed .stone{animation:place .15s ease-out}.cell.last .stone:after{content:'';position:absolute;width:15%;height:15%;left:42.5%;top:42.5%;border-radius:50%;background:#ffa365;box-shadow:0 0 0 1px #44271177}.cell.dead .stone{opacity:.45}.cell.dead:after{content:'×';color:#a6301e;font:bold clamp(15px,2.1vw,25px)/1 system-ui;position:absolute;pointer-events:none;text-shadow:0 1px #ffe4c7}.territory{position:absolute;width:28%;height:28%;pointer-events:none;display:none}.cell[data-owner='1'] .territory{display:block;background:#162024;border:1px solid #151e20}.cell[data-owner='2'] .territory{display:block;background:#fff7e8;border:1px solid #b8a78b}.board[data-phase='finished'] .cell{cursor:default}.board[data-phase='scoring'] .cell[data-color='1'],.board[data-phase='scoring'] .cell[data-color='2']{cursor:pointer}@media(hover:hover){.board[data-phase='playing'] .cell[data-color='0']:hover{background:#35200f22}.board[data-phase='playing'] .cell[data-color='0']:hover .stone{display:block;opacity:.46;background:#10181c;width:78%;height:78%}.board[data-phase='playing'][data-turn='2'] .cell[data-color='0']:hover .stone{background:#fff5e7}}.board-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:11px;margin:23px 1px 0}.board-caption>span{display:flex;align-items:center;gap:7px}.last-marker{width:6px;height:6px;background:var(--accent);border-radius:50%}.touch-hint{display:none!important}.notice{font-size:13px;line-height:1.7;min-height:45px;color:#bac8cf;margin:21px 0 0;padding:11px 14px;border-left:2px solid #526f76;background:#12262d}.notice.error{color:#ffd0ae;border-color:var(--accent);background:#352a25}.board-bottom{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#8d9ea8;padding-top:15px}.game-panel{min-width:0;align-self:start;padding-top:2px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.panel-heading .eyebrow{margin:0}.match-label{font-size:11px;color:var(--muted)}.setting-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:10px;color:#d2dbe0}.setting-heading>span:last-child{font-size:11px;color:var(--muted)}.size-switch{display:flex;gap:4px;padding:4px;background:#09151c;border:1px solid #2a3b45;border-radius:8px}.size-switch button{flex:1;min-height:39px;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:13px}.size-switch button:hover{background:#253944;color:white}.size-switch button[aria-pressed='true']{background:#354751;color:#fff1df;font-weight:700;box-shadow:0 2px 4px #0002}.komi-row{display:flex;align-items:center;gap:8px;margin-top:13px;font-size:12px;color:#cbd5db}.komi-row select{color:#e9d8c8;border:1px solid #40535e;background:#162832;border-radius:5px;padding:5px 22px 5px 8px;font-size:12px}.komi-row>span{margin-left:auto;font-size:11px;color:var(--muted)}.status-block{padding:24px 0 19px}.status-overline{font:11px ui-monospace,monospace;letter-spacing:.08em;color:var(--accent)}.status-block p{color:var(--muted);font-size:13px;line-height:1.8;margin:0;word-break:keep-all}.players{display:grid;gap:8px}.player{display:flex;align-items:center;gap:11px;border:1px solid #293e49;border-radius:7px;padding:13px;background:#12212a}.player.active{background:#252a29;border-color:#d7905d}.player-stone{width:34px;height:34px;flex:none;display:block;border-radius:50%}.player>div{display:grid;gap:4px}.player strong{font-size:13px;font-weight:600}.player>div>span{color:var(--muted);font-size:11px}.player b{font-weight:500;color:#d6dde0}.turn-tag{font-size:11px;color:var(--accent);margin-left:auto;white-space:nowrap}.match-stats{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 4px}.match-stats>div{display:grid;gap:8px}.match-stats>div+div{border-left:1px solid var(--line);padding-left:23px}.match-stats>div>span{font-size:11px;color:var(--muted)}.match-stats strong{font:500 21px ui-monospace,monospace;color:#e8e9ea}.match-stats small{font:12px system-ui;color:var(--muted)}.actions,.utility-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.primary-button,.secondary-button{border-radius:6px;padding:12px 9px;min-height:45px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;font-weight:600}.primary-button{background:var(--accent);color:#1b2325;border:1px solid #ffb47e}.primary-button:hover:enabled{background:#ffbb86}.primary-button span{font-size:11px;font-weight:500;opacity:.7}.secondary-button{background:transparent;border:1px solid #405560;color:#dce4e7}.secondary-button:hover:enabled{background:#263c47}.utility-actions{margin-top:10px}.utility-actions svg{width:16px;height:16px}.text-button{display:block;border:0;background:transparent;font-size:11px;color:var(--muted);padding:12px 8px;margin:1px auto}.text-button:hover{color:#ffd5b0}.rules{border-top:1px solid var(--line);padding-top:16px;margin-top:7px}.rules summary{list-style:none;cursor:pointer;font-size:12px;color:#c5d0d6;display:flex;justify-content:space-between;gap:10px;align-items:center}.rules summary::-webkit-details-marker{display:none}.rules summary>span{font-size:19px}.rules[open] summary>span{transform:rotate(45deg)}.rules p{color:var(--muted);font-size:12px;line-height:1.85;word-break:keep-all}.rules strong{color:#e9e1d5}.provenance{margin-top:17px}.provenance summary{font-size:11px;color:#95a7b1}.scoring-panel{background:#12262e;border:1px solid #455b62;border-radius:9px;padding:16px}.score-heading{display:flex;justify-content:space-between;gap:10px;font-size:13px}.score-heading>span{font-size:11px;color:var(--muted)}.scoring-panel p{font-size:12px;line-height:1.8;color:#b4c4cc;margin:10px 0}.score-row{display:grid;grid-template-columns:1.5fr 1fr 1fr;align-items:center;gap:6px;padding:7px 0;font-size:12px}.score-row>:not(:first-child){text-align:right;font-family:ui-monospace,monospace}.score-labels{color:var(--accent);font-weight:700}.score-total{border-top:1px solid #40565d;margin-top:5px;padding-top:12px;font-size:14px}.score-total strong{font-size:21px}.score-note{font-size:11px!important;color:#9eb3bd!important}.agreement{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:15px 0 9px}.agreement button{padding:10px 5px;background:#192d36;border:1px solid #526973;border-radius:5px;font-size:12px}.agreement button[aria-pressed='true']{border-color:#9cbca2;color:#c4ecc7;background:#243d35}.full-width{width:100%;margin-top:8px}footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;padding:20px 0 26px;font-size:11px;color:#95a5af}footer span:last-child{font-family:ui-monospace,monospace;letter-spacing:.05em}dialog{background:#142832;color:var(--text);border:1px solid #52636c;border-radius:12px;padding:28px;width:calc(100% - 32px);max-width:400px;box-shadow:0 28px 90px #0008}dialog::backdrop{background:#061016cf;backdrop-filter:blur(3px)}dialog p{font-size:14px;line-height:1.8;color:var(--muted)}.dialog-actions{display:flex;gap:10px;margin-top:23px}.dialog-actions button{flex:1}body:has(dialog[open]){overflow:hidden}@keyframes place{from{transform:scale(.8)}to{transform:scale(1)}}
@media(min-width:1500px){.app-shell{max-width:1380px}main{grid-template-columns:minmax(0,1fr) 350px;gap:45px}}
@media(max-width:1000px){.app-shell{padding:0 24px}main{grid-template-columns:minmax(0,1fr) 290px;gap:24px}.rule-tag{display:none}.keyboard-hint{display:none!important}.board-bottom>span:last-child{display:none}.komi-row{gap:6px}.komi-row>span{font-size:10px}}
@media(max-width:760px){.app-shell{padding:0 18px;max-width:620px}.header{height:72px}.header-note{display:none}.brand{font-size:18px}main{grid-template-columns:minmax(0,1fr);gap:22px;padding:24px 0}.board-heading{margin-bottom:16px}h1{font-size:25px}.rule-tag{display:block;font-size:11px}.rule-tag span{display:inline;margin-left:7px}.eyebrow{font-size:10px}.board-frame{padding:9px}.match-strip{margin-bottom:10px}.board-caption{margin-top:20px;font-size:10px}.touch-hint{display:flex!important}.coordinates{font-size:10px}.horizontal{bottom:.5%;height:13px}.vertical{left:0;width:16px}.notice{font-size:12px;margin-top:17px;padding:9px 11px;min-height:40px}.board-bottom{padding-top:9px;font-size:10px}.game-panel{display:grid;grid-template-columns:1fr;gap:0}.panel-heading{display:none}.settings{grid-row:5;border-top:1px solid var(--line);margin-top:21px;padding-top:19px}.status-block{grid-row:1;padding:0 0 14px}.status-block h2{font-size:20px}.status-block p{font-size:12px}.players{grid-row:2;grid-template-columns:1fr 1fr;gap:8px}.player{flex-wrap:wrap;gap:8px;padding:11px 9px}.player-stone{width:29px;height:29px}.player strong{font-size:11px}.player>div>span{font-size:10px}.turn-tag{width:100%;margin-left:37px;margin-top:-2px}.match-stats{grid-row:3;margin:16px 3px}.actions{grid-row:4}.scoring-panel{grid-row:4}.utility-actions{grid-row:6;margin-top:15px}.text-button{grid-row:7}.rules{grid-row:8}.provenance{grid-row:9}.size-switch button{min-height:40px}.setting-heading{font-size:12px}.komi-row>span{font-size:11px}.cell.dead:after{font-size:18px}.rule-tag span{font-size:10px}}
@media(max-width:370px){.app-shell{padding:0 11px}.rule-tag{font-size:10px}.player{padding:10px 6px;gap:6px}.player strong{font-size:10px}.turn-tag{margin-left:35px}.coordinates{font-size:9px}.vertical{width:13px}.brand{font-size:17px}h1{font-size:24px}.board-caption{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.mode-switch{display:flex;background:#09151c;border:1px solid #2a3b45;border-radius:8px;padding:4px;gap:4px;margin-bottom:18px}.mode-switch button{flex:1;border:0;border-radius:5px;background:transparent;color:var(--muted);padding:11px 5px;font-size:13px}.mode-switch button[aria-pressed=true]{background:#354751;color:#fff1df;font-weight:700}.ai-settings{margin-bottom:22px}.setting-heading strong{font-size:12px;font-weight:500;color:var(--accent)}.level-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}.level-grid button{min-width:0;min-height:35px;padding:0;border:1px solid #425663;border-radius:5px;background:#182a34;color:#e8eef2;font:13px ui-monospace,monospace}.level-grid button[aria-pressed=true]{background:#ffa365;border-color:#ffb47e;color:#132129;font-weight:800}.level-grid button:hover{border-color:var(--accent)}.level-description{font-size:12px;line-height:1.7;color:#bac7cf;margin:10px 0 5px;min-height:20px}.ai-note{font-size:10px;line-height:1.7;color:#8fa4ae;margin:0}.board[data-phase=thinking] .cell{cursor:wait}.board[data-phase=thinking]{filter:saturate(.96)}@media(max-width:760px){.settings{grid-row:auto}.mode-switch{margin-bottom:16px}.ai-settings{margin-bottom:19px}.level-grid button{min-height:37px}.game-panel .settings{grid-row:1;margin-top:0;border-top:0;padding-top:0;margin-bottom:22px}.status-block{grid-row:2}.players{grid-row:3}.match-stats{grid-row:4}.actions,.scoring-panel{grid-row:5}.utility-actions{grid-row:6}.text-button{grid-row:7}.rules{grid-row:8}.provenance{grid-row:9}}@media(max-width:370px){.level-grid{gap:3px}.level-grid button{font-size:11px}}
.learn-card{padding:16px;background:#132c32;border:1px solid #476466;border-radius:9px;margin-bottom:22px}.learn-card p{font-size:12px;line-height:1.8;color:#d4e3e5;margin:12px 0 0}.learn-option{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:15px}.learn-option input{accent-color:#ffa365}.learn-card .learn-legend{font-size:11px;color:#9fb8bf}.learn-card button[aria-pressed=true]{border-color:#90ddd5;color:#a5eee3}.cell.coach-liberty:before{content:'';position:absolute;width:45%;height:45%;border:2px solid #1877b8;border-radius:50%;background:#b2e5ff88;pointer-events:none}.cell.coach-group{outline:2px solid #36866b;outline-offset:-2px!important}#learn-dialog{max-width:580px;max-height:94dvh;overflow:auto}.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.lesson-top button{min-height:36px;font-size:12px}#lesson-tabs{display:flex;gap:6px;margin:18px 0;flex-wrap:wrap}#lesson-tabs button{flex:1;min-width:35px;min-height:36px;border:1px solid #57717b;border-radius:5px;background:#1c3640;color:#e7eff0}#lesson-tabs button[aria-pressed=true]{background:#ffa365;color:#172027}.lesson-board{position:relative;width:min(100%,360px);aspect-ratio:1;margin:16px auto;background-color:#dcba84;background-image:linear-gradient(#70543388 1px,transparent 1px),linear-gradient(90deg,#70543388 1px,transparent 1px);background-size:10.75% 10.75%;background-position:7% 7%;border:8px solid #bd8e54;border-radius:5px}.lesson-cell{position:absolute;width:10.5%;height:10.5%;transform:translate(-50%,-50%);display:grid;place-items:center;background:transparent;border:0;border-radius:50%;padding:0}.lesson-cell:hover{background:#3c482644}.lesson-cell .player-stone{width:96%;height:96%}#lesson-feedback{min-height:65px;background:#1e3d42;padding:12px;border-left:3px solid #92d5ba}#lesson-text{min-height:50px}@media(max-width:760px){.learn-card{grid-row:1}.game-panel .settings{grid-row:2}.status-block{grid-row:3}.players{grid-row:4}.match-stats{grid-row:5}.actions,.scoring-panel{grid-row:6}.utility-actions{grid-row:7}.text-button{grid-row:8}.rules{grid-row:9}.provenance{grid-row:10}#learn-dialog{padding:18px}.learn-card{margin-bottom:20px}}
.lesson-board{background-image:none}.lesson-lines{position:absolute;inset:0;width:100%;height:100%;stroke:#705433;stroke-width:.4;pointer-events:none}.lesson-coordinate{position:absolute;font:10px ui-monospace,monospace;color:#513719;transform:translate(-50%,-50%);pointer-events:none}.lesson-liberty:after{content:'';width:40%;height:40%;border:2px solid #1877b8;border-radius:50%;background:#b2e5ff88}
.finish-guide{padding:15px;border:1px solid #45616a;border-radius:8px;background:#102b34;margin:0 0 14px}.finish-guide>strong{font-size:13px;color:#f4c69b}.finish-guide p{font-size:12px;color:#b9cbd1;line-height:1.85;margin:9px 0}.finish-guide summary{font-size:12px;color:#dfebef;cursor:pointer}.end-steps{list-style:none;display:flex;gap:5px;margin:12px 0;padding:0;flex-wrap:wrap}.end-steps li{font-size:11px;color:#93aab4;padding:5px;border-bottom:2px solid #3c535d}.end-steps .current{color:#ffe2be;border-color:#ffa365}@media(max-width:760px){.finish-guide{grid-row:6}.actions,.scoring-panel{grid-row:7}.utility-actions{grid-row:8}.text-button{grid-row:9}.rules{grid-row:10}.provenance{grid-row:11}}
.match-strip #end-help{padding:6px 9px;background:#15323a;border:1px solid #62818b;color:#e6d2b5;border-radius:5px;font-size:11px;min-height:32px;white-space:nowrap}.match-strip #board-move{margin-left:auto}@media(max-width:370px){.match-strip{gap:6px}.match-strip #board-move{font-size:10px}.match-strip #end-help{font-size:10px;padding:5px}}
/* Keep the full board in view and give match actions priority. */
.game-panel{display:flex;flex-direction:column;min-width:0}.game-panel>*{grid-row:auto}.panel-heading{margin-bottom:8px}.status-block{padding:4px 0 12px}.status-block h2{margin:5px 0;font-size:20px}.status-block p{font-size:12px;line-height:1.65}.players{grid-template-columns:repeat(2,minmax(0,1fr))}.player{flex-wrap:wrap;gap:7px;padding:10px 8px;align-content:start;min-height:76px}.player-stone{width:28px;height:28px}.player strong{font-size:11px}.player>div>span{font-size:10px}.turn-tag{width:100%;margin:0 0 0 35px;font-size:10px}.match-stats{margin:13px 3px;gap:16px}.match-stats>div{gap:5px}.match-stats strong{font-size:20px}.actions button,.utility-actions button{min-height:43px;padding:10px 8px}.utility-actions{margin-top:8px}.text-button{margin:0 auto;padding:9px 8px}.game-panel .settings{border-top:1px solid var(--line);padding-top:15px;margin-top:6px;margin-bottom:15px}.mode-switch{margin-bottom:12px}.mode-switch button{padding:9px 5px}.ai-settings{margin-bottom:14px}.setting-heading{margin-bottom:8px}.level-description{margin:7px 0 4px}.level-grid button{min-height:33px}.size-switch button{min-height:34px}.komi-row{margin-top:9px}.learn-card{padding:0;margin:0;background:#132c32;border-color:#3c5962;border-radius:8px}.learn-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:14px;list-style:none;font-size:12px}.learn-summary::-webkit-details-marker{display:none}.learn-summary:after{content:'+';font-size:18px;color:#b4c9cf}.learn-card[open]>.learn-summary:after{content:'−'}.learn-summary>span{margin-left:auto;color:#9eb6bf;font-size:10px}.learn-body{padding:0 14px 14px}.learn-body .primary-button{margin-top:0;min-height:40px;font-size:12px}.learn-body #inspect-stones{font-size:12px}.learn-body .rules{margin-top:16px;padding-top:13px}.learn-body .finish-guide{margin:15px 0 0;padding:13px}.learn-card .rules summary{font-size:12px}.learn-card .rules p,.learn-card .finish-guide p{font-size:12px}.learn-card .finish-guide details{padding-top:6px}.learn-card .finish-guide summary{font-size:12px}.game-panel>.scoring-panel{margin-top:0;margin-bottom:6px}
@media(min-width:761px){.header{height:64px}main{padding-top:20px;gap:30px}.app-shell{padding-left:28px;padding-right:28px}.play-section{width:min(100%,calc(100dvh - 310px));margin-inline:auto;align-self:start;position:sticky;top:18px}.board-heading{margin-bottom:12px}.board-heading .eyebrow{margin-bottom:6px}.board-heading h1{font-size:24px;line-height:1.3}.rule-tag{font-size:11px}.match-strip{min-height:24px;margin-bottom:10px}.board-frame{padding:10px}.board-caption{margin-top:18px;font-size:10px}.notice{margin-top:13px;min-height:38px;padding:9px 11px;font-size:12px;line-height:1.6}.board-bottom{padding-top:9px;font-size:10px}.board-caption .keyboard-hint{display:none}.coordinates{font-size:10px}.horizontal{bottom:1%;height:13px}.vertical{left:0;width:18px}}
@media(min-width:761px) and (max-height:600px){.play-section{width:100%;position:static}}
@media(max-width:760px){.game-panel{display:flex;gap:0}.game-panel .settings{padding-top:16px;margin-top:8px;margin-bottom:17px}.game-panel .status-block{padding-bottom:13px}.learn-summary{padding:14px}.board-frame{width:100%}}
@media(min-width:761px){.app-shell{max-width:min(1240px,calc(100dvh + 106px))}main{grid-template-columns:minmax(0,1fr) 330px}}@media(min-width:761px) and (max-height:600px){.app-shell{max-width:1240px}}

/* Give the playing surface the available desktop height. */
.game-panel>.notice{margin:0 0 10px;padding:6px 9px;min-height:0;font-size:11px}
.game-panel>.board-bottom{padding:0 0 10px;font-size:10px;flex-wrap:wrap}
@media(min-width:761px){
.app-shell{max-width:min(1540px,calc(100dvh + 300px));padding-inline:20px}
.header{height:48px}.brand-mark{width:30px;height:30px}.brand{font-size:17px}.icon-button{width:34px;height:34px}
main{padding-top:10px;gap:24px;grid-template-columns:minmax(0,1fr) 330px}
.play-section{width:min(100%,calc(100dvh - 160px));top:10px}
.board-heading{align-items:center;margin-bottom:5px}.board-heading>div{display:flex;align-items:center;gap:10px}
.board-heading .eyebrow{margin:0;font-size:9px;letter-spacing:.08em}.board-heading h1{font-size:17px;line-height:1.3}
.rule-tag{display:flex;gap:8px;padding:0;font-size:10px}.rule-tag span{margin:0;font-size:10px}
.match-strip{min-height:20px;margin-bottom:5px;font-size:11px}.match-strip strong{font-size:12px}
.board-caption{margin-top:13px}.panel-heading{margin-bottom:4px}
}
@media(min-width:761px) and (max-height:600px){.play-section{width:100%;position:static}}

#color-settings{margin-bottom:12px}#color-note{margin-top:6px}.play-section>.notice{margin:0 0 7px;padding:5px 9px;min-height:28px;font-size:11px;line-height:1.5}@media(min-width:761px){.play-section{width:min(100%,calc(100dvh - 190px))}}

.header{position:sticky;top:0;z-index:20;background:#0b1b21}.header-learn{border:1px solid #638078;border-radius:6px;background:#183a39;color:#f3e2ca;padding:7px 12px;font-size:12px;white-space:nowrap}.header-learn:hover{background:#28514b}@media(min-width:761px){.play-section{top:58px}}@media(max-width:760px){.header-tools{gap:9px}.header-learn{padding:7px 9px}}

.match-strip #notice{flex:1;margin:0;padding:0 8px;border:0;background:none;min-height:0;font-size:10px;line-height:1.5}.match-strip{flex-wrap:wrap}.match-strip #board-move{margin-left:auto}#help-dialog{padding:20px;max-width:580px;max-height:90dvh;overflow:auto;margin:auto}#help-dialog .learn-body{padding:8px 0 0}#help-dialog #learn-progress{font-size:11px;color:var(--muted)}.status-block:has(#status-description[hidden]){padding-bottom:8px}@media(max-width:760px){.match-strip #notice{font-size:10px;min-width:140px}}

.header-learn{height:34px;padding:0 13px;border:1px solid #3b505b;border-radius:17px;background:#11232c;color:#ebdbca;font-weight:400;transition:background .15s,border-color .15s}.header-learn:hover{background:#30434c}.header-tools{gap:10px}@media(max-width:760px){.header-learn{height:42px;border-radius:21px}.header-tools{gap:9px}}

#help-dialog .help-topic{border-top:1px solid var(--line);margin:0;padding:0}#help-dialog .help-topic>summary{min-height:48px;padding:12px 0;font-size:13px;color:#e3eceb}#help-dialog .help-topic p{margin:0 0 13px;font-size:12px;line-height:1.85}#help-dialog .help-topic:first-of-type{margin-top:18px}#help-dialog .finish-guide{margin:18px 0 0;padding:14px;background:#10272e;border:1px solid #3c5962}#help-dialog .help-section-title{font-size:11px;font-weight:500;color:#9fb8bf;margin:0 0 9px}#help-dialog .finish-guide>strong{font-size:13px}#help-dialog .finish-guide p{margin:8px 0 0}#help-dialog .end-steps{margin-bottom:0}

.board-lines{inset:var(--grid-inset,6.5%);width:var(--grid-span,87%);height:var(--grid-span,87%)}.coordinates.horizontal{left:var(--grid-inset,6.5%);right:var(--grid-inset,6.5%)}.coordinates.vertical{top:var(--grid-inset,6.5%);bottom:var(--grid-inset,6.5%)}.board[aria-rowcount="19"] .horizontal{bottom:0;height:12px;font-size:9px}.board[aria-rowcount="19"] .vertical{left:0;width:15px;font-size:9px}@media(max-width:760px){.board[aria-rowcount="19"] .coordinates{font-size:8px}.board[aria-rowcount="19"] .vertical{width:10px}.board[aria-rowcount="19"] .horizontal{height:10px}}

/* Size the two columns together so the board has no unused column gutter. */
@media(min-width:761px){
  .app-shell{--board-limit:calc(100dvh - 156px);--panel-width:clamp(330px,24vw,390px);--layout-gap:clamp(20px,2vw,28px);width:100%;max-width:calc(var(--board-limit) + var(--panel-width) + var(--layout-gap) + 48px);padding-inline:24px}
  main{grid-template-columns:minmax(0,1fr) var(--panel-width);gap:var(--layout-gap);padding-top:10px;padding-bottom:24px;align-items:start}
  .play-section{width:100%;margin:0;top:58px}
  .board-heading h1{font-size:19px}.board-heading{margin-bottom:6px}
  .match-strip{min-height:24px;margin-bottom:6px;gap:8px}.match-strip #notice{font-size:11px;padding-inline:4px}.match-strip #board-move{font-size:11px}
  .board-caption{margin-top:12px;font-size:11px}
  .header{width:100%}.game-panel{padding-top:0}
  .status-block h2{font-size:22px}.status-block{padding-top:0}
  .game-panel>.board-bottom{font-size:11px;padding-bottom:12px;gap:5px 12px}
  .player{min-height:80px;padding:11px 10px;gap:8px}.player-stone{width:30px;height:30px}.player strong{font-size:12px}.player>div>span{font-size:11px}.turn-tag{font-size:11px;margin-left:38px}
  .match-stats>div>span{font-size:12px}.match-stats strong{font-size:22px}
  .actions button,.utility-actions button{min-height:46px;font-size:14px}
  .mode-switch button{min-height:40px;font-size:14px;padding:9px 5px}
  .setting-heading{font-size:14px}.setting-heading>span:last-child{font-size:12px}.setting-heading strong{font-size:12px}
  .size-switch button{min-height:38px;font-size:13px}.level-grid button{min-height:36px;font-size:14px}
  .level-description{font-size:12px;line-height:1.65}.komi-row{font-size:13px}.komi-row select{font-size:13px}.komi-row>span{font-size:11px}
}
@media(min-width:761px) and (max-width:1000px){
  .app-shell{--panel-width:290px;--layout-gap:20px;padding-inline:18px;max-width:calc(var(--board-limit) + 346px)}
  .game-panel>.board-bottom>span:last-child{display:none}.player{padding:10px 8px;gap:7px}.player strong{font-size:11px}.turn-tag{margin-left:37px}.actions button,.utility-actions button{font-size:13px}.setting-heading{font-size:13px}
}
@media(min-width:761px) and (max-height:740px){
  .game-panel .settings{padding-top:12px;margin-top:3px;margin-bottom:0}.match-stats{margin:10px 3px}.player{min-height:72px;padding-block:8px}.actions button,.utility-actions button{min-height:42px;padding-block:8px}.mode-switch button{min-height:36px}.size-switch button{min-height:34px}.level-grid button{min-height:33px}.status-block h2{font-size:20px}
}
@media(min-width:761px) and (max-height:600px){.app-shell{max-width:1180px}.play-section{position:static}}

@media(min-width:761px){
  .player{display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:8px;row-gap:4px;align-items:center;align-content:center}.player>div{min-width:0}.player strong{white-space:nowrap;letter-spacing:-.035em}.turn-tag{grid-column:2;width:auto;margin:0}
}
@media(min-width:761px) and (max-height:800px){
  .status-block h2{font-size:20px;margin:2px 0}.status-block:has(#status-description[hidden]){padding-bottom:6px}.game-panel>.board-bottom{font-size:10px;padding-bottom:8px}
  .player{min-height:68px;padding:8px}.player strong{font-size:11px}.player>div>span,.turn-tag{font-size:10px}
  .match-stats{margin:10px 3px}.match-stats strong{font-size:20px}.match-stats>div>span{font-size:11px}
  .actions button,.utility-actions button{min-height:42px;padding:8px;font-size:13px}.text-button{padding-block:7px}
  .game-panel .settings{padding-top:11px;margin-top:3px;margin-bottom:0}.mode-switch{margin-bottom:10px}.mode-switch button{min-height:34px;padding:7px 5px;font-size:13px}.size-switch button{min-height:32px;font-size:12px}.setting-heading{font-size:13px;margin-bottom:6px}.setting-heading>span:last-child{font-size:11px}.level-grid button{min-height:32px;font-size:13px}.level-description{font-size:11px;line-height:1.6;margin-top:6px}.ai-settings{margin-bottom:10px}#color-settings{margin-bottom:10px}.komi-row{margin-top:8px}
}

.match-hero{position:relative;aspect-ratio:2.3;margin:0 0 12px;overflow:hidden;border:1px solid #3b505b;border-radius:8px;background:#10242b}.match-hero img{display:block;width:100%;height:auto}.match-hero figcaption{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:linear-gradient(transparent,#09171cee);font-size:12px}.match-hero figcaption span{border:1px solid #d3a477;border-radius:5px;padding:3px 8px;color:#ffd1a6}.game-panel>.settings:not(.board-settings){border:0;padding:0;margin:0 0 10px}.game-panel>.players{display:none}.game-panel>.board-settings{margin-top:10px}.game-panel .match-stats{margin-top:0}@media(min-width:761px){.game-panel{max-height:calc(100dvh - 72px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#40535e transparent;padding-right:5px}}

.board-select-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;font-size:12px;color:#cbd5db}.board-select-row select{width:100%;min-width:0;height:34px;padding:4px 6px;color:#e9d8c8;border:1px solid #40535e;background:#162832;border-radius:5px;font:inherit}.board-select-note{margin:8px 0 0;font-size:10px;color:var(--muted)}@media(max-width:370px){.board-select-row{gap:6px;font-size:11px}}

.board-select-row label{font-size:13px}.board-select-note{font-size:12px;line-height:1.65}#resign{display:flex;align-items:center;justify-content:center;min-height:44px;margin:10px auto;padding:10px 18px;font-size:13px;line-height:1.5;color:#bac8cf}@media(min-width:761px){.board-select-row label{font-size:14px}}@media(min-width:761px) and (max-width:1000px){.board-select-row label{font-size:13px}}@media(min-width:761px) and (max-height:800px){.board-select-row label{font-size:13px}.board-select-note{font-size:11px;line-height:1.6}}

.match-progress{display:block;margin:4px 0 10px!important}.match-progress>div{display:flex;align-items:center;justify-content:space-between}.live-summary{border-top:1px solid var(--line);padding-top:8px;margin-bottom:12px}.live-summary-row{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px;align-items:center;padding:5px 0;font-size:12px}.live-summary-row>:not(:first-child){text-align:right}.live-summary-labels{font-size:11px;color:var(--muted)}.live-summary-row strong{font-weight:500}.live-summary-row small{font-size:10px;color:var(--muted)}.live-summary p{margin:6px 0 0;font-size:10px;line-height:1.6;color:var(--muted)}.pass-status{padding:10px 12px;margin:0 0 9px;border:1px solid #8f7556;border-radius:6px;background:#342d23;color:#ffdbaf;font-size:12px;line-height:1.65}.match-hero figcaption{justify-content:flex-start}

.game-panel>*{flex-shrink:0}
