/* The board stays the main workspace; source commentary opens only on request. */
.main-nav{min-width:0;overflow-x:auto;scrollbar-width:none}.main-nav::-webkit-scrollbar{display:none}.nav-button{flex:none;white-space:nowrap}.brand{flex-shrink:0}
@media(max-width:679px){.brand span{display:none}.main-nav{gap:0}.app-header{gap:8px}.nav-button{padding-inline:9px}}
@media(min-width:680px) and (max-width:1049px){.app-header{gap:14px;padding-inline:18px}.main-nav{margin-left:auto}.nav-button{padding-inline:10px}.account{gap:10px}}
@media(min-width:680px) and (max-width:1249px){.brand{width:auto}.brand span{display:none}.account{flex-shrink:0}}
.understanding-view{max-width:1080px;margin:auto;padding:12px 12px 32px}
.understanding-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.understanding-top h1{font-size:16px;letter-spacing:-.3px;line-height:1.4;font-weight:650}
.understanding-top h1 span{display:block;font-size:11px;letter-spacing:0;color:var(--muted);font-weight:450}
.understanding-top .phase-switch{min-width:176px}
.understanding-top .phase-switch button{min-height:44px;padding:6px 12px}
:is(#understanding-status,#sicilian-status){font-size:14px;margin:18px 0}
.understanding-picker{display:flex;align-items:end;gap:12px;margin-bottom:12px;min-width:0}
.understanding-picker label{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1;font-size:11px;color:var(--muted)}
.understanding-view select{min-height:44px;max-width:100%;width:100%;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:16px;padding:8px 28px 8px 10px}
:is(#understanding-count,#sicilian-count){flex-shrink:0;padding-bottom:15px;color:var(--muted);font-size:11px}
.understanding-workspace{display:grid;gap:18px}
.understanding-board-column{width:100%;max-width:480px;justify-self:center;min-width:0}
.understanding-move-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 2px 9px}
.understanding-move-heading strong{font:650 18px ui-monospace,SFMono-Regular,monospace}
.understanding-move-heading span{font-size:12px;color:var(--muted)}
.understanding-board-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px}
.understanding-board-caption>span{font-size:11px;color:var(--muted)}
.understanding-board-caption button{min-height:44px}
.understanding-navigation{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;margin-top:2px}
.understanding-navigation select{font:13px ui-monospace,SFMono-Regular,monospace;text-align:center}
.understanding-navigation .icon-button{border:1px solid var(--line)}
.understanding-explanation{min-width:0}
.understanding-explanation h2{font-size:19px;line-height:1.4;letter-spacing:-.3px;margin-bottom:10px}
:is(#understanding-brief,#sicilian-brief),.understanding-answer p{font-size:15px;line-height:1.7}
:is(#understanding-line-test,#sicilian-line-test){margin-top:8px;min-height:44px}
.understanding-source{margin-top:16px;border-top:1px solid var(--line);padding-top:4px}
.understanding-source summary{font-size:13px;font-weight:550;min-height:44px;padding:14px 0;cursor:pointer}
.understanding-source-caption{font-size:12px;color:var(--muted);margin:0 0 16px}
.understanding-source article{margin-bottom:24px}
.understanding-source h3{font-size:12px;line-height:1.6;font-weight:600;margin:0 0 8px}
.understanding-source article p{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.understanding-source article>a{display:inline-block;color:var(--accent);font-size:13px;line-height:1.5;padding:10px 0;min-height:44px;text-underline-offset:3px}
.understanding-original{margin-top:12px;color:var(--muted)}
.understanding-original summary{font-size:12px;font-weight:450}
.understanding-quiz-hint{font-size:12px;color:var(--muted);margin:0 0 14px}
:is(#understanding-question-line,#sicilian-question-line){font-size:11px;margin-bottom:6px}
.understanding-choices{display:grid;gap:8px}
.understanding-choice{display:flex;gap:10px;align-items:baseline;text-align:left;border:1px solid var(--line);background:var(--surface);padding:12px;font-size:14px;font-weight:450;line-height:1.55;min-height:48px}
.understanding-choice>span:first-child{font:12px ui-monospace,monospace;color:var(--muted);flex-shrink:0}
.understanding-choice:hover{border-color:var(--accent)}
.understanding-choice.correct{border-color:var(--accent);background:var(--accent-light)}
.understanding-choice.incorrect{border-color:var(--error);background:#f6eae6}
.understanding-choice[aria-pressed=true]{box-shadow:inset 3px 0 currentColor}
.understanding-answer{border-left:3px solid var(--accent);margin-top:18px;padding-left:14px}
.understanding-answer strong{font-size:14px;display:block;margin-bottom:7px}
.understanding-answer .understanding-correction{font-size:13px;margin-bottom:8px}
.understanding-quiz-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}
.understanding-quiz-actions button{min-height:44px;font-size:13px}
:is(#understanding-question-next,#sicilian-question-next){margin-left:auto}
.understanding-result{padding:28px 0;max-width:620px;margin:auto}
.understanding-result h2{font-size:24px;letter-spacing:-.5px}
:is(#understanding-result-score,#sicilian-result-score){font-size:21px;font-weight:600;margin:18px 0 6px}
:is(#understanding-result-detail,#sicilian-result-detail){color:var(--muted);font-size:14px}
.understanding-result-actions{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}
.understanding-result>.muted{font-size:12px}
@media(min-width:720px){
  .understanding-view{padding:24px 28px 40px}
  .understanding-top{margin-bottom:20px}.understanding-top h1{font-size:20px}.understanding-top h1 span{display:inline;font-size:14px}.understanding-top h1 span:before{content:"· "}
  .understanding-picker{max-width:540px;margin-bottom:18px}
  .understanding-workspace{--understanding-board:clamp(280px,min(calc(100svh - 380px),calc(100vw - 430px)),480px);grid-template-columns:var(--understanding-board) minmax(0,1fr);gap:30px;align-items:start}
  .understanding-board-column{position:sticky;top:16px}
  .understanding-explanation{padding-top:30px}
}
@media(min-width:1050px){.understanding-view{padding-top:26px}.understanding-workspace{gap:42px}}
@media(max-width:370px){.understanding-top{gap:8px}.understanding-top .phase-switch{min-width:164px}.nav-button{padding-inline:8px}#sicilian-view .understanding-top h1{font-size:15px}}
@media(max-width:719px) and (max-height:600px){.understanding-board-column{max-width:280px}}
