:root{font-family:system-ui,sans-serif;color-scheme:light;--bg:#f8f7fc;--surface:#fff;--text:#28253b;--muted:#69677c;--border:#e8e5f0;--purple:#6c55a6;--lavender:#f0eafb;--pink:#f9d9e5;color:var(--text);background:var(--bg)}:root[data-theme=dark]{color-scheme:dark;--bg:#191724;--surface:#282538;--text:#f5f0ff;--muted:#c1bbd2;--border:#474157;--purple:#c5b4f8;--lavender:#3a314f;--pink:#604357}@media(prefers-color-scheme:dark){:root:not([data-theme=light]):not([data-theme=dark]){color-scheme:dark;--bg:#191724;--surface:#282538;--text:#f5f0ff;--muted:#c1bbd2;--border:#474157;--purple:#c5b4f8;--lavender:#3a314f;--pink:#604357}}:root[data-text-size=large]{font-size:112.5%}*{box-sizing:border-box}body{margin:0;min-width:280px}button,input,select{font:inherit}button,.file-button{border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);padding:.7rem 1rem;cursor:pointer}button:hover,.file-button:hover{border-color:var(--purple)}button:focus-visible,input:focus-visible,select:focus-visible,.file-button:focus-within{outline:3px solid #b69bf3;outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.6}input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select{width:100%;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:.75rem;margin-top:.4rem}input[type=range]{width:100%;accent-color:#765bbb}input[type=checkbox],input[type=radio]{accent-color:#765bbb;flex:none}label:not(.check):not(.file-button){display:block;font-weight:600;margin:.9rem 0}small,.muted{color:var(--muted)}p{line-height:1.6}h1,h2{line-height:1.15;letter-spacing:-.035em}.eyebrow{color:var(--purple);font-size:.72rem;font-weight:800;letter-spacing:.12em}.brand-mark{display:inline-grid;place-items:center;width:2.6rem;height:2.6rem;background:#765bbb;color:#fff;border-radius:13px;font-weight:800}.accent{color:#d687a8}.pill{display:inline-block;background:var(--lavender);color:var(--purple);font-size:.72rem;font-weight:700;border-radius:100px;padding:.4rem .75rem}.primary{background:#6e55a8;border-color:#6e55a8;color:#fff;font-weight:700}.text-button{padding:.5rem 0;border:0;background:transparent;color:var(--purple);font-weight:700}.notice{color:var(--muted);font-size:.8rem;border-top:1px solid var(--border);padding-top:1rem}.error{color:#b43553;font-weight:600}.status{color:var(--purple);font-weight:600}.access-layout{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:5vw;max-width:1100px;margin:auto;padding:2rem}.access-intro h1{font-size:clamp(3rem,7vw,5.5rem);margin:.5rem 0}.access-intro>p:not(.eyebrow){color:var(--muted)}.kana-decoration{color:var(--purple);opacity:.25;font-size:2rem;margin-top:4rem}.access-card,.panel{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:clamp(1.3rem,3vw,2rem);box-shadow:0 14px 40px #51436c0a}.access-card h2{font-size:2rem;margin-bottom:.5rem}.access-card form .primary{width:100%;margin:1rem 0 .5rem}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 4vw;border-bottom:1px solid var(--border);background:var(--surface)}.brand{display:flex;align-items:center;gap:.7rem;border:0;padding:0;background:transparent;font-size:1.1rem}.avatar{width:2.8rem;height:2.8rem;border:0;border-radius:50%;background:var(--pink);font-weight:800}.profile-wrap{position:relative}.profile-menu{position:absolute;z-index:2;right:0;top:3.5rem;width:220px;display:grid;gap:.35rem;padding:1rem;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 30px #0002}.profile-menu button{text-align:left;border:0}.workspace{display:grid;grid-template-columns:210px 1fr;max-width:1450px;margin:auto}.navigation{display:flex;flex-direction:column;gap:.35rem;padding:2rem 1rem}.navigation button{display:flex;align-items:center;gap:.8rem;border:0;background:transparent;text-align:left;color:var(--muted);font-weight:650}.navigation button[aria-current=page]{background:var(--lavender);color:var(--purple)}.nav-icon{font-size:1.25rem;width:1.5rem;text-align:center}.content{min-width:0;padding:2.5rem clamp(1rem,4vw,4rem)}.welcome{min-height:200px;padding:2rem;margin-bottom:1.5rem;border-radius:22px;background:var(--lavender);display:flex;align-items:center;justify-content:space-between;overflow:hidden}.welcome h1{font-size:clamp(2rem,4vw,3rem);margin:.5rem 0}.welcome-art{color:var(--purple);opacity:.25;font-weight:800;font-size:clamp(3rem,7vw,6rem);white-space:nowrap}.welcome-art span{color:#e392b2}.learning-route{display:grid;gap:1.25rem}.route-intro,.route-stage,.route-diagnostic{background:var(--surface);border:1px solid var(--border);border-radius:22px}.route-intro{padding:clamp(1.3rem,3vw,2rem)}.route-intro h2{margin:.9rem 0 .5rem}.route-intro p,.route-diagnostic p{margin:.35rem 0 0;color:var(--muted);line-height:1.55}.route-stages{display:grid;gap:1rem}.route-stage{overflow:hidden}.route-stage-header,.route-unit-header{display:flex;align-items:center;gap:1rem;cursor:pointer;list-style:none}.route-stage-header::-webkit-details-marker,.route-unit-header::-webkit-details-marker{display:none}.route-stage-header{padding:1.2rem 1.3rem}.route-stage-header>span:first-child,.route-unit-label{display:grid;flex:1;gap:.3rem;min-width:0}.route-stage-header small,.route-unit-label small{color:var(--muted);line-height:1.4}.route-chevron{color:var(--purple);font-size:1.4rem;transition:transform .15s}details[open]>summary .route-chevron{transform:rotate(180deg)}.route-unit-list{display:grid;gap:.8rem;padding:0 1rem 1rem}.route-unit{border:1px solid var(--border);border-radius:16px;background:var(--bg);overflow:hidden}.route-unit-header{padding:1rem}.route-unit-number{display:grid;place-items:center;width:2.5rem;height:2.5rem;flex:none;border-radius:12px;color:var(--purple);background:var(--lavender);font-weight:800}.route-unit-content{padding:0 1rem 1rem}.route-unit-content>p{color:var(--muted);line-height:1.5}.route-lessons{list-style:none;display:grid;gap:.55rem;padding:0;margin:1rem 0 0}.route-lessons button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:1rem;text-align:left;line-height:1.4}.route-lesson-action{color:var(--purple);font-size:.86rem;white-space:nowrap}.route-diagnostic{padding:1.3rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}.route-diagnostic h3{margin:0}@media(prefers-reduced-motion:reduce){.route-chevron{transition:none}}.profile-stats,.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin:1.5rem 0}.profile-stats div{padding:1rem;background:var(--bg);border-radius:12px;display:grid;gap:.35rem}.profile-stats span{color:var(--muted);font-size:.85rem}.lesson{max-width:800px}.lesson h2{margin-top:2rem}.lesson li{margin:.5rem 0;line-height:1.5}.example{background:var(--lavender);padding:1.2rem;border-radius:14px}.example strong{font-size:1.4rem}.lesson a{color:var(--purple)}.review-list{list-style:none;padding:0;display:grid;gap:.75rem}.review-list button{width:100%;text-align:left;line-height:1.5}.scheduled-review{background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:1rem}.scheduled-review p{margin:.4rem 0}.help-explanation{border-left:4px solid var(--purple);background:var(--lavender);border-radius:8px;padding:.8rem 1rem;margin:1rem 0}.help-explanation p{margin:.4rem 0 0}.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}.tutor{max-width:800px;margin:auto;background:var(--surface);border:1px solid var(--border);border-radius:22px;overflow:hidden;box-shadow:0 14px 40px #51436c0a}.tutor-header{display:flex;align-items:center;gap:.85rem;padding:1.1rem 1.25rem;border-bottom:1px solid var(--border)}.tutor-header h1{font-size:1.2rem;margin:0}.tutor-header h1 span{color:var(--muted);font-size:.85rem;font-weight:500;letter-spacing:0}.tutor-header p{font-size:.8rem;margin:.25rem 0 0;color:var(--muted)}.tutor-avatar{flex:none;width:3rem;height:3rem;border-radius:50%;background:var(--pink);object-fit:cover;object-position:50% 30%}.tutor-disclosure,.tutor-input-help{margin:.7rem 1.25rem;color:var(--muted);font-size:.8rem;line-height:1.4}.tutor-recommendation{margin:.5rem 1.25rem;font-size:.85rem;color:var(--purple)}.tutor-recommendation button{font-size:inherit;margin-left:.3rem}label.tutor-topic:not(.check):not(.file-button){margin:.75rem 1.25rem;font-size:.85rem}.tutor-conversation{height:clamp(18rem,45vh,32rem);overflow-y:auto;overscroll-behavior:contain;padding:1rem 1.25rem;background:var(--bg)}.tutor-bubble,.tutor-question{width:fit-content;max-width:90%;padding:.8rem 1rem;margin:.4rem 0;overflow-wrap:anywhere;white-space:pre-line}.tutor-bubble{background:var(--lavender);border-radius:4px 16px 16px}.tutor-question{margin:1rem 0 .5rem auto;background:var(--surface);border:1px solid var(--border);border-radius:16px 4px 16px 16px}.tutor-composer{display:flex;align-items:center;gap:.6rem;padding:.9rem 1.25rem 0}.tutor-composer input:not([type=checkbox]):not([type=radio]){margin:0;min-width:0}.tutor-composer button{flex:none}.tutor-suggestions{display:flex;flex-wrap:wrap;gap:.5rem;padding:0 1.25rem .8rem}.tutor-suggestions button{font-size:.82rem;padding:.5rem .7rem}.tutor-options,.tutor-errors{margin:.2rem 1.25rem;padding:.7rem 0;border-top:1px solid var(--border);font-size:.85rem}.tutor-options summary{color:var(--purple);cursor:pointer;font-weight:650}.tutor-lesson-list{display:grid;gap:.5rem;margin:1rem 0}.tutor-lesson-list button{text-align:left}.tutor-lesson-list button[aria-pressed=true]{border-color:var(--purple);background:var(--lavender)}.tutor-errors p{margin:.35rem 0;color:var(--muted)}.exam-review{display:grid;gap:1rem;padding-left:1.5rem}.exam-review li{padding:.5rem}.exam-review p{margin:.4rem 0}.diagnostic-entry{border-top:1px solid var(--border);margin-top:1.5rem;padding-top:.5rem}.diagnostic-question{margin:1rem 0}.diagnostic-results{padding-left:1.25rem}.diagnostic-results li{margin:1rem 0}.kana-keyboard{margin:1rem 0;padding:1rem;max-width:32rem;background:var(--bg);border:1px solid var(--border);border-radius:14px}.kana-keyboard .button-row{margin-top:0}.kana-keyboard [aria-pressed=true]{background:var(--lavender);color:var(--purple);border-color:var(--purple)}.kana-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(2.7rem,1fr));gap:.35rem;margin-bottom:.75rem}.kana-grid button{min-height:2.7rem;padding:.35rem;font-size:1.1rem}fieldset{border:1px solid var(--border);border-radius:14px;padding:1rem;min-width:0}legend{font-weight:700;padding:0 .4rem}.check{display:flex;gap:.5rem;align-items:center;margin:1rem 0}.button-row{display:flex;gap:.6rem;flex-wrap:wrap;margin:1rem 0}.file-button{display:inline-flex;align-items:center}.file-button input{width:1px;height:1px;position:absolute;opacity:0}@media(max-width:700px){.access-layout{grid-template-columns:1fr;gap:1rem;padding:1.25rem}.access-intro h1{font-size:2.7rem}.access-intro h1 br,.kana-decoration{display:none}.workspace{display:flex;flex-direction:column}.navigation{flex-direction:row;overflow-x:auto;padding:.7rem;border-bottom:1px solid var(--border)}.navigation button{flex:1;justify-content:center;flex-direction:column;gap:.2rem;font-size:.75rem;padding:.5rem}.content{padding:1rem}.welcome-art{font-size:2.5rem}}
