*{box-sizing:border-box} :root{--ink:#132d3e;--muted:#687985;--line:#dce3e7;--paper:#fff;--bg:#f4f7f9;--accent:#bf462e;--accent-pale:#fcf0ed;--green:#21715a}body{margin:0;color:var(--ink);font:16px/1.6 -apple-system,BlinkMacSystemFont,'Segoe UI','Noto Sans KR',sans-serif;background:var(--bg);word-break:keep-all}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button{transition:background .15s,color .15s,transform .15s}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #cd715d;outline-offset:4px}button{color:inherit}a{color:inherit}h1,h2,h3,p{margin:0}button[hidden],[hidden]{display:none!important}.header{height:94px;display:flex;justify-content:space-between;align-items:center;padding:0 max(5vw,24px);border-bottom:1px solid var(--line);background:#fff}.brand{display:flex;align-items:center;gap:12px;text-decoration:none}.brand strong{font-size:25px;letter-spacing:-1px}.brand-mark{display:block;flex:none;object-fit:contain;width:44px;height:44px}.brand-sub{border-left:1px solid var(--line);padding-left:18px;margin-left:7px;font-size:14px;color:var(--muted)}main{max-width:1160px;margin:auto;padding:40px 32px 0}.heading-row{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}.eyebrow{font-size:13px;font-weight:650;letter-spacing:.07em;color:var(--muted)}h1{font-size:32px;font-weight:700;letter-spacing:-1.2px;margin-top:5px}.scope{display:grid;grid-template-columns:auto 140px;gap:7px 14px;align-items:center}.scope>label:first-child{font-size:14px;color:var(--muted)}select{background:#fff;border:1px solid var(--line);color:var(--ink);border-radius:8px;padding:8px 12px;font-weight:600;min-height:44px}.scope .check{grid-column:2;font-size:13px}.check{display:flex;align-items:center;gap:5px;font-size:14px;cursor:pointer;color:var(--muted);white-space:nowrap}input[type=checkbox]{accent-color:var(--ink);width:16px;height:16px}.workspace-bar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:10px}.tabs{display:flex;gap:24px}.tabs button{border:0;border-bottom:3px solid transparent;padding:13px 0 16px;background:none;font-size:15px;font-weight:600;color:var(--muted);white-space:nowrap}.tabs button[aria-current=page]{color:var(--ink);border-color:var(--ink)}.tabs button>span:first-child{font-size:19px;margin-right:4px}.tabs .count{font-size:12px!important;background:#e7edf1;border-radius:10px;padding:1px 7px;margin-left:3px}.muted{color:var(--muted);font-size:14px}#range-summary{font-size:13px}.lesson-head{display:flex;justify-content:space-between;align-items:center;padding:20px 1px 16px}.lesson-count{display:flex;gap:14px;align-items:center;color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums}.pill{padding:3px 10px;border:1px solid var(--line);border-radius:5px;color:var(--ink);background:#fff;font-weight:600}.text-button{border:0;padding:6px;background:none;font-size:14px;color:var(--muted)}.text-button:hover{color:var(--accent)}.study-layout{display:grid;grid-template-columns:0.83fr 1.17fr;gap:24px}.prompt-panel{background:var(--ink);color:#fff;padding:28px 30px;border-radius:16px;display:flex;flex-direction:column;min-width:0;position:relative;overflow:hidden}.prompt-panel .eyebrow{color:#b5c9d7;font-size:14px;letter-spacing:0}.prompt-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.icon-button{border:0;background:transparent;color:inherit;font-size:27px;line-height:1;width:38px;height:38px;flex-shrink:0}.icon-button[aria-pressed=true]{color:#ffb89b}#meaning{font-size:40px;letter-spacing:-1px;font-weight:400;line-height:1.35;margin:19px 0 6px}#meaning strong{font-weight:700}#secondary-meaning{color:#b5c9d7;min-height:22px}.answer-box{flex:1;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px 0}.hanja{font-family:HanjaSerif,'Noto Serif CJK KR','Batang',serif;font-weight:400}#answer-char{font-size:108px;line-height:1.15}.answer-box .muted{color:#b5c9d7;margin-top:16px;font-size:14px}.hidden-character{font-family:HanjaSerif,serif;font-size:70px;line-height:1.2;color:#547183}#answer-hidden{text-align:center;color:#a6bdcc}#answer-hidden p{font-size:14px;margin-top:10px}.prompt-actions{display:flex;gap:10px}.outline-button,.next-button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:10px 17px;font-size:14px;font-weight:600;min-height:44px}.outline-button:hover{background:#eef3f6}.prompt-actions button{flex:1;background:#213c4d;border:1px solid #4a6475;color:#fff}.prompt-actions button:hover{background:#345365}.prompt-actions button.active{background:#fff;color:var(--ink)}.tip{border-top:1px solid #385263;margin-top:26px;padding-top:20px}.tip-label{font-size:12px;letter-spacing:.04em;color:#c9a58b}.tip p{color:#b4c7d4;font-size:14px;margin-top:7px;line-height:1.8}.writing-panel{background:#fff;padding:20px 24px 16px;border:1px solid var(--line);border-radius:16px;min-width:0}.paper-toolbar{display:flex;justify-content:space-between;font-size:14px;color:var(--muted);margin-bottom:15px}.paper-wrap{width:min(100%,350px);aspect-ratio:1;margin:auto;position:relative;background:#fff}canvas{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair;border:1px solid #e5dcd7;border-radius:3px}#pad-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#9caaaF;font-size:15px;pointer-events:none}.corner{position:absolute;width:16px;height:16px;pointer-events:none;border-color:var(--accent);border-style:solid}.top-left{left:0;top:0;border-width:2px 0 0 2px}.bottom-right{right:0;bottom:0;border-width:0 2px 2px 0}.canvas-tools{display:flex;align-items:center;margin:12px auto 14px;gap:9px;max-width:420px}.canvas-tools .text-button{padding:3px;font-size:13px}.grid-toggle{margin-left:auto;font-size:13px}.primary-button{background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:8px;min-height:46px;padding:10px 18px;font-weight:650;font-size:15px}.primary-button:hover:not(:disabled){background:#a83824}.primary-button span{float:right;font-size:20px;line-height:24px}#recognize{width:100%;touch-action:manipulation;min-height:46px}.feedback{margin-top:12px;padding:9px 11px;border-radius:6px;background:var(--bg);font-size:14px;min-height:42px;line-height:1.6}.feedback.success{background:#e9f5ef;color:var(--green)}.feedback.error{background:var(--accent-pale);color:#9a3623}.feedback.caution{background:#fff6e7;color:#7e591b}.candidates{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}.candidate{border:1px solid var(--line);border-radius:8px;background:#fff;padding:3px 11px;font-family:HanjaSerif,serif;font-size:30px;min-width:48px}.candidate:first-child{border-color:#8b9ba7;background:var(--bg)}.recognition-note{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.6}.lesson-footer{display:flex;align-items:center;justify-content:space-between;margin-top:22px;gap:12px}.lesson-footer>div{text-align:center;font-size:14px}.lesson-footer small{display:block;font-size:12px;color:var(--muted);margin-top:2px}.next-button{background:var(--ink);border-color:var(--ink);color:#fff;padding-inline:22px}.next-button:hover{background:#254c63}.footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;margin-top:40px;padding:22px 0 24px;font-size:12px;color:var(--muted)}.footer b{font-size:14px;color:var(--ink);margin-right:5px}.footer button{font-size:12px}.loading{padding:100px 20px;text-align:center;color:var(--muted)}.loader{display:inline-block;width:18px;height:18px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite;margin-right:10px;vertical-align:middle}@keyframes spin{to{transform:rotate(360deg)}}.learn-panel{border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;align-items:center;flex-direction:column;padding:40px 25px;min-height:480px;justify-content:center}.learn-glyph{font-size:170px;line-height:1.4;margin:14px 0 24px}.learn-panel>p:last-child{margin-top:22px;text-align:center}.self-check{display:flex;gap:12px}.catalog-head{display:flex;justify-content:space-between;align-items:center;margin:30px 0 22px;gap:16px}.catalog-head h2{font-size:22px}.search{display:flex;align-items:center;gap:9px;background:#fff;padding:9px 13px;border:1px solid var(--line);border-radius:8px;min-width:0}.search input{border:0;background:transparent;width:200px;color:var(--ink);font-size:15px}.char-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:12px}.char-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 7px;position:relative;display:flex;flex-direction:column;align-items:center;min-height:121px}.char-card:hover{border-color:var(--accent);background:#fff9f6}.char-card .hanja{font-size:34px;line-height:1.4}.char-card .char-label{font-size:12px;color:var(--muted);margin-top:6px}.char-card .star{position:absolute;right:7px;top:4px;font-size:12px;color:var(--accent)}#more{display:block;margin:24px auto}.empty{text-align:center;padding:65px 20px}.empty-mark{font-family:HanjaSerif,serif;display:block;font-size:60px;color:#8ca0ad;margin-bottom:12px}.empty h2{font-size:23px}.empty p{color:var(--muted);margin:10px 0 22px}.empty .primary-button{width:auto}dialog{border:1px solid var(--line);border-radius:16px;padding:0;max-width:610px;width:calc(100% - 36px);max-height:85vh;color:var(--ink);box-shadow:0 20px 100px #10233238}dialog::backdrop{background:#081f35a1}.dialog-head{padding:20px 25px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}.dialog-head h2{font-size:20px}.dialog-body{padding:5px 25px 30px}.dialog-body h3{font-size:16px;margin:24px 0 8px}.dialog-body p,.dialog-body li{font-size:14px;line-height:1.85;margin-bottom:10px}.dialog-body ul{padding-left:20px}.dialog-body a{color:#28627f;text-underline-offset:3px}
@media(min-width:1400px){main{padding-top:48px}.paper-wrap{width:370px}.study-layout{gap:30px}.prompt-panel{padding:34px 36px}.answer-box{min-height:220px}}@media(max-width:850px){.brand-sub{display:none}.header{height:76px}main{padding:25px 22px 0}.heading-row{align-items:flex-start}h1{font-size:28px}.scope{grid-template-columns:auto}.scope>label:first-child{display:none}.scope .check{grid-column:1;font-size:12px}.scope select{width:140px}#range-summary{display:none}.study-layout{grid-template-columns:.8fr 1.2fr;gap:16px}.prompt-panel{padding:22px 20px}.writing-panel{padding:17px 17px 13px}#meaning{font-size:33px}.char-grid{grid-template-columns:repeat(6,1fr)}}@media(max-width:620px){.header{height:68px;padding:0 20px}.brand-mark{width:36px;height:36px;font-size:23px}.brand strong{font-size:23px}.header>.text-button{font-size:13px}main{padding:22px 18px 0}.heading-row{gap:12px;margin-bottom:16px}h1{font-size:25px;letter-spacing:-1px}.eyebrow{font-size:12px}.scope select{min-height:40px;font-size:14px;width:125px;padding:7px 10px}.scope .check{font-size:12px;gap:3px}.tabs{width:100%;justify-content:space-between;gap:10px}.tabs button{font-size:14px;padding:11px 0 12px}.tabs button>span:first-child{display:none}.tabs .count{display:inline!important}.lesson-head{padding:15px 0 12px}.study-layout{display:flex;flex-direction:column;gap:14px}.prompt-panel{padding:17px 20px;border-radius:12px;display:grid;grid-template-columns:1fr auto;gap:0 15px}.prompt-top{grid-column:1/-1}.prompt-panel .eyebrow{font-size:13px}.prompt-top .icon-button{height:25px;font-size:24px}#meaning{font-size:31px;line-height:1.4;margin:4px 0 0;align-self:center;grid-column:1}#secondary-meaning{grid-column:1;min-height:0;font-size:12px;line-height:1.5}.answer-box{grid-column:2;grid-row:2/4;padding:0;min-height:0}.answer-box>#answer-char{font-size:55px}.answer-box #answer-meta{font-size:12px;margin:0}#answer-hidden{display:none}.prompt-actions{grid-column:1/-1;margin-top:12px}.prompt-actions button{min-height:34px;padding:6px 9px;font-size:13px}.tip{display:none}.writing-panel{padding:14px 16px;border-radius:12px}.paper-toolbar{margin-bottom:10px;font-size:13px}.paper-wrap{width:min(100%,320px)}.canvas-tools{margin:10px 0 12px}.feedback{font-size:13px;margin-top:10px}.recognition-note{font-size:12px}.lesson-footer{margin-top:16px;gap:6px}.lesson-footer .outline-button,.lesson-footer .next-button{padding:8px 11px;font-size:13px}.lesson-footer>div{font-size:12px}.lesson-footer small{font-size:12px;max-width:150px;line-height:1.4}.footer{margin-top:26px;padding-top:16px;gap:8px}.footer>span{font-size:11px}.footer button{font-size:12px;padding:0}.char-grid{grid-template-columns:repeat(4,1fr);gap:8px}.char-card{min-height:105px;padding:12px 4px}.char-card .hanja{font-size:31px}.catalog-head{align-items:stretch;flex-direction:column;margin-top:22px}.search input{width:100%}.learn-panel{min-height:330px;padding:24px}.learn-glyph{font-size:135px;margin:0 0 17px}.learn-panel .eyebrow{font-size:12px}.self-check{gap:8px}.self-check button{font-size:14px}.empty{padding:40px 10px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.toolbar-actions{display:flex;align-items:center;gap:15px}.settings-button{background:#edf2f5;border:1px solid #d6e0e7;border-radius:6px;padding:5px 10px;font-size:13px;font-weight:650;color:var(--ink);min-height:34px}.settings-button:hover{background:#dde8ef}.recognition-state{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin:-3px 0 13px;flex-wrap:wrap}.recognition-state .unavailable{color:#966322}.check-results{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}.check-badge{font-size:12px;border-radius:4px;padding:3px 7px;background:#edf3f6;color:#687985}.check-badge.pass{background:#e9f5ef;color:#21715a}.check-badge.fail{background:#fcf0ed;color:#9a3623}.check-badge.unavailable{background:#fff6e7;color:#7e591b}.setting-select{display:flex;align-items:center;justify-content:space-between;margin:23px 0 12px;gap:15px}.setting-select select{font-size:15px}.settings-body>p{margin-bottom:20px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:19px 0;border-top:1px solid var(--line);gap:20px;cursor:pointer}.setting-row strong{font-size:16px}.setting-row small{font-size:13px;color:var(--muted);display:block;margin-top:5px;line-height:1.7}.setting-row input{appearance:none;-webkit-appearance:none;flex-shrink:0;width:42px;height:25px;background:#c8d4dc;border-radius:30px;position:relative;cursor:pointer;transition:background .2s;border:1px solid #b8c7d2}.setting-row input:before{content:'';position:absolute;left:3px;top:3px;width:17px;height:17px;background:white;border-radius:50%;transition:transform .2s;box-shadow:0 1px 2px #0002}.setting-row input:checked{background:var(--ink);border-color:var(--ink)}.setting-row input:checked:before{transform:translateX(17px)}.settings-note{padding:15px;background:#eff4f7;border-radius:8px;margin:12px 0 20px}.settings-note strong{font-size:14px}.settings-note p{font-size:13px;margin:6px 0 0}.settings-save{font-size:12px!important;margin-top:13px}.order-body{padding:20px 25px 28px;text-align:center}.order-body>p{margin:0 0 14px}.order-body>p:last-child{font-size:12px;margin:18px 0 0}#order-pad{width:100%;max-width:380px;aspect-ratio:1;height:auto;margin:16px auto;touch-action:auto;cursor:default}#order-step{font-size:15px;font-weight:650}.order-controls{display:flex;gap:10px;justify-content:center}.prompt-actions{flex-wrap:wrap}.prompt-actions button{white-space:nowrap;padding-inline:9px}.order-source-warning{color:#95651d!important}
@media(max-width:620px){.paper-toolbar{margin-bottom:9px}.recognition-state{font-size:12px;margin-bottom:10px}.toolbar-actions{gap:10px}.settings-button{font-size:12px;padding:4px 8px}.prompt-actions{gap:7px}.prompt-actions button{font-size:12px}.settings-body{padding-inline:20px}.setting-row{gap:12px}.setting-row strong{font-size:15px}.setting-select{align-items:flex-start}.order-body{padding-inline:18px}.order-controls{gap:8px}.order-controls button{font-size:13px;padding-inline:12px}}

/* Learning tools share the existing navy / ink-red notebook palette. */
.tabs{overflow-x:auto;scrollbar-width:thin;gap:22px;max-width:100%}.tabs button{white-space:nowrap;flex-shrink:0}.workspace-bar{gap:14px}#range-summary{white-space:nowrap;font-size:12px}.practice-order{display:flex;gap:12px;align-items:center}.practice-order label{font-size:14px;color:var(--muted)}.practice-order select{font-size:14px}.catalog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.learning-panel{margin-top:26px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.section-heading h2{font-size:26px;margin:3px 0}.section-heading .muted{font-size:14px}.exam-setup{display:grid;grid-template-columns:1fr 1.25fr;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff}.exam-intro{background:var(--ink);color:white;padding:35px 30px}.exam-intro .eyebrow{color:#f3b19e}.exam-intro h3{font-size:26px;font-weight:500;line-height:1.6;margin:20px 0 24px}.exam-intro p{font-size:14px;line-height:1.9;color:#bfd0db;margin:14px 0}.exam-config{padding:30px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.exam-config>label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:650;min-width:0}.exam-config select{width:100%;font-size:15px}.exam-config>p,.exam-config>button{grid-column:1/-1}.exam-config .muted{font-size:14px;line-height:1.75}.draft-note{font-size:14px;line-height:1.8;color:var(--muted);margin-top:22px}.exam-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:12px 0}.exam-toolbar>div:first-child{display:flex;flex-direction:column;gap:2px}.exam-toolbar .muted{font-size:14px}.timer{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.timer.urgent{color:#a33320}.learning-panel progress{appearance:none;width:100%;height:6px;border:0;border-radius:6px;overflow:hidden;background:#e0e7ec;display:block}.learning-panel progress::-webkit-progress-bar{background:#e0e7ec}.learning-panel progress::-webkit-progress-value{background:var(--ink)}.learning-panel progress::-moz-progress-bar{background:var(--ink)}.exam-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:24px;margin-top:22px;align-items:start}.exam-question{border:1px solid var(--line);border-radius:16px;background:white;padding:26px;min-width:0}.exam-question-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.exam-question-head .outline-button{font-size:14px;min-height:44px}.exam-question-head button[aria-pressed=true]{color:var(--accent);border-color:var(--accent)}#exam-prompt{text-align:center;margin:25px 0 12px;line-height:1.45}.exam-glyph{font-size:110px}.exam-meaning{font-size:34px;font-weight:500}#exam-instruction{text-align:center;font-size:16px;margin-bottom:24px}.exam-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.exam-option{display:flex;gap:12px;align-items:center;text-align:left;background:white;border:1px solid var(--line);border-radius:9px;padding:18px 16px;min-height:72px;font-size:17px;line-height:1.6}.exam-option:hover{background:#f0f5f8}.exam-option[aria-pressed=true]{border:2px solid var(--ink);padding:17px 15px;background:#eaf1f5}.option-number{font-size:14px;color:var(--muted);flex-shrink:0;width:22px;height:22px;border:1px solid #becbd4;border-radius:50%;display:grid;place-items:center;line-height:1}.exam-option .hanja{font-size:40px;margin:auto}#exam-answer-status{font-size:14px;margin-top:18px;min-height:24px}.exam-navigation{display:flex;justify-content:space-between;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.question-map{border:1px solid var(--line);background:#fff;border-radius:12px;padding:20px}.question-map h3{font-size:16px}.question-map>p{font-size:14px;margin:6px 0 14px}.question-map .exam-exit-note{font-size:14px;margin:13px 0 0}.question-map .primary-button{width:100%}#exam-question-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:16px 0}.question-number{border:1px solid #b9c8d1;border-radius:6px;min-height:44px;background:white;font-size:14px;padding:5px 1px;font-variant-numeric:tabular-nums}.question-number.answered{background:var(--ink);border-color:var(--ink);color:#fff}.question-number[aria-current]{outline:2px solid var(--accent);outline-offset:2px}.question-map .map-key{font-size:13px}.resume-banner{margin:20px 0 0;padding:13px 17px;background:#e4eef4;border:1px solid #becfd9;border-radius:9px;display:flex;justify-content:space-between;align-items:center;gap:14px;font-size:14px}.resume-banner .outline-button{font-size:14px;flex-shrink:0}#exam-writing-host .writing-panel{border:0;padding:0;border-radius:0}#exam-writing-host .recognition-note{display:none}#exam-writing-host .paper-toolbar{margin-top:20px}#exam-writing-host .paper-wrap{width:min(100%,350px)}.result-overview{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:30px;background:var(--ink);color:white;border-radius:16px}.result-overview .eyebrow{color:#bfd0db;letter-spacing:0}#exam-score{font-size:62px;line-height:1.4;font-weight:500}#exam-result-summary{color:#d5e0e7;font-size:15px}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.result-actions button{font-size:14px}.result-actions .text-button{color:#d9e4ea}.result-actions .primary-button{grid-column:1/-1}#exam-marking-note{font-size:14px;line-height:1.8;margin:20px 0}.result-filter{margin-bottom:16px;font-size:14px}#exam-result-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.result-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:20px;min-width:0}.result-card-head{display:flex;justify-content:space-between;gap:10px;font-size:14px}.result-verdict{color:var(--green);font-weight:650}.result-card.wrong .result-verdict{color:#a03927}.result-card.pending .result-verdict{color:#86601e}.result-answer{display:flex;align-items:center;gap:20px;margin:16px 0}.result-answer .hanja{font-size:47px;line-height:1.3}.result-answer>div{font-size:15px;line-height:1.75}.result-card>p{font-size:14px}.result-ink{display:block;width:140px;height:140px;background:var(--bg);border:1px solid var(--line);border-radius:6px;margin-bottom:14px}.result-ink path{fill:none;stroke:var(--ink);stroke-width:8;stroke-linejoin:round;stroke-linecap:round}.result-marking{display:flex;flex-wrap:wrap;gap:8px}.result-marking button{font-size:14px;padding:8px 11px}.result-marking button[aria-pressed=true]{border-color:var(--ink);background:#e6eef3}.empty-result{padding:25px 0;grid-column:1/-1}.dialog-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}#exam-submit-dialog .dialog-body{padding-top:22px}.study-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.metric{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px}.metric p{font-size:14px}.metric strong{font-size:36px;display:block;margin:10px 0 4px;font-weight:500}.metric small{font-size:13px;color:var(--muted)}.progress-detail{margin-top:24px;display:grid;grid-template-columns:1fr 1fr;gap:24px}.progress-detail>div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:25px}.progress-detail h3{font-size:18px;margin-bottom:8px}.progress-detail p{font-size:14px;line-height:1.8}.progress-detail progress{margin:17px 0;height:10px}.weak-chars{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.weak-chars button{display:flex;gap:8px;align-items:center;font-size:14px;padding:6px 10px}.weak-chars .hanja{font-size:27px}.ad-slot{margin-top:40px;padding:24px 0 16px;border-top:1px solid var(--line);min-height:140px;text-align:center}.ad-label{font-size:13px;color:var(--muted);margin-bottom:12px}.ad-slot iframe{max-width:100%}
@media(max-width:1000px){#range-summary{display:none}.tabs{width:100%;justify-content:space-between}.exam-layout{grid-template-columns:minmax(0,1fr) 205px;gap:16px}.exam-question{padding:20px}.exam-config{padding:24px;gap:18px}.exam-intro{padding:28px 24px}.exam-intro h3{font-size:23px}}
@media(max-width:700px){.tabs{justify-content:flex-start;gap:22px}.practice-order{gap:8px}.practice-order label{display:none}.practice-order select{max-width:160px;font-size:14px}.lesson-head{flex-wrap:wrap;gap:12px}.exam-setup,.exam-layout,.progress-detail{grid-template-columns:1fr}.exam-intro{padding:22px}.exam-intro h3{font-size:23px;margin:10px 0}.exam-intro h3 br{display:none}.exam-intro p{margin:8px 0}.exam-intro p:last-child{display:none}.exam-config{padding:22px 18px;gap:18px 12px}.exam-config select{font-size:14px;padding:10px 8px}.exam-question{padding:20px 16px}.exam-option{padding:14px 10px;gap:9px;font-size:16px}.exam-option[aria-pressed=true]{padding:13px 9px}.exam-navigation{gap:8px;flex-wrap:wrap}.exam-navigation .outline-button,.exam-navigation .next-button{padding:10px 13px}.exam-navigation .text-button{font-size:14px}.exam-glyph{font-size:90px}.exam-meaning{font-size:30px}#exam-question-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.question-map{padding:20px}.exam-toolbar{align-items:flex-start}.exam-toolbar .muted{font-size:13px;max-width:220px}.timer{font-size:17px}.result-overview{padding:23px;flex-direction:column;align-items:stretch;gap:20px}.result-actions{grid-template-columns:1fr 1fr}.result-actions .primary-button{grid-column:auto}#exam-result-list{grid-template-columns:1fr}.study-metrics{gap:8px}.metric{padding:16px 10px}.metric p{font-size:14px;line-height:1.5}.metric strong{font-size:29px}.metric small{font-size:12px;line-height:1.5;display:block}.section-heading{align-items:flex-start;flex-wrap:wrap;gap:13px}.section-heading h2{font-size:25px}.section-heading .primary-button{font-size:14px}.resume-banner{align-items:flex-start;flex-direction:column;gap:9px}.resume-banner .outline-button{width:100%}}
@media(max-width:380px){.exam-options{grid-template-columns:1fr}.practice-order select{max-width:140px}.study-metrics{grid-template-columns:1fr}.metric{display:grid;grid-template-columns:1fr auto;align-items:center;padding:16px}.metric strong{margin:0;grid-column:2;grid-row:1/3}.result-actions{grid-template-columns:1fr}.exam-config{grid-template-columns:1fr}}
/* v8: dictionary, radicals and sentence learning */
.hanja,.knowledge-text,.sentence,.form-glyph,.candidate{font-family:HanjaSerif,HanjaExtras,'Noto Serif CJK KR',serif}.workspace-bar{min-width:0}.tabs{min-width:0;max-width:100%;flex-shrink:1}.tabs button{white-space:nowrap}.character-info{margin-top:14px}.knowledge-heading h2{font-size:30px;margin:8px 0}.knowledge-toolbar,.knowledge-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.knowledge-toolbar{margin:24px 0 10px}.knowledge-toolbar input{min-width:160px;flex:1;padding:12px 14px;border:1px solid var(--line,#d8e0e5);border-radius:9px;background:#fff;font:inherit}.knowledge-toolbar select{padding:12px;max-width:100%}.knowledge-actions{margin:16px 0 22px}.knowledge-actions .primary-button{width:auto;padding:13px 20px;margin:0}.radical-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:12px}.knowledge-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}.knowledge-tile{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;padding:20px;border:1px solid #d9e1e6;border-radius:14px;background:white;color:#163040;min-width:0}.knowledge-tile:hover,.knowledge-tile:focus-visible{border-color:#ac402a;box-shadow:0 3px 12px #18304010}.tile-text{font-size:28px;line-height:1.65;overflow-wrap:anywhere}.radical-grid .tile-text{font-size:45px}.tile-label{font-size:14px;color:#697982;line-height:1.5}.knowledge-card{max-width:860px;margin:18px auto;padding:32px;background:#fff;border:1px solid #d9e1e6;border-radius:18px}.knowledge-card h3{line-height:1.7}.knowledge-card>.primary-button{margin-top:22px}.knowledge-text{font-size:42px;line-height:1.9;overflow-wrap:anywhere;letter-spacing:.03em;margin:16px 0 26px}.sentence{font-size:27px;line-height:1.9}.knowledge-field{padding:15px 0;border-bottom:1px solid #e8edef}.knowledge-field h4{font-size:13px;color:#78848c;margin:0 0 8px}.knowledge-field p{margin:5px 0;line-height:1.8;overflow-wrap:anywhere}.knowledge-field small{color:#75828a;line-height:1.7;display:block}.form-glyph{font-size:30px;vertical-align:middle}.source-note{color:#75828a;font-size:13px;line-height:1.9;margin-top:26px}.source-note a{color:#526a7b;text-decoration:underline}.word-links{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:18px 0}.glyph-link{font-size:26px;padding:6px 14px;background:#f2f6f8;border:1px solid #dde5e9;border-radius:8px;color:#183344}.knowledge-options{display:grid;gap:12px;margin:18px 0}.knowledge-option{font:inherit;text-align:left;line-height:1.65;padding:16px 20px;border:1px solid #d3dee5;border-radius:10px;background:white;color:#183344}.knowledge-option:hover:not(:disabled){background:#f0f5f8}.knowledge-option:disabled{opacity:1;cursor:default}.knowledge-option.is-correct{background:#edf6ef;border-color:#52886a;color:#28513a}.knowledge-option.is-wrong{background:#fff1ed;border-color:#b85740;color:#853c2b}.quiz-feedback{padding:18px;border-radius:10px;background:#f1f5f7;line-height:1.7}.character-meaning{font-size:22px}.setting-toggle{display:flex;gap:12px;align-items:flex-start;margin:20px 0}.setting-toggle input{margin-top:5px;flex-shrink:0}.setting-toggle small{display:block;font-size:13px;line-height:1.65;color:#73808a;margin-top:6px}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:22px 26px;border-bottom:1px solid #dde5e9}.dialog-heading h2{font-size:22px;margin:0}.knowledge-card>button+button{margin-left:10px}#character-detail>.outline-button{margin-top:12px}#character-detail>.primary-button{margin-top:20px}
@media(max-width:650px){.knowledge-card{padding:22px 18px}.knowledge-text{font-size:32px}.knowledge-heading h2{font-size:25px}.knowledge-grid{grid-template-columns:1fr}.radical-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.knowledge-tile{padding:14px 11px}.radical-grid .tile-label{font-size:12px}.knowledge-actions{gap:8px}.knowledge-actions button{padding:11px 13px;font-size:13px}.knowledge-toolbar input{width:100%;flex-basis:200px}.workspace-bar{display:block}.tabs{width:100%}.knowledge-card>button+button{margin:12px 0 0}.knowledge-card .knowledge-actions{margin-bottom:0}}
.glyph-explorer{border:1px solid #dbe3e7;border-radius:15px;background:#f8fafb;color:#173142;padding:18px;margin:15px 0;text-align:center;min-width:0}.glyph-caption{font-weight:700;font-size:15px}.glyph-stage{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;min-height:210px}.glyph-arrow{border:1px solid #d7e0e5;background:#fff;border-radius:50%;width:42px;height:42px;font-size:32px;line-height:1;color:#233e4e}.glyph-display{border:0;background:transparent;display:flex;justify-content:center;align-items:center;min-width:0;width:100%;min-height:190px;color:#173142}.glyph-display .hanja{font-size:126px;line-height:1.4}.glyph-display img{width:min(100%,190px);height:190px;object-fit:contain;mix-blend-mode:multiply}.glyph-display:disabled{opacity:1}.glyph-note{font-size:13px;line-height:1.7;color:#627581}.glyph-explorer .source-note{margin-top:10px;font-size:11px}.glyph-tools{display:flex;justify-content:center;gap:15px;flex-wrap:wrap}.glyph-tools .text-button{color:#536c7d;font-size:12px}.glyph-missing{font-size:16px;color:#8a959c}.glyph-table-wrap{overflow-x:auto;margin-top:20px}.glyph-table{width:100%;border-collapse:collapse;text-align:left;table-layout:fixed;font-size:13px}.glyph-table caption{text-align:left;font-weight:700;font-size:16px;padding:10px 0}.glyph-table th,.glyph-table td{padding:12px 8px;border-bottom:1px solid #dce4e8;vertical-align:middle;overflow-wrap:anywhere}.glyph-table thead{background:#eaf0f4}.glyph-table th:first-child{width:22%}.glyph-table th:nth-child(2){width:24%}.glyph-table tbody th{font-weight:600}.glyph-table td:nth-child(2){text-align:center}.glyph-table td .hanja{font-size:46px}.glyph-table td img{max-width:100%;width:82px;height:82px;object-fit:contain;mix-blend-mode:multiply}.glyph-table td a{display:block;text-decoration:underline;margin-top:5px}.glyph-table .glyph-missing{font-size:12px}.six-types{padding:18px 22px;border:1px solid #dce4e8;border-radius:14px;background:#fff;margin-bottom:22px}.six-types summary{cursor:pointer;font-weight:700}.six-types>a{display:block;margin-top:18px;text-decoration:underline}.six-types>p{line-height:1.8}.result-glyph-button{background:transparent;border:0;font-size:46px;text-decoration:underline;text-underline-offset:8px;text-decoration-thickness:1px}.header{gap:10px}.header .brand{margin-right:auto}.header #open-display{white-space:nowrap}.answer-box #answer-explorer{width:100%}.prompt-panel .glyph-explorer{background:#f4f7f9;color:#173142;padding:12px}.prompt-panel .glyph-note{color:#627581}.prompt-panel .glyph-explorer .source-note{color:#75828a}.answer-box:has(#answer-explorer:not([hidden])){min-height:0;padding:10px 0}.candidate-group{display:flex;flex-direction:column;gap:3px}.candidate-correct{font-size:11px;padding:3px;border:0;background:transparent;color:#6c7c87}.tabs{scrollbar-width:thin}.tabs:focus-within{scroll-behavior:smooth}#character-dialog{max-width:780px;width:calc(100% - 24px)}#character-dialog .dialog-body{max-height:75vh;overflow-y:auto;overscroll-behavior:contain}#character-dialog .dialog-head{position:sticky;top:0;background:#fff;z-index:1}.knowledge-card .knowledge-text{cursor:pointer}
@media(max-width:650px){.header{padding-left:18px;padding-right:18px}.header #about{font-size:12px}.header #open-display{font-size:12px}.brand-sub{display:none}.glyph-stage{min-height:180px;grid-template-columns:36px minmax(0,1fr) 36px;gap:4px}.glyph-arrow{width:36px;height:36px}.glyph-display{min-height:165px}.glyph-display .hanja{font-size:110px}.glyph-display img{height:165px}.glyph-table td,.glyph-table th{padding:9px 5px;font-size:12px}.glyph-table td img{height:68px}.glyph-explorer{padding:12px}.glyph-table th:first-child{width:24%}.glyph-table th:nth-child(2){width:25%}}
.word-examples{text-align:left;border-top:1px solid #dce4e8;padding-top:14px;margin-top:16px}.word-examples h4{font-size:13px;color:#75858e;margin:0 0 10px}.example-word{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid #e7edf0}.example-hanja{display:flex;gap:3px;flex-wrap:wrap}.example-hanja button{border:0;background:transparent;padding:3px 5px;font-size:27px;line-height:1.3;min-width:32px;min-height:38px;border-radius:5px;color:#173142}.example-hanja button:hover{background:#e4edf2}.example-reading{font-size:15px;font-weight:600;color:#3f5d70}.word-examples small{font-size:11px;color:#75858e;display:block;margin-top:10px}.word-examples>.muted{font-size:13px}
.mobile-mode{display:none}@media(max-width:650px){.mobile-mode{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:15px 0;color:#687985;font-size:13px}.mobile-mode select{max-width:65%;padding:9px 13px;border:1px solid #d6e1e7;border-radius:8px;background:#fff;color:#163142;font-size:15px}}
/* v9: identity details and sourced stroke-by-stroke teaching */
.detail-setting{padding:18px;border:1px solid #ccd9df;border-radius:12px;margin:18px 0;background:#f4f8fa}.detail-setting label{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.detail-setting output{font-weight:700;color:#a73925}.detail-setting input{width:100%;margin:20px 0 8px;accent-color:#b7432b}.range-ends{display:flex;justify-content:space-between;font-size:14px;color:#567080}.detail-setting p{font-size:14px;line-height:1.8;margin:14px 0 0}.contrast-panel{margin:24px 0;color:#193344;text-align:left}.contrast-panel:empty{display:none}.contrast-panel h3{font-size:18px}.contrast-group{border:1px solid #d4dfe5;border-radius:12px;background:#f8fafb;padding:16px;margin:12px 0}.contrast-group summary{font-weight:700;cursor:pointer;font-size:15px;line-height:1.7}.contrast-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-top:15px}.contrast-card{padding:14px;background:white;border:1px solid #dee6ea;border-radius:9px}.contrast-card.is-current{border:2px solid #b7432b}.contrast-glyph{font-size:56px;color:#173142;background:transparent;border:0;display:block;margin:0 auto 10px;line-height:1.3;cursor:pointer}.contrast-card p{font-size:14px;line-height:1.7;margin:0}.contrast-tip{font-size:15px;line-height:1.8;margin-bottom:0}.result-guide{width:100%;margin:15px 0}#writing-guide-dialog{width:calc(100% - 24px);max-width:760px}#writing-guide-body{max-height:78vh;overflow-y:auto;overscroll-behavior:contain}#guide-svg{width:min(100%,380px);display:block;margin:15px auto;background:#fff;border:1px solid #d9e3e8;border-radius:10px;aspect-ratio:1}.guide-source,.guide-warning{padding:12px 15px;font-size:14px;line-height:1.8;border-radius:8px;background:#eef4f7;color:#34586a}.guide-warning{background:#fff2e5;color:#7d481d}.guide-step{min-height:3em;text-align:center;line-height:1.8;font-size:15px}.guide-step-details{margin:20px 0;border-top:1px solid #d9e3e8;padding-top:16px}.guide-step-details summary{font-weight:700;cursor:pointer}.guide-step-details ol{padding-left:25px}.guide-step-details li{padding:5px 0}.guide-step-button{display:block;width:100%;text-align:left;font-size:14px;padding:9px 10px;line-height:1.7;border:1px solid transparent;background:#f2f6f8;border-radius:7px;color:#193344}.guide-step-button.is-current{border-color:#b7432b;background:#fff1eb}.guide-ink{margin:20px 0 5px}.guide-checklist{margin:22px 0}.guide-checklist h3{font-size:18px}.guide-checklist li{line-height:1.8;margin:8px 0}.guide-fallback{font-size:144px;text-align:center;margin:10px}.guide-practice{line-height:1.8;padding:15px;background:#eef4f7;border-radius:8px}.guide-step-details .source-note{font-size:13px}#writing-guide-body>a{font-size:14px;text-decoration:underline}#show-guide{margin-bottom:10px}#practice-comparison{width:100%}
@media(max-width:650px){.contrast-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.contrast-group{padding:12px}.contrast-card{padding:10px}.contrast-glyph{font-size:49px}.contrast-card p{font-size:14px}.detail-setting{padding:14px}#writing-guide-body{padding:16px}.order-controls button{min-height:44px}}

/* v10: every filled control owns its foreground, including on navy cards. */
:root{color-scheme:light}
.outline-button{color:var(--ink)}
button{-webkit-text-fill-color:currentColor;line-height:1.5;overflow-wrap:anywhere}
button:disabled{opacity:1}
.outline-button:disabled,.primary-button:disabled,.next-button:disabled,.settings-button:disabled,.text-button:disabled,.glyph-arrow:disabled{color:#526777;background:#e8edf1;border-color:#c3d0d9}
.prompt-actions button:disabled{color:#c4d6e2;background:#263e4f;border-color:#657d8c}
.prompt-panel>.character-info{grid-column:1/-1;width:100%;max-width:100%;white-space:normal;font-size:14px}
.prompt-actions button{white-space:normal;min-height:44px;font-size:14px}
.prompt-actions button:hover:not(:disabled){background:#345365;color:#fff}
.prompt-actions button.active:hover:not(:disabled){background:#eef3f6;color:var(--ink)}
.outline-button:hover:disabled,.next-button:hover:disabled{background:#e8edf1}
.prompt-actions button:disabled:hover{color:#c4d6e2;background:#263e4f}
.recognition-note,.knowledge-field h4,.word-examples h4{font-size:14px}
.dialog-head,.dialog-heading{gap:12px}.dialog-head h2,.dialog-heading h2{min-width:0;overflow-wrap:anywhere}
.recognition-state,.canvas-tools{min-width:0;flex-wrap:wrap}
.recognition-state{font-size:14px}.canvas-tools .text-button,.settings-button,.check{font-size:14px}
.recognition-note{line-height:1.8}
.recall-status{margin:0 0 15px;padding:12px 14px;background:#edf4f8;border-left:3px solid #476c83;border-radius:6px;color:#25485e;font-size:14px;line-height:1.75}
.due-review{display:flex;align-items:center;justify-content:space-between;gap:24px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px;margin:22px 0}
.due-review>div{min-width:0}.due-review h3{font-size:20px;margin:0 0 10px}.due-review h3 span{color:var(--accent);margin-left:8px}.due-review p{font-size:15px;line-height:1.8;margin:8px 0 0}.due-review .muted{font-size:14px}.due-review button{flex-shrink:0;max-width:100%}
.guide-practice-button{margin-top:12px;max-width:100%}
@media(max-width:620px){.due-review{align-items:stretch;flex-direction:column;gap:16px;padding:18px}.knowledge-actions button,.canvas-tools .text-button,.settings-button,.prompt-actions button{font-size:14px}.setting-select{flex-wrap:wrap}.prompt-actions button{flex:1 1 90px}.order-controls{flex-wrap:wrap}.paper-toolbar{gap:8px;flex-wrap:wrap}.toolbar-actions{gap:8px}.guide-ink{white-space:normal}.lesson-footer{flex-wrap:wrap}.lesson-footer>div{order:3;flex-basis:100%}.lesson-footer small{max-width:none}}
@media(forced-colors:active){button:disabled{color:GrayText;border-color:GrayText}.prompt-panel>.character-info{background:ButtonFace;color:ButtonText}}
/* Per-character study support: the same compact reading surface at every grade. */
.study-coach{margin:1.25rem 0;padding:1rem;border:1px solid #c6d6df;border-radius:12px;background:#f4f8fa;color:#173747}
.study-coach h4{margin:0 0 .8rem;font-size:1.05rem}.study-coach ol{padding-left:1.3rem}.study-coach li{margin:.65rem 0;line-height:1.75}.study-coach a{font-size:.875rem;color:#205c78}
.component-parts{display:flex;gap:.75rem;flex-wrap:wrap;margin:.7rem 0}.component-part{background:#fff;border:1px solid #c6d6df;border-radius:9px;padding:.6rem .85rem;min-width:70px}.component-part small{display:block;color:#415969}.component-glyph{display:inline-block;font-size:2.25rem;color:#163444;background:transparent;border:0;padding:.1rem}.component-analysis{line-height:1.75}.coach-radical{font-weight:600}
.knowledge-scope{display:flex;gap:.7rem;align-items:center;margin:1rem 0}.knowledge-scope select{font:inherit;padding:.5rem .75rem;color:#173747;border:1px solid #c6d6df;border-radius:8px;background:white}
.grade-support{margin:.5rem 0 1.25rem;border:1px solid #cedae1;border-radius:10px;padding:.8rem 1rem;background:#fff;color:#173747}.grade-support summary{cursor:pointer;font-weight:600}.grade-support p{line-height:1.65}.grade-support dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem 1rem;max-width:550px}.grade-support dd{margin:0;font-variant-numeric:tabular-nums}.grade-support dt{color:#415969}

@font-face{font-family:HanhoegComponents;src:url('hanja-components.woff') format('woff');font-display:swap}.component-glyph{font-family:HanjaSerif,HanjaExtras,HanhoegComponents,serif}

/* Comparison practice and portable, device-local study records. */
.contrast-intro,.contrast-question,.backup-section{padding:24px;border:1px solid var(--line);border-radius:14px;background:#fff;margin:20px 0}
.contrast-intro h3,.backup-section h3{margin-top:0}.contrast-intro p,.backup-section p,.contrast-explanation p,.contrast-browse{line-height:1.8}
.contrast-options,.contrast-actions,.backup-actions{display:flex;flex-wrap:wrap;gap:12px}.contrast-actions{margin:20px 0}.contrast-options button{font-size:48px;flex:1 1 88px;max-width:140px;min-height:96px;padding:10px}
.contrast-options button.is-answer:disabled{border:2px solid #2c6957;background:#edf7f1;color:#205242}.contrast-options button.is-mistake:disabled{border:2px solid #a63d28;background:#fff0ec;color:#8d2e20}
.contrast-question h3{font-size:30px;margin:14px 0 24px}.contrast-explanation{padding:18px 0}.contrast-explanation h4{font-size:19px;margin:0 0 14px}
.contrast-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.contrast-cards article{padding:18px;background:#f4f8fa;border:1px solid #c6d6df;border-radius:12px;min-width:0}.contrast-cards strong{display:block}.contrast-cards p{margin:10px 0 0;color:#344e5e}
.contrast-glyph{font-size:48px;color:#173747;border:0;background:transparent;padding:0 8px 8px;min-width:60px;min-height:60px}.contrast-glyph:hover{background:#e3edf3}.contrast-tip{border-left:3px solid #a53c26;padding:10px 16px;background:#fff5ed;color:#75402f}
.contrast-review,.contrast-browse,.contrast-library>details{border:1px solid var(--line);border-radius:10px;padding:14px 18px;margin:12px 0;background:#fff}.contrast-review summary,.contrast-browse summary{cursor:pointer;font-weight:600;line-height:1.8}.contrast-review summary:focus-visible,.contrast-browse summary:focus-visible{outline:3px solid #375e78;outline-offset:4px}
.backup-section>p:empty{display:none}.backup-file-label{display:block;font-weight:600}.backup-file-label input{display:block;max-width:100%;margin-top:12px;font:inherit}.backup-file-label input::file-selector-button{min-height:44px;color:#173747;background:#edf3f7;border:1px solid #c6d6df;border-radius:8px;margin-right:10px;padding:8px 12px;font:inherit}
#backup-preview p{line-height:1.8}#backup-confirm{width:100%;margin-top:16px}#contrast-panel>progress{width:100%;margin:8px 0}
.candidate-correct:disabled{color:#526777;background:#e8edf1;border-color:#c3d0d9;cursor:default}
@media(max-width:620px){.contrast-intro,.contrast-question,.backup-section{padding:18px}.contrast-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.contrast-cards article{padding:12px}.contrast-options button{flex-basis:72px;max-width:none;font-size:42px}.contrast-actions button,.backup-actions button{flex:1 1 140px}.contrast-question h3{font-size:26px}.contrast-library>details{padding:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.regional-reference{margin:1rem 0;padding:1rem;border:1px solid #d5dfe3;border-radius:12px;background:#f7fafb}
.regional-reference summary{cursor:pointer;font-weight:700;color:#173341;min-height:30px}
.regional-reference a{color:#963920;text-underline-offset:3px}
.regional-reference .knowledge-field{margin-top:1rem}
.stroke-categories{display:flex;flex-wrap:wrap;gap:8px 24px;padding-left:24px;color:#173341}
.stroke-categories li{padding:3px 5px;white-space:nowrap}
.component-reference-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0}
.component-reference-row figure{margin:0;text-align:center;max-width:100px}
.component-reference-row img{display:block;background:white;border:1px solid #d5dfe3;border-radius:6px;object-fit:contain}
.component-reference-row figcaption{font-size:.75rem;color:#50636d}
/* Subject first learning, readable labels and display-only ink settings. */
.study-home>h1{font-size:clamp(27px,4vw,38px);margin:7px 0 8px}.subject-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:28px 0}.subject-grid button{padding:20px 12px;border:1px solid #ccd8df;border-radius:16px;background:#fff;color:#183747;display:flex;align-items:center;flex-direction:column;gap:8px}.subject-grid .hanja{font-size:44px;line-height:1.3}.subject-grid strong{font-size:18px}.subject-grid small{font-size:13px;color:#526777}.subject-grid [aria-pressed=true]{background:#183747;color:white;border-color:#183747;box-shadow:0 5px 16px #132d3e19}.subject-grid [aria-pressed=true] small{color:#dce6ed}.hub-selection{padding:24px;border:1px solid #dce3e7;background:#fff;border-radius:16px;display:grid;gap:12px}.hub-selection h2{font-size:22px}.hub-selection .scope{justify-content:start}.hub-selection #hub-subject-options{display:flex;gap:20px;flex-wrap:wrap}.hub-selection label{display:flex;align-items:center;gap:10px}.hub-selection select{max-width:100%;min-height:44px}.hub-method-title{font-size:21px;margin:30px 0 14px}.hub-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.hub-method{display:flex;flex-direction:column;align-items:flex-start;gap:10px;border:1px solid #cbd8e0;border-radius:12px;background:#fff;padding:22px 18px;color:#173747;text-align:left;min-height:118px}.hub-method strong{font-size:18px}.hub-method span{font-size:14px;color:#526777}.hub-method:hover{border-color:#b7432b;background:#fcf5f1}.course-bar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:24px}.course-bar h1{font-size:25px}.subject-navigation{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}.subject-navigation [aria-current=page]{background:#183747;color:white}.lesson-context{padding:14px 18px;margin-bottom:18px;background:#e8eef2;border-radius:10px;color:#294657}.ink-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 0;color:#344f5f;font-size:14px}.ink-controls label{display:flex;align-items:center;gap:7px}.ink-controls select{padding:5px 9px;min-height:40px}.ink-controls input[type=range]{width:100px;min-height:38px;accent-color:#183747}.ink-controls output{min-width:32px;font-variant-numeric:tabular-nums}.contrast-reading{display:block;font-size:15px;color:#183747;margin:6px 0}.candidate{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;height:auto!important;gap:7px;padding:12px 6px!important}.candidate .hanja{font-size:37px;line-height:1.2}.candidate small{font:13px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#344f5f;white-space:normal}.subject-exam-nav{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.subject-exam-map{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0}.subject-exam-map button{min-width:42px;min-height:42px}.subject-exam-map [aria-current=true]{outline:2px solid #b7432b}.subject-exam-map .answered{background:#183747;color:white}.knowledge-option[aria-pressed=true]{border-color:#183747;background:#eaf0f4;color:#183747}.exam-detail{border-top:1px solid #dce3e7;padding:22px 0}.guide-render-choice{display:flex;gap:10px;align-items:center;margin-bottom:12px}.guide-render-choice select{max-width:100%}#guide-svg{background:#fff;max-width:100%}.guide-mask-note{margin-bottom:12px}
@media(max-width:700px){.subject-grid,.hub-actions{grid-template-columns:repeat(2,1fr)}.subject-grid{gap:10px;margin:20px 0}.subject-grid button{padding:16px 8px}.subject-grid strong{font-size:16px}.subject-grid small{font-size:12px}.hub-selection{padding:18px}.hub-method{padding:18px 14px;min-height:108px}.hub-method strong{font-size:16px}.course-bar{align-items:flex-start}.course-bar h1{font-size:22px}.course-bar button{font-size:13px;padding:10px;flex-shrink:0}.hub-selection #hub-subject-options{display:grid;gap:10px}.hub-selection #hub-subject-options label{display:grid;grid-template-columns:65px minmax(0,1fr)}.ink-controls{gap:6px}.ink-controls input[type=range]{width:78px}.lesson-context{font-size:14px}.candidate small{font-size:12px}}

/* Compact study surface: settings are reused inside a single menu sheet. */
.mobile-navigation{display:none}.practice-details{margin-top:10px;border-top:1px solid #dce3e7;padding-top:10px}.practice-details>summary{cursor:pointer;font-size:14px;font-weight:650}.practice-details[open]>summary{margin-bottom:12px}.prompt-panel .practice-details{border-color:#4b6574}.navigation-sheet{width:min(540px,calc(100vw - 24px))}.navigation-sheet section{margin-top:22px}.navigation-sheet section h3{font-size:16px;margin-bottom:12px}.navigation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.navigation-grid button{min-height:46px}.navigation-sheet #nav-home{width:100%}.navigation-sheet .practice-order{flex-wrap:wrap}.navigation-sheet #nav-general button{display:block;min-height:44px;margin:7px 0}.navigation-sheet #open-settings{margin-top:8px;min-height:44px}.navigation-sheet .grade-support{margin-top:14px}.navigation-sheet .ink-controls{align-items:flex-start;gap:12px}.lazy-glyph{font-size:90px;line-height:1.3}.lazy-character .source-note{margin:12px 0}.navigation-sheet .dialog-body{padding-bottom:max(24px,env(safe-area-inset-bottom))}.practice-details .tip{margin-top:12px;padding-top:12px}
@media(max-width:650px){
 body:not([data-study-mode=home]) main{padding-bottom:calc(76px + env(safe-area-inset-bottom))}.header{height:52px;padding:0 14px;gap:12px}.brand strong{font-size:21px}.brand-mark{width:32px;height:32px;font-size:23px}.header #open-navigation{padding:6px 12px;font-size:14px;min-height:40px}main{padding:12px 12px 0}.course-bar{margin:0 0 8px;min-height:32px}.course-bar .eyebrow,.course-bar #change-course{display:none}.course-bar h1{font-size:17px;margin:0}#grade-navigation,#subject-navigation{display:none!important}
#course-bar #change-course{display:none}.mobile-navigation:not([hidden]){display:grid;grid-template-columns:repeat(4,1fr);position:fixed;inset:auto 0 0;z-index:20;border-top:1px solid #d4dfe6;background:#fff;padding:5px 6px calc(5px + env(safe-area-inset-bottom));box-shadow:0 -3px 16px #132d3e0d}.mobile-navigation button{min-height:48px;border:0;border-radius:9px;background:white;color:#405766;font-size:14px;font-weight:650}.mobile-navigation [aria-current=page]{background:#e6eef3;color:#132d3e}.navigation-sheet{width:100%;max-width:100%;margin:auto 0 0;max-height:86dvh;border-radius:20px 20px 0 0}.navigation-sheet .dialog-head{position:sticky;top:0;background:#fff;z-index:1}.navigation-sheet .dialog-body{padding:14px 18px max(24px,env(safe-area-inset-bottom))}.lesson-head{margin-bottom:10px;gap:8px}.lesson-count{font-size:14px;gap:10px}.lesson-count .pill{padding:3px 9px;font-size:13px;max-width:240px}.study-layout{gap:12px}.prompt-panel{padding:15px 17px;min-height:0;border-radius:13px}.prompt-top{margin-bottom:4px;min-height:26px}.prompt-top .eyebrow{font-size:12px}.prompt-panel #bookmark{font-size:25px;width:34px;height:34px}.prompt-panel h2{font-size:29px;margin:0 0 4px}.prompt-panel #secondary-meaning:empty{display:none}.prompt-panel #answer-box{min-height:0;margin:0;padding:0}.prompt-panel #answer-hidden{display:none}.prompt-actions{margin:10px 0 0;gap:8px}.prompt-actions button{min-height:40px;padding:7px 10px;font-size:14px;flex:1 1 100px}.prompt-panel>.character-info[hidden]{display:none}.prompt-panel .character-info{margin-top:8px;min-height:40px;padding:7px 10px}.prompt-panel .practice-details{font-size:14px}.prompt-panel .glyph-stage{min-height:115px}.prompt-panel .glyph-display{min-height:105px}.prompt-panel .glyph-display .hanja{font-size:88px}.prompt-panel .glyph-display img{height:105px}.prompt-panel .glyph-note,.prompt-panel .glyph-tools,.prompt-panel .glyph-explorer>.source-note{font-size:12px}.writing-panel{padding:13px;border-radius:13px}.paper-toolbar{margin-bottom:8px;flex-wrap:nowrap;font-size:14px}.toolbar-actions{gap:8px}.settings-button{font-size:13px}.recognition-state{display:none}.paper-wrap{width:min(100%,44svh);margin-inline:auto}.canvas-tools{gap:10px;margin:9px 0;flex-wrap:wrap}.canvas-tools .text-button,.canvas-tools .check{font-size:13px;min-height:35px}.canvas-tools .grid-toggle{margin-left:auto}.writing-panel>#recognize{min-height:48px;padding:10px 14px;font-size:16px}.feedback{margin-top:10px;padding:12px;font-size:14px}.check-results{gap:5px}.check-badge{font-size:12px;padding:4px 7px}.writing-panel .secondary-mobile{display:none}.lesson-footer{margin:13px 0;gap:10px}.lesson-footer>div{display:none}.lesson-footer button{padding:10px 13px;min-height:44px}.lesson-context{font-size:13px;padding:9px 12px;margin-bottom:10px;line-height:1.5}body:not([data-study-mode=home]) .footer{display:none}.hub-selection{gap:8px;padding:14px}.subject-grid{margin:16px 0;gap:8px}.subject-grid button{padding:12px 6px;gap:5px}.subject-grid .hanja{font-size:30px}.hub-method-title{margin:18px 0 10px}.hub-method{min-height:90px;padding:14px 12px;gap:5px}.study-home>h1{font-size:27px}.study-home>.muted{font-size:14px}.hub-selection #hub-note{font-size:13px}.knowledge-heading .eyebrow,.knowledge-heading #knowledge-description{display:none}.knowledge-heading h2{font-size:21px;margin:5px 0 10px}.knowledge-toolbar{gap:8px}.knowledge-actions{gap:8px}.knowledge-card{padding:16px 14px}.knowledge-card .knowledge-text{font-size:32px}.exam-intro{display:none}.exam-config{padding:18px}.section-heading{margin-bottom:12px}.exam-config label{font-size:14px}.resume-banner{font-size:13px;padding:10px}.result-overview{padding:18px}.guide-mask-note{font-size:12px}#writing-guide-body #guide-svg{max-height:42svh;width:100%}
}
.memory-scene{font-size:1rem;line-height:1.8}.memory-contrast{border-left:3px solid var(--accent,#b7432b);padding:.6rem .8rem;margin:1rem 0;background:#fbf3ee}.memory-contrast h5,.memory-details h5{font-size:1rem;margin:.3rem 0}.memory-neighbours{display:flex;flex-wrap:wrap;gap:.45rem}.memory-neighbour{background:#fff;border:1px solid #c6d1d6;border-radius:8px;color:#183747;padding:.5rem;min-height:44px;font-size:.9rem}.memory-details,.memory-recall{border-top:1px solid #dce4e8;margin-top:.75rem;padding:.7rem 0}.memory-recall summary{font-weight:600}.recovery-section{background:#edf3f6;border:1px solid #d3dfe5;border-radius:14px;padding:18px;margin-bottom:18px}.recovery-section h3{margin:0}.recovery-actions,.recovery-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}#recovery-dialog{max-width:580px}#recovery-dialog input[type=password],#recovery-dialog input[type=text]{width:100%;min-height:48px;margin:8px 0 12px;font:1rem monospace;box-sizing:border-box}#recovery-create{width:100%}#recovery-preview{padding:14px;border:1px solid #a5bac5;border-radius:10px;margin-top:18px}.profile-grades{margin:1rem 0}.profile-grade-row{display:grid;grid-template-columns:65px 1fr 95px;gap:10px;align-items:center;margin:12px 0}.profile-grade-row progress{width:100%}.header-profile{background:transparent;color:#183747;border:1px solid #ccd6dd;border-radius:9px;padding:8px 12px;min-height:40px}
@media(max-width:650px){.lesson-footer,.exam-navigation,.subject-exam-nav{display:none}.mobile-navigation{grid-template-columns:1fr 1fr 1fr 1fr}.mobile-navigation button{font-size:.9rem;min-height:48px}.mobile-navigation #mobile-next{background:#183747;color:#fff;border-radius:9px}.mobile-navigation button:disabled{opacity:.4}.header-profile{font-size:.85rem;padding:6px 8px}.profile-grade-row{font-size:.9rem;grid-template-columns:58px 1fr 85px}.recovery-section{padding:14px}.memory-neighbour{font-size:.9rem}.knowledge-actions:has([data-study-step]){display:none}}

#ink-report-label{width:3.5rem;min-height:44px;margin:8px;color:var(--ink);background:white;border:1px solid var(--line);border-radius:6px;text-align:center;font-size:1.75rem}#ink-report-save{display:block;margin-top:10px;min-height:44px}#ink-report .muted{font-size:14px;line-height:1.7}

/* Daily learning: actionable progress without changing saved record semantics. */
.hub-today{margin-top:20px;padding:24px;border:1px solid #cbd8e0;border-radius:16px;background:#f0f5f8}.hub-today-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.hub-today-heading h2{font-size:22px;margin:0}.hub-today-heading button{font-size:14px;min-height:44px}.hub-today>p{font-size:14px;line-height:1.65;margin:8px 0}.hub-today progress{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:8px;overflow:hidden;background:#d7e2e9}.hub-today progress::-webkit-progress-bar{background:#d7e2e9}.hub-today progress::-webkit-progress-value{background:#183747}.hub-today progress::-moz-progress-bar{background:#183747}.hub-today-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.hub-today-actions>div{padding:18px;background:white;border:1px solid #d4dfe6;border-radius:12px;display:flex;flex-direction:column;gap:8px;min-width:0}.hub-today-actions span{font-size:14px;color:#405766}.hub-today-actions strong{font-size:28px;font-weight:600;color:#183747}.hub-today-actions button{min-height:46px;font-size:14px;padding:10px 8px;margin-top:4px;white-space:normal}.hub-today-actions button:disabled{opacity:1;color:#657782;background:#edf1f4;border-color:#e0e7ec;cursor:default}
@media(max-width:650px){.hub-today{padding:16px;margin-top:14px}.hub-today-heading h2{font-size:20px}.hub-today-actions{grid-template-columns:1fr;gap:8px;margin-top:12px}.hub-today-actions>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:12px 14px;align-items:center}.hub-today-actions strong{font-size:24px;grid-column:1}.hub-today-actions button{grid-column:2;grid-row:1/3;max-width:170px;margin:0}.hub-today>p{margin:8px 0}.hub-today-heading{gap:8px}}

.practice-finish-actions{display:flex;gap:10px;flex-wrap:wrap}.practice-finish-actions button{min-height:44px;flex:1 1 160px}#practice-finish-dialog{max-width:540px;width:calc(100% - 32px)}

.practice-memory{background:#f3f7f9;color:#203d4a;padding:14px 16px;border-radius:12px;margin:12px 0;text-align:left}.practice-memory p{margin:7px 0;line-height:1.65}.practice-memory .source-note{font-size:12px;color:#516a74}

.prompt-actions .outline-button:not(:disabled){color:#fff;background:#213c4d}.prompt-actions .outline-button:not(:disabled):hover{color:#fff;background:#345365}.prompt-actions .outline-button:disabled{color:#c4d6e2;background:#263e4f}.prompt-actions .outline-button.active:not(:disabled){color:#132d3e;background:#fff}
.mobile-navigation button{color:#183747;background:#fff}.mobile-navigation button:disabled{color:#526777;background:#e8edf1;opacity:1}

.practice-memory .tip-label{color:#405766}

/* Work/topic controls retain bounded width for long excerpt titles. */
#hub-subject-options>label{min-width:0;max-width:100%;flex-wrap:wrap}#hub-selection{min-width:0;max-width:min(100%,40rem)}#knowledge-work{min-width:0;max-width:100%}

/* Reuse the original writing entry and edit actions in the mobile dock. */
.mobile-writing-actions{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.7fr);gap:8px;padding-bottom:5px;border-bottom:1px solid #dce3e7}
@media(max-width:650px){
 body:not([data-study-mode=home]) main{padding-bottom:calc(var(--mobile-navigation-height,calc(76px + env(safe-area-inset-bottom))) + 18px)}
 body.has-writing-dock main{padding-bottom:calc(var(--mobile-navigation-height,calc(134px + env(safe-area-inset-bottom))) + 18px)}
 .mobile-navigation:not([hidden]){grid-template-columns:repeat(5,minmax(0,1fr));padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right))}
 .mobile-navigation>button{min-width:0;padding:6px 3px;line-height:1.3;overflow-wrap:anywhere}
 .mobile-navigation #nav-write{font-size:14px;word-break:keep-all}
 .mobile-navigation #nav-write[aria-current=page]{background:#e6eef3;color:#132d3e}
 .mobile-writing-actions button{min-width:0;min-height:48px;padding:8px 5px;font-size:14px;line-height:1.35;white-space:normal;overflow-wrap:anywhere}
 .mobile-writing-actions #recognize{margin:0;width:100%;padding:8px 10px;background:#bf462e;color:#fff}
 .mobile-writing-actions #undo{background:#edf2f5;color:#183747}
 .mobile-writing-actions #clear{margin-right:8px;border:1px solid #e5b4a7;background:#fff4f0;color:#96321f}
 .mobile-writing-actions button:disabled{background:#e8edf1!important;color:#526777!important;border-color:#d4dfe6!important}
 .has-writing-dock #mobile-next{background:#fff;color:#183747;box-shadow:inset 0 0 0 1px #d4dfe6}
 .writing-panel{scroll-margin-top:12px;scroll-margin-bottom:calc(var(--mobile-navigation-height,134px) + 18px)}
 #pad{scroll-margin-bottom:calc(var(--mobile-navigation-height,134px) + 18px)}
}

/* Recognition notices stay above the writing dock, wrap on narrow screens,
   and never intercept ink or navigation. Persistent feedback remains below. */
.recognition-toast{position:fixed;z-index:50;top:calc(env(safe-area-inset-top) + 16px);left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;max-width:32rem;margin-inline:auto;padding:12px 18px;border-radius:12px;background:#132d3e;color:#fff;box-shadow:0 6px 24px #132d3e33;font-size:1rem;line-height:1.6;text-align:center;overflow-wrap:anywhere;pointer-events:none}
.recognition-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* The page header is available only at the top. Preserve its normal-flow
   space so scrolling, restored positions and short pages never jump. */
.header{position:static}
.header.is-scrolled-away{visibility:hidden;pointer-events:none}

/* Keep revealed reference examples compact without shrinking the writing pad. */
#answer-box:has(#answer-explorer:not([hidden])){flex:0 0 auto;min-width:0;padding:6px 0}
#answer-explorer .glyph-explorer{margin:6px 0;padding:10px}
#answer-explorer .glyph-stage{min-height:136px;grid-template-columns:44px minmax(0,1fr) 44px;gap:4px}
#answer-explorer .glyph-display{min-height:128px;padding:0}
#answer-explorer .glyph-display .hanja{font-size:96px;line-height:1.2}
#answer-explorer .glyph-display img{width:min(100%,128px);height:128px;object-fit:contain}
#answer-explorer .glyph-arrow{width:44px;height:44px}
#answer-explorer .glyph-tools{gap:8px}
#answer-explorer .glyph-tools button{min-height:44px;padding:4px 8px}
#answer-explorer .glyph-explorer>.source-note{margin:4px 0 0}
#answer-explorer .word-examples{padding-top:8px;margin-top:6px}
#answer-explorer .word-examples h4{margin-bottom:4px}
#answer-explorer .example-word{gap:8px;padding:2px 0;min-width:0}
#answer-explorer .example-hanja{flex:1;min-width:0;gap:0}
#answer-explorer .example-hanja button{font-size:24px;line-height:1.3;min-width:44px;min-height:44px;padding:2px 4px;flex-shrink:0}
#answer-explorer .example-reading{font-size:14px;max-width:40%;overflow-wrap:anywhere}
#answer-explorer .word-examples small{margin-top:4px;line-height:1.5}
#answer-explorer .lazy-character>.source-note{margin:4px 0}
#answer-box #answer-meta{margin-top:4px}
@media(max-width:650px){
 .prompt-panel #answer-box{grid-column:1/-1;grid-row:auto;min-width:0}
 .prompt-panel #practice-memory,.prompt-panel #prompt-tools{grid-column:1/-1}
 #answer-explorer .glyph-explorer{margin:4px 0;padding:8px}
}
@media(max-width:850px){
 #answer-explorer .glyph-stage{min-height:96px}
 #answer-explorer .glyph-display{min-height:88px}
 #answer-explorer .glyph-display .hanja,#answer-explorer .lazy-glyph{font-size:64px;line-height:1.2}
 #answer-explorer .glyph-display img{width:min(100%,88px);height:88px}
}
@media(max-width:650px){
 #answer-explorer .example-hanja button{font-size:22px}
}

/* v48: a separate in-flow reading surface; the study DOM stays mounted. */
.hub-reader-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#edf3f3;border:1px solid #d3e0df;border-radius:12px;padding:22px;margin:24px 0}.hub-reader-entry h2{font-size:19px}.hub-reader-entry button{flex-shrink:0}.reader-entry-button{display:block;margin:16px 0}
body.reader-active{padding-bottom:32px!important}.reader-active .header,.reader-active #mobile-navigation,.reader-active main>:not(#reader-panel){display:none!important}.reader-active main{max-width:960px;padding-top:28px}.reader-panel{max-width:840px;margin:0 auto;padding-bottom:36px;overflow-wrap:anywhere}.reader-navigation{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:36px}.reader-heading{margin-bottom:28px}.reader-heading h1{font-size:clamp(28px,4.5vw,42px);line-height:1.35;letter-spacing:-.045em;margin:12px 0 16px}.reader-subtitle{font-size:18px;color:#526975;max-width:40em;line-height:1.75}.reader-intro{font-size:18px;line-height:1.9;margin-bottom:32px}.reader-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.reader-preview{text-align:left;background:white;border:1px solid var(--line);border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:12px}.reader-preview:hover{border-color:#687985;background:#fafdfd}.reader-preview h2{font-size:21px;line-height:1.5;letter-spacing:-.03em}.reader-preview p{color:#526975;font-size:15px;line-height:1.8}.reader-preview-link{margin-top:auto;padding-top:8px;font-size:14px;font-weight:700}.reader-article{background:#fff;border:1px solid var(--line);border-radius:14px;padding:36px 42px}.reader-article h2{font-size:23px;line-height:1.5;letter-spacing:-.03em;margin-bottom:18px}.reader-article h3{font-size:17px;line-height:1.6}.reader-section{margin:36px 0}.reader-section p{font-size:17px;line-height:2;margin:16px 0}.reader-extracts{padding:28px;background:#f4f7f7;border-radius:10px;margin:32px 0}.reader-extract{padding:20px 0;border-top:1px solid #dce3e7}.reader-extract:first-of-type{border-top:0;padding-top:0}.reader-extract:last-child{padding-bottom:0}.reader-extract p{margin-top:10px;line-height:1.9}.reader-original{font-size:26px;letter-spacing:.045em;word-break:normal}.reader-reading{font-size:15px;color:#526975}.reader-note{font-size:15px;color:#526975}.reader-takeaway{border-left:3px solid #bf462e;padding:6px 0 6px 22px;margin:36px 0}.reader-takeaway p{font-size:17px;line-height:1.9}.reader-sources{border-top:1px solid var(--line);padding-top:30px;margin-top:36px;color:#526975;font-size:14px;line-height:1.9}.reader-sources h2{font-size:20px}.reader-source-group{margin:20px 0}.reader-source-group p{margin:8px 0}.reader-sources a{text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.reader-sources ul{padding-left:20px}.reader-sources li{margin:14px 0}.reader-end-navigation{display:flex;gap:16px;align-items:center;justify-content:center;padding:32px 0 0}.reader-notice{padding:20px;border:1px solid var(--line);margin:20px 0}.reader-ad-slot{border-top:1px solid var(--line);margin:64px auto 0;padding-top:24px;max-width:728px}.reader-ad-heading{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#526975;margin-bottom:32px}.reader-ad-heading button{min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:6px;background:white}.reader-ad-body{min-height:250px;width:100%;display:block}.reader-ad-body>.muted{text-align:center;padding-top:100px}
@media(max-width:650px){.hub-reader-entry{align-items:stretch;flex-direction:column;padding:20px}.reader-active main{padding:18px 16px 0}.reader-navigation{gap:8px;margin-bottom:26px}.reader-navigation button{font-size:14px}.reader-grid{grid-template-columns:1fr}.reader-article{padding:24px 20px}.reader-intro{font-size:17px}.reader-extracts{padding:20px 16px;margin-left:-4px;margin-right:-4px}.reader-original{font-size:23px}.reader-section p{font-size:16px;line-height:1.95}.reader-end-navigation{flex-wrap:wrap;gap:12px}.reader-ad-slot{margin-top:64px}.reader-preview{padding:22px}}

/* One shared settings entry for writing, cards and subject learning. */
.course-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}.course-actions #open-pad-menu{min-height:44px;white-space:nowrap}
.learning-settings{width:min(540px,calc(100vw - 24px));max-height:88vh;max-height:88dvh}.learning-settings .dialog-body{min-height:0;min-width:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;padding-bottom:max(24px,env(safe-area-inset-bottom))}.learning-settings section+section{border-top:1px solid var(--line);margin-top:22px;padding-top:20px}.learning-settings h3{font-size:17px;margin:0 0 12px}.learning-settings p{font-size:14px;line-height:1.7}.learning-settings .practice-order{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.learning-settings .grade-support{margin-top:16px}.learning-settings .ink-controls{align-items:flex-start}.learning-settings #open-settings{min-height:44px;margin-top:8px}.learning-settings .dialog-head{flex:0 0 auto;position:sticky;top:0;background:#fff;z-index:1}
/* The contained body must shrink inside the bounded dialog. Without this flex
   boundary it grows to its content height and traps gestures instead of scrolling. */
.learning-settings[open]{display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
html:has(#display-dialog[open]),body:has(#display-dialog[open]){overflow:hidden;overscroll-behavior:none}
@media(max-width:650px){.course-actions{gap:0}.course-actions #open-pad-menu{font-size:13px;padding:7px 10px;min-height:44px}.course-bar>div:first-child{min-width:0}.learning-settings{width:100%;max-width:100%;margin:auto 0 0;max-height:86dvh;border-radius:20px 20px 0 0}.learning-settings .dialog-body{padding:14px 18px max(24px,env(safe-area-inset-bottom))}}


/* v49: one shared navigation bar, with the same nodes on desktop and mobile. */
#grade-navigation,#subject-navigation{display:none!important}
#course-bar #change-course{display:none}
body:not([data-study-mode=home]) .header #open-navigation,body:not([data-study-mode=home]) .header #open-profile{display:none}
.mobile-navigation:not([hidden]){display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-items:center;margin:0 0 24px;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff}
.mobile-navigation>button{min-width:0;min-height:48px;padding:8px 6px;border:0;border-radius:8px;font-size:14px;font-weight:650;line-height:1.4;word-break:keep-all;overflow-wrap:anywhere}
.mobile-navigation [aria-current=page]{background:#e6eef3;color:#132d3e;box-shadow:inset 0 0 0 1px #bfd0dc}
.mobile-navigation #mobile-next{background:#183747;color:#fff}
.mobile-navigation button:disabled{background:#e8edf1;color:#526777;box-shadow:none}
.lesson-footer>#prev,.lesson-footer>#next{display:none}
.lesson-footer{justify-content:center}
.knowledge-actions:has(>[data-study-step]){display:none}
@media(max-width:650px){
 .mobile-navigation:not([hidden]){gap:3px;margin:0;border-radius:0;border-width:1px 0 0;padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
 .mobile-navigation>button,.mobile-navigation #nav-write{font-size:12px;padding:6px 2px;min-height:48px}
 .mobile-navigation #open-pad-menu{font-size:12px}
}

/* Keep answer-clearing actions distinct while relocating duplicate steps. */
.exam-navigation>#exam-prev,.exam-navigation>#exam-next,.subject-exam-nav>[data-study-step]{display:none}
@media(max-width:650px){.exam-navigation,.subject-exam-nav{display:flex;justify-content:center}.lesson-footer{display:flex}.lesson-footer>div{display:block;text-align:center}.lesson-footer small{display:block}}

/* v51: shared desktop navigation and honest, reversible mastery state. */
@media(min-width:651px){
 .mobile-navigation:not([hidden]){position:sticky;top:8px;z-index:21;grid-template-columns:repeat(8,minmax(0,1fr));box-shadow:0 4px 18px #1837470c}
 .nav-mobile-only{display:none!important}
 #exercise,#catalog,#progress-panel,#practice-empty{scroll-margin-top:88px}
}
@media(max-width:650px){.nav-desktop-only{display:none!important}}
.current-mastery{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;flex-wrap:wrap}.current-mastery>button{min-height:40px}
.mastery-badge{display:inline-block;border:1px solid #697d8a;border-radius:999px;background:#f3f6f8;color:#354957;padding:4px 9px;font-size:12px;font-weight:700;line-height:1.4}
.mastery-badge.status-learning{background:#eaf1fb;color:#234b7b;border-color:#6084b4}
.mastery-badge.status-weak{background:#fff0e5;color:#873b09;border-color:#bb6c33}
.mastery-badge.status-mastered{background:#e5f3e9;color:#235e39;border-color:#48875e}
.mastery-badge.status-unseen{border-style:dashed}
.char-card.status-mastered{border:2px solid #48875e;background:#f5fbf7}.char-card.status-learning{border:2px solid #7898bf}.char-card.status-weak{border:2px solid #ba6b32;background:#fff8f1}.char-card.status-unseen{border:1px dashed #91a0ac}
.char-card .mastery-badge{margin-top:8px;white-space:normal;font-size:11px}.char-card:focus-visible{outline:3px solid #183747;outline-offset:3px}
.catalog-filters{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0 10px}.catalog-filters button{min-height:44px;background:#fff;color:#354957;border:1px solid #9aaab6;border-radius:999px;padding:8px 14px;font-weight:650}.catalog-filters button[aria-pressed=true]{background:#183747;color:#fff;border-color:#183747}.mastery-legend{color:#526975;font-size:13px;line-height:1.6;margin-bottom:18px}
.mastery-overview{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px;margin:24px 0}.mastery-overview progress{width:100%;height:14px;accent-color:#39764d}.mastery-overview .section-heading{align-items:center;margin-bottom:12px}.mastery-overview h3{font-size:20px}.mastery-medals{list-style:none;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:22px 0}.mastery-medal{border:1px dashed #9aaab6;border-radius:12px;padding:14px 8px;display:flex;flex-direction:column;align-items:center;gap:7px;background:#f6f7f8;color:#526975;text-align:center;font-size:12px}.mastery-medal>span:first-child{font-size:28px;filter:grayscale(1)}.mastery-medal strong{font-size:14px}.mastery-medal.earned{border:2px solid #997323;background:#fff9e8;color:#665019}.mastery-medal.earned>span:first-child{filter:none}.mastery-explanation{border-top:1px solid var(--line);padding-top:14px;font-size:14px;line-height:1.8}.mastery-explanation summary{cursor:pointer;font-weight:650}.mastery-explanation p{margin:12px 0}
.character-mastery{padding:16px;border:1px solid var(--line);border-radius:10px;margin:16px 0}.character-mastery .muted{font-size:13px;margin:10px 0}.practice-available-count{font-weight:700;color:#214c61;border-left:3px solid #497184;padding:8px 12px;margin:14px 0}
#practice-settings select{max-width:60%;min-height:44px;background:#fff;color:#183747;border:1px solid #879eac;border-radius:7px;padding:8px}#practice-settings .setting-row{gap:14px}#practice-settings .muted{font-size:13px;line-height:1.65}#practice-empty{padding:32px;border:1px solid var(--line);border-radius:14px;background:#fff;line-height:1.8}#practice-empty button{margin:12px 10px 0 0}#practice-empty h2{font-size:22px}
@media(max-width:650px){.mastery-overview{padding:18px 14px}.mastery-overview .section-heading{align-items:flex-start;gap:12px;flex-wrap:wrap}.mastery-medals{gap:6px}.mastery-medal{padding:12px 3px;font-size:11px}.mastery-medal strong{font-size:12px}.mastery-medal>span:first-child{font-size:25px}.catalog-filters{gap:6px}.catalog-filters button{font-size:12px;padding:8px 10px}.char-card .mastery-badge{font-size:10px;padding:3px 5px}.current-mastery{margin-bottom:9px}#practice-settings .setting-row{align-items:center}#practice-settings select{font-size:13px;max-width:58%}}
/* Configurable mixed mock exams: shared allocation, touch and keyboard controls. */
.exam-mix{grid-column:1/-1;min-width:0;margin:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:#f7fafb}.exam-mix legend{font-size:15px;font-weight:700;padding:0 6px}.exam-mix-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.exam-mix-values label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:650;min-width:0}.exam-mix input[type=number]{width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #b8c7d1;border-radius:7px;font:inherit;font-size:16px;color:var(--ink);background:white;font-variant-numeric:tabular-nums}.exam-mix-slider-label{display:block;font-size:13px;margin-top:14px;color:var(--muted)}#exam-mix-slider{display:block;width:100%;min-height:44px;margin:0;accent-color:var(--ink)}.exam-mix p{margin:4px 0}.exam-mix .muted{font-size:13px}.exam-mix-summary{font-size:14px;font-weight:650;line-height:1.75}.exam-mix-footer{display:flex;align-items:center;flex-wrap:wrap;gap:5px 14px;margin-top:10px}.exam-mix-footer .text-button{font-size:14px;min-height:44px;padding:7px 0}.exam-mix-footer p{flex:1 1 150px}.exam-mix input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}@media(max-width:380px){.exam-mix{padding:12px}.exam-mix-values{gap:10px}.exam-mix-values label{font-size:13px}}

/* Device disconnect is a visible secondary action, separate from server deletion. */
#recovery-disconnect{display:block;width:100%;margin:4px 0 16px;border-color:#51758a;background:#e9f1f5;color:#163e55}
#recovery-disconnect:hover:not(:disabled){background:#dceaf2}

.manual-correction{margin-top:14px;padding:12px;border:1px dashed var(--line);border-radius:10px}.manual-correction p{margin:0 0 8px;font-size:14px;line-height:1.6}
.manual-correction .candidate-correct{min-height:44px;padding:10px 12px;font-size:14px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff}

/* v54: a short card reveal, bounded references, and one fixed learning dock. */
body[data-study-mode=learn] #answer-box{flex:0;min-height:0;padding:0;margin:0}
body[data-study-mode=learn] #answer-meta{margin:12px 0 0;font-size:13px}
body[data-study-mode=learn] .prompt-actions:has(>button[hidden]){display:none}
body[data-study-mode=learn] .learn-panel{min-height:320px;padding:24px}
body[data-study-mode=learn] .learn-glyph{font-size:128px;margin:8px 0 16px;line-height:1.25}
body[data-study-mode=learn] .prompt-panel{align-self:stretch}
.card-reference-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:18px}
.card-reference-actions button{background:#213c4d;border-color:#688293;color:#fff;padding:8px;min-height:44px}
.card-reference-actions button:hover{background:#345365}
.study-details-dialog{width:min(760px,calc(100vw - 24px));max-height:min(84dvh,850px);padding:0;overflow:hidden}
.study-details-dialog[open]{display:flex;flex-direction:column}
.study-details-dialog .dialog-heading{flex:none;padding:16px 20px;gap:12px}
.study-details-dialog .dialog-heading h2{font-size:20px}
.study-detail-tabs{display:flex;flex:none;gap:6px;padding:0 20px 12px;border-bottom:1px solid var(--line)}
.study-detail-tabs button{flex:1;min-width:0;min-height:44px;padding:8px;border:1px solid #a4b3bd;border-radius:8px;background:#fff;color:#183747;font-size:14px;font-weight:650}
.study-detail-tabs button[aria-selected=true]{background:#183747;color:#fff;border-color:#183747}
.study-details-dialog .dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 22px;scrollbar-gutter:stable}
.study-details-dialog .study-coach{margin-top:0}
.study-detail-footer{display:flex;flex:none;justify-content:space-between;gap:12px;padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}
.study-details-dialog .glyph-display{min-height:110px}.study-details-dialog .glyph-stage{min-height:140px}
.study-details-dialog .glyph-display .hanja{font-size:90px}.study-details-dialog .glyph-display img{max-height:140px}
body:not([data-study-mode=home]) main{padding-bottom:calc(var(--mobile-navigation-height,76px) + 22px + env(safe-area-inset-bottom))}
.mobile-navigation:not([hidden]){position:fixed;inset:auto 0 0;top:auto;z-index:21;grid-template-columns:repeat(6,minmax(0,1fr));margin:0;border-radius:0;border-width:1px 0 0;box-shadow:0 -3px 18px #18374712}
.mobile-navigation .nav-desktop-only{display:none!important}
@media(min-width:651px){
 .mobile-navigation:not([hidden]){padding:10px max(24px,calc((100vw - 1096px)/2)) max(10px,env(safe-area-inset-bottom));gap:10px}
 .mobile-navigation>button{min-height:48px;padding:8px 12px;font-size:14px}
 #exercise,#catalog,#progress-panel,#practice-empty{scroll-margin-top:16px;scroll-margin-bottom:calc(var(--mobile-navigation-height,76px) + 22px)}
}
@media(max-width:650px){
 body[data-study-mode=learn] .learn-panel{padding:18px;min-height:260px}
 body[data-study-mode=learn] .learn-glyph{font-size:100px}
 .card-reference-actions{margin-top:12px;gap:6px}
 .card-reference-actions button{font-size:13px}
 .study-details-dialog{width:calc(100vw - 16px);max-height:88dvh;border-radius:14px}
 .study-details-dialog .dialog-heading{padding:14px 16px}.study-details-dialog .dialog-heading h2{font-size:18px}
 .study-detail-tabs{padding:0 12px 10px;gap:5px}.study-detail-tabs button{font-size:13px;padding:7px 4px}
 .study-details-dialog .dialog-body{padding:16px}.study-detail-footer{padding-inline:14px}
}
/* Canonical radical ranges and dependent checkbox pickers. */
.radical-picker{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:14px;min-width:0}.radical-dropdown{position:relative;min-width:0}.radical-picker-label{font-size:14px;font-weight:650;margin-bottom:6px}.radical-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-weight:600}.radical-dropdown-trigger span:first-child{overflow-wrap:anywhere;min-width:0}.radical-dropdown-trigger[aria-expanded=true]{border-color:var(--accent)}.radical-dropdown-panel{position:absolute;inset:100% 0 auto;z-index:40;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #132d3e26;padding:6px;max-height:min(440px,60vh);overflow-y:auto;overscroll-behavior:contain}.radical-picker-actions{display:flex;gap:10px;position:sticky;top:-6px;background:var(--paper);z-index:1;border-bottom:1px solid var(--line);padding:4px}.radical-picker-actions button{min-height:44px;padding:8px 12px;color:var(--ink)}.radical-picker .radical-check{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px;cursor:pointer;border-radius:6px;font-size:14px}.radical-check:hover,.radical-check:focus-within{background:var(--bg)}.radical-check input{width:20px;height:20px;flex:none;accent-color:var(--ink)}.radical-check span{min-width:0;overflow-wrap:anywhere}.radical-item-options fieldset{border:0;margin:0;padding:6px 0 8px;min-width:0}.radical-item-options legend{font-weight:700;font-size:14px;padding:8px}.radical-picker-note{grid-column:1/-1}.radical-catalog-note{margin-bottom:18px}.radical-stroke-section{margin:0 0 28px}.radical-stroke-section h3{font-size:19px;border-bottom:1px solid var(--line);padding:0 0 8px;margin:0 0 14px;color:var(--ink)}
@media(max-width:700px){.radical-picker{grid-template-columns:minmax(0,1fr);gap:12px}.radical-dropdown-panel{position:static;margin-top:6px;max-height:45dvh;box-shadow:none}.radical-picker .radical-check{min-height:46px}.radical-picker-note{font-size:13px}.radical-stroke-section h3{font-size:17px}}

/* Writing answers stay compact; reference content opens only on request. */
body[data-study-mode=write] #answer-box{flex:0 0 auto;min-height:0;padding:8px 0 4px}
body[data-study-mode=write] #answer-char{font-size:84px;line-height:1.15}
#prompt-tools-body{width:100%;min-width:0;padding-top:8px}
#prompt-tools>summary,#comparison-details>summary{min-height:44px;line-height:1.5;padding-block:10px;cursor:pointer}
#comparison-details{width:100%;margin-top:8px;grid-column:1/-1}
#comparison-details .contrast-panel{margin:8px 0}
#comparison-details .contrast-panel>h3{color:#dbe7ef;font-size:15px}
#comparison-details .contrast-group{margin:8px 0}
#prompt-tools-body .tip{display:block;margin-top:14px;padding-top:12px}
.writing-panel .paper-toolbar .grid-toggle{margin-left:0;min-height:44px;font-size:13px}
.writing-panel>.canvas-tools{display:none}
@media(max-width:650px){body[data-study-mode=write] #answer-char{font-size:64px}.paper-toolbar .toolbar-actions{gap:10px;flex-wrap:wrap}.writing-panel .paper-toolbar .grid-toggle{min-height:40px}}

/* Complete poems retain their verse lines without changing sentence-writing cells. */
.poetry-card .knowledge-text,.poetry-card .knowledge-field p{white-space:pre-line}
.poetry-title{font-weight:650;color:#405766;margin:0 0 12px}

/* Header shortcuts stay distinct from the study navigation dock. */
.header-actions{display:flex;align-items:center;gap:8px;min-width:0}
.header-actions>.header-profile{white-space:nowrap;min-height:44px;flex-shrink:0}
.header-actions #open-server-recovery{border-color:#51758a;background:#edf3f6}
body:not([data-study-mode=home]) .header-actions #open-navigation,body:not([data-study-mode=home]) .header-actions #open-profile{display:block}
.recovery-summary{margin:16px 0;padding:14px;background:#edf3f6;border:1px solid #d3dfe5;border-radius:10px}
#recovery-dialog-state{font-weight:650}#recovery-save-dialog{width:100%}
@media(max-width:650px){
 .header{height:auto;min-height:104px;flex-wrap:wrap;gap:8px;padding:10px 14px}
 .header .brand{flex-basis:100%}
 .header-actions{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px}
 .header-actions>.header-profile,.header .header-actions #open-navigation{font-size:13px;min-height:44px;padding:7px 8px}
 .header-actions #open-server-recovery{min-width:0;white-space:normal;overflow-wrap:anywhere}
}

.exam-type-ratios{grid-template-columns:repeat(3,minmax(0,1fr))}#exam-typed-host{margin-top:20px}#exam-typed-host label{display:block;font-weight:650;margin-bottom:8px}#exam-typed-answer{width:100%;min-width:0;min-height:52px;padding:12px;border:1px solid #b8c7d1;border-radius:8px;font:inherit;font-size:20px;background:#fff;color:var(--ink)}#exam-typed-answer:focus-visible{outline:3px solid var(--accent);outline-offset:3px}#exam-typed-help{font-size:14px;margin-top:8px}.result-card>p{overflow-wrap:anywhere}@media(max-width:380px){.exam-type-ratios{grid-template-columns:1fr}}
/* Device-local answer display preferences; usable without horizontal scrolling. */
#answer-display-settings .setting-row{gap:12px;align-items:center}#answer-display-settings select{min-width:0;max-width:65%;font:inherit}#answer-display-settings p{overflow-wrap:anywhere}.display-auxiliary{min-width:0;padding:12px;border:1px solid var(--line,#dedbd2);border-radius:12px}.display-auxiliary legend{font-weight:700}.display-auxiliary-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0}.display-auxiliary-row[hidden]{display:none}.display-auxiliary-row label:first-child{display:flex;align-items:center;gap:9px;min-width:0}.display-auxiliary-row input{width:20px;height:20px;flex-shrink:0}.display-auxiliary-row select{max-width:none!important;min-width:82px!important;min-height:40px}.display-auxiliary-row label:last-child{flex-shrink:0}.display-auxiliary-row .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Server-save status is separate from recognition feedback; failures persist. */
.recovery-toast{position:fixed;z-index:60;top:calc(env(safe-area-inset-top) + 12px);left:12px;right:12px;max-width:34rem;margin-inline:auto;padding:12px;display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-radius:12px;background:#132d3e;color:#fff;box-shadow:0 6px 24px #132d3e33;overflow-wrap:anywhere}
.recovery-toast[hidden]{display:none}
.recovery-toast span{flex:1 1 180px}
.recovery-toast button{min-height:44px;padding:6px 10px;background:#fff;color:#132d3e}
.recovery-toast[data-error="true"]{border:2px solid #b54629}
.header-actions #quick-server-save{border-color:#51758a;background:#edf3f6}
/* Keep exam presets and their current allocation visible; disclose only ratio editing. */
.exam-mix-overview,.exam-ratio-details{grid-column:1/-1;min-width:0}.exam-mix-overview p{margin:0}.exam-mix-overview p+p{margin-top:6px}.exam-ratio-details{padding:12px 16px;border:1px solid var(--line);border-radius:12px}.exam-ratio-details>summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:15px;font-weight:650;line-height:1.6}.exam-ratio-details>summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.exam-ratio-details>.exam-mix{margin-top:16px}
/* Long translations and enlarged text must wrap without shrinking switches. */
#settings-dialog{overflow-wrap:anywhere}
#settings-dialog .setting-row>span{min-width:0}
#settings-dialog select{min-width:0;max-width:100%}
/* A tall translated heading must not cover keyboard-focused controls. */
#settings-dialog[open]{display:flex;flex-direction:column}
#settings-dialog .dialog-head{flex:none;position:static}
#settings-dialog .settings-body{min-height:6rem;overflow:auto}
