/* Shared UI typography. Board numbers, notation and piece artwork keep their own face. */
:root{font-family:var(--font-body,"Yu Gothic",system-ui,sans-serif);--font-number:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace}
body{font-family:var(--font-body,"Yu Gothic",system-ui,sans-serif)}
button,input,select,textarea{font-family:var(--font-body,"Yu Gothic",system-ui,sans-serif)}
h1,h2,h3,.brand-name,.pause-title,.finale-title,.result-panel h2,.learning-feature h2,.section-num{font-family:var(--font-title,"Yu Mincho",serif)!important;font-weight:500;overflow-wrap:anywhere;word-break:normal}
.brand-name{font-weight:500;letter-spacing:.05em;white-space:normal}
.brand,.header-nav,.header-inner>*{min-width:0}.header-nav{flex-wrap:wrap}
.game-heading h1,.hero h1,.prose h1{line-height:1.5}.game-card h3,.catalog-copy h2,.learning-feature h2{line-height:1.55}
.btn,.mode,.chip,.option{border-radius:9px}.play-panel,.panel,.record-card{border-radius:12px}
.btn,.mode,.chip{white-space:normal;overflow-wrap:anywhere}
.selection-summary,.game-status,.fine-print,.finale-detail,.result-panel p{overflow-wrap:anywhere;min-width:0}
.sudoku-cell,.notes-grid,.number-key,.merge-tile,.mine-cell,.card-corner{font-family:var(--font-number)}
.match-open{min-height:48px;padding:10px 16px;border-radius:9px;font-size:16px}
.match-overlay{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;font-family:var(--font-body);font-weight:500}
.match-setup-dialog{color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:28px 24px 24px;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;font-family:var(--font-body);font-size:16px;line-height:1.65}
.match-setup-dialog::backdrop{background:color-mix(in srgb,var(--ink) 65%,transparent)}
.match-setup-dialog h2{font-size:26px;line-height:1.5;margin:0 28px 8px 0}.match-setup-dialog .setup-intro{color:var(--muted);margin:0 0 20px}
.match-setup-dialog>label,.setup-fields>label{display:grid;gap:6px;margin:14px 0;font-size:15px;font-weight:500}
.match-setup-dialog select{color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:8px;min-height:48px;padding:9px 8px;width:100%;font:inherit;font-size:16px}
.setup-fields{min-width:0}.setup-fields>.setup-check{display:flex;align-items:center;gap:10px;min-height:48px}
.setup-check input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
.setup-actions{display:grid;gap:10px;margin-top:20px}
.match-setup-dialog .setup-actions>.btn,.setup-resume-box>.btn{display:block;min-height:48px;width:100%;margin:0;padding:10px 14px;border-radius:9px;white-space:normal;line-height:1.6}
.setup-resume-box{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.setup-resume-box p{margin:0 0 10px;font-size:14px;line-height:1.7}.setup-stage-note,.replacement-notice{font-size:14px;line-height:1.7}
.match-dismiss{min-width:44px;min-height:44px;right:6px;top:6px;font-family:var(--font-body)}
.match-setup-dialog [hidden]{display:none!important}.match-setup-dialog [role=status]:empty{display:none}
#quiz-root .option{font-family:var(--font-body);min-height:56px;line-height:1.65}
#quiz-root .question-prompt{font-family:var(--font-body)!important;font-weight:500}
.imported-shell [class*="guideLabel"],.imported-shell [class*="checkMark"]{font-family:var(--font-body)}
@media(max-width:600px){.brand-name{font-size:22px}.header-nav{line-height:1.65}.game-heading h1{font-size:24px;line-height:1.5}.match-setup-dialog{padding:26px 18px 20px}.match-setup-dialog h2{font-size:24px}.match-open{width:100%}}
@media(prefers-reduced-motion:reduce){.match-overlay,.match-setup-dialog{animation:none;transition:none}}
