@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@500;600;700&display=swap');
:root{--bg:#f6f5f0;--paper:#fffefb;--ink:#233b33;--muted:#81867e;--line:#e7e8df;--soft:#eff1e9;--accent:#b7744f;--green:#536e51;--bad:#b2574c;--serif:'Noto Serif JP',Georgia,serif;--sans:'DM Sans','Noto Sans JP',sans-serif}
*{box-sizing:border-box}body{margin:0;font-family:var(--sans);font-size:14px;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}a{color:inherit}button{border:0;background:none;color:inherit}input,select{color:var(--ink)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b7744f88;outline-offset:3px}button:hover{transition:background .15s,transform .15s}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}.shell{min-height:100vh}.sidebar{width:232px;position:fixed;inset:0 auto 0 0;background:#fafaf6;border-right:1px solid var(--line);padding:36px 24px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:12px;margin-bottom:45px;text-decoration:none}.logo-mark{font-family:Georgia,serif;font-size:33px;line-height:44px;width:46px;height:46px;background:var(--ink);color:var(--paper);border-radius:13px;display:block;padding-left:11px;position:relative}.logo-mark span{font-family:var(--sans);font-size:18px;color:#dda77c;position:absolute;right:4px;top:-7px}.brand-name{font-size:19px;font-weight:700;letter-spacing:2px}.brand small{display:block;font-size:9px;letter-spacing:1.8px;color:var(--muted);margin-top:5px}.nav-label{font-size:10px;letter-spacing:2px;color:#969c91;margin:0 12px 13px}.nav{display:flex;flex-direction:column;gap:7px}.nav button{display:flex;align-items:center;gap:12px;padding:13px 12px;text-align:left;border-radius:8px;font-weight:500;color:#757e73;font-size:13px}.nav button.active{background:#e9eee3;color:var(--ink);font-weight:700}.nav button:hover{background:#edf0e8}.nav .badge-count{margin-left:auto;font-size:10px;line-height:19px;min-width:25px;text-align:center;background:#e2e7d8;border-radius:5px;padding:0 4px}.sidebar-bottom{margin-top:auto;padding-top:32px}.study-note{border:1px solid var(--line);border-radius:9px;padding:16px 13px;background:#f2f3ea}.study-note .tiny{color:var(--accent);font-size:10px;letter-spacing:1.4px}.study-note p{font-size:12px;line-height:1.9;margin:8px 0 0}.local-label{font-size:10px;color:#90978c;display:flex;align-items:center;gap:7px;margin-top:18px}.local-label svg{width:13px;height:13px}.main{margin-left:232px}.topbar{height:86px;border-bottom:1px solid var(--line);padding:0 44px;display:flex;align-items:center;justify-content:space-between;gap:20px}.breadcrumb{font-size:11px;letter-spacing:.6px;color:var(--muted);display:flex;gap:13px;align-items:center}.breadcrumb strong{font-weight:500;color:var(--ink)}.top-actions{display:flex;gap:14px;align-items:center}.language-switch{display:flex;padding:4px;background:#eaece4;border-radius:8px;gap:2px}.language-switch button{padding:7px 13px;border-radius:5px;font-size:12px;color:#87907f;display:flex;align-items:center;gap:7px}.language-switch button.active{background:var(--paper);box-shadow:0 2px 5px #182d2410;color:var(--ink);font-weight:600}.lang-code{font-size:10px;border:1px solid currentColor;border-radius:3px;padding:0 3px;line-height:15px}.icon-button{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:#7a8477}.icon-button:hover{background:var(--soft)}.content{max-width:1320px;margin:0 auto;padding:36px 44px 32px}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:28px;gap:16px}.eyebrow{font-size:10px;letter-spacing:2.2px;text-transform:uppercase;color:var(--accent);font-weight:600;margin:0 0 8px}.page-heading h1{font-family:var(--serif);font-size:28px;font-weight:600;letter-spacing:1px;margin:0 0 9px}.subtitle{font-size:12px;color:#82887b;line-height:1.8;margin:0}.date-stamp{font-size:11px;letter-spacing:.5px;color:#91988b;white-space:nowrap;padding-bottom:3px}.hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;background:var(--ink);border-radius:13px;color:#fffaf0;padding:30px 36px;overflow:hidden;min-height:185px}.hero:after{content:'';position:absolute;right:220px;top:-180px;width:400px;height:400px;border:1px solid #ffffff08;border-radius:50%;pointer-events:none}.hero-label{font-size:10px;letter-spacing:1.9px;color:#b9c9b5;margin:0 0 12px;display:flex;align-items:center;gap:7px}.hero h2{font-family:var(--serif);font-size:25px;line-height:1.6;letter-spacing:1px;font-weight:500;margin:0 0 13px}.hero-copy{font-size:11px;color:#b7c5b2;line-height:1.8;margin:0;max-width:460px}.hero-side{display:flex;align-items:center;gap:27px;z-index:1}.ring{--progress:0;position:relative;width:115px;height:115px;border-radius:50%;background:conic-gradient(#d6b17b calc(var(--progress)*1%),#6d7e663d 0);display:grid;place-items:center;flex:none}.ring:before{content:'';position:absolute;inset:6px;background:var(--ink);border-radius:50%}.ring-content{position:relative;text-align:center}.ring .number{font-size:32px;font-weight:500;line-height:1.2}.ring .number span{font-size:13px;color:#c7d0c0}.ring .label{display:block;font-size:9px;letter-spacing:1px;margin-top:6px;color:#c7d0c0}.hero-start{display:flex;flex-direction:column;align-items:center;gap:9px}.hero-start small{font-size:10px;color:#b5c6ac}.button{display:inline-flex;justify-content:center;align-items:center;gap:9px;padding:12px 19px;border-radius:7px;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap}.button.primary{background:var(--ink);color:white}.button.primary:hover{background:#385346}.button.light{background:#e7ecdd;color:var(--ink)}.button.light:hover{background:#fff9e9}.button.secondary{background:var(--paper);border:1px solid #dce1d5}.button.secondary:hover{background:#edf0e7}.button.ghost{color:#687862;border:1px solid var(--line);background:transparent}.button.ghost:hover{background:var(--soft)}.button.small{padding:8px 12px;font-size:11px}.button.full{width:100%}.button svg{width:16px;height:16px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0 32px}.metric{display:flex;align-items:center;gap:15px;border:1px solid var(--line);border-radius:10px;padding:18px 22px;background:var(--paper)}.metric-icon{height:40px;width:40px;border-radius:10px;background:#edf1e6;color:#667b52;display:grid;place-items:center}.metric:nth-child(2) .metric-icon{background:#f8efe2;color:#aa8751}.metric:nth-child(3) .metric-icon{background:#eceee8;color:#889081}.metric-label{font-size:11px;color:#848b7c;margin-bottom:3px}.metric-value{font-size:25px;font-weight:500;letter-spacing:-.7px}.metric-value small{font-size:11px;color:#92998b;letter-spacing:0;margin-left:6px}.metric-help{margin-left:auto;font-size:9px;color:#959e8e;align-self:flex-end;padding-bottom:3px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.section-heading h2{font-size:17px;font-weight:600;margin:0;letter-spacing:.5px}.section-heading h2 small{font-size:10px;font-family:var(--sans);font-weight:400;letter-spacing:.5px;color:#90978a;margin-left:12px}.text-link{display:flex;align-items:center;gap:7px;font-size:11px;color:#74816c}.text-link:hover{color:var(--ink)}.text-link svg{width:14px;height:14px}.filters{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 20px}.tabs{display:flex;align-items:center;gap:5px;padding:4px;background:#eaede4;border-radius:7px;flex-wrap:wrap}.tabs button{font-size:11px;font-weight:500;padding:8px 15px;border-radius:4px;color:#7c8575;white-space:nowrap}.tabs button.active{background:var(--paper);box-shadow:0 1px 4px #233b3310;color:var(--ink)}.tabs button:hover{color:var(--ink)}.select-wrap{display:flex;align-items:center;gap:8px;color:#848c7c;font-size:10px}select{border:1px solid #dfe2d8;background:var(--paper);border-radius:6px;padding:9px 29px 9px 12px;font-size:11px;max-width:100%}.stage-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.stage-card{border:1px solid var(--line);border-radius:10px;padding:21px;background:var(--paper);transition:border-color .15s,box-shadow .15s}.stage-card:hover{border-color:#bac8ad;box-shadow:0 5px 18px #233b3306}.card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.stage-number{font-size:10px;color:#858e7a;letter-spacing:1.2px}.level-badge{font-size:9px;letter-spacing:.2px;line-height:20px;border-radius:4px;padding:0 8px;background:#edf1e6;color:#70805e}.level-badge.exam{background:#f7eddf;color:#a28257}.level-badge.specialist{background:#ecebed;color:#85768d}.stage-card h3{font-family:var(--serif);font-size:16px;font-weight:600;margin:0 0 7px}.stage-kind{font-size:10px;color:#949b8b;margin-bottom:20px;display:flex;align-items:center;gap:6px}.stage-kind svg{width:13px;height:13px}.card-progress-label{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#87917d;margin-bottom:7px}.card-progress-label strong{font-weight:500;color:#697c5f}.bar{height:4px;border-radius:10px;background:#edf0e8;overflow:hidden}.bar>span{display:block;height:100%;background:#8ba275;border-radius:inherit}.card-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eff0e9;margin-top:18px;padding-top:14px;gap:8px}.weak-link{font-size:10px;color:#939b89;display:flex;align-items:center;gap:5px}.weak-link:hover{color:var(--ink)}.card-actions .button{padding:8px 13px}.pagination{display:flex;align-items:center;justify-content:center;gap:15px;padding:24px 0 12px;color:#909786;font-size:11px}.pagination button{background:var(--paper);border:1px solid var(--line);border-radius:5px;display:grid;place-items:center;height:30px;width:34px}.pagination svg{width:14px;height:14px}.footer{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#9da493;border-top:1px solid var(--line);padding-top:18px;margin-top:22px;gap:15px}.footer b{font-size:10px;font-weight:500;letter-spacing:1.5px}.panel{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:26px}.panel h2{font-size:16px;margin:0 0 20px}.panel h3{font-size:13px;margin:20px 0 10px}.panel p{line-height:1.9;font-size:12px;color:#7d8775}.practice-page{max-width:840px;margin:auto}.practice-config{display:grid;grid-template-columns:1.3fr 1fr;gap:20px}.field{margin-bottom:23px}.field-label{font-size:12px;font-weight:600;display:block;margin-bottom:11px}.check-grid{display:grid;gap:10px}.check-tile{border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:14px;display:flex;align-items:center;gap:10px;cursor:pointer}.check-tile:has(input:checked){border-color:#849874;background:#f1f4e9}.check-tile input{accent-color:var(--ink)}.check-tile strong{font-size:12px;font-weight:500}.check-tile small{display:block;color:#939a87;font-size:10px;line-height:1.7;margin-top:3px}.check-tile .count{margin-left:auto;color:#8d9784;font-size:11px;white-space:nowrap}.field select{width:100%;font-size:12px;padding:11px}.inline-check{display:flex;align-items:center;gap:9px;font-size:12px;margin:14px 0;line-height:1.6}.inline-check input{accent-color:var(--ink);width:16px;height:16px;flex:none}.config-aside{background:#eef1e6;border-radius:8px;padding:20px;margin:16px 0}.config-aside h3{margin:0 0 8px;font-family:var(--serif);font-size:15px}.config-aside p{font-size:11px;line-height:1.9;margin:0}.count-preview{font-size:11px;color:#808c76;margin:14px 0;line-height:1.9}.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:3px 0 16px;font-size:11px;color:#89927f}.quiz-progress{height:4px;background:#e1e7d7;border-radius:9px;margin:0 0 26px;overflow:hidden}.quiz-progress span{display:block;background:var(--ink);height:100%;transition:width .2s}.question-card{text-align:center;border:1px solid var(--line);background:var(--paper);border-radius:13px;padding:30px 28px 27px;margin-bottom:22px;position:relative}.question-meta{display:flex;align-items:center;justify-content:center;gap:8px;font-size:10px;color:#8b9580;margin-bottom:23px}.question-word{font-family:Georgia,var(--serif);font-size:40px;line-height:1.45;font-weight:500;letter-spacing:-.5px;margin:0 0 18px;overflow-wrap:anywhere}.question-word.reverse{font-family:var(--serif);font-size:28px}.question-card p{font-size:11px;color:#8e9784;letter-spacing:.3px;margin:0}.speak-button{position:absolute;top:17px;right:17px}.options-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.option{display:flex;align-items:center;gap:12px;text-align:left;min-height:57px;line-height:1.6;font-size:12px;border:1px solid #dfe4d7;border-radius:7px;background:var(--paper);padding:12px 16px}.option:hover:enabled{border-color:#819573;background:#f0f4e7}.option-number{display:grid;place-items:center;border:1px solid #e3e8dc;background:#f6f7f0;color:#92a086;border-radius:5px;width:24px;height:24px;flex:none;font-size:10px}.option.correct{border-color:#7d9768;background:#eaf1df;color:#486037;opacity:1}.option.wrong{border-color:#c38a79;background:#fbede8;color:#a65d4c;opacity:1}.option:disabled:not(.wrong):not(.correct){opacity:.6}.unknown{width:100%;border:1px dashed #d5ddca;border-radius:7px;padding:13px;font-size:12px;color:#8d9982;margin-top:12px}.unknown:hover:enabled{background:#edf0e7}.hidden-options{padding:43px;text-align:center;background:#eef1e8;border:1px dashed #ccd5c1;border-radius:10px}.hidden-options p{color:#7a886e;font-size:12px;line-height:1.8;margin:0 0 20px}.feedback{margin-top:20px;padding:20px;border-radius:9px;border:1px solid #dce5cf;background:#edf3e3}.feedback.bad{border-color:#e7d6ca;background:#faf0e9}.feedback-title{font-size:13px;font-weight:600;display:flex;align-items:center;gap:8px}.feedback-answer{font-size:14px;line-height:1.7;margin:10px 0}.feedback-note{font-size:11px;line-height:1.8;color:#7b8872;margin:5px 0}.feedback-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px}.streak{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#87967b}.dot{width:7px;height:7px;border-radius:50%;background:#dde4d3;display:inline-block}.dot.on{background:#7b9863}.shortcut{text-align:center;font-size:10px;color:#9ca58f;margin-top:21px;line-height:1.7}.result{max-width:650px;margin:auto;text-align:center}.result-icon{display:grid;place-items:center;color:#69815b;background:#eaf0df;width:68px;height:68px;border-radius:50%;margin:8px auto 22px}.result-icon svg{height:30px;width:30px}.result h2{font-family:var(--serif);font-size:26px;margin:0 0 10px}.result .metrics{margin-top:28px}.result .metric{padding:16px 12px;justify-content:center}.result .metric-value{font-size:28px}.result-actions{display:flex;justify-content:center;gap:12px;margin-top:24px;flex-wrap:wrap}.result-words{margin-top:25px;text-align:left}.review-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:18px}.search{flex:1;min-width:180px;position:relative}.search svg{position:absolute;left:12px;top:11px;width:16px;height:16px;color:#939d87}.search input{width:100%;border:1px solid var(--line);border-radius:7px;background:var(--paper);padding:11px 12px 11px 36px;font-size:12px}.table-wrap{background:var(--paper);border:1px solid var(--line);border-radius:10px;overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;color:#8a947d;font-weight:500;background:#f0f3e9;padding:13px 20px;white-space:nowrap}td{padding:15px 20px;border-top:1px solid #eef0e7;font-size:12px;line-height:1.7}td.term{font-family:Georgia,var(--sans);font-size:16px;min-width:155px}td .tiny{font-size:9px;color:#97a08c;display:block;font-family:var(--sans);margin-top:4px}.status-pill{font-size:9px;white-space:nowrap;color:#849278}.status-pill.mastered{color:#647f4e}.empty{padding:50px 20px;text-align:center;color:#929d84;font-size:12px;line-height:2}.review-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.review-heading p{color:#8b957f;font-size:11px;margin:0;line-height:1.8}.review-heading strong{font-size:20px;color:var(--ink);margin-right:4px}.stats-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:20px}.level-progress{margin:21px 0}.level-progress .card-progress-label{font-size:12px;margin-bottom:10px}.level-progress .bar{height:6px}.session-row{padding:14px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px;font-size:12px}.session-row:last-child{border:0}.session-row .session-date{font-size:10px;color:#939e86;min-width:50px}.session-row .session-score{margin-left:auto;font-size:11px;color:#7d8e6a}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.help-step{display:flex;align-items:flex-start;gap:13px;margin:22px 0}.help-step .step{background:var(--soft);border-radius:6px;padding:5px 9px;font-size:11px;color:#82936f}.help-step strong{font-size:12px;font-weight:600}.help-step p{font-size:11px;margin:6px 0 0;line-height:1.9}.backup-buttons{display:flex;gap:9px;flex-wrap:wrap;margin-top:23px}.notice{border:1px solid #e2d1b9;background:#fff6e9;padding:12px 17px;color:#a07d4d;font-size:11px;line-height:1.8;border-radius:8px;margin:0 0 18px}.modal-overlay{position:fixed;inset:0;background:#1c2c2270;backdrop-filter:blur(3px);z-index:100;display:flex;align-items:center;justify-content:center;padding:24px}.modal{background:var(--bg);border-radius:13px;max-height:90vh;width:600px;max-width:100%;overflow:auto;box-shadow:0 24px 90px #16221930;padding:26px}.modal.wide{width:900px}.modal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:20px}.modal-header h2{font-family:var(--serif);font-size:21px;margin:0 0 7px}.modal-header p{font-size:11px;color:#8c9780;margin:0;line-height:1.8}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.modal .practice-config{display:block}.modal .panel{padding:20px}.loading{height:100vh;display:flex;justify-content:center;align-items:center;gap:18px;color:#8b977f;font-size:12px}.error-page{max-width:500px;margin:20vh auto;text-align:center;padding:20px}.error-page h1{font-family:var(--serif);font-size:24px}.error-page p{font-size:12px;line-height:2;color:#8b977f}#toast{position:fixed;bottom:25px;left:calc(50% + 116px);transform:translateX(-50%) translateY(20px);padding:13px 21px;background:var(--ink);color:white;font-size:12px;border-radius:8px;box-shadow:0 4px 24px #233b3330;z-index:120;opacity:0;transition:.2s;pointer-events:none;max-width:90vw;text-align:center}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.mobile-brand{display:none}.mobile-nav{display:none}.file-input{display:none}.visually-hidden{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;overflow:hidden}
@media(min-width:1500px){.content{padding-top:44px}.hero{padding:38px 42px}.stage-card{padding:25px}.stage-grid{gap:20px}}
@media(max-width:1180px){.sidebar{width:200px;padding:30px 17px}.main{margin-left:200px}.content{padding:30px}.topbar{padding:0 30px}.stage-grid{gap:13px}.stage-card{padding:17px}.hero{padding:27px}.hero-side{gap:18px}.hero h2{font-size:21px}.ring{width:98px;height:98px}.metric{padding:17px 15px;gap:11px}.metric-help{display:none}#toast{left:calc(50% + 100px)}}
@media(max-width:950px){.hero-side{gap:12px}.hero-start{display:none}.hero h2{font-size:20px}.hero-copy{max-width:340px}.stage-grid{grid-template-columns:repeat(2,1fr)}.metric-icon{width:32px;height:32px;border-radius:8px}.metric-icon svg{width:17px;height:17px}.metric-value{font-size:22px}.metrics{gap:10px}.metric{padding:14px 12px;gap:8px}.stats-grid,.settings-grid{grid-template-columns:1fr}.tabs button{padding:8px 11px}.date-stamp{display:none}.page-heading h1{font-size:25px}.filters{flex-wrap:wrap}}
@media(max-width:760px){.sidebar{display:none}.main{margin-left:0}.topbar{height:73px;padding:0 20px}.breadcrumb{display:none}.mobile-brand{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;letter-spacing:1.2px}.mobile-brand .logo-mark{width:32px;height:32px;font-size:24px;line-height:32px;border-radius:8px;padding-left:7px}.mobile-brand .logo-mark span{font-size:13px;right:2px;top:-5px}.top-actions{gap:7px}.language-switch button{padding:6px 8px;font-size:10px}.lang-code{display:none}.icon-button{width:32px}.content{padding:27px 20px 88px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;height:67px;background:#fafbf6f5;border-top:1px solid var(--line);z-index:50;justify-content:space-around;backdrop-filter:blur(15px);padding:7px 3px max(7px,env(safe-area-inset-bottom))}.mobile-nav button{font-size:9px;color:#929d87;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:60px}.mobile-nav button.active{color:var(--ink);font-weight:600}.mobile-nav svg{height:18px;width:18px}.page-heading{margin-bottom:23px}.page-heading h1{font-size:24px}.eyebrow{font-size:9px}.hero{padding:26px 24px;min-height:180px;gap:14px}.hero h2{font-size:21px;letter-spacing:.4px;line-height:1.7}.hero-label{font-size:8px;letter-spacing:1.1px}.hero-copy{font-size:10px;max-width:250px}.ring{width:90px;height:90px}.ring .number{font-size:26px}.ring .label{font-size:8px}.metrics{margin:15px 0 28px;gap:9px}.metric{padding:13px 12px;display:block}.metric-icon{display:none}.metric-label{font-size:9px}.metric-value{font-size:23px}.metric-value small{font-size:9px;margin-left:4px}.section-heading h2{font-size:15px}.section-heading h2 small{display:none}.filters{gap:10px}.tabs button{padding:8px 11px;font-size:10px}.select-wrap{font-size:9px}.stage-card{padding:18px}.stage-card h3{font-size:15px}.stage-grid{gap:12px}.stage-kind{margin-bottom:17px;font-size:9px}.card-actions .button{padding:7px 10px;font-size:10px}.weak-link{font-size:9px}.stage-number{font-size:9px}.level-badge{font-size:8px;padding:0 6px}.footer{flex-direction:column;gap:7px;margin-top:15px;line-height:1.8;align-items:flex-start}.practice-config{grid-template-columns:1fr}.question-word{font-size:33px}.question-card{padding:27px 20px}.option{padding:11px 13px;font-size:11px;gap:8px;min-height:59px}.option-number{width:21px;height:21px;font-size:9px}.feedback-foot{align-items:flex-start}.shortcut{font-size:9px}.panel{padding:22px}.review-toolbar select{flex:1;min-width:145px}.search{flex-basis:100%}td,th{padding:13px 14px}td.term{font-size:14px;min-width:135px}.review-heading{align-items:flex-start}.review-heading .button{font-size:10px;padding:9px 12px}.modal-overlay{padding:15px}.modal{padding:20px;max-height:92vh}#toast{left:50%;bottom:83px}.result .metrics .metric{padding:15px 8px}.result h2{font-size:23px}}
@media(max-width:420px){.content{padding-left:16px;padding-right:16px}.topbar{padding:0 16px}.stage-grid{gap:10px}.stage-card{padding:15px 13px}.stage-card h3{font-size:14px}.hero{padding:23px 20px}.hero h2{font-size:19px}.hero-copy{font-size:9px;max-width:215px}.ring{width:78px;height:78px}.ring .number{font-size:24px}.ring .label{font-size:7px}.card-actions{gap:4px}.weak-link{font-size:8px}.card-actions .button{padding:7px 8px}.tabs button{padding:8px 9px}.options-grid{gap:8px}.option{font-size:10px;padding:10px;gap:7px}.feedback-foot .streak{font-size:9px}.quiz-top{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}

/* Keep the answer, explanation, and next action close together during practice. */
.quiz-active{padding-bottom:86px}
.quiz-active .quiz-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;margin:0 0 12px}
.quiz-top>span:nth-child(2){text-align:center;line-height:1.6;overflow-wrap:anywhere}
.quiz-active .quiz-progress{margin-bottom:12px}
.quiz-timer{display:flex;align-items:center;gap:12px;font-size:11px;color:#6e7f62;margin-bottom:16px;font-variant-numeric:tabular-nums}
.quiz-timer>span{white-space:nowrap;min-width:66px}
.quiz-timer strong{font-size:16px;font-weight:600}
.timer-track{flex:1;min-width:0;height:5px;border-radius:8px;background:#e6eadf;overflow:hidden}
.timer-track>span{display:block;height:100%;width:100%;border-radius:inherit;background:#7e976a;transition:width .12s linear}
.quiz-timer.urgent{color:var(--bad)}
.quiz-timer.urgent .timer-track>span{background:var(--bad)}
.quiz-active .question-card{padding:24px 28px;margin-bottom:16px}
.quiz-active .question-meta{margin-bottom:12px}
.quiz-active .question-word{margin-bottom:10px}
.quiz-answered .question-card{padding:14px 28px;margin-bottom:12px}
.quiz-answered .question-meta{margin-bottom:5px}
.quiz-answered .question-word{font-size:32px;margin-bottom:0}
.quiz-answered .question-word.reverse{font-size:23px}
.quiz-answered .question-card>p{display:none}
.quiz-answered .feedback{margin:0 0 16px;scroll-margin-top:16px;padding:17px 20px}
.quiz-answered .feedback-answer{margin:7px 0}
.quiz-answered .feedback-foot{margin-top:10px}
.quiz-next-dock{position:fixed;bottom:0;left:232px;right:0;z-index:60;display:flex;justify-content:center;padding:13px 44px calc(13px + env(safe-area-inset-bottom));border-top:1px solid #dfe4d7;background:#fafbf6f5;backdrop-filter:blur(12px);box-shadow:0 -5px 20px #233b3306}
.quiz-next-dock .next-button{width:min(100%,840px);min-height:46px;font-size:13px}
body.in-quiz .mobile-nav{display:none}
body.in-quiz #toast{bottom:87px}
.quiz-answered .shortcut{margin-top:14px}

/* Stage selection and personal strength markers. */
.stage-card.selected{border-color:#80956d;background:#f5f8ee;box-shadow:0 0 0 1px #80956d30}
.stage-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px;padding-bottom:11px;border-bottom:1px solid #eff0e9}
.stage-select{display:flex;align-items:center;gap:7px;font-size:10px;color:#6f7e63;cursor:pointer;min-height:30px}
.stage-select input{width:16px;height:16px;margin:0;accent-color:var(--ink);flex:none}
.stage-mark-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:13px 0 0}
.stage-mark{display:inline-flex;justify-content:center;align-items:center;gap:4px;border:1px solid #dfe4d7;background:#f7f8f2;border-radius:6px;padding:6px 9px;font-size:10px;min-height:31px;color:#7d8971}
.stage-mark:hover{background:#edf2e5}
.stage-mark.strong{background:#eaf1de;border-color:#8ba377;color:#486037}
.stage-mark.weak{background:#faf0e8;border-color:#c79d7e;color:#a36f48}
.stage-mark svg{height:13px;width:13px}
.stage-selection-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:15px 17px;border:1px solid #d8e0cb;border-radius:9px;background:#edf2e4;margin-bottom:18px}
.stage-selection-toolbar>span,.stage-selection-toolbar>strong{font-size:12px;line-height:1.7}
.stage-selection-toolbar select{background:var(--paper);font-size:11px}
.stage-selection-toolbar .button{min-height:38px}
.stage-selection-toolbar .selection-summary{margin-right:auto;font-size:11px}
.selection-summary strong{display:block;font-size:12px;line-height:1.7}
.selection-summary small{display:block;font-size:10px;line-height:1.8;color:#7d8971;margin-top:3px}
.stage-selection-toolbar .selection-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.stage-card .card-top{gap:8px;flex-wrap:wrap}
.stage-card .stage-select .stage-number{white-space:nowrap}

@media(max-width:1180px){.quiz-next-dock{left:200px;padding-left:30px;padding-right:30px}}
@media(max-width:760px){
  body.in-quiz .topbar{height:62px}
  body.in-quiz .content{padding-top:16px;padding-bottom:calc(90px + env(safe-area-inset-bottom))}
  .quiz-active{padding-bottom:0}
  .quiz-active .quiz-top{font-size:10px;gap:9px;grid-template-columns:auto minmax(0,1fr) auto;margin-bottom:9px}
  .quiz-top .text-link{font-size:10px;gap:3px;min-height:30px;white-space:nowrap}
  .quiz-top .text-link svg{height:12px;width:12px}
  .quiz-active .quiz-progress{margin-bottom:10px}
  .quiz-timer{gap:10px;font-size:10px;margin-bottom:12px}
  .quiz-timer strong{font-size:15px}
  .quiz-active .question-card{padding:18px 16px 17px;margin-bottom:12px}
  .quiz-active .question-meta{font-size:9px;gap:6px;margin-bottom:10px}
  .quiz-active .question-word{font-size:31px;line-height:1.35;margin-bottom:8px}
  .quiz-active .question-word.reverse{font-size:23px}
  .quiz-active .question-card p{font-size:10px}
  .quiz-active .speak-button{right:9px;top:8px;width:30px;height:30px}
  .quiz-active .speak-button svg{width:18px;height:18px}
  .quiz-active .options-grid{gap:8px}
  .quiz-active .option{padding:9px 10px;min-height:53px;font-size:11px;line-height:1.5;gap:7px;overflow-wrap:anywhere}
  .quiz-active .option-number{width:20px;height:20px;font-size:9px}
  .quiz-active .option-number svg{width:15px;height:15px}
  .quiz-active .unknown{padding:10px;margin-top:9px;min-height:43px;font-size:11px}
  .quiz-active .hidden-options{padding:25px 16px}
  .quiz-active .hidden-options p{font-size:11px;margin-bottom:15px}
  .quiz-active .shortcut{font-size:9px;margin-top:13px}
  .quiz-answered .question-card{padding:12px 15px 11px;margin-bottom:10px}
  .quiz-answered .question-meta{margin-bottom:4px}
  .quiz-answered .question-word{font-size:27px;margin-bottom:0}
  .quiz-answered .question-word.reverse{font-size:21px}
  .quiz-answered .feedback{padding:15px;margin-bottom:12px;scroll-margin-top:12px}
  .quiz-answered .feedback-title{font-size:12px;gap:6px}
  .quiz-answered .feedback-title svg{width:18px;height:18px}
  .quiz-answered .feedback-answer{font-size:13px;line-height:1.65;margin:7px 0}
  .quiz-answered .feedback-note{font-size:11px;line-height:1.75}
  .quiz-answered .feedback-foot{margin-top:10px}
  .quiz-answered .option{min-height:46px;padding-top:8px;padding-bottom:8px}
  .quiz-next-dock{left:0;padding:11px 20px calc(11px + env(safe-area-inset-bottom))}
  .quiz-next-dock .next-button{min-height:45px;font-size:13px}
  .stage-select{font-size:9px;min-height:32px}
  .stage-mark-controls{gap:5px;margin-top:11px}
  .stage-mark{padding:7px 8px;font-size:9px;min-height:34px}
  .stage-tools{gap:6px;align-items:flex-start;margin-bottom:11px;padding-bottom:9px}
  .stage-selection-toolbar{padding:13px;gap:9px}
  .stage-selection-toolbar .selection-summary{flex-basis:100%;margin-right:0}
  .stage-selection-toolbar .selection-controls{width:100%}
  .stage-selection-toolbar .button{padding:10px 12px}
  .stage-selection-toolbar .selection-controls .button.primary{flex:1}
}
@media(max-width:420px){
  .quiz-active .quiz-top{gap:6px;font-size:9px}
  .quiz-top .text-link{font-size:9px}
  .quiz-active .question-word{font-size:29px}
  .quiz-active .option{font-size:10px;padding:9px 8px;gap:6px}
  .quiz-next-dock{padding-left:16px;padding-right:16px}
  .stage-mark{padding:7px 6px}
}
@media(max-width:760px) and (max-height:640px){
  body.in-quiz .topbar{height:55px}
  body.in-quiz .content{padding-top:10px}
  .quiz-active .quiz-top{margin-bottom:6px}
  .quiz-timer{margin-bottom:9px}
  .quiz-active .question-card{padding-top:12px;padding-bottom:12px}
  .quiz-active .question-meta{margin-bottom:6px}
  .quiz-active .question-word{font-size:27px;margin-bottom:5px}
  .quiz-active .option{min-height:47px;padding-top:8px;padding-bottom:8px}
  .quiz-answered .question-card{padding-top:10px;padding-bottom:10px}
  .quiz-answered .question-word{margin-bottom:0}
}

/* Home-screen setup stays in settings, outside the timed practice flow. */
.home-screen-panel{margin-bottom:24px}
.home-screen-heading{display:flex;align-items:center;gap:16px}
.home-screen-heading .logo-mark{flex-shrink:0;width:52px;height:52px;font-size:38px}
.home-screen-heading .eyebrow{display:block;margin-bottom:7px;font-size:10px}
.home-screen-heading h2{margin:0;font-size:20px;line-height:1.5}
.home-screen-panel .backup-buttons{align-items:center;flex-wrap:wrap}
.home-screen-status{font-size:12px;color:var(--green)}
.home-screen-panel .home-screen-storage{font-size:12px;color:var(--muted);line-height:1.9;margin-bottom:0}
.install-guide h3{font-size:15px;margin:23px 0 8px}
.install-guide p{line-height:1.9;color:var(--ink);margin:0 0 12px}
.install-guide .install-note{color:var(--muted);font-size:12px;margin-top:20px}
@media(max-width:760px){.home-screen-heading{gap:12px}.home-screen-heading h2{font-size:17px}.home-screen-panel .backup-buttons .button{width:100%}}
@media(max-width:760px){.mobile-nav{height:calc(67px + env(safe-area-inset-bottom));padding-bottom:calc(7px + env(safe-area-inset-bottom))}.content{padding-bottom:calc(88px + env(safe-area-inset-bottom))}#toast{bottom:calc(83px + env(safe-area-inset-bottom))}}

/* Grammar units, contextual word meanings, and the grammar notebook. */
.grammar-heading{display:block;max-width:760px}.grammar-heading .subtitle{line-height:1.9}
.grammar-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 24px;margin-bottom:20px}
.grammar-overview h2{margin:9px 0 6px;font-size:18px}.grammar-overview p{margin:0}
.grammar-progress-count{text-align:right;align-self:center;white-space:nowrap}
.grammar-progress-count strong{font-family:Georgia,serif;font-size:36px;font-weight:500}
.grammar-progress-count>span{font-size:12px;color:var(--muted)}
.grammar-progress-count small{display:block;font-size:11px;color:#748267;margin-top:5px}
.progress-track{height:5px;background:#e7ebdf;border-radius:8px;overflow:hidden}
.progress-track>span{display:block;height:100%;background:#819a6e;border-radius:inherit}
.grammar-overview>.progress-track{grid-column:1/-1}
.grammar-home-actions,.grammar-level-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:20px 0}
.grammar-home-actions .button,.grammar-level-filters .button{min-height:42px}
.grammar-level-filters{gap:7px;margin:26px 0 18px}
.grammar-level-filters .active{background:#e6eddf;border-color:#b0be9e;color:var(--ink)}
.grammar-unit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.grammar-unit-card{display:flex;flex-direction:column;padding:23px;min-width:0}
.grammar-unit-top,.grammar-unit-progress{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;color:#818d77}
.grammar-unit-card h2{margin:18px 0 9px;line-height:1.6}
.grammar-unit-title{font-family:var(--serif);font-weight:600;font-size:17px;line-height:1.65;text-align:left;padding:0;overflow-wrap:anywhere}
.grammar-unit-title:hover{text-decoration:underline;text-underline-offset:4px}
.grammar-unit-card .subtitle{margin:0 0 20px;flex:1}
.grammar-unit-progress{margin-bottom:9px;font-size:11px}
.grammar-unit-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}
.grammar-unit-actions .button{min-height:40px;flex:1;white-space:normal}
.grammar-book-filters{display:grid;grid-template-columns:minmax(0,1fr) 210px auto;align-items:end;gap:16px;margin:0 0 20px}
.grammar-book-filters .field{margin:0}
.grammar-book-filters input{width:100%;min-height:42px;border:1px solid var(--line);border-radius:7px;background:var(--paper);padding:11px 12px;font-size:12px}
.grammar-book-filters .button{min-height:42px}
.grammar-book-list{display:grid;gap:15px}
.grammar-book-entry{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:24px;align-items:center}
.grammar-book-entry h2{margin:12px 0 5px}.grammar-book-entry p{margin:0}
.grammar-book-entry .grammar-unit-actions{flex-direction:column;margin:0}
.grammar-topic-list{list-style:none;padding:0;margin:14px 0 0;display:flex;flex-wrap:wrap;gap:7px}
.grammar-topic-list li{background:#eff2e8;border-radius:5px;padding:6px 9px;font-size:11px;color:#65785a;line-height:1.6}
.grammar-unit-caption{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:11px;color:#7d8972;margin:0 0 20px}
.grammar-unit-detail{padding:30px 34px;margin-top:20px}
.grammar-explanation-section+.grammar-explanation-section{border-top:1px solid var(--line);padding-top:23px;margin-top:27px}
.grammar-explanation-section h3{font-size:17px;margin:0 0 12px;line-height:1.7}
.grammar-explanation-section>p{font-size:13px;color:#52634d;line-height:2.1;margin:0 0 15px;white-space:pre-line}
.grammar-examples{display:grid;gap:12px}
.grammar-examples .grammar-sentence-wrap{padding:13px 18px;border-left:3px solid #afbd98;border-radius:0 7px 7px 0;background:#f4f6ee}
.grammar-sentence{font-family:Georgia,serif;font-size:22px!important;line-height:1.9!important;color:var(--ink)!important;letter-spacing:0!important;margin:0!important;overflow-wrap:anywhere}
.grammar-token{display:inline;vertical-align:baseline;border-bottom:1px dotted #9dad8c;border-radius:3px;padding:4px 1px;min-height:36px;font:inherit;line-height:inherit}
.grammar-token:hover{background:#e5edda;border-bottom-color:#506c42}
.grammar-token:focus-visible{outline-offset:1px;background:#e5edda}
.grammar-gap{display:inline-block;min-width:65px;border-bottom:2px solid #8da577;margin:0 4px;color:#81936e;letter-spacing:2px;line-height:1.5}
.grammar-filled-gap{background:#e9f0dd;border-radius:5px;padding:2px 5px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.grammar-translation{font-family:var(--sans);font-size:12px!important;line-height:1.9!important;color:#64735c!important;letter-spacing:0!important;margin:10px 0 0!important}
.grammar-question-card .question-meta{flex-wrap:wrap}
.grammar-question-card .grammar-instruction{font-size:12px!important;line-height:1.9!important;margin:0 0 15px!important;color:#69765f!important;letter-spacing:0!important}
.grammar-question-card .grammar-sentence-wrap{margin:10px 0 15px}
.grammar-question-card .grammar-sentence{font-size:27px!important;line-height:1.8!important}
.grammar-sentence-tools{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px}
.grammar-translation-toggle{font-size:11px;min-height:38px}
.grammar-sentence-tools small{font-size:10px;color:#839077}
.grammar-unlimited{font-size:11px;line-height:1.8;color:#7a866e;margin:0 0 14px}
.grammar-streak{font-size:10px;color:#80996c;white-space:nowrap;letter-spacing:2px}
.grammar-feedback .feedback-foot{justify-content:flex-start;flex-wrap:wrap;font-size:11px;color:#6d7f61;gap:8px 12px}
.grammar-feedback .feedback-foot .button{margin-left:auto;min-height:36px}
.grammar-gloss{font-size:17px!important;color:var(--ink)!important;line-height:1.9}
.grammar-result h1{font-family:var(--serif);font-size:25px;line-height:1.7}
.grammar-result .metric{display:flex;flex-direction:column;gap:10px}
.grammar-result .metric>span{font-size:11px;color:#849177}
.grammar-result .metric strong{font-size:29px;font-weight:500}
.grammar-result .metric small{font-size:11px;margin-left:5px;color:#89947f}
.grammar-missed-list{text-align:left;margin-top:30px;display:grid;gap:14px}
.grammar-missed-list>h2{font-family:var(--serif);font-size:18px}
.grammar-missed-item p{font-size:12px;line-height:1.9}.grammar-missed-item .button{min-height:40px}
@media(max-width:1180px){.grammar-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .mobile-nav button{min-width:0;flex:1;max-width:20%;font-size:8px;gap:4px}
 .grammar-overview{grid-template-columns:minmax(0,1fr) auto;gap:15px;padding:20px}
 .grammar-overview h2{font-size:16px}.grammar-overview .subtitle{font-size:10px;line-height:1.8}
 .grammar-progress-count strong{font-size:30px}.grammar-progress-count small{font-size:9px}.grammar-progress-count>span{font-size:10px}
 .grammar-home-actions{gap:8px;margin:17px 0}.grammar-home-actions .button{font-size:11px;padding:10px 12px}
 .grammar-level-filters{gap:6px}.grammar-level-filters .button{font-size:10px;padding:8px 11px}
 .grammar-unit-grid{grid-template-columns:1fr;gap:13px}.grammar-unit-card{padding:20px}
 .grammar-unit-card h2{margin-top:14px}.grammar-unit-card .subtitle{margin-bottom:15px}
 .grammar-unit-title{font-size:17px}.grammar-unit-actions{margin-top:17px}
 .grammar-book-filters{grid-template-columns:minmax(0,1fr) auto;gap:13px;padding:19px}
 .grammar-book-filters .field:first-child{grid-column:1/-1}
 .grammar-book-entry{grid-template-columns:1fr;gap:18px;padding:20px}.grammar-book-entry .grammar-unit-actions{flex-direction:row}
 .grammar-unit-detail{padding:23px 20px}.grammar-explanation-section h3{font-size:16px}
 .grammar-explanation-section>p{font-size:12px;line-height:2}.grammar-examples .grammar-sentence-wrap{padding:11px 12px}
 .grammar-sentence{font-size:21px!important;line-height:1.95!important}.grammar-token{padding-top:6px;padding-bottom:6px;min-height:40px}
 .grammar-question-card .grammar-sentence{font-size:24px!important;line-height:1.9!important}
 .grammar-question-card .grammar-instruction{font-size:11px!important}.grammar-question-card .grammar-sentence-wrap{margin:9px 0 13px}
 .grammar-sentence-tools{gap:5px}.grammar-sentence-tools small{font-size:9px}.grammar-quiz .option{font-size:12px}
 .grammar-quiz.quiz-answered .grammar-question-card{padding:12px 15px}
 .grammar-quiz.quiz-answered .grammar-sentence{font-size:21px!important;line-height:1.8!important}
 .grammar-result h1{font-size:22px}.grammar-feedback .feedback-foot .button{margin-left:0}
}
@media(max-width:380px){.grammar-overview{grid-template-columns:1fr}.grammar-progress-count{text-align:left}}
