:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --surface: #fffdf8;
  --ink: #17211c;
  --muted: #6f776f;
  --line: #ddd8ca;
  --green: #1f5c45;
  --green-dark: #174535;
  --green-soft: #e3eee7;
  --gold: #bf8743;
  --board: #d8a95f;
  --danger: #a54a3f;
  --shadow: 0 20px 60px rgba(39, 45, 37, .11);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: url("data:image/svg+xml,%3Csvg width='90' height='90' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E"); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .19em; }
.primary, .ghost { min-height: 44px; border-radius: 12px; padding: 0 18px; border: 1px solid transparent; font-weight: 700; transition: .18s ease; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.primary { color: white; background: var(--green); box-shadow: 0 7px 18px rgba(31, 92, 69, .18); }
.primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.ghost { color: var(--ink); background: rgba(255,255,255,.46); border-color: var(--line); }
.ghost:hover { background: white; border-color: #c6c0b1; }
.compact { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.danger-button { min-height: 44px; padding: 0 18px; border: 1px solid #dfc5bf; border-radius: 12px; color: var(--danger); background: #fff8f6; font-weight: 700; }
.danger-button:hover { border-color: var(--danger); background: #f9e9e5; }
.wide { width: 100%; }
.error { color: var(--danger); min-height: 1.4em; font-size: 13px; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 18%, #fffdf8 0, var(--paper) 55%); }
.auth-card { width: min(430px, 100%); padding: 48px; border: 1px solid rgba(202,196,182,.8); border-radius: 28px; background: rgba(255,253,248,.86); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.auth-card h1 { font-family: Georgia, "Songti SC", serif; font-size: 54px; margin: 0; letter-spacing: .08em; }
.auth-copy { color: var(--muted); line-height: 1.7; margin: 12px 0 28px; }
.auth-card label { display: grid; gap: 8px; margin: 16px 0; font-size: 13px; font-weight: 700; }
.auth-card input, select { width: 100%; padding: 13px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; outline: 0; }
.auth-card input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,92,69,.1); }
.privacy-note { margin: 22px 0 0; font-size: 11px; text-align: center; color: #8b918b; }
.brand-mark { width: 55px; height: 55px; position: relative; margin-bottom: 22px; background: linear-gradient(135deg,#d8ad6c,#c68a40); border-radius: 13px; box-shadow: inset 0 0 16px rgba(91,53,17,.2); }
.brand-mark i { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #1c231f; box-shadow: 0 3px 5px rgba(0,0,0,.3); }
.brand-mark i:nth-child(1) { left: 10px; top: 10px; }.brand-mark i:nth-child(2) { right: 10px; top: 10px; background: #faf8f1; }.brand-mark i:nth-child(3) { left: 10px; bottom: 10px; background: #faf8f1; }.brand-mark i:nth-child(4) { right: 10px; bottom: 10px; }

.topbar { height: 66px; position: sticky; top: 0; z-index: 20; padding: 0 max(24px, calc((100vw - 1380px)/2)); display: flex; align-items: center; gap: 20px; background: rgba(244,240,231,.86); border-bottom: 1px solid rgba(205,199,185,.7); backdrop-filter: blur(18px); }
.brand-button { border: 0; background: none; display: flex; align-items: center; gap: 11px; color: var(--ink); font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 700; }
.brand-stone { width: 27px; height: 27px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #55635b 0, #1b2520 42%, #080c0a 100%); box-shadow: 0 4px 8px rgba(0,0,0,.25); }
.engine-pill { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.engine-pill > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #bd8b52; box-shadow: 0 0 0 4px rgba(189,139,82,.1); }
.engine-pill.ready > span:first-child { background: #3c9a70; box-shadow: 0 0 0 4px rgba(60,154,112,.1); }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
main { position: relative; z-index: 1; }
.library-view { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 90px; }
.hero { min-height: 260px; padding: 48px 54px; border-radius: 28px; display: flex; justify-content: space-between; align-items: flex-end; color: #f6f4ec; background: radial-gradient(circle at 88% 8%, rgba(216,169,95,.28), transparent 29%), linear-gradient(130deg,#163c2f,#245b45 58%,#173a2e); box-shadow: var(--shadow); overflow: hidden; }
.hero h2 { max-width: 700px; margin: 0; font: 600 clamp(34px,5vw,58px)/1.16 Georgia, "Songti SC", serif; letter-spacing: .015em; }
.hero p:not(.eyebrow) { max-width: 590px; color: rgba(255,255,255,.72); line-height: 1.7; }
.hero .eyebrow { color: #d9b475; }
.hero-button { flex: 0 0 auto; background: #f0e4ce; color: #173a2e; box-shadow: none; }.hero-button:hover { background: white; color: #173a2e; }.hero-button span { margin-left: 22px; }
.section-heading { margin: 52px 4px 20px; display: flex; align-items: end; justify-content: space-between; }
.section-heading h3 { margin: 0; font: 600 30px Georgia,"Songti SC",serif; }
.game-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.game-card { position: relative; text-align: left; border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: rgba(255,253,248,.72); transition: .2s ease; cursor: pointer; }
.game-card:focus-visible { outline: 3px solid rgba(31,92,69,.22); border-color: var(--green); }
.game-card:hover { transform: translateY(-3px); background: var(--surface); box-shadow: 0 14px 35px rgba(54,52,43,.08); }
.game-card-head, .game-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.game-card h4 { margin: 18px 0 7px; font-size: 18px; }.game-card p { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.board-chip { color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 750; }
.status-chip { color: var(--muted); font-size: 11px; }.status-chip.finished { color: var(--gold); }
.game-card-foot { padding-top: 15px; border-top: 1px solid #e7e2d6; color: var(--muted); font-size: 11px; }
.card-delete { min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; color: #9b6259; background: transparent; font-size: 11px; }
.card-delete:hover { color: var(--danger); background: #f7e8e4; }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed #cbc5b8; border-radius: 22px; }.empty-state h3 { margin-bottom: 6px; }.empty-state p { color: var(--muted); margin-bottom: 22px; }
.empty-board { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 10px; background-color: #d8a95f; background-image: linear-gradient(#72582f 1px,transparent 1px),linear-gradient(90deg,#72582f 1px,transparent 1px); background-size: 16px 16px; background-position: 8px 8px; box-shadow: inset 0 0 12px rgba(79,48,16,.18); }

.training-heading { margin-bottom: 18px; }.training-banner { padding: 22px 26px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; border: 1px solid #d8d5c8; border-radius: 20px; background: rgba(255,253,248,.76); box-shadow: 0 10px 30px rgba(54,52,43,.055); }
.training-banner h4 { margin: 0 0 6px; font-size: 16px; }.training-banner p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.training-mark { position: relative; width: 58px; height: 58px; flex: 0 0 auto; border-radius: 13px; background-color: #d9ac68; background-image: linear-gradient(#6d512e 1px,transparent 1px),linear-gradient(90deg,#6d512e 1px,transparent 1px); background-size: 19px 19px; background-position: 10px 10px; box-shadow: inset 0 0 14px rgba(79,48,16,.16); }
.training-mark i { position: absolute; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 2px 4px #0003; }.training-mark i:nth-child(1) { left: 21px; top: 21px; background: #151b17; }.training-mark i:nth-child(2) { left: 40px; top: 21px; background: #f7f5ee; border: 1px solid #c9c5b9; }.training-mark i:nth-child(3) { left: 21px; top: 40px; background: #151b17; }

.tsumego-view { width: min(1380px,calc(100% - 38px)); margin: 0 auto; padding: 19px 0 70px; }
.tsumego-toolbar { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }.tsumego-toolbar > div { text-align: center; }.tsumego-toolbar h2 { margin: 0; font: 600 24px Georgia,"Songti SC",serif; }.tsumego-toolbar > strong { justify-self: end; color: var(--green); font: 700 17px Georgia,serif; }
.tsumego-progress-track { width: 100%; height: 6px; margin-bottom: 18px; overflow: hidden; border-radius: 999px; background: #dfdcd2; }.tsumego-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),#6a9c7f); transition: width .35s ease; }
.tsumego-layout { display: grid; grid-template-columns: minmax(560px,840px) minmax(320px,420px); justify-content: center; align-items: start; gap: 24px; }
.tsumego-level-panel,.tsumego-board-card,.tsumego-guide-card { border: 1px solid var(--line); border-radius: 19px; background: rgba(255,253,248,.8); box-shadow: 0 14px 40px rgba(44,48,40,.055); }
.tsumego-level-panel { margin-bottom: 18px; padding: 14px; display: grid; grid-template-columns: minmax(480px,1.5fr) minmax(360px,1fr); align-items: center; gap: 16px; }.tsumego-guide-card { padding: 20px; }.tsumego-guide-card > h3 { margin: 0 0 7px; font: 600 21px Georgia,"Songti SC",serif; }
.tsumego-level-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }.tsumego-level-button { width: 100%; min-height: 58px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 11px; color: var(--ink); background: #f1efe7; text-align: left; }.tsumego-level-button span { display: grid; gap: 2px; }.tsumego-level-button strong { font-size: 12px; }.tsumego-level-button small { color: var(--muted); font-size: 9px; }.tsumego-level-button em { color: var(--muted); font-size: 10px; font-style: normal; }.tsumego-level-button:hover { background: #e9eee9; }.tsumego-level-button.active { color: var(--green); border-color: #b9d1c2; background: var(--green-soft); }.tsumego-level-button.active em { color: var(--green); }
.tsumego-problem-row { min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }.tsumego-problem-heading { margin: 0 1px 9px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 750; }.tsumego-problem-heading small { font-weight: 500; }
.tsumego-problem-list { display: grid; grid-template-columns: repeat(8,1fr); gap: 7px; }.tsumego-problem-button { width: 33px; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: #fff; font-size: 11px; font-weight: 800; }.tsumego-problem-button:hover { border-color: #91ad9d; }.tsumego-problem-button.solved { color: var(--green); border-color: #b9d1c2; background: var(--green-soft); }.tsumego-problem-button.active { color: white; border-color: var(--green); background: var(--green); box-shadow: 0 0 0 3px rgba(31,92,69,.12); }
.tsumego-board-card { min-width: 0; overflow: hidden; }.tsumego-board-head { min-height: 76px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }.tsumego-board-head h3 { margin: 7px 0 0; font: 600 18px Georgia,"Songti SC",serif; }.tsumego-turn { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }.tsumego-turn .mini-stone { width: 22px; height: 22px; }
.tsumego-board-wrap { position: relative; width: 100%; aspect-ratio: 1; background: var(--board); box-shadow: inset 0 0 30px rgba(92,53,15,.12); overflow: hidden; }
#tsumego-board { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: crosshair; }
#tsumego-board .grid { stroke: #5a4327; stroke-width: 2.3; opacity: .82; vector-effect: non-scaling-stroke; }#tsumego-board .hoshi { fill: #493620; }#tsumego-board .coord { fill: rgba(66,47,24,.66); font-size: 21px; font-weight: 650; text-anchor: middle; dominant-baseline: central; }
#tsumego-board .stone-black { fill: #111713; filter: drop-shadow(0 7px 5px rgba(46,27,7,.36)); stroke: #050706; stroke-width: 1; }#tsumego-board .stone-white { fill: #f7f6f0; filter: drop-shadow(0 6px 5px rgba(46,27,7,.25)); stroke: #c8c5bb; stroke-width: 1.5; }
#tsumego-board .answer-marker { stroke-width: 5; fill: rgba(255,255,255,.2); }#tsumego-board .answer-marker.correct { stroke: #2f805b; }#tsumego-board .answer-marker.wrong { stroke: #b54e44; }#tsumego-board .last-dot { fill: #d4a55c; stroke: #fff8; stroke-width: 2; }
.tsumego-guide-card { position: sticky; top: 85px; }.tsumego-prompt { min-height: 60px; margin: 17px 0; color: #4e5952; font-size: 13px; line-height: 1.75; }.tsumego-feedback { min-height: 118px; padding: 16px; border: 1px solid #dbe7df; border-radius: 13px; background: linear-gradient(145deg,#e9f1ec,#f6f4eb); }.tsumego-feedback strong { font: 600 17px Georgia,"Songti SC",serif; }.tsumego-feedback p { margin: 8px 0 0; color: #59635d; font-size: 11px; line-height: 1.65; }.tsumego-feedback.correct { border-color: #bcd8c7; background: #e4f0e8; }.tsumego-feedback.wrong { border-color: #eccdc7; background: #f8e8e5; }.tsumego-feedback.wrong strong { color: #8f4037; }
.tsumego-hint-text { margin-top: 10px; padding: 12px 13px; border-left: 3px solid var(--gold); border-radius: 4px 10px 10px 4px; color: #655845; background: #f7efdf; font-size: 11px; line-height: 1.6; }.tsumego-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 14px; }.tsumego-actions button { min-height: 40px; padding: 0 7px; font-size: 10px; }.tsumego-attempts { margin: 13px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }.tsumego-source { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #8b918b; font-size: 9px; line-height: 1.6; }.tsumego-source a { color: inherit; text-decoration-color: #b8b7af; text-underline-offset: 2px; }.tsumego-source a:hover { color: var(--green); }

.game-view { width: min(1420px, calc(100% - 38px)); margin: 0 auto; padding: 18px 0 50px; }
.game-toolbar { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.back-button { border: 0; padding: 8px 0; background: none; color: var(--muted); text-align: left; }.back-button:hover { color: var(--ink); }
.game-title-wrap { text-align: center; }.game-title-wrap h2 { margin: 0; font: 600 18px Georgia,"Songti SC",serif; }.game-title-wrap span { color: #859087; font-size: 10px; }
.game-toolbar-actions { justify-self: end; display: flex; gap: 7px; }
.game-layout { display: grid; grid-template-columns: minmax(560px,840px) minmax(320px,420px); gap: 24px; justify-content: center; align-items: start; }
.board-column { min-width: 0; }
.player-strip { height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 14px; }.player-strip > div { display: grid; }.player-strip strong { font-size: 14px; }.player-strip small { color: var(--muted); font-size: 10px; margin-top: 2px; }.captures { margin-left: auto; font-size: 11px; color: var(--muted); }
.mini-stone { display: inline-block; flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%; vertical-align: middle; }.mini-stone.black { background: radial-gradient(circle at 35% 25%,#59625d,#151a17 55%,#050706); box-shadow: 0 3px 6px rgba(0,0,0,.28); }.mini-stone.white { background: radial-gradient(circle at 35% 25%,#fff,#ebeae4 60%,#cbc9c1); border: 1px solid #ccc9c0; box-shadow: 0 3px 6px rgba(0,0,0,.12); }
.board-wrap { position: relative; width: 100%; aspect-ratio: 1; background: var(--board); border-radius: 8px; box-shadow: 0 18px 45px rgba(77,55,23,.2), inset 0 0 30px rgba(92,53,15,.12); overflow: hidden; }
#go-board { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: crosshair; }
#go-board .grid { stroke: #5a4327; stroke-width: 2.3; opacity: .82; vector-effect: non-scaling-stroke; }
#go-board .hoshi { fill: #493620; }
#go-board .coord { fill: rgba(66,47,24,.66); font-size: 21px; font-weight: 650; text-anchor: middle; dominant-baseline: central; }
#go-board .stone-black { fill: #111713; filter: drop-shadow(0 7px 5px rgba(46,27,7,.36)); stroke: #050706; stroke-width: 1; }
#go-board .stone-white { fill: #f7f6f0; filter: drop-shadow(0 6px 5px rgba(46,27,7,.25)); stroke: #c8c5bb; stroke-width: 1.5; }
#go-board .last-dot { fill: #d4a55c; stroke: #fff6; stroke-width: 2; }
#go-board .candidate { fill: rgba(31,92,69,.84); stroke: #fff; stroke-width: 3; cursor: pointer; }
#go-board .candidate-label { fill: white; font-size: 22px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.thinking { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; background: rgba(28,38,32,.32); color: white; backdrop-filter: blur(2px); }
.thinking span { width: 42px; height: 42px; border: 3px solid #ffffff55; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }.thinking strong { padding: 8px 13px; border-radius: 9px; background: rgba(16,24,19,.74); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.board-actions { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 9px; margin: 10px 0; }.board-actions button { min-height: 42px; }

.coach-panel { height: min(840px, calc(100vh - 150px)); min-height: 520px; margin-top: 58px; display: flex; flex-direction: column; background: rgba(255,253,248,.78); border: 1px solid var(--line); border-radius: 19px; overflow: hidden; box-shadow: 0 14px 40px rgba(44,48,40,.06); }
.panel-tabs { flex: 0 0 54px; height: 54px; display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); }.tab { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; position: relative; }.tab.active { color: var(--green); }.tab.active::after { content: ""; position: absolute; left: 26%; right: 26%; bottom: -1px; height: 2px; background: var(--green); }
.tab-content { flex: 1 1 auto; min-height: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#moves-tab { flex-direction: column; overflow: hidden; }
#moves-tab:not(.hidden) { display: flex; }
.turn-card { padding: 21px; border-radius: 15px; background: linear-gradient(145deg,#e9f1ec,#f6f4eb); border: 1px solid #dbe7df; }.turn-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--green); background: #d6e7dc; font-size: 10px; font-weight: 800; }.turn-card h3 { margin: 14px 0 8px; font: 600 21px Georgia,"Songti SC",serif; }.turn-card p { color: #59635d; font-size: 13px; line-height: 1.75; margin: 0; }
.turn-card.welcome,.turn-card.thinking,.turn-card.neutral { background: linear-gradient(145deg,#e4f0e8,#f5f4eb); border-color: #cfe1d6; }
.turn-card.great { background: #e4f0e8; }.turn-card.good { background: #edf1e7; }.turn-card.inaccuracy { background: #faf0db; border-color: #ecd9b4; }.turn-card.mistake { background: #f8e8e5; border-color: #eccdc7; }
.coach-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 13px; color: var(--muted); font-size: 11px; }.coach-options .compact { min-height: 32px; padding: 0 11px; font-size: 11px; }.coach-level-control { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }.coach-level-control > span { flex: 0 0 auto; }.coach-level-control select { min-width: 0; width: min(145px,100%); padding: 7px 9px; border-radius: 9px; font-size: 11px; }
.evaluation { margin: 17px 0; padding: 16px; border-radius: 13px; border: 1px solid var(--line); background: #fff; }.evaluation span { color: var(--muted); }.winrate-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.winrate-side { display: grid; gap: 4px; font-size: 12px; }.winrate-side strong { font-size: 17px; }.winrate-side.white-side { justify-items: end; text-align: right; }.winrate-bar { display: flex; height: 11px; margin: 12px 0 15px; border: 1px solid #cbc8bf; border-radius: 999px; overflow: hidden; background: #e9e6de; }.winrate-bar i { display: block; height: 100%; transition: width .4s ease; }.black-winrate-fill { width: 50%; background: #202824; }.white-winrate-fill { width: 50%; background: #f0ede5; box-shadow: inset 1px 0 #bcb8ae; }.score-row { display: flex; justify-content: space-between; font-size: 12px; }.winrate-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid #ece8df; color: var(--muted); font-size: 10px; line-height: 1.55; }.winrate-hidden .evaluation,.winrate-hidden .candidate-winrate { display: none !important; }
.candidate-section { margin: 20px 0; }.mini-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 9px; }.mini-heading h4 { margin: 0; }.mini-heading span { color: var(--muted); font-size: 9px; }.candidate-row { width: 100%; display: grid; grid-template-columns: 29px 52px 1fr auto; align-items: center; gap: 8px; padding: 12px 7px; border: 0; border-bottom: 1px solid #e6e1d5; background: transparent; text-align: left; }.candidate-row:hover { background: #f7f4ec; }.candidate-rank { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 10px; font-weight: 800; }.candidate-row strong { font-family: ui-monospace,Consolas,monospace; }.candidate-row small { color: var(--muted); }.candidate-row em { color: var(--green); font-style: normal; font-size: 10px; white-space: nowrap; }.candidate-explanation { grid-column: 2 / -1; margin: 0; color: #565b55; font-size: 11px; line-height: 1.55; }
.move-number { font-family: ui-monospace,Consolas,monospace; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }.move-number.on-black { fill: #fff; }.move-number.on-white { fill: #1d221f; }
.replay-controls { flex: 0 0 auto; display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 6px; margin-bottom: 9px; }.replay-controls strong { text-align: center; color: var(--green); font-size: 12px; }.replay-help { flex: 0 0 auto; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }.move-list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 4px 16px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; list-style: none; counter-reset: moves; }.move-list li { counter-increment: moves; display: grid; grid-template-columns: 32px 25px 1fr auto; align-items: center; gap: 9px; padding: 9px 4px; border-bottom: 1px solid #e7e2d7; border-radius: 7px; font-size: 13px; cursor: pointer; }.move-list li::before { content: counter(moves); color: #999; font-size: 10px; }.move-list li:hover,.move-list li.selected { background: #edf3ef; }.move-list li.selected { box-shadow: inset 3px 0 var(--green); }.move-list .mini-stone { width: 19px; height: 19px; }.move-status { color: var(--danger); font-size: 9px; font-weight: 700; }.move-status.pass { color: var(--muted); }
.review-empty { text-align: center; padding: 44px 8px; }.review-empty p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 22px; }.review-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 18px; }.review-metrics div { padding: 12px 5px; border-radius: 11px; background: #f0eee7; text-align: center; }.review-metrics strong { display: block; font-size: 22px; }.review-metrics small { color: var(--muted); font-size: 9px; }.review-item { margin: 9px 0; padding: 13px; border-left: 3px solid #8ba397; background: #f6f3eb; border-radius: 4px 10px 10px 4px; }.review-item.mistake { border-color: var(--danger); }.review-item.inaccuracy { border-color: var(--gold); }.review-item header { display: flex; justify-content: space-between; font-size: 12px; }.review-item p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

dialog { width: min(520px,calc(100% - 24px)); padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 90px rgba(20,29,24,.28); }dialog::backdrop { background: rgba(23,33,28,.48); backdrop-filter: blur(5px); }dialog form { padding: 29px; }.dialog-heading { display: flex; justify-content: space-between; }.dialog-heading h2 { margin: 0 0 22px; font: 600 31px Georgia,"Songti SC",serif; }.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: #f0eee7; font-size: 23px; }.icon-button:hover { background: #e5e1d6; }
.confirm-dialog { width: min(440px,calc(100% - 24px)); }.confirm-card { position: relative; padding: 29px; }.confirm-mark { width: 42px; height: 42px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: #f8e7e3; font: 800 20px Georgia,serif; }.confirm-dialog .dialog-heading h2 { margin-bottom: 0; }.confirm-message { margin: 18px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.75; }.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.confirm-actions .danger-button { min-height: 44px; }
fieldset { padding: 0; margin: 0 0 21px; border: 0; }legend,.form-label { display: block; width: 100%; margin-bottom: 9px; font-size: 12px; font-weight: 800; }.segmented { display: grid; gap: 8px; }.segmented.three { grid-template-columns: repeat(3,1fr); }.segmented.two { grid-template-columns: repeat(2,1fr); }.segmented input { position: absolute; opacity: 0; }.segmented span { min-height: 61px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-weight: 750; font-size: 13px; }.segmented small { color: var(--muted); font-size: 9px; font-weight: 500; }.segmented input:checked + span { color: var(--green); border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(31,92,69,.08); }.segmented .mini-stone { width: 18px; height: 18px; margin-right: 5px; }.segmented.two span { flex-direction: row; }
.form-label select { margin-top: 7px; }.form-label > small { display: block; margin: 7px 2px 20px; color: var(--muted); font-weight: 400; line-height: 1.5; }.switch-row { display: flex; align-items: center; margin: 6px 0 24px; position: relative; }.switch-row > div { display: grid; }.switch-row small { color: var(--muted); font-size: 10px; margin-top: 3px; }.switch-row input { position: absolute; right: 0; opacity: 0; }.switch { width: 43px; height: 24px; margin-left: auto; padding: 3px; border-radius: 999px; background: #c9cbc6; transition: .2s; }.switch::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #0002; transition: .2s; }.switch-row input:checked + .switch { background: var(--green); }.switch-row input:checked + .switch::after { transform: translateX(19px); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 11px 17px; color: white; background: rgba(23,33,28,.94); border-radius: 10px; box-shadow: 0 12px 30px #0003; font-size: 12px; }

@media (max-width: 980px) {
  .game-list { grid-template-columns: repeat(2,1fr); }.game-layout { grid-template-columns: 1fr; }.coach-panel { height: min(720px, calc(100svh - 90px)); min-height: 460px; margin-top: 0; }.board-column { width: min(760px,100%); margin: auto; }.hero { align-items: start; flex-direction: column; gap: 20px; }.game-view { width: min(820px,calc(100% - 24px)); }.tsumego-level-panel { grid-template-columns: 1fr; }.tsumego-problem-row { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }.tsumego-problem-list { grid-template-columns: repeat(8,33px); }.tsumego-layout { grid-template-columns: 1fr; }.tsumego-guide-card { position: static; }.tsumego-prompt { min-height: 0; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 13px; }.engine-pill { display: none; }.top-actions .ghost { display: none; }.library-view { width: calc(100% - 24px); padding-top: 20px; }.hero { min-height: 300px; padding: 30px 25px; border-radius: 20px; }.hero h2 { font-size: 37px; }.training-banner { padding: 18px; grid-template-columns: auto 1fr; gap: 14px; }.training-banner > button { grid-column: 1 / -1; }.training-banner h4 { font-size: 15px; }.training-mark { width: 50px; height: 50px; background-size: 16px 16px; background-position: 9px 9px; }.training-mark i { width: 13px; height: 13px; }.training-mark i:nth-child(1) { left: 18px; top: 18px; }.training-mark i:nth-child(2) { left: 34px; top: 18px; }.training-mark i:nth-child(3) { left: 18px; top: 34px; }.game-list { grid-template-columns: 1fr; }.section-heading { margin-top: 36px; }.tsumego-view { width: calc(100% - 20px); padding-top: 8px; }.tsumego-toolbar { grid-template-columns: 1fr auto; }.tsumego-toolbar > div { text-align: right; }.tsumego-toolbar > strong { grid-column: 1 / -1; width: 100%; margin: 5px 0 8px; text-align: right; }.tsumego-layout { grid-template-columns: 1fr; gap: 11px; }.tsumego-level-panel { padding: 10px; }.tsumego-level-list { grid-template-columns: 1fr 1fr; }.tsumego-level-button { min-height: 54px; }.tsumego-level-button em { display: none; }.tsumego-problem-list { grid-template-columns: repeat(8,1fr); gap: 5px; }.tsumego-problem-button { width: 100%; }.tsumego-guide-card { padding: 17px; }.tsumego-board-head { min-height: 67px; padding: 10px 13px; }.tsumego-board-head h3 { font-size: 16px; }.game-toolbar { grid-template-columns: 1fr auto; }.game-title-wrap { text-align: right; }.game-toolbar > a { display: none; }.game-layout { gap: 8px; }.player-strip { height: 48px; }.board-wrap { border-radius: 3px; }.board-actions { grid-template-columns: 1fr 1fr; }.coach-panel { height: min(620px, calc(100svh - 88px)); min-height: 400px; border-radius: 14px; }.tab-content { padding: 16px; }.auth-card { padding: 34px 25px; }.segmented.three { grid-template-columns: 1fr; }.segmented.three span { min-height: 48px; flex-direction: row; gap: 8px; }dialog form { padding: 23px 18px; }
}
