:root{color-scheme:dark;--bg:#0b1d2a;--panel:#122b3d;--text:#f4f0e7;--muted:#b3c4d0;--gold:#e6bb69;--line:#355162;--wood:#d9ac67;--board-size: min(49vw,600px)}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 65% 0,#19364b 0,#0b1d2a 60%);color:var(--text);font-family:"Yu Gothic",Meiryo,sans-serif;font-size:17px;line-height:1.6;min-height:100vh}button,input,select{font:inherit}button,select{color:inherit}button,a,input,select,summary{touch-action:manipulation}button{border:1px solid var(--line);background:#1c394d;border-radius:8px;padding:11px 17px;min-height:48px;cursor:pointer;transition:background .15s,border-color .15s}button:hover:not(:disabled){background:#29495e;border-color:#87a4b5}button:disabled{opacity:.48;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:4px}button.primary{background:linear-gradient(135deg,#f0cf86,#dbac56);color:#182c38;border-color:#f2d497;font-weight:700;box-shadow:0 4px 15px #0003}button.primary:hover:not(:disabled){background:#f5d695;border-color:#fff1cf}button.quiet{background:transparent}.wide{width:100%}.primary span{margin-left:16px}.muted{color:var(--muted)}.gold{color:var(--gold)}.small{font-size:15px}.eyebrow{color:var(--gold);font-size:16px;letter-spacing:.06em;margin:0 0 6px}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand{font-family:"Yu Mincho","Noto Serif JP",serif}h1{font-size:34px;line-height:1.4;margin-bottom:10px;font-weight:600}h2{font-size:25px;font-weight:600;line-height:1.5;margin-bottom:12px}p{margin-bottom:14px}input[type=checkbox],input[type=radio]{accent-color:var(--gold);width:20px;height:20px;flex-shrink:0}select{background:#173347;border:1px solid var(--line);border-radius:8px;padding:9px 40px 9px 15px;min-height:48px}option{background:#173347}a{color:var(--gold)}[hidden]{display:none!important}.topbar{max-width:1640px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 32px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:14px;color:var(--text);text-decoration:none;font-size:26px;font-weight:600;letter-spacing:.07em}.brand-mark{display:inline-grid;place-items:center;width:47px;height:52px;color:var(--gold);border:1px solid #987746;border-radius:15px 15px 5px 5px;font-size:31px}.brand small{font-family:"Yu Gothic",Meiryo,sans-serif;display:block;letter-spacing:.14em;font-size:13px;font-weight:400;color:var(--muted)}.header-actions{display:flex;gap:14px;align-items:center}.save-badge{font-size:14px;color:#bccebd;display:inline-flex;align-items:center;gap:8px}.save-badge:before{content:"";height:7px;width:7px;background:#a8c797;border-radius:50%}main{max-width:1580px;margin:0 auto;padding:32px}.home-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:22px}.home-heading>div{max-width:790px}.home-heading .muted{margin-bottom:0}.home-heading button{flex-shrink:0}.level-section{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:17px 0 26px;border-bottom:1px solid var(--line);margin-bottom:28px}.level-section label{font-weight:600}.level-section select{min-width:200px}.selection-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr);gap:28px;align-items:start}.section-line{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.section-line h2{margin:0}.style-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.style-card{text-align:left;position:relative;min-height:95px;padding:17px 20px;background:#142d3f;display:flex;flex-direction:column;gap:4px}.style-card:hover{background:#1a394e}.style-card[aria-pressed=true]{border-color:var(--gold);box-shadow:inset 4px 0 0 var(--gold);background:linear-gradient(125deg,#344440,#243c44)}.style-card[aria-pressed=true]:after{content:"✓";position:absolute;right:17px;top:15px;color:var(--gold)}.style-card .name{font-family:"Yu Mincho",serif;font-size:23px;line-height:1.5;padding-right:30px;font-weight:600}.style-card .sub{font-size:15px;color:var(--muted)}.style-card .won{font-size:14px;color:#e6d09c;position:absolute;right:16px;bottom:12px}.choice-panel{background:linear-gradient(145deg,#18354a,#102637);border:1px solid var(--line);border-radius:12px;padding:28px;position:sticky;top:22px}.choice-panel h2{font-size:32px;margin-bottom:3px}.reading{margin-bottom:21px;font-size:15px}.focus-box{padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:21px 0}.focus-box span{font-size:15px}.focus-box p{margin:5px 0 0}.choice-panel fieldset{border:0;padding:0;margin:0 0 12px}.choice-panel legend{color:var(--muted);margin-bottom:6px}.choice-panel label{display:flex;gap:10px;align-items:center;padding:8px 0;cursor:pointer}.choice-panel .primary{margin-top:10px}.beginner-card{background:#152f3e;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;gap:25px;padding:40px;min-height:330px}.big-piece{font-family:"Yu Mincho",serif;font-size:72px;color:var(--gold)}.journey{margin-top:30px;border:1px solid var(--line);border-radius:10px;background:#112a3a}.journey summary{padding:19px 24px;cursor:pointer;font-size:23px;font-family:"Yu Mincho",serif}.journey summary .muted{font-size:15px;font-family:"Yu Gothic",sans-serif;margin-left:18px}.journey-body{padding:0 24px 20px}.journey-body p{font-size:16px;margin-bottom:9px}.journey-steps{display:flex;gap:10px;margin:2px 0 20px;flex-wrap:wrap}.journey-step{padding:8px 14px;border:1px solid var(--line);border-radius:7px;display:flex;flex-direction:column;font-size:16px;min-width:95px}.journey-step small{font-size:13px;color:var(--muted)}.journey-step.open{border-color:#857044;background:#313c36}.journey-step.complete{border-color:#809778;background:#263d37}.future{padding-top:17px;margin-top:18px;border-top:1px solid var(--line);display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:15px}.tag{font-size:13px;border:1px solid var(--line);padding:3px 8px;border-radius:4px;color:var(--muted)}.game-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.game-heading h1{font-size:28px;margin:0}.game-tools{display:flex;gap:22px;align-items:center}.clock-toggle{font-size:15px;color:var(--muted);display:flex;align-items:center;gap:8px}.turn-badge{padding:9px 17px;border:1px solid #7f714d;color:#f1d89d;background:#2a3837;border-radius:8px;white-space:nowrap}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:26px;align-items:start}.board-section{min-width:0}.arena{display:grid;grid-template-columns:100px minmax(0,1fr) 100px;gap:14px;align-items:start}.board-frame{padding:23px 24px 12px 12px;background:linear-gradient(115deg,#e4bc80,#c99247);border:5px solid #785126;border-radius:5px;position:relative;box-shadow:0 13px 40px #0006;aspect-ratio:1}.board{display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(9,1fr);width:100%;height:100%;border:1px solid #715026;background:repeating-linear-gradient(94deg,#d7a45d55 0px,#e1b67566 2px,#deb17388 16px,#dbaa6655 19px),linear-gradient(95deg,#e6bf83,#d7a15a);position:relative}.square{padding:0;min-height:0;width:100%;height:100%;aspect-ratio:1;border:0;border-bottom:1px solid #795725aa;border-right:1px solid #795725aa;border-radius:0;background:transparent;position:relative;display:flex;align-items:center;justify-content:center;isolation:isolate}.square:nth-child(9n){border-right:0}.square:nth-child(n+73){border-bottom:0}.square:hover:not(:disabled){background:#fff2bd45;border-color:#795725aa}.square:disabled{opacity:1}.square:focus-visible{outline:3px solid #31627b;outline-offset:-4px;z-index:5}.square.selected{background:#ffe08a;box-shadow:inset 0 0 0 3px #a06e18}.square.legal:after{content:"";position:absolute;z-index:3;background:#306845a8;border:2px solid #214530;border-radius:50%;width:17px;height:17px;bottom:4px;right:4px;box-shadow:0 0 0 2px #ffffc666}.square.last-from{background:#eec26788}.square.last-to{background:#f6d38e;box-shadow:inset 0 0 0 2px #a7722d}.square.preview-from{box-shadow:inset 0 0 0 3px #56a2cd;background:#f0d197}.square.preview-to{box-shadow:inset 0 0 0 4px #325f8e;background:#f4d77e}.square.preview-to:before{content:"候補";position:absolute;left:2px;bottom:0;font-size:10px;color:#132e4a;font-weight:700;z-index:5;line-height:1.3}.piece{font-family:"Yu Mincho","Noto Serif JP",serif;display:flex;align-items:center;justify-content:center;clip-path:polygon(50% 0,86% 14%,100% 100%,0 100%,14% 14%);width:80%;height:90%;background:linear-gradient(110deg,#ffe0a2,#efc477 70%,#d39a3f);color:#322518;font-size:clamp(22px,2.25vw,39px);font-weight:700;line-height:1;text-shadow:0 1px 0 #fff2c2;filter:drop-shadow(0 1px 1px #58340099);padding-top:5px;user-select:none;pointer-events:none}.piece.enemy{transform:rotate(180deg)}.piece.promoted{color:#a32b1a}.files{position:absolute;top:1px;left:12px;right:24px;display:grid;grid-template-columns:repeat(9,1fr);height:22px;align-items:center;text-align:center;font-size:13px;color:#62471e}.ranks{position:absolute;right:2px;top:23px;bottom:12px;display:grid;grid-template-rows:repeat(9,1fr);align-items:center;width:20px;text-align:center;color:#62471e;font-size:13px}.hand-tray{border:1px solid #526275;background:linear-gradient(130deg,#233f4e,#122e40);border-radius:9px;padding:12px 8px;min-height:230px;box-shadow:0 5px 15px #0003}.own-tray{align-self:end;border-color:#897349;background:linear-gradient(130deg,#334244,#1d3541)}.player-label{display:flex;align-items:center;flex-direction:column;margin-bottom:14px;line-height:1.5}.player-label .small{color:var(--muted);font-size:13px}.player-label strong{font-size:20px}.hand-pieces{display:grid;grid-template-columns:1fr;gap:6px}.hand-piece{display:flex;align-items:center;justify-content:center;gap:5px;background:transparent;border-color:#58708066;border-radius:5px;padding:2px;min-height:46px}.hand-piece .piece{width:34px;height:39px;font-size:25px;flex-shrink:0}.hand-piece .hand-number{font-size:16px;min-width:13px}.hand-piece.selected{background:#676342;border-color:var(--gold)}.empty-hand{color:#8ca2b0;font-size:15px;text-align:center;padding:15px 0}.hand-caption{color:var(--muted);font-size:11px;text-align:center;white-space:nowrap;margin:12px 0 0}.move-instruction{display:flex;gap:15px;align-items:center;justify-content:center;min-height:69px;padding:12px 3px;color:#d7e3e7;font-size:16px;text-align:center}.move-instruction button{font-size:14px;min-height:40px;padding:5px 9px}.board-actions{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.board-actions .muted{font-size:15px;margin-left:8px}.save-note{text-align:center;font-size:14px;color:var(--muted);margin:14px 0 0}.analysis-panel{border:1px solid var(--line);border-radius:12px;padding:22px;background:linear-gradient(125deg,#183345,#102635);box-shadow:0 8px 25px #0002}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--line);padding-bottom:14px}.panel-title h2{margin:0;font-size:28px}.percent-labels{display:flex;justify-content:space-between;margin-top:20px}.percent-labels>div{display:flex;flex-direction:column}.percent-labels>div:last-child{text-align:right}.percent-labels span{font-size:14px;color:var(--muted)}.percent-labels strong{font-family:Georgia,serif;font-size:36px;font-weight:400;line-height:1.5}.percent-labels>div:first-child strong{color:#efd18f}.evaluation-bar{height:23px;border:1px solid #8296a4;background:#203e55;border-radius:15px;overflow:hidden}.evaluation-bar>div{height:100%;width:50%;background:linear-gradient(100deg,#d9aa49,#f0cb7c);transition:width .6s;border-right:2px solid #e6deba}.eval-note{font-size:12px;color:#9baebc;margin:9px 0 19px}.consult-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.consult-row label{display:flex;flex-direction:column;cursor:pointer}.consult-row label strong{font-size:21px;font-family:"Yu Mincho",serif}.consult-row label span{font-size:13px;color:var(--muted)}input.switch{appearance:none;-webkit-appearance:none;width:54px;height:31px;border:1px solid #7c929f;background:#2c4352;border-radius:20px;position:relative;cursor:pointer;transition:background .2s;margin:0;flex-shrink:0}input.switch:before{content:"";position:absolute;width:23px;height:23px;border-radius:50%;background:#c4d0d6;left:3px;top:3px;transition:transform .2s}input.switch:checked{background:#9b762d;border-color:#eed08a}input.switch:checked:before{transform:translateX(22px);background:#ffe0a0}#hintContent{padding-top:16px}.candidate-list{display:flex;flex-direction:column;gap:9px;margin-bottom:12px}.candidate{display:flex;gap:10px;padding:12px 10px;text-align:left;align-items:flex-start;background:#173346;min-height:70px}.candidate.selected{border-color:var(--gold);background:#334039}.candidate-number{background:#2f536c;color:#e4eff6;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;flex-shrink:0;font-family:Georgia,serif;font-size:22px}.candidate:first-child .candidate-number{background:var(--gold);color:#20313c}.candidate-body{display:flex;flex-direction:column;min-width:0}.candidate strong{font-family:"Yu Mincho",serif;font-size:21px}.candidate small{font-size:14px;color:var(--muted);line-height:1.6}.chart-heading{font-family:"Yu Mincho",serif;font-size:21px;margin:22px 0 7px;color:#d4e0e6}#historyChart{width:100%;display:block;overflow:visible}.graph-legend{display:flex;justify-content:space-between;color:#99afbd;font-size:12px}.record{margin-top:21px;border-top:1px solid var(--line);padding-top:16px}.record summary{cursor:pointer;font-size:16px;display:list-item}.record summary span{font-size:13px;color:var(--muted);margin-left:9px}.record ol{font-size:15px;color:var(--muted);max-height:240px;overflow:auto;padding-left:33px;line-height:1.9}.result-banner{border:1px solid var(--gold);padding:20px 25px;background:linear-gradient(110deg,#3a453b,#243c45);border-radius:10px;margin-bottom:25px;font-size:21px}.result-banner small{display:block;font-size:16px;color:#d4ded9;margin-top:7px}.error-banner{max-width:1516px;margin:20px auto 0;background:#513538;border:1px solid #af7676;border-radius:8px;padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.error-banner button{white-space:nowrap}.notice{border-left:3px solid #a68a55;background:#263638;padding:12px 18px;margin-bottom:20px;color:#d8d2b8;font-size:15px}footer{max-width:1516px;margin:15px auto 0;border-top:1px solid var(--line);padding:20px 0 27px;color:#8ba1af;font-size:13px;display:flex;gap:15px;justify-content:space-between}dialog{max-width:570px;width:calc(100% - 40px);background:#163247;color:var(--text);border:1px solid #59758a;border-radius:14px;padding:30px;box-shadow:0 30px 150px #0009}dialog::backdrop{background:#03111dd9;backdrop-filter:blur(4px)}dialog h2{font-size:28px}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:26px;flex-wrap:wrap}#familyContent{overflow-wrap:anywhere}.busy .turn-badge{animation:breathe 1.5s infinite}@keyframes breathe{50%{opacity:.5}}@media(min-width:1450px){.game-layout{grid-template-columns:minmax(0,1fr) 360px;gap:32px}.arena{grid-template-columns:110px minmax(0,650px) 110px;gap:18px;justify-content:center}.analysis-panel{padding:26px}.piece{font-size:42px}}@media(max-width:1150px){main{padding:25px 20px}.topbar{padding:18px 20px}.game-layout{grid-template-columns:minmax(0,1fr) 290px;gap:18px}.arena{grid-template-columns:72px minmax(0,1fr) 72px;gap:8px}.hand-tray{padding:10px 3px}.hand-piece .piece{width:29px;height:34px;font-size:22px}.hand-caption{font-size:9px}.player-label strong{font-size:17px}.analysis-panel{padding:18px}.piece{font-size:clamp(19px,2.8vw,32px)}.hand-number{font-size:13px!important}.game-tools{gap:10px}.selection-layout{gap:20px;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr)}.choice-panel{padding:23px}.style-card{padding:15px}.style-card .name{font-size:21px}.style-card .sub{font-size:13px}.home-heading{align-items:start}.home-heading .primary{font-size:15px}.save-badge{display:none}footer{margin:15px 20px 0}}@media(max-width:930px){.game-layout{grid-template-columns:1fr}.arena{grid-template-columns:90px minmax(0,600px) 90px;gap:14px;justify-content:center}.piece{font-size:clamp(25px,5vw,42px)}.analysis-panel{max-width:690px;width:100%;margin:8px auto 0;display:grid;grid-template-columns:1fr 1fr;column-gap:25px}.panel-title{grid-column:1/-1}.percent-labels,.evaluation-bar,.eval-note{grid-column:1}.consult-row{grid-column:2;grid-row:2/5;border-top:0;border-bottom:0;align-self:center}.chart-heading,#historyChart,.graph-legend,.record,#hintContent{grid-column:1/-1}.chart-heading{margin-top:13px}#historyChart{max-height:170px}#hintContent{border-top:1px solid var(--line)}.candidate-list{flex-direction:row}.candidate{flex:1;padding:10px}.candidate-number{width:24px;height:24px;font-size:18px}.candidate strong{font-size:19px}.candidate small{font-size:13px}.selection-layout{grid-template-columns:1fr 300px}.style-grid{grid-template-columns:1fr}.home-heading{display:block}.home-heading .primary{margin-top:18px}.game-heading{align-items:start}.game-tools{flex-direction:column;align-items:flex-end}.hand-tray{padding:12px 6px}.hand-caption{font-size:11px}.hand-piece .piece{width:34px;height:39px;font-size:25px}}@media(max-width:650px){body{font-size:16px}.topbar{padding:14px}.brand{font-size:20px;gap:9px}.brand-mark{width:36px;height:43px;font-size:26px}.brand small{font-size:10px}.header-actions{gap:5px}.header-actions button{font-size:13px;padding:8px 10px;min-height:42px}.header-actions #familyButton{display:none}main{padding:24px 12px}h1{font-size:29px}.selection-layout{grid-template-columns:1fr}.style-grid{grid-template-columns:1fr 1fr;gap:8px}.style-card{min-height:102px;padding:12px}.style-card .name{font-size:20px}.style-card .sub{font-size:12px}.style-card .won{position:static;font-size:12px}.choice-panel{position:static}.level-section{gap:11px}.level-section .muted{font-size:14px;width:100%}.journey summary{padding:17px 16px;font-size:21px}.journey-body{padding:0 16px 17px}.journey summary .muted{font-size:12px;margin-left:8px}.journey-step{font-size:14px;min-width:79px}.game-heading{gap:12px;margin-bottom:15px}.game-heading h1{font-size:23px}.game-heading .eyebrow{font-size:13px}.clock-toggle{font-size:12px}.turn-badge{font-size:13px;padding:5px 9px}.arena{grid-template-columns:1fr 1fr;gap:10px}.board-frame{grid-column:1/-1;grid-row:2;max-width:600px;width:100%;padding:21px 22px 9px 9px;border-width:4px}.files{left:9px;right:22px;font-size:12px}.ranks{top:21px;bottom:9px;font-size:12px;right:1px}.opponent-tray{grid-column:1/-1;grid-row:1}.own-tray{grid-column:1/-1;grid-row:3}.hand-tray{min-height:73px;display:flex;gap:9px;align-items:center;justify-content:flex-start;padding:8px 10px}.player-label{margin:0 6px 0 0;min-width:45px}.player-label strong{font-size:16px}.player-label .small{font-size:12px}.hand-pieces{display:flex;gap:4px;flex-wrap:wrap}.hand-piece{min-height:42px;gap:3px;padding:2px}.hand-piece .piece{width:27px;height:34px;font-size:21px}.hand-caption{display:none}.empty-hand{padding:0 4px}.piece{font-size:clamp(24px,6vw,40px)}.move-instruction{font-size:14px;min-height:57px;gap:8px}.board-actions{gap:8px}.board-actions button{font-size:14px;padding:9px 11px}.board-actions .muted{font-size:13px}.save-note{font-size:12px}.analysis-panel{padding:18px}.candidate-list{flex-direction:column}.candidate strong{font-size:22px}.candidate small{font-size:15px}.eval-note{font-size:10px}.consult-row{gap:7px}.consult-row label strong{font-size:18px}.consult-row label span{font-size:11px}.percent-labels span{font-size:12px}.percent-labels strong{font-size:30px}.beginner-card{padding:25px;gap:20px}.big-piece{font-size:58px}footer{font-size:11px;margin:10px 12px 0;flex-direction:column;gap:3px}.error-banner{margin:12px;font-size:14px;align-items:start;flex-direction:column}.result-banner{font-size:18px;padding:16px}.result-banner small{font-size:14px}}
.piece.compound{writing-mode:vertical-rl;text-orientation:upright;font-size:clamp(13px,1.45vw,24px);letter-spacing:-.1em;padding-top:3px}.square .piece.compound{line-height:1}@media(max-width:930px){.piece.compound{font-size:clamp(17px,3.3vw,27px)}}@media(max-width:650px){.piece.compound{font-size:clamp(14px,3.7vw,24px)}}
@media(min-width:931px){.game-open .topbar{padding-top:12px;padding-bottom:12px}.game-open main{padding-top:20px;padding-bottom:16px}.game-heading{margin-bottom:18px}.game-open .arena{grid-template-columns:90px minmax(0,min(650px,calc(100vh - 310px))) 90px;gap:14px;justify-content:center}.move-instruction{min-height:49px;padding:8px 0}.save-note{margin-top:10px;font-size:13px}.game-open .square .piece{font-size:clamp(21px,3.5vh,40px)}.game-open .square .piece.compound{font-size:clamp(14px,2.1vh,24px)}}
.opponent-tray .hand-piece:disabled{opacity:1}

/* Approved classroom layout: the board, latest reply, and full move history stay together. */
:root{--cyan:#42d8ef;--sidebar-width:clamp(198px,17vw,270px);--analysis-width:clamp(248px,24vw,350px);--board-limit:min(720px,calc(100dvh - 286px));--frame-top:25px;--frame-right:25px;--frame-bottom:12px;--frame-left:12px}
body{background:radial-gradient(ellipse at 56% 8%,#123b50 0,#082333 47%,#061b28 100%)}
.topbar{max-width:1840px;padding:17px 28px;gap:20px}
.brand{font-size:clamp(24px,2.1vw,35px);white-space:nowrap;gap:13px}
.brand-mark{width:49px;height:56px;font-size:36px;border:2px solid #9b793d;border-radius:12px;background:linear-gradient(145deg,#143445,#081f2f);box-shadow:inset 0 1px 1px #f9d79822}
.brand small{font-size:12px;letter-spacing:.16em}
.header-actions{gap:13px;flex-wrap:wrap;justify-content:flex-end}
.header-actions button{font-size:16px;min-height:46px;padding:8px 17px}
.save-badge{white-space:nowrap;font-size:13px}
.voice-control{display:grid;grid-template-columns:auto 52px;align-items:center;gap:0 9px;font-size:15px;line-height:1.5;cursor:pointer;padding-left:14px;border-left:1px solid var(--line)}
.voice-control input.switch{width:52px;height:30px}
.voice-control input.switch:checked:before{transform:translateX(21px)}
.voice-control .audio-status{grid-column:1/-1;max-width:165px;text-align:center;font-size:11px;color:#a9c6d7;line-height:1.3}
.voice-control input.switch:checked,.sound-row input.switch:checked{background:#136b9e;border-color:#54bde8}
.voice-control input.switch:checked:before,.sound-row input.switch:checked:before{background:#d8f2ff}
.sound-settings{position:relative;align-self:center;z-index:30;font-size:15px}
.sound-settings>summary{list-style:none;border:1px solid var(--line);border-radius:8px;padding:10px 12px;cursor:pointer;min-height:46px;background:#102e40;white-space:nowrap}
.sound-settings>summary::-webkit-details-marker{display:none}
.sound-settings[open]>summary{border-color:#65a1ba;background:#174258}
.sound-popover{position:absolute;top:calc(100% + 10px);right:0;width:260px;padding:19px;border:1px solid #456c82;border-radius:11px;background:#112e41;box-shadow:0 12px 36px #0008}
.sound-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px;font-size:17px}
.volume-label{font-size:14px;display:block;margin-bottom:4px;color:var(--muted)}
#bgmVolume{width:100%;accent-color:#e6bb69;cursor:pointer;min-height:28px}
#bgmStatus{margin:10px 0 0;font-size:12px}
main{max-width:1840px;padding:28px;margin:0 auto}
.game-open .topbar{padding-top:13px;padding-bottom:13px}
.game-open main{padding-top:18px;padding-bottom:12px}
.game-heading{display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr) var(--analysis-width);gap:22px;align-items:center;margin-bottom:16px}
.game-heading h1{font-size:clamp(22px,1.7vw,29px);line-height:1.45;white-space:nowrap}
.game-context .eyebrow{font-size:15px;margin-bottom:5px}
.game-tools{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.turn-badge{padding:9px 15px;font-size:17px;background:linear-gradient(135deg,#3c493e,#17313b);border-color:#a28945}
.clock-toggle{font-size:12px;gap:5px;line-height:1.4}
.clock-toggle input{width:15px;height:15px}
.last-move-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:74px;padding:12px 18px;border:1px solid #156189;background:linear-gradient(110deg,#0a3c55,#084866 65%,#06344d);border-radius:10px;box-shadow:inset 0 1px 0 #8fd6ff0c}
.last-move-main{display:flex;align-items:center;gap:15px;flex-wrap:wrap;min-width:0;line-height:1.35}
.last-move-caption{font-family:"Yu Mincho","Noto Serif JP",serif;font-size:20px;white-space:nowrap}
#lastMoveLabel{font-family:"Yu Mincho","Noto Serif JP",serif;font-size:clamp(22px,2.1vw,36px);font-weight:600;letter-spacing:.04em;white-space:nowrap}
.last-move-route{font-size:15px;color:#aed3e5;border-left:1px solid #47758b;padding-left:15px;white-space:nowrap}
.last-move-route:empty{display:none}
.replay-move{flex-shrink:0;display:flex;align-items:center;gap:9px;font-size:14px;padding:8px 12px;min-height:43px;background:#092f48;border-color:#4b7e99}
.replay-move>span:first-child{color:#c8f0ff;font-size:21px;line-height:1}
.game-layout{display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr) var(--analysis-width);gap:22px;align-items:start}
.game-sidebar{height:var(--board-limit);min-height:370px;display:flex;flex-direction:column;gap:16px;min-width:0}
.hand-tray{border:1px solid #37627b;border-radius:9px;background:linear-gradient(135deg,#10394d,#0a2b3e);box-shadow:inset 0 1px 0 #c5eaff0d,0 5px 18px #0002;padding:16px;min-height:0}
.opponent-tray{width:100%;flex-shrink:0;max-height:215px;overflow:auto}
.opponent-tray .player-label{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:6px;line-height:1.4;margin:0 0 12px}
.opponent-tray .player-label .small,.opponent-tray .player-label strong{font-size:17px;color:#c6dce7;font-weight:500}
.opponent-tray .tray-title{font-size:16px;color:#c6dce7;margin-left:6px}
.opponent-tray .hand-pieces{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;min-height:37px}
.opponent-tray .empty-hand{padding:5px 0;font-size:16px}
.opponent-tray .hand-piece{padding:2px 4px;min-height:44px;gap:4px}
.opponent-tray .hand-piece .piece{width:30px;height:35px;font-size:23px}
.move-history{display:flex;flex-direction:column;flex:1;min-height:170px;border:1px solid #28566f;border-radius:9px;background:linear-gradient(135deg,#0b2d42,#092638);padding:14px 12px 9px;overflow:hidden}
.history-heading{display:flex;align-items:baseline;justify-content:space-between;gap:5px;padding:0 4px 10px;border-bottom:1px solid #315469}
.history-heading h2{font-size:23px;white-space:nowrap;margin:0}
.history-heading .small{font-size:12px;white-space:nowrap}
.history-empty{font-size:14px;line-height:1.8;color:#9fb8c6;padding:24px 8px;text-align:center;margin:0}
#moveRecord{flex:1;min-height:0;margin:0;padding:0;list-style:none;overflow:auto;overscroll-behavior:contain;scrollbar-color:#47788e #0c2637;scrollbar-width:thin}
.move-row{display:grid;grid-template-columns:22px 42px minmax(0,1fr);align-items:center;gap:7px;min-height:49px;padding:10px 6px;border-bottom:1px solid #285064;position:relative;font-size:16px;line-height:1.4}
.move-number{font-size:14px;color:#a8c0cf;font-variant-numeric:tabular-nums}
.move-owner{font-size:13px;white-space:nowrap;color:#aacbdf}
.move-row.human .move-owner{color:#efc564}
.move-notation{font-family:"Yu Mincho","Noto Serif JP",serif;font-size:22px;white-space:nowrap;letter-spacing:0}
.move-row.latest{border:1px solid #28b8e5;border-radius:7px;background:linear-gradient(100deg,#0c4b6b,#105878);box-shadow:inset 0 0 14px #00a3df12;color:#effaff;margin-top:2px;min-height:60px;padding-bottom:19px}
.latest-tag{position:absolute;right:6px;bottom:1px;font-size:9px;color:#08364d;background:#70d5f4;line-height:1.4;padding:0 5px;border-radius:8px;white-space:nowrap}
.history-latest{min-height:29px;padding:4px 2px;font-size:11px;border:0;align-self:center;color:#98c7dd;margin-top:4px}
.board-section{min-width:0}
.game-open .arena,.arena{display:flex;gap:12px;align-items:flex-start;justify-content:center;min-width:0}
.board-frame{--frame-top:25px;--frame-right:25px;--frame-bottom:12px;--frame-left:12px;width:min(var(--board-limit),calc(100% - 90px));flex:0 0 auto;max-width:none;padding:var(--frame-top) var(--frame-right) var(--frame-bottom) var(--frame-left);border:5px solid #956322;border-radius:5px;aspect-ratio:1;background:linear-gradient(110deg,#e8c785,#dcb067 65%,#c88f3e);box-shadow:inset 0 1px 1px #fff1b877,0 12px 28px #0006}
.board{border-color:#70502b;background:repeating-linear-gradient(92deg,#e2b87400 0px,#c7954c18 1px,#f5d79912 3px,#d0a0520e 11px,#f6d69215 23px),linear-gradient(95deg,#efd08e,#e9be73 64%,#dfaf63)}
.square{border-bottom:1px solid #8b672dbb;border-right:1px solid #8b672dbb;overflow:visible}
.square.last-from{background:#eec26744;box-shadow:inset 0 0 0 2px #ba91432b}
.square.last-to{background:#f6d38e77;box-shadow:inset 0 0 0 2px #bd954688}
.square.opponent-from{background:#95edf227;box-shadow:inset 0 0 0 2px #32ceeab3}
.square.opponent-to{background:#7cdef247;box-shadow:inset 0 0 0 3px #25ddf3}
.square.selected{background:#ffe08add;box-shadow:inset 0 0 0 3px #a67320}
.square.preview-from{background:#dbcafa77;box-shadow:inset 0 0 0 3px #7560b8}
.square.preview-to{background:#ddc7f477;box-shadow:inset 0 0 0 4px #7856af}
.square.preview-to:before{color:#4a2877}
.square.legal:after{width:13px;height:13px;bottom:3px;right:3px;border-width:1px}
.piece{--piece-cut:polygon(50% 0,86% 15%,100% 94%,89% 100%,11% 100%,0 94%,14% 15%);position:relative;clip-path:none;background:transparent;isolation:isolate;filter:drop-shadow(0 2px 1px #77511e9e);width:83%;height:88%;padding:0;display:flex;align-items:center;justify-content:center;color:#251b10;text-shadow:0 1px 0 #fff2c6;font-family:"Yu Mincho","HGS行書体","BIZ UDPMincho",serif;font-weight:900;line-height:1;writing-mode:horizontal-tb;text-orientation:mixed;letter-spacing:0}
.piece:before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(120deg,#fff1b1 0,#e3b564 30%,#ba8130 76%,#85531f);clip-path:var(--piece-cut)}
.piece:after{content:"";position:absolute;inset:1px 2px 3px;z-index:-1;clip-path:var(--piece-cut);background:repeating-linear-gradient(97deg,#9e5c1210 0,#eec56c10 1px,#fff6cf19 2px,#fbdc9733 9px),linear-gradient(115deg,#ffeaba,#f5d99a 30%,#f0c97b 68%,#dfaa55);box-shadow:inset 0 0 5px #fff6be}
.piece-text{position:relative;display:block;padding-top:3px;transform:scaleX(.95);font-size:inherit;line-height:1;letter-spacing:-.03em}
.piece.enemy{transform:rotate(180deg)}
.piece.promoted{color:#a52917}
.game-open .square .piece,.square .piece{font-size:clamp(24px,3.6vh,43px)}
.piece.compound{writing-mode:horizontal-tb;letter-spacing:0;padding-top:0}
.game-open .square .piece.compound,.square .piece.compound{font-size:clamp(15px,2.25vh,26px)}
.piece.compound .piece-text{writing-mode:vertical-rl;text-orientation:upright;letter-spacing:-.08em;padding-top:2px;line-height:1;transform:scaleX(.95)}
.files{top:2px;left:var(--frame-left);right:var(--frame-right);height:21px;font-size:15px;font-family:Georgia,"Yu Mincho",serif;color:#503719}
.ranks{right:1px;top:var(--frame-top);bottom:var(--frame-bottom);width:23px;font-family:"Yu Mincho",serif;font-size:14px;color:#503719}
#moveArrow{position:absolute;left:var(--frame-left);top:var(--frame-top);width:calc(100% - var(--frame-left) - var(--frame-right));height:calc(100% - var(--frame-top) - var(--frame-bottom));overflow:visible;pointer-events:none;z-index:8;filter:drop-shadow(0 1px 1px #0b365aaa)}
.own-tray{width:78px;flex:0 0 78px;align-self:flex-end;padding:13px 5px;border-color:#997a3a;background:linear-gradient(135deg,#293e3f,#102c3b);max-height:var(--board-limit);overflow:auto}
.own-tray .player-label{display:flex;align-items:center;flex-direction:column;gap:1px;margin-bottom:13px}
.own-tray .player-label .small{font-size:12px}
.own-tray .player-label strong{font-size:17px}
.own-tray .hand-pieces{display:grid;grid-template-columns:1fr;gap:6px}
.hand-piece .piece{width:33px;height:40px;font-size:25px}
.hand-piece{padding:3px 2px;gap:4px;min-height:47px}
.hand-piece .hand-number{font-size:13px!important;min-width:9px}
.hand-piece.last-drop{box-shadow:inset 0 0 0 2px #42d8ef;background:#164758}
.own-tray .hand-caption{font-size:9px;white-space:normal;line-height:1.5;margin-top:10px}
.own-tray .empty-hand{padding:17px 0;font-size:15px}
.move-instruction{min-height:35px;padding:7px 0;font-size:14px;line-height:1.5;gap:10px}
.move-instruction button{font-size:12px;min-height:30px;padding:3px 7px}
.board-actions{gap:11px;flex-wrap:wrap}
.board-actions button{font-size:17px;min-height:46px;padding:8px 17px}
.board-actions .muted{font-size:14px;margin-left:3px}
.save-note{font-size:12px;margin-top:8px}
.analysis-panel{padding:24px 22px;border-color:#28566d;background:linear-gradient(135deg,#0e3247,#092739);display:block;width:auto;max-width:none;margin:0;box-shadow:inset 0 1px 0 #ace5ff08,0 8px 25px #0002}
.panel-title h2{font-size:29px}
.panel-title{padding-bottom:17px}
.percent-labels{margin-top:19px;gap:12px}
.percent-labels span{font-size:14px}
.percent-labels strong{font-size:44px}
.percent-labels>div:last-child strong{color:#9fd8f7}
.evaluation-bar{height:25px;background:linear-gradient(90deg,#238fc4,#1764a7);border-color:#6f9eaf}
.eval-note{font-size:11px;margin-bottom:21px}
.consult-row{padding:20px 0}
.consult-row label strong{font-size:23px}
.consult-row label span{font-size:13px}
.chart-heading{font-size:23px;margin-top:23px}
#historyChart{max-height:none;width:100%}
.candidate-list{flex-direction:column}
.candidate{padding:10px;flex:initial}
.candidate strong{font-size:21px}
.candidate small{font-size:14px}
.result-banner{margin-bottom:18px}
footer{max-width:1784px;margin:12px 28px 0;padding-top:16px}
@media(min-width:1840px){footer{margin-left:auto;margin-right:auto}}
@media(max-width:1450px) and (min-width:901px){
 :root{--sidebar-width:208px;--analysis-width:266px;--board-limit:min(660px,calc(100dvh - 281px))}
 .topbar,.game-open .topbar{padding:12px 22px}.brand{font-size:26px}.brand-mark{width:43px;height:49px;font-size:32px}.brand small{font-size:11px}
 .header-actions{gap:9px}.header-actions button{font-size:14px;min-height:42px;padding:8px 11px}.save-badge{font-size:11px}.voice-control{font-size:13px;padding-left:9px;gap:0 6px}.sound-settings{font-size:13px}.sound-settings>summary{min-height:42px;padding:10px}.sound-popover{font-size:16px}
 .game-open main{padding:15px 22px 12px}.game-heading,.game-layout{gap:16px}.game-heading{margin-bottom:13px}.game-heading h1{font-size:23px}.game-context .eyebrow{font-size:14px}
 .last-move-banner{padding:10px 13px;min-height:72px;gap:8px}.last-move-main{gap:7px 10px}.last-move-caption{font-size:17px}#lastMoveLabel{font-size:28px}.last-move-route{font-size:13px;padding-left:10px}.replay-move{font-size:12px;gap:5px;padding:7px;min-height:40px}.replay-move>span:first-child{font-size:17px}.turn-badge{font-size:15px;padding:8px 12px}
 .hand-tray{padding:12px}.opponent-tray .player-label{gap:4px;margin-bottom:9px}.opponent-tray .player-label .small,.opponent-tray .player-label strong{font-size:15px}.opponent-tray .tray-title{font-size:14px;margin-left:4px}.opponent-tray{max-height:178px}
 .game-sidebar{gap:13px;min-height:350px}.move-history{padding:12px 9px 6px}.history-heading{gap:4px;padding:0 3px 9px}.history-heading h2{font-size:21px}.history-heading .small{font-size:11px}.move-row{grid-template-columns:20px 35px minmax(0,1fr);gap:5px;min-height:44px;padding:8px 5px}.move-notation{font-size:20px}.move-owner{font-size:11px}.move-number{font-size:12px}.move-row.latest{min-height:54px;padding-bottom:17px}.history-latest{font-size:10px}
 .game-open .arena,.arena{gap:9px}.board-frame{width:min(var(--board-limit),calc(100% - 79px));--frame-top:22px;--frame-right:22px;--frame-bottom:10px;--frame-left:10px;border-width:4px}.own-tray{width:70px;flex-basis:70px;padding:11px 4px}.own-tray .player-label strong{font-size:16px}.hand-piece .piece{width:29px;height:36px;font-size:23px}.hand-piece{min-height:42px;gap:2px}.hand-piece .hand-number{font-size:12px!important}.files{height:19px;font-size:13px}.ranks{font-size:13px;width:20px}.own-tray .hand-caption{font-size:9px}.game-open .square .piece,.square .piece{font-size:clamp(23px,3.8vh,36px)}.game-open .square .piece.compound,.square .piece.compound{font-size:clamp(14px,2.2vh,22px)}
 .analysis-panel{padding:20px 17px}.panel-title h2{font-size:26px}.panel-title{padding-bottom:13px}.percent-labels{margin-top:16px}.percent-labels span{font-size:12px}.percent-labels strong{font-size:37px}.evaluation-bar{height:22px}.eval-note{font-size:10px;margin:7px 0 15px}.consult-row{padding:17px 0}.consult-row label strong{font-size:21px}.consult-row label span{font-size:12px}.chart-heading{font-size:21px;margin-top:18px}.graph-legend{font-size:11px}.board-actions button{font-size:15px;padding:8px 14px;min-height:44px}.move-instruction{font-size:13px;min-height:34px}.save-note{font-size:11px;margin-top:7px}
}
@media(max-width:1150px) and (min-width:901px){
 :root{--sidebar-width:174px;--analysis-width:222px}.topbar,.game-open .topbar{padding-left:16px;padding-right:16px}.brand{font-size:23px}.header-actions{gap:7px}.header-actions .save-badge{display:none}.game-open main{padding-left:16px;padding-right:16px}.game-layout,.game-heading{gap:12px}.game-context h1{font-size:20px}.game-context .eyebrow{font-size:13px}.last-move-banner{padding:9px 10px}.last-move-caption{font-size:15px}#lastMoveLabel{font-size:23px}.last-move-route{font-size:12px;padding-left:7px}.last-move-main{gap:4px 8px}.replay-move{font-size:11px;max-width:73px;line-height:1.4;padding:6px;gap:3px}.replay-move>span:first-child{display:none}.turn-badge{font-size:13px}.clock-toggle{font-size:11px}.history-heading h2{font-size:18px}.history-heading .small{font-size:10px}.move-row{grid-template-columns:18px 28px minmax(0,1fr);gap:4px;padding-left:3px;padding-right:3px}.move-owner{font-size:10px}.move-notation{font-size:18px}.move-number{font-size:11px}.hand-tray{padding:10px}.opponent-tray .player-label .small,.opponent-tray .player-label strong,.opponent-tray .tray-title{font-size:13px}.opponent-tray .tray-title{margin-left:1px}.analysis-panel{padding:17px 13px}.panel-title h2{font-size:23px}.percent-labels span{font-size:11px}.percent-labels strong{font-size:34px}.consult-row{gap:9px}.consult-row label strong{font-size:19px}.consult-row label span{font-size:10px}.chart-heading{font-size:20px}.game-open .arena,.arena{gap:7px}.board-frame{width:min(var(--board-limit),calc(100% - 67px));--frame-left:8px;--frame-right:20px;--frame-top:20px;--frame-bottom:8px}.own-tray{width:60px;flex-basis:60px;padding:10px 3px}.own-tray .player-label strong{font-size:14px}.own-tray .hand-caption{font-size:8px}.hand-piece .piece{width:25px;height:31px;font-size:20px}.hand-piece .hand-number{font-size:10px!important}.files{font-size:11px;height:17px}.ranks{font-size:11px;width:18px}.game-open .square .piece,.square .piece{font-size:clamp(19px,2.7vw,30px)}.game-open .square .piece.compound,.square .piece.compound{font-size:clamp(12px,1.65vw,19px)}
}
@media(max-width:900px){
 :root{--board-limit:660px;--sidebar-width:185px}.topbar,.game-open .topbar{padding:13px 18px;gap:12px;align-items:flex-start}.brand{font-size:25px;gap:10px}.brand-mark{width:41px;height:49px;font-size:31px}.brand small{font-size:10px}.header-actions{gap:8px;max-width:320px}.save-badge{display:none}.header-actions button{font-size:12px;min-height:37px;padding:7px 10px}.voice-control{padding-left:0;border-left:0;font-size:12px;grid-template-columns:auto 46px}.voice-control input.switch{width:46px;height:27px}.voice-control input.switch:before{width:19px;height:19px}.voice-control input.switch:checked:before{transform:translateX(19px)}.audio-status{font-size:10px!important}.sound-settings{font-size:12px}.sound-settings>summary{padding:7px 9px;min-height:37px}
 main,.game-open main{padding:22px 16px}.game-heading{display:grid;grid-template-columns:1fr auto;gap:12px;margin-bottom:17px}.game-context h1{font-size:24px}.game-context .eyebrow{font-size:14px}.game-tools{grid-column:2;grid-row:1;gap:6px}.turn-badge{font-size:14px;padding:8px 12px}.clock-toggle{font-size:11px}.last-move-banner{grid-row:2;grid-column:1/-1;min-height:64px;padding:11px 14px}.last-move-main{gap:9px 13px}.last-move-caption{font-size:18px}#lastMoveLabel{font-size:29px}.last-move-route{font-size:14px}.replay-move{font-size:13px}
 .game-layout{grid-template-columns:185px minmax(0,1fr);gap:16px}.game-sidebar{height:540px;min-height:0;gap:13px}.move-history{min-height:270px}.history-heading h2{font-size:19px}.history-heading .small{font-size:10px}.move-history{padding:12px 8px 7px}.move-row{grid-template-columns:18px 30px minmax(0,1fr);gap:4px;padding:8px 3px;min-height:45px}.move-owner{font-size:10px}.move-number{font-size:11px}.move-notation{font-size:18px}.move-row.latest{padding-bottom:17px;min-height:53px}.opponent-tray{max-height:170px;padding:12px}.opponent-tray .player-label{gap:4px}.opponent-tray .player-label .small,.opponent-tray .player-label strong,.opponent-tray .tray-title{font-size:13px}.opponent-tray .tray-title{margin-left:0}
 .game-open .arena,.arena{display:flex;gap:10px;flex-direction:column;align-items:stretch}.board-frame{width:100%;max-width:660px;margin:auto;--frame-top:22px;--frame-right:22px;--frame-bottom:10px;--frame-left:10px;border-width:4px;order:0}.own-tray{width:auto;max-width:none;flex:none;max-height:none;min-height:74px;display:flex;gap:13px;align-items:center;align-self:stretch;padding:10px 12px;order:1}.own-tray .player-label{margin:0;min-width:49px}.own-tray .player-label strong{font-size:16px}.own-tray .hand-pieces{display:flex;flex-wrap:wrap;gap:6px}.own-tray .hand-caption{margin:0 0 0 auto;font-size:10px;max-width:45px}.hand-piece .piece{width:28px;height:34px;font-size:22px}.hand-piece .hand-number{font-size:12px!important}.hand-piece{min-height:39px}.own-tray .empty-hand{padding:2px 5px}.files{height:19px;font-size:13px}.ranks{font-size:13px;width:20px}.game-open .square .piece,.square .piece{font-size:clamp(22px,3.5vw,35px)}.game-open .square .piece.compound,.square .piece.compound{font-size:clamp(13px,2.15vw,22px)}
 .analysis-panel{grid-column:1/-1;max-width:none;margin-top:6px;padding:22px;display:grid;grid-template-columns:1fr 1fr;column-gap:28px}.panel-title{grid-column:1/-1}.percent-labels,.evaluation-bar,.eval-note{grid-column:1}.consult-row{grid-column:2;grid-row:2/5;align-self:center;border:0;padding:0}.chart-heading,#historyChart,.graph-legend,#hintContent{grid-column:1/-1}.chart-heading{margin-top:14px}#historyChart{max-height:180px}.candidate-list{flex-direction:row}.candidate{flex:1;min-width:0;gap:7px}.candidate strong{font-size:18px}.candidate small{font-size:12px}.candidate-number{width:24px;height:24px;font-size:18px}.move-instruction{font-size:13px;min-height:40px}.board-actions{gap:8px}.board-actions button{font-size:14px;min-height:42px;padding:8px 12px}.save-note{font-size:11px}footer{margin:10px 16px 0}
}
@media(max-width:650px){
 .topbar,.game-open .topbar{padding:12px;align-items:center;gap:10px;flex-wrap:wrap}.brand{font-size:23px}.brand-mark{width:35px;height:43px;font-size:28px}.brand small{font-size:10px}.header-actions{max-width:none;width:100%;justify-content:flex-end;gap:10px}.header-actions #familyButton{display:inline-block}.voice-control{margin-right:auto}.sound-settings>summary{min-height:37px}.header-actions button{font-size:12px;min-height:37px;padding:7px 9px}.sound-popover{right:-100px;width:250px}
 main,.game-open main{padding:20px 12px}.game-heading{gap:10px}.game-context h1{font-size:21px}.game-context .eyebrow{font-size:13px}.turn-badge{font-size:12px;padding:7px 9px}.last-move-banner{padding:10px;min-height:68px;gap:8px}.last-move-caption{font-size:15px}#lastMoveLabel{font-size:23px}.last-move-main{gap:4px 10px}.last-move-route{font-size:12px;padding-left:0;border-left:0;flex-basis:100%}.replay-move{max-width:85px;font-size:11px;gap:4px;line-height:1.4;padding:7px;min-height:43px}.replay-move>span:first-child{font-size:17px}
 .game-layout{display:flex;flex-direction:column;gap:16px}.board-section{width:100%;order:0}.game-sidebar{order:1;width:100%;height:auto;display:grid;grid-template-columns:1fr;gap:12px}.opponent-tray{max-height:none;min-height:0;padding:12px;display:block}.opponent-tray .player-label{margin-bottom:9px;min-width:0;gap:6px}.opponent-tray .player-label .small,.opponent-tray .player-label strong,.opponent-tray .tray-title{font-size:15px}.opponent-tray .hand-pieces{justify-content:flex-start;min-height:25px}.opponent-tray .empty-hand{padding:0 3px}.move-history{height:315px;min-height:0;flex:none;padding:14px 12px 8px}.history-heading h2{font-size:23px}.history-heading .small{font-size:12px}.move-row{grid-template-columns:28px 58px minmax(0,1fr);gap:10px;padding:9px 8px;min-height:48px}.move-owner{font-size:14px}.move-number{font-size:14px}.move-notation{font-size:23px}.move-row.latest{padding-bottom:10px;min-height:51px;padding-right:42px}.latest-tag{bottom:17px;right:8px;font-size:10px}.history-latest{font-size:12px;min-height:34px}.history-empty{padding:17px 8px}
 .board-frame{grid-column:auto;grid-row:auto;--frame-top:21px;--frame-right:21px;--frame-bottom:9px;--frame-left:9px}.own-tray{grid-column:auto;grid-row:auto;min-height:68px;gap:9px;padding:9px 11px;display:flex}.own-tray .player-label{min-width:49px}.own-tray .hand-caption{display:block;font-size:9px}.own-tray .hand-pieces{gap:4px}.hand-piece{padding:2px;min-height:39px}.hand-piece .piece{width:28px;height:33px;font-size:22px}.hand-piece .hand-number{font-size:11px!important}.files{font-size:12px;height:18px}.ranks{font-size:12px;width:19px}.game-open .square .piece,.square .piece{font-size:clamp(24px,6vw,39px)}.game-open .square .piece.compound,.square .piece.compound{font-size:clamp(14px,3.7vw,24px)}
 .analysis-panel{order:2;width:100%;padding:18px;column-gap:18px;margin-top:0}.panel-title h2{font-size:26px}.percent-labels span{font-size:11px}.percent-labels strong{font-size:34px}.consult-row{gap:9px}.consult-row label strong{font-size:20px}.consult-row label span{font-size:11px}.candidate-list{flex-direction:column}.candidate strong{font-size:22px}.candidate small{font-size:14px}.chart-heading{font-size:22px}.eval-note{font-size:9px}.board-actions button{font-size:14px;min-height:44px}.move-instruction{font-size:13px}.save-note{font-size:11px}.board-actions .muted{font-size:13px}footer{margin:12px 12px 0}
}
@media(max-width:900px){
 .game-layout{display:flex;flex-direction:column;gap:16px}.game-sidebar{display:contents}.game-layout>.board-section{order:0;width:100%;max-width:750px;margin:0 auto}.game-sidebar>.opponent-tray{order:-1;width:100%;max-height:none}.game-sidebar>.move-history{order:1;width:100%;height:320px;min-height:0;flex:none}.game-layout>.analysis-panel{order:2;width:100%}.opponent-tray .hand-pieces{justify-content:flex-start;min-height:26px}.opponent-tray .player-label{margin-bottom:9px}.move-row{grid-template-columns:28px 58px minmax(0,1fr);gap:10px}.move-number{font-size:14px}.move-owner{font-size:14px}.move-notation{font-size:23px}.history-heading h2{font-size:23px}.history-heading .small{font-size:12px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.opponent-tray.last-drop{border-color:#42d8ef;box-shadow:inset 0 0 0 1px #42d8ef;background:#164758}

.session-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;padding:10px 28px 0}
.session-actions button{min-height:44px;padding:8px 17px;font-size:16px}
#suspendButton{border-color:#b99859;color:#f6d695}
#suspendDialog{width:min(650px,calc(100vw - 32px));padding:30px}
#suspendDialog h2{font-size:30px;margin:0 0 18px}
#suspendMessage{font-size:22px;line-height:1.7}
#suspendDetail{font-size:17px;line-height:1.6;overflow-wrap:anywhere}
#suspendDialog .dialog-actions{flex-wrap:wrap;gap:12px;margin-top:25px}
#suspendDialog button{font-size:18px;min-height:50px}
#suspendDialog[data-phase="error"] h2{color:#ffc29f}
@media(max-width:650px){.session-actions{padding:8px 12px 0}.session-actions button{font-size:14px}#suspendDialog{padding:22px}#suspendDialog h2{font-size:25px}#suspendMessage{font-size:19px}}
