:root{color-scheme:dark;--bg:#111719;--panel:#1b2426;--line:#334043;--text:#e9eee9;--muted:#a4b3b0;--accent:#d5e99f;--ink:#1b2516;--bad:#ffaaa0;--hero-start:#29382f;--hero-end:#1d2926;--hero-line:#46534a;--hover:#253133}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.65 system-ui,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit;background:transparent;border:1px solid var(--line);border-radius:9px;padding:10px 15px}button:hover,button:focus-visible{border-color:var(--accent)}button:disabled{opacity:.5;cursor:default}a{color:var(--accent)}.shell{display:grid;grid-template-columns:245px 1fr;min-height:100vh}aside{position:sticky;top:0;height:100vh;border-right:1px solid var(--line);padding:35px 22px;display:flex;flex-direction:column}.brand{color:var(--text);text-decoration:none;font-size:31px;font-weight:800;letter-spacing:-2px}.brand span{color:var(--accent)}.sub,.eyebrow,footer{font-size:11px;letter-spacing:2px;color:var(--muted);font-weight:700}nav{margin-top:35px}nav button{display:block;width:100%;text-align:left;border:0;margin-bottom:8px;color:var(--muted)}nav button.active{background:var(--panel);color:var(--accent)}footer{margin-top:auto}main{width:100%;max-width:1080px;margin:0 auto;padding:52px 42px 80px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:26px;margin:18px 0}.hero{background:linear-gradient(120deg,var(--hero-start),var(--hero-end) 65%);padding:34px;border-radius:22px;border:1px solid var(--hero-line)}.hero h1{max-width:780px}h1,h2,h3,p{margin-top:0}h1{font:500 clamp(32px,5vw,57px)/1.12 Georgia,serif;letter-spacing:-1.6px;margin-bottom:18px}h2{font-size:24px;letter-spacing:-.6px}h3{font-size:18px;margin-bottom:8px}.muted,small{color:var(--muted)}.pill{display:inline-block;border:1px solid var(--line);border-radius:30px;padding:3px 12px;color:var(--accent);font-size:12px;margin:0 7px 8px 0}.primary{background:var(--accent);color:var(--ink);font-weight:750;border:0}.reading{font:20px/1.85 Georgia,serif;white-space:pre-wrap;max-width:780px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.word{border:1px solid var(--line);padding:16px;border-radius:12px}.word h3{color:var(--accent)}.word p{margin-bottom:8px}.word button{font-size:13px}.q{border-top:1px solid var(--line);padding:20px 0}.q label{display:block;padding:8px 12px;border-radius:8px;cursor:pointer}.q label:hover{background:var(--hover)}input[type=radio]{accent-color:var(--accent);margin-right:10px}input:not([type=radio]),textarea{width:100%;border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:9px;padding:12px;margin:8px 0 14px}textarea{min-height:200px;resize:vertical}.login{max-width:450px;margin:10vh auto}.row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.stat strong{font-size:36px;color:var(--accent);display:block}.good{color:var(--accent)}.bad{color:var(--bad)}.flash{text-align:center;padding:48px 20px}.flash h1{font-size:42px}.archive{width:100%;text-align:left;margin:5px 0;padding:15px}.archive strong{display:block}.bar{height:10px;border-radius:10px;background:var(--line);overflow:hidden}.bar progress{width:100%;height:10px;display:block;accent-color:var(--accent)}#toast{position:fixed;bottom:20px;right:20px;background:var(--accent);color:var(--ink);border-radius:10px;padding:9px 16px;opacity:0;pointer-events:none}#toast.show{opacity:1}[hidden]{display:none!important}@media(max-width:700px){.shell{display:block}aside{position:static;height:auto;padding:16px 18px;border-right:0;border-bottom:1px solid var(--line)}aside footer{display:none}nav{margin-top:12px;display:flex;overflow:auto;gap:5px}nav button{white-space:nowrap;width:auto;font-size:13px;padding:8px}main{padding:24px 15px 50px}.panel,.hero{padding:20px}.reading{font-size:18px}.sub{font-size:10px}.login{margin:20px auto}}
.lesson-plan ol{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));list-style:none;gap:8px;margin:0;padding:0}
:root[data-theme="light"]{
 color-scheme:light;--bg:#f6f6ed;--panel:#fffefa;--line:#aab6ab;--text:#24322a;
 --muted:#4f6055;--accent:#23583d;--ink:#fffefa;--bad:#962e27;
 --hero-start:#e4eddb;--hero-end:#f4f2e6;--hero-line:#adbda9;--hover:#edf2e9
}
:root[data-theme="soft"]{
 color-scheme:light;--bg:#d7d3c6;--panel:#f4f0e4;--line:#707868;--text:#202820;
 --muted:#3e483b;--accent:#00554e;--ink:#fffdf6;--bad:#8c2424;
 --hero-start:#a1ccbe;--hero-end:#ede6d6;--hero-line:#31796a;--hover:#d2e7dc;
 --accent-wash:#c5e4d8
}
:root[data-theme="soft"] :where(button,a,select,input,textarea,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
:root[data-theme="soft"] .hero{border-top:4px solid var(--accent)}
:root[data-theme="soft"] #profile-button,:root[data-theme="soft"] nav button.active{background:var(--accent-wash)}
:root[data-theme="soft"] nav button.active{box-shadow:inset 3px 0 var(--accent)}
:root[data-theme="soft"] .bonus-card{border-top:3px solid var(--hero-line)}
aside{overflow:auto}
#profile-button{
 margin-top:22px;text-align:left;color:var(--accent);background:var(--panel);
 font-weight:700;overflow-wrap:anywhere
}
#profile-button.active{border-color:var(--accent)}
#profile-button + nav{margin-top:14px}
.profile-form select{
 width:100%;min-width:0;border:1px solid var(--line);border-radius:9px;
 color:var(--text);background:var(--bg);padding:8px 11px
}
.profile-heading h2{margin-bottom:2px;overflow-wrap:anywhere}
.profile-list{display:grid;gap:8px;margin-top:15px}
.profile-choice{text-align:left;overflow-wrap:anywhere}
.profile-choice span{font-weight:650}
.profile-back{margin-bottom:12px}
.profile-form{max-width:380px}
.profile-form label{display:block;font-size:14px;font-weight:650}
.profile-form select{margin:8px 0 16px}
.profile-form [role="status"]:empty{display:none}
.profile-form [role="status"]{margin:9px 0 0}
@media(max-width:700px){
 #profile-button{align-self:flex-start;margin-top:10px;padding:6px 11px;max-width:100%}
}
.lesson-plan-header{margin-bottom:14px}
.lesson-plan-header h2{margin-bottom:0}
.lesson-view-switch{display:flex;flex-wrap:wrap;gap:7px}
.lesson-view-switch button{font-size:14px;padding:7px 11px}
.lesson-view-switch button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--ink)}
#lesson-step-status{margin:0 0 10px;font-weight:700;color:var(--accent)}
.lesson-plan [data-lesson-step]{
 display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;text-align:left;
 padding:8px 11px;font-size:14px;line-height:1.4
}
.lesson-plan [data-lesson-step][aria-current="step"]{border-color:var(--accent);color:var(--accent);background:var(--bg)}
.lesson-plan [data-lesson-step] small{margin-top:2px;font-variant-numeric:tabular-nums}
.lesson-stage{display:flow-root;scroll-margin-top:16px}
.lesson-step-actions{display:flex;gap:10px;margin:0 0 18px}
#lesson-next{margin-inline-start:auto}
.lesson-exercise-header{margin-bottom:14px}
.lesson-exercise-header h2{margin-bottom:0}
.lesson-exercise-header [data-open-reading]{color:var(--accent);font-size:14px;padding:7px 11px}
.reading-preview{
 width:min(900px,calc(100vw - 26px));max-width:none;max-height:calc(100dvh - 26px);overflow:auto;
 padding:0;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text)
}
.reading-preview::backdrop{background:rgba(11,19,17,.68)}
.reading-preview-header{position:sticky;top:0;z-index:1;padding:14px 20px;background:var(--panel);border-bottom:1px solid var(--line)}
.reading-preview-header h2{margin:0}
.reading-preview-content{padding:16px 20px 22px}
.reading-preview-content .reading-columns{margin-top:14px}
@media(max-width:540px){
 .reading-preview-header,.reading-preview-content{padding-inline:14px}
 .reading-preview-header h2{font-size:20px}
}
main section[id]{scroll-margin-top:20px}
.reading-header{margin-bottom:16px}
.reading-header h2{margin-bottom:0}
.reading-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,276px),1fr));gap:24px;align-items:start}
.reading-language{color:var(--muted);font-size:14px;letter-spacing:.02em}
.word-actions,.card-actions,.review-answer{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.card-actions{justify-content:center;margin:14px 0}
.pronounce{white-space:nowrap}
.writing-hint{color:var(--accent)}
#writing{min-height:110px}
.review-task{border-top:1px solid var(--line);padding:14px 0}
.review-task p{margin-bottom:4px}
.review-gap{display:inline-block;min-width:2em;color:var(--accent);text-align:center;border-bottom:1px solid currentColor}
.review-task summary{color:var(--accent);cursor:pointer;margin:6px 0}
.review-answer{margin:8px 0}
.card-guide ol{margin-bottom:0;padding-left:24px}
.lesson-source summary{cursor:pointer;color:var(--muted)}
.lesson-source p{margin:12px 0 6px}
.bonus-panel > summary{font-weight:750;color:var(--text)}
.bonus-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));gap:12px;margin-top:15px}
.bonus-card{min-width:0;border:1px solid var(--line);border-radius:12px;padding:15px}
.bonus-card .bonus-byline{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin:0 0 8px;color:var(--accent)}
.bonus-card h3,.bonus-card p{overflow-wrap:anywhere}
.bonus-card .word-actions{gap:12px;margin-top:12px}
.bonus-card .word-actions button{font-size:14px;padding:6px 9px}
.bonus-translation{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.bonus-translation p{margin-top:3px}
.bonus-help{font-size:14px}
#bonus-status:empty,.bonus-translation-status:empty{display:none}
#bonus-status,.bonus-translation-status{color:var(--muted)}
.word-game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.word-game-grid button{overflow-wrap:anywhere}
.word-game-grid button[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:var(--bg)}
:root[data-theme="soft"] .word-game-grid button[aria-pressed="true"]{color:var(--ink);background:var(--accent)}
.word-game-rules{margin-bottom:14px}
.word-game-rules summary{cursor:pointer;color:var(--accent)}
.word-game-rules p{margin:6px 0 0}
.word-game-answer{margin:8px 0;padding:10px 14px;border:1px solid var(--line);border-radius:9px}
.word-game-answer.found{border-left:4px solid var(--accent)}
.word-game-connection{margin:6px 0 0;color:var(--muted)}
#word-game-review{margin:16px 0 10px}
#word-game-review h3{margin-bottom:5px}
#word-game-review-status{margin:0 0 5px;color:var(--muted)}
#word-game-review-status:empty{display:none}
.word-game-notes{margin-top:10px}
.word-game-notes summary{cursor:pointer;color:var(--accent)}
.word-game-notes ul{list-style:none;padding:0;margin:8px 0 0}
.word-game-notes li{border-top:1px solid var(--line);padding:9px 0}
.word-game-note-title{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:10px}
.word-game-outside{border-radius:5px;background:var(--hover);padding:1px 5px;color:var(--muted)}
.word-game-example{margin-top:2px;font-style:italic}
.word-game-progress{margin-bottom:12px}
#word-game-tip:empty,#word-game-status:empty{margin:0}
#word-game-tip:not(:empty),#word-game-status:not(:empty){margin-top:12px}
@media(max-width:540px){.word-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
