*{box-sizing:border-box}html{background:#efe6d2;color:#241d16;font-family:Inter,"Noto Sans SC","Microsoft YaHei",sans-serif}body{margin:0;min-height:100vh;overflow-x:hidden;background:radial-gradient(circle at 50% -10%,#fff9e9 0,#efe6d2 48%,#ded0b4 100%)}button,select{font:inherit}.topbar{height:72px;display:flex;align-items:center;gap:14px;padding:0 clamp(16px,4vw,54px);border-bottom:1px solid #8b76583d;background:#f8f0dfd9;backdrop-filter:blur(12px);position:sticky;top:0;z-index:5}.brand{width:42px;height:42px;border:1px solid #7d281e;display:grid;place-items:center;text-decoration:none;color:#7d281e;font:700 13px Georgia,serif;letter-spacing:.04em}.topbar div{display:grid;line-height:1.1}.topbar small{font-size:10px;letter-spacing:.14em;color:#765f48;margin-top:4px}.topbar>button{margin-left:auto;border:1px solid #846f55;background:#fff7e8;padding:9px 13px;border-radius:999px;color:#463727}.shell{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:38px 0 60px}.intro{display:grid;grid-template-columns:1fr auto;gap:30px;align-items:end;margin-bottom:22px}.eyebrow{font-size:11px;letter-spacing:.2em;color:#8a3527;margin:0 0 10px}.intro h1{font-family:"Noto Serif SC","Songti SC",Georgia,serif;font-size:clamp(32px,5vw,64px);font-weight:600;margin:0 0 10px;letter-spacing:.04em}.intro p:not(.eyebrow){max-width:660px;color:#65523e;margin:0;line-height:1.7}.tabs{display:flex;background:#e4d6bc;padding:4px;border-radius:12px;box-shadow:inset 0 0 0 1px #90795d33}.tabs button{min-width:108px;padding:10px 15px;border:0;background:transparent;border-radius:9px;color:#6b5743;cursor:pointer}.tabs button small{display:block;font-size:9px;letter-spacing:.12em;margin-top:3px}.tabs button.active{background:#fff8e9;color:#72281d;box-shadow:0 3px 14px #70552b24}.playcard{border:1px solid #6e594238;background:#f8f0df;box-shadow:0 24px 70px #5b3d1c1f;border-radius:18px;overflow:hidden}.toolbar,.foot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;background:#fdf7eb}.toolbar{border-bottom:1px solid #6e59422b}.toolbar>div:first-child{display:grid;gap:2px}.toolbar span{font-size:11px;color:#806a52}.toolbar strong{font-size:16px}.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}.actions button,.actions select{border:1px solid #816b50;background:#fffaf0;color:#3f3022;border-radius:8px;padding:8px 12px}.actions button{cursor:pointer}.actions button:hover{background:#efe1c6}.actions label{font-size:12px;color:#6c5842}.board-wrap{padding:clamp(10px,2vw,22px);display:grid;place-items:center;background:linear-gradient(135deg,#d5bd8d,#c8a970)}canvas{display:block;max-width:100%;touch-action:manipulation;border-radius:5px;box-shadow:0 12px 35px #38210c40;background:#d8b46f}.foot{border-top:1px solid #6e59422b;color:#725e47;font-size:12px}.notes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}.notes article{border-top:1px solid #8a7258;padding:14px 4px}.notes b{font-family:"Noto Serif SC","Songti SC",serif;font-size:18px}.notes p{font-size:12px;line-height:1.65;color:#6f5b45;margin:7px 0 0}.matchbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 18px;border-bottom:1px solid #6e59422b;background:#f7edda}.time-control{display:flex;align-items:center;gap:8px;font-size:12px;color:#6c5842}.time-control select{border:1px solid #816b50;background:#fffaf0;color:#3f3022;border-radius:8px;padding:7px 10px}.clock-pair{display:grid;grid-template-columns:repeat(2,minmax(112px,1fr));gap:8px}.clock{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:126px;padding:7px 11px;border:1px solid #8c765b55;border-radius:9px;background:#fff8e9}.clock span{font-size:11px;color:#765f48}.clock strong{font:700 16px ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums}.clock.active{border-color:#1b5b46;box-shadow:inset 0 0 0 1px #1b5b4638;background:#edf4ea}.clock.low{border-color:#9c382d;background:#fae8df;color:#7c241b}.record-panel{border-top:1px solid #6e59422b;background:#fbf4e6;padding:12px 18px 14px}.record-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.record-head>div:first-child{display:flex;align-items:baseline;gap:10px}.record-head b{font-family:"Noto Serif SC","Songti SC",serif;font-size:15px}.record-head span{font-size:11px;color:#806a52}.review-actions{display:flex;flex-wrap:wrap;gap:6px}.review-actions button{border:1px solid #816b50;background:#fffaf0;color:#3f3022;border-radius:7px;padding:6px 9px;font-size:11px;cursor:pointer}.review-actions button:disabled{opacity:.38;cursor:not-allowed}.record-list{list-style:none;display:flex;gap:6px;overflow-x:auto;margin:10px 0 0;padding:0 0 2px;scrollbar-width:thin}.record-list li{flex:0 0 auto}.record-list button{border:1px solid #8b76584a;background:#f5ead5;color:#5c4936;border-radius:7px;padding:6px 9px;font-size:11px;white-space:nowrap;cursor:pointer}.record-list button.live{border-color:#8a3527;color:#7a3025}.record-list button.active{background:#1b5b46;border-color:#1b5b46;color:#fff}.record-empty{font-size:11px;color:#8a7258;padding:5px 1px}.actions button:disabled{opacity:.42;cursor:not-allowed;background:#f1e8d6}.actions #confirmBtn:not(:disabled){background:#1b5b46;border-color:#1b5b46;color:#fff}.actions #resumeBtn:not(:disabled){background:#f1ead9;border-color:#5f765f;color:#38513d}.actions #resignBtn:not(:disabled){border-color:#9b665f;color:#7b3428}.actions button.armed{border-color:#9c382d;background:#f8dfd7;color:#7c241b}.notice{padding:9px 18px;border-bottom:1px solid #6e59422b;background:#f3ead8;color:#5f4b36;font-size:12px;line-height:1.45}.notice[data-tone="warn"]{background:#f7e5d9;color:#7b3428}.notice[data-tone="ok"]{background:#e6eee4;color:#345b3e}.notice[hidden]{display:none}.foot-meta{display:flex;align-items:center;gap:14px;text-align:right}.foot-meta #sessionHint{color:#8a7258}.control-hint{margin:10px 3px 0;color:#806b54;font-size:11px;text-align:right}canvas:focus-visible{outline:3px solid #1b5b46;outline-offset:4px}.tabs button:focus-visible,.actions button:focus-visible,.actions select:focus-visible,.topbar>button:focus-visible,.review-actions button:focus-visible,.time-control select:focus-visible,.record-list button:focus-visible{outline:2px solid #1b5b46;outline-offset:2px}@media(max-width:780px){.topbar{height:62px;padding:0 12px}.topbar div strong{font-size:14px}.shell{width:min(100% - 18px,700px);padding:22px 0 38px}.intro{grid-template-columns:1fr;gap:16px}.intro h1{font-size:38px}.tabs{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.tabs button{min-width:0;padding:9px 5px}.toolbar{align-items:flex-start;flex-direction:column}.actions{width:100%;justify-content:flex-start}.actions button{flex:1}.matchbar{align-items:flex-start;flex-direction:column;padding:9px 12px}.clock-pair{width:100%}.record-panel{padding:10px 12px 12px}.record-head{align-items:flex-start;flex-direction:column}.review-actions{width:100%}.review-actions button{flex:1}.notes{grid-template-columns:1fr}.board-wrap{padding:8px}.foot{padding:11px 12px;align-items:flex-start}.foot>span:first-child{max-width:70%}.foot-meta{display:grid;gap:3px}.foot-meta #sessionHint{font-size:10px}.control-hint{font-size:10px;text-align:left;line-height:1.55}}@media(max-width:430px){.topbar>button{font-size:12px;padding:7px 9px}.brand{width:36px;height:36px}.intro p:not(.eyebrow){font-size:13px}.playcard{border-radius:12px}.tabs{overflow:hidden}.actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.actions label{grid-column:1/-1;width:auto}.actions button{width:100%;min-width:0;padding:8px 6px}.actions select{padding:6px 9px}.clock-pair{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.clock{min-width:0;padding:7px 8px}.clock strong{font-size:14px}.time-control{width:100%;justify-content:space-between}.time-control select{min-width:120px}.review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.review-actions button{width:100%;padding:7px 5px}.record-list button{font-size:10px;padding:6px 8px}.notes{margin-top:10px}}

.ai-setup{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 18px;border-bottom:1px solid #6e59422b;background:#f7edda}
.ai-setup label{display:flex;align-items:center;gap:6px;color:#6c5842;font-size:12px;white-space:nowrap}
.ai-setup select{border:1px solid #816b50;background:#fffaf0;color:#3f3022;border-radius:8px;padding:7px 28px 7px 10px}
.ai-setup select:disabled{opacity:.58}
.ai-state{margin-left:auto;padding:6px 10px;border-radius:999px;background:#e8dfcc;color:#6c5842;font-size:11px;letter-spacing:.04em}
.ai-state[data-busy="true"]{background:#f3dfb4;color:#7d281e;animation:ai-pulse 1s ease-in-out infinite alternate}
@keyframes ai-pulse{to{box-shadow:0 0 0 4px rgba(125,40,30,.08)}}
.playcard[data-ai-turn="true"] canvas{cursor:wait}
@media(max-width:780px){.ai-setup{padding:10px 12px;gap:8px}.ai-setup label{flex:1 1 calc(50% - 8px)}.ai-setup select{min-width:0;flex:1}.ai-state{width:100%;margin-left:0;text-align:center}.playcard[data-ai-turn="true"] .board-wrap{opacity:.94}}
@media(max-width:430px){.ai-setup label{flex-basis:100%}}

/* v0.6.0 bilingual / immersive controls */
.topbar{height:auto;min-height:72px;flex-wrap:wrap}.title-lockup{min-width:155px}.top-actions{margin-left:auto;display:flex!important;grid-auto-flow:column!important;align-items:center;gap:8px}.top-action{display:inline-flex;align-items:center;justify-content:center;min-height:38px;border:1px solid #846f55;background:#fff7e8;padding:8px 12px;border-radius:999px;color:#463727;text-decoration:none;font-size:12px;white-space:nowrap;cursor:pointer}.top-action:hover{background:#efe1c6}.top-action:focus-visible{outline:2px solid #1b5b46;outline-offset:2px}.home-action{border-color:#7d281e;color:#7d281e}.topbar>button{margin-left:0}.topbar .top-actions button{margin-left:0}
html[data-lang="en"] .intro h1{letter-spacing:.01em}html[data-lang="en"] .notes b{font-family:Georgia,serif}
:fullscreen body{height:100dvh;overflow:hidden;background:#d6c39c}:fullscreen .topbar{position:relative;height:56px;min-height:56px;padding:0 14px;background:#f4ead7;box-shadow:0 1px 0 #725d4433}:fullscreen .brand{width:34px;height:34px}:fullscreen .title-lockup small{display:none}:fullscreen .shell{width:100%;height:calc(100dvh - 56px);padding:0;margin:0}:fullscreen .intro,:fullscreen .notes,:fullscreen .control-hint{display:none}:fullscreen .playcard{height:100%;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto auto}:fullscreen .board-wrap{min-height:0;padding:8px;background:linear-gradient(135deg,#d5bd8d,#c8a970)}:fullscreen .record-panel{max-height:92px;overflow:hidden}:fullscreen .record-list{margin-top:6px}:fullscreen .toolbar,:fullscreen .ai-setup,:fullscreen .matchbar,:fullscreen .foot{padding-top:7px;padding-bottom:7px}:fullscreen canvas{max-height:100%;max-width:100%}
@media(max-width:780px){.topbar{min-height:62px}.top-actions{gap:5px}.top-action{padding:7px 9px;font-size:11px}.home-action span{font-size:0}.home-action span:after{content:'⌂';font-size:16px}.title-lockup{min-width:120px}:fullscreen .topbar{height:52px;min-height:52px;padding:0 8px}:fullscreen .shell{height:calc(100dvh - 52px)}:fullscreen .record-panel{max-height:82px}:fullscreen .toolbar{padding:7px 10px}:fullscreen .ai-setup,:fullscreen .matchbar,:fullscreen .foot{padding:6px 10px}}
@media(max-width:520px){.topbar{gap:8px}.title-lockup{flex:1}.top-actions{width:100%;margin:0 0 8px;justify-content:flex-end}.top-action{flex:1}.home-action span{font-size:11px}.home-action span:after{content:''}:fullscreen .topbar{flex-wrap:nowrap}.fullscreen .top-actions{width:auto;margin:0}.topbar:fullscreen .title-lockup{display:none}:fullscreen .top-actions{width:auto;margin:0;flex:1;justify-content:flex-end}:fullscreen .home-action span{font-size:0}:fullscreen .home-action span:after{content:'⌂';font-size:16px}:fullscreen .top-action{flex:0 1 auto;padding:6px 8px}:fullscreen .record-panel{display:none}:fullscreen .playcard{grid-template-rows:auto auto auto minmax(0,1fr) auto}:fullscreen .foot{font-size:10px}}
:fullscreen .record-panel{display:none}:fullscreen .playcard{grid-template-rows:auto auto auto minmax(0,1fr) auto}:fullscreen .topbar{min-height:50px;height:50px}:fullscreen .shell{height:calc(100dvh - 50px)}
:fullscreen .ai-setup,:fullscreen .foot{display:none}:fullscreen .playcard{grid-template-rows:auto auto minmax(0,1fr)}:fullscreen .topbar{min-height:46px;height:46px}:fullscreen .shell{height:calc(100dvh - 46px)}

/* v0.6.1 stable fullscreen + Xiangqi feedback */
.board-wrap{position:relative}
.capture-fx,.check-fx{position:absolute;left:50%;top:50%;z-index:4;pointer-events:none;opacity:0;transform:translate(-50%,-50%) scale(.55);font-family:"STKaiti","KaiTi","Noto Serif SC",serif;font-weight:900;line-height:1;text-shadow:0 3px 14px rgba(74,24,16,.26);will-change:transform,opacity}
.capture-fx{color:#9d241d;font-size:clamp(48px,7vw,92px)}.check-fx{color:#7d281e;font-size:clamp(42px,6vw,78px)}
.capture-fx.play{animation:board-capture-pop .7s cubic-bezier(.2,.8,.2,1)}.check-fx.play{animation:board-check-pop .65s cubic-bezier(.2,.8,.2,1)}
@keyframes board-capture-pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.45) rotate(-8deg)}18%{opacity:.94;transform:translate(-50%,-50%) scale(1.12) rotate(2deg)}65%{opacity:.78;transform:translate(-50%,-58%) scale(.98)}100%{opacity:0;transform:translate(-50%,-78%) scale(.88)}}
@keyframes board-check-pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.55)}20%{opacity:.88;transform:translate(-50%,-50%) scale(1.04)}100%{opacity:0;transform:translate(-50%,-72%) scale(.92)}}
:fullscreen .playcard{position:relative}:fullscreen .notice{position:absolute;z-index:10;left:50%;top:106px;width:min(620px,calc(100% - 28px));transform:translateX(-50%);border:1px solid #6e594244;border-radius:10px;box-shadow:0 8px 24px rgba(56,33,12,.18);pointer-events:none}:fullscreen .notice[hidden]{display:none}
@media(max-width:780px){:fullscreen .notice{top:100px;width:calc(100% - 18px);padding:7px 10px}}

/* v0.6.2 explicit match start, local-data reset and volume control */
.setup-action{border:1px solid #816b50;background:#fffaf0;color:#3f3022;border-radius:8px;padding:7px 11px;font-size:12px;cursor:pointer;white-space:nowrap}.setup-action.primary{background:#1b5b46;border-color:#1b5b46;color:#fff}.setup-action.danger{border-color:#9b665f;color:#7b3428}.setup-action.danger.armed{background:#f8dfd7;border-color:#9c382d;color:#7c241b}.setup-action:disabled{opacity:.45;cursor:not-allowed}.match-options{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.volume-control{display:flex;align-items:center;gap:7px;font-size:12px;color:#6c5842}.volume-control input{width:112px;accent-color:#1b5b46}.volume-control output{min-width:34px;text-align:right;font:600 11px ui-monospace,SFMono-Regular,Menlo,monospace;color:#5f4b36}
@media(max-width:780px){.ai-setup .setup-action{flex:1 1 calc(50% - 8px)}.match-options{width:100%;justify-content:space-between;gap:10px}.volume-control{flex:1;justify-content:flex-end}.volume-control input{width:min(34vw,150px)}}
@media(max-width:430px){.ai-setup .setup-action{flex-basis:100%}.match-options{display:grid;grid-template-columns:1fr}.volume-control{justify-content:space-between}.volume-control input{width:min(52vw,190px)}}
:fullscreen .playcard[data-waiting-start="true"] .ai-setup{display:flex}:fullscreen .playcard[data-waiting-start="true"]{grid-template-rows:auto auto auto minmax(0,1fr)}


/* v0.6.3 Go capture feedback */
.go-capture-stats{display:flex;align-items:center;gap:7px;padding:6px 10px;border:1px solid #8c765b55;border-radius:999px;background:#f3ead8;color:#604c38;font-size:11px;white-space:nowrap}.go-capture-stats[hidden]{display:none}.go-capture-stats i{font-style:normal;opacity:.45}.go-capture-layer{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:hidden}.go-captured-stone{position:absolute;border-radius:50%;transform:translate(-50%,-50%);animation:go-stone-lift .72s cubic-bezier(.18,.7,.28,1) forwards;box-shadow:0 3px 10px rgba(40,25,12,.28)}.go-captured-stone.black{background:radial-gradient(circle at 34% 30%,#555 0,#171717 48%,#020202 100%);border:1px solid #000}.go-captured-stone.white{background:radial-gradient(circle at 34% 30%,#fff 0,#eee9dc 68%,#bdb7aa 100%);border:1px solid #999}.go-capture-text{position:absolute;z-index:6;pointer-events:none;opacity:0;transform:translate(-50%,-50%) scale(.7);padding:5px 9px;border-radius:999px;background:rgba(248,240,223,.94);border:1px solid rgba(125,40,30,.35);color:#8b2e22;font:700 12px "Noto Serif SC","Songti SC",serif;white-space:nowrap;box-shadow:0 5px 16px rgba(56,33,12,.18)}.go-capture-text.play{animation:go-capture-label .9s cubic-bezier(.18,.8,.25,1)}@keyframes go-stone-lift{0%{opacity:.92;transform:translate(-50%,-50%) scale(1)}45%{opacity:.68;transform:translate(-50%,-62%) scale(.82)}100%{opacity:0;transform:translate(-50%,-105%) scale(.48)}}@keyframes go-capture-label{0%{opacity:0;transform:translate(-50%,-30%) scale(.7)}18%{opacity:.96;transform:translate(-50%,-72%) scale(1.04)}68%{opacity:.9;transform:translate(-50%,-92%) scale(1)}100%{opacity:0;transform:translate(-50%,-125%) scale(.94)}}
@media(max-width:780px){.go-capture-stats{font-size:10px;padding:5px 8px}.matchbar{gap:8px}}


/* v0.7.0 dual-end experience and HUD hierarchy */
:root{--board-ink:#241d16;--board-green:#1b5b46;--board-red:#7d281e;--panel:#f8f0df;--panel-soft:#fdf7eb;--line:#6e59422b}
.topbar{min-height:64px;height:64px;flex-wrap:nowrap;padding:0 max(14px,env(safe-area-inset-left)) 0 max(14px,env(safe-area-inset-right));gap:12px}
.brand{flex:0 0 38px;width:38px;height:38px}.title-lockup{min-width:0;flex:1}.title-lockup strong{white-space:nowrap}.title-lockup small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{flex:0 0 auto;display:flex!important;gap:6px;min-width:0}.top-action{min-height:38px;padding:7px 11px}
.shell{width:min(1320px,calc(100% - 28px));padding:28px 0 48px}.intro{margin-bottom:16px}.intro h1{font-size:clamp(32px,4.2vw,56px)}
.playcard{border-radius:16px}.toolbar{display:grid;grid-template-columns:minmax(180px,.72fr) minmax(210px,1fr) auto;align-items:center;gap:12px;padding:11px 14px}.status-lockup{display:grid!important;gap:2px;min-width:0}.status-lockup>span:first-child{font-size:10px;letter-spacing:.08em;text-transform:uppercase}.status-lockup strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-lockup .ai-state{width:max-content;max-width:100%;margin:3px 0 0;padding:4px 8px;font-size:10px;overflow:hidden;text-overflow:ellipsis}
.live-metrics{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0}.metric{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:7px;padding:6px 10px;border:1px solid #8c765b45;border-radius:999px;background:#f5ead7;white-space:nowrap}.metric small{font-size:10px;color:#806a52}.metric b{font:700 14px ui-monospace,SFMono-Regular,Menlo,monospace;color:#382c20;font-variant-numeric:tabular-nums}.go-capture-stats{margin:0;background:#f5ead7}
.actions{gap:6px;flex-wrap:nowrap}.actions button,.actions select{min-height:40px;padding:7px 11px}.actions button{white-space:nowrap}.actions #confirmBtn:not(:disabled){box-shadow:0 4px 12px rgba(27,91,70,.18)}
.ai-setup{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr)) auto auto;gap:8px;padding:9px 14px}.ai-setup label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center}.ai-setup select{width:100%;min-height:38px}.setup-action{min-height:38px}.setup-action.primary{min-width:104px}.setup-action.danger{min-width:88px}
.matchbar{display:grid;grid-template-columns:minmax(260px,1fr) auto;align-items:center;gap:12px;padding:8px 14px}.match-options{gap:14px}.time-control select{min-height:38px}.volume-control input{width:clamp(100px,11vw,150px)}.clock-pair{min-width:276px}.clock{min-height:40px;padding:6px 10px}.clock.active{border-color:var(--board-green);background:#edf4ea;box-shadow:inset 3px 0 0 var(--board-green)}.clock strong{font-size:15px}
.board-wrap{padding:clamp(7px,1.35vw,16px)}canvas{box-shadow:0 10px 28px #38210c35}.foot{padding:9px 14px;gap:18px}.foot>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.foot-meta{margin-left:auto;max-width:48%}.record-panel{padding:10px 14px 12px}.record-head{gap:10px}.review-actions button{min-height:34px}.record-list{margin-top:8px}
.notice{position:relative;z-index:8}
@media(max-width:1100px){.toolbar{grid-template-columns:minmax(170px,1fr) auto;grid-template-areas:"status metrics" "actions actions"}.status-lockup{grid-area:status}.live-metrics{grid-area:metrics;justify-content:flex-end}.actions{grid-area:actions;width:100%;justify-content:flex-end;flex-wrap:wrap}.ai-setup{grid-template-columns:repeat(3,minmax(130px,1fr)) auto auto}.matchbar{grid-template-columns:1fr auto}}
@media(max-width:780px){
  .topbar{min-height:52px;height:52px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));gap:7px}.brand{flex-basis:34px;width:34px;height:34px;font-size:11px}.title-lockup{min-width:68px}.title-lockup strong{font-size:13px}.title-lockup small{display:none}.top-actions{gap:4px;overflow:visible}.top-action{min-height:36px;padding:6px 8px;font-size:10px}
  .shell{width:100%;padding:12px 0 calc(26px + env(safe-area-inset-bottom))}.intro{padding:0 10px;margin-bottom:12px}.intro h1{font-size:34px}.intro p:not(.eyebrow){font-size:12px}.tabs{margin:0 10px;width:calc(100% - 20px)}
  .playcard{border-left:0;border-right:0;border-radius:0}.toolbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"status metrics" "actions actions";gap:8px;padding:8px 9px}.status-lockup strong{font-size:15px}.status-lockup .ai-state{font-size:9px;padding:3px 6px}.live-metrics{gap:5px}.metric{padding:5px 7px;gap:5px}.metric small{font-size:9px}.metric b{font-size:12px}.go-capture-stats{font-size:9px;padding:5px 7px}
  .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.actions label{grid-column:auto;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px}.actions button,.actions select{width:100%;min-width:0;min-height:44px;padding:7px 5px;font-size:12px}.actions label>span{font-size:9px}
  .ai-setup{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px 9px}.ai-setup label{display:grid;grid-template-columns:1fr;gap:3px;min-width:0}.ai-setup label>span{font-size:9px}.ai-setup select{min-width:0;min-height:44px;padding:6px 22px 6px 7px;font-size:11px}.ai-setup .setup-action{min-height:44px;min-width:0}.ai-setup .setup-action.primary{grid-column:span 2}
  .matchbar{display:grid;grid-template-columns:1fr;gap:7px;padding:7px 9px}.clock-pair{grid-row:1;min-width:0;width:100%;gap:6px}.clock{min-width:0;min-height:42px}.clock strong{font-size:14px}.match-options{grid-row:2;display:grid;grid-template-columns:minmax(110px,.72fr) minmax(0,1fr);width:100%;gap:8px}.time-control,.volume-control{min-width:0}.time-control{justify-content:space-between}.time-control select{min-width:0;min-height:40px}.volume-control{justify-content:flex-end}.volume-control input{width:min(32vw,150px)}
  .board-wrap{padding:5px}canvas{box-shadow:0 7px 20px #38210c30}.foot{padding:8px 9px;display:grid;grid-template-columns:1fr;gap:3px}.foot>span:first-child{white-space:normal;line-height:1.35}.foot-meta{max-width:none;margin:0;text-align:left}.record-panel{padding:9px}.record-head{gap:7px}.review-actions button{min-height:40px}.record-list button{min-height:36px}
  .notes{padding:0 10px}.control-hint{padding:0 10px}
}
@media(max-width:430px){
  .topbar{gap:5px}.topbar .title-lockup{min-width:58px}.topbar .title-lockup strong{font-size:12px}.top-actions{gap:3px}.top-action{padding:5px 6px;font-size:10px}.home-action span{font-size:0}.home-action span:after{content:'主页';font-size:10px}html[data-lang="en"] .home-action span:after{content:'Home'}
  .intro h1{font-size:30px}.toolbar{padding:7px}.status-lockup strong{font-size:14px}.status-lockup .ai-state{max-width:52vw}.live-metrics{align-self:start}.metric small{display:none}.metric{padding:5px 7px}.go-capture-stats{max-width:44vw;overflow:hidden;text-overflow:ellipsis}
  .actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.actions button,.actions select{font-size:11px;min-height:42px}
  .ai-setup{grid-template-columns:repeat(2,minmax(0,1fr));padding:7px}.ai-setup label:nth-of-type(3){grid-column:1/-1}.ai-setup .setup-action.primary{grid-column:auto}.ai-setup .setup-action{font-size:11px;min-height:42px}
  .match-options{grid-template-columns:1fr}.volume-control{justify-content:space-between}.volume-control input{width:min(48vw,180px)}.clock{padding:6px 8px}.clock span{font-size:10px}
  .record-head{align-items:stretch}.review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1024px) and (orientation:landscape) and (max-height:719px){
  body{height:100dvh;overflow:hidden}.topbar{position:relative;min-height:44px;height:44px}.brand{width:30px;height:30px;flex-basis:30px}.shell{height:calc(100dvh - 44px);width:100%;padding:0}.intro,.notes,.control-hint,.record-panel,.foot{display:none}.playcard{height:100%;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-rows:auto auto minmax(0,1fr)}.playcard[data-waiting-start="true"]{grid-template-rows:auto auto auto minmax(0,1fr)}.playcard[data-started="true"] .ai-setup{display:none}
  .toolbar{padding:4px 7px;grid-template-columns:minmax(140px,.55fr) minmax(160px,.65fr) 1.4fr;grid-template-areas:"status metrics actions";gap:6px}.status-lockup .ai-state{margin-top:1px}.actions{display:flex;flex-wrap:nowrap;gap:4px}.actions button,.actions select{min-height:34px;padding:4px 7px;font-size:10px}.actions label{display:flex;grid-column:auto}.live-metrics{justify-content:flex-start}.metric,.go-capture-stats{padding:4px 6px}.matchbar{padding:4px 7px;grid-template-columns:minmax(230px,1fr) auto;gap:7px}.match-options{grid-row:auto;display:flex;width:auto}.clock-pair{grid-row:auto;width:auto;min-width:230px}.clock{min-height:34px;padding:4px 8px}.time-control select{min-height:34px}.board-wrap{min-height:0;padding:3px}.ai-setup{padding:4px 7px}.ai-setup select,.ai-setup .setup-action{min-height:34px}
}
:fullscreen .topbar{min-height:46px;height:46px;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))}:fullscreen .shell{height:calc(100dvh - 46px)}:fullscreen .playcard{grid-template-rows:auto auto minmax(0,1fr)}:fullscreen .playcard[data-waiting-start="true"]{grid-template-rows:auto auto auto minmax(0,1fr)}:fullscreen .toolbar{grid-template-columns:minmax(160px,.65fr) minmax(180px,.7fr) auto;grid-template-areas:"status metrics actions";padding:5px 9px;gap:7px}:fullscreen .status-lockup{grid-area:status}:fullscreen .live-metrics{grid-area:metrics;justify-content:flex-start}:fullscreen .actions{grid-area:actions;display:flex;flex-wrap:nowrap}:fullscreen .actions button,:fullscreen .actions select{min-height:36px;padding:5px 8px}:fullscreen .matchbar{padding:5px 9px;grid-template-columns:minmax(240px,1fr) auto}:fullscreen .board-wrap{padding:4px}:fullscreen .notice{top:92px}:fullscreen .playcard[data-waiting-start="true"] .notice{top:134px}
@media(max-width:780px){:fullscreen .toolbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"status metrics" "actions actions"}:fullscreen .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}:fullscreen .actions button,:fullscreen .actions select{min-height:40px}:fullscreen .matchbar{grid-template-columns:1fr}:fullscreen .match-options{display:none}:fullscreen .clock-pair{grid-row:auto}:fullscreen .notice{top:128px}:fullscreen .playcard[data-waiting-start="true"] .notice{top:222px}}
@media(prefers-reduced-motion:reduce){.capture-fx.play,.check-fx.play,.go-captured-stone,.go-capture-text.play,.ai-state[data-busy="true"]{animation:none!important}.go-captured-stone,.go-capture-text{opacity:0!important}}

/* v0.7.0 responsive corrections */
@media(max-width:780px){.top-actions{width:auto;margin:0 0 0 auto;justify-content:flex-end}.top-action{flex:0 0 auto}.playcard[data-opponent="ai"][data-started="true"] .ai-setup{display:none}}
@media(max-width:430px){.top-actions{width:auto;margin:0 0 0 auto}.top-action{flex:0 0 auto}}

/* v0.7.0 mobile density pass */
@media(max-width:780px){.intro{display:block;padding:0 8px;margin:8px 0 10px}.intro>div{display:none}.tabs{margin:0;width:100%}.tabs button{min-height:44px}}
@media(max-width:430px){.actions{grid-template-columns:repeat(auto-fit,minmax(55px,1fr))}.ai-setup{grid-template-columns:repeat(3,minmax(0,1fr))}.ai-setup label:nth-of-type(3){grid-column:auto}.ai-setup .setup-action.primary{grid-column:span 2}.match-options{grid-template-columns:minmax(106px,.7fr) minmax(0,1.3fr)}.volume-control{justify-content:flex-end}.volume-control input{width:min(24vw,96px)}.volume-control output{min-width:30px}.time-control select{max-width:76px}}

/* v0.7.0 stable overlays and post-start focus */
.playcard{position:relative}.notice{position:absolute;left:50%;z-index:20;width:min(620px,calc(100% - 20px));transform:translateX(-50%);border:1px solid #6e594244;border-radius:10px;box-shadow:0 8px 24px rgba(56,33,12,.16);pointer-events:none}.notice[hidden]{display:none}
@media(max-width:780px){.notice{width:calc(100% - 14px);padding:7px 10px}}

/* v0.7.0 interaction polish */
.board-wrap,canvas{-webkit-user-select:none;user-select:none}:fullscreen canvas{touch-action:none}:fullscreen .matchbar{padding-bottom:max(5px,env(safe-area-inset-bottom))}
@media(max-width:1024px) and (orientation:landscape) and (max-height:719px){canvas{touch-action:none}}
