:root{
 color-scheme:dark;--bg:#09090b;--panel:#1b1b1f;--surface:#18181c;--input:#111113;--text:#fafafa;--muted:#a1a1aa;--line:#36363d;--border:#45454e;--soft:#27272a;--accent:#f4f4f5;--accent-ink:#09090b;--green:#d4d4d8;--red:#ffb4b4;--red-bg:#ff85850c;--success:#a5d6b5;--header:#101012d9;--inset:inset 0 1px 0 #ffffff12;--shadow:0 12px 32px #0003;
 font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;line-height:1.5;background:var(--bg);color:var(--text);-webkit-text-size-adjust:100%
}
html[data-theme=light]{color-scheme:light;--bg:#f4f4f5;--panel:#fff;--surface:#fff;--input:#fafafa;--text:#18181b;--muted:#52525b;--line:#d4d4d8;--border:#b4b4bc;--soft:#e4e4e7;--accent:#18181b;--accent-ink:#fafafa;--green:#3f3f46;--red:#a33131;--red-bg:#a3313109;--success:#276b45;--header:#ffffffe6;--inset:inset 0 1px 0 #ffffffd9;--shadow:0 12px 32px #0000000a}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:280px;min-height:100dvh;background:var(--bg);color:var(--text)}
body::before{content:'';position:fixed;inset:76px 0 0;z-index:0;pointer-events:none;background:linear-gradient(150deg,#9ca5e5,#9296b6);opacity:.23;-webkit-mask:url('/static/wallpaper.svg') center top/min(1300px,180vw) auto no-repeat;mask:url('/static/wallpaper.svg') center top/min(1300px,180vw) auto no-repeat}
html[data-theme=light] body::before{background:linear-gradient(150deg,#484c78,#5c5678);opacity:.13}
#app{position:relative;z-index:1}
button,input,textarea,select{font:inherit}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{cursor:pointer}button:disabled{opacity:.45;cursor:default}
:is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--text);outline-offset:4px}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin:0}h1,h2,h3{overflow-wrap:anywhere;font-weight:600}
h1{font-size:clamp(28px,4vw,40px);letter-spacing:-.035em;line-height:1.18}
h2{font-size:21px;letter-spacing:-.025em;line-height:1.3}
h3{font-size:17px;letter-spacing:-.015em;line-height:1.4}
p{color:var(--muted);line-height:1.65}
.icon{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.muted,.helper,.smallprint{color:var(--muted)}.helper{font-size:13px;line-height:1.6}.smallprint{font-size:12px;line-height:1.65}
.hidden,[hidden]{display:none!important}
.app-shell{position:relative;isolation:isolate;width:min(100%,880px);min-height:100dvh;margin:0 auto;padding:calc(2px + env(safe-area-inset-top,0px)) 20px calc(128px + env(safe-area-inset-bottom,0px))}
.app-shell.auth-shell{padding-bottom:36px}
.app-header{position:relative;z-index:10;min-height:76px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--line);border-radius:28px;background:var(--header);box-shadow:var(--inset),0 8px 32px #00000008;-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}
.header-leading,.header-actions{display:flex;align-items:center;gap:6px}.header-actions{justify-self:end}
.header-title{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.header-title>span{font-size:10px;color:var(--muted);letter-spacing:.02em}
.brand-capsule{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:4px 18px;border:1px solid var(--border);border-radius:999px;font-size:17px;font-weight:600;white-space:nowrap;background:linear-gradient(150deg,#ffffff0a,transparent),var(--header);box-shadow:var(--inset)}
.brand-capsule .icon{width:14px;height:14px;opacity:.75}
.icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:12px;background:linear-gradient(145deg,#ffffff0b,transparent 65%),var(--surface);color:var(--text);box-shadow:var(--inset)}
.icon-button:disabled{opacity:.3}.profile-button{font-size:13px;font-weight:600;border-radius:50%}
main{padding:38px 14px 0;min-width:0}
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:0 0 32px}
.page-heading p{font-size:14px;margin-top:12px;max-width:54ch}.page-heading>.button{margin-top:8px}
.eyebrow{display:block;font-size:10px;font-weight:600;letter-spacing:.15em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.page-heading .eyebrow{margin-bottom:12px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:12px 17px;border:1px solid transparent;border-radius:14px;background:var(--accent);color:var(--accent-ink);font-size:14px;font-weight:650;line-height:1.45;text-align:center;text-decoration:none;transition:filter .16s,border-color .16s,background .16s,transform .16s}
.button:hover{filter:brightness(.91)}.button:active{transform:scale(.98)}
.button.secondary,.button.ghost{background:color-mix(in srgb,var(--text) 5%,transparent);border-color:var(--border);color:var(--text);font-weight:500;box-shadow:var(--inset)}
.button.secondary:hover,.button.ghost:hover{background:var(--soft);filter:none}
.button.small{min-height:40px;padding:9px 13px;font-size:12px;border-radius:12px}
.button.danger{background:var(--red);color:var(--bg)}
.text-button{display:inline-flex;align-items:center;gap:7px;border:0;padding:4px 0;background:transparent;color:var(--text);font-size:13px;text-decoration:underline;text-underline-offset:4px}
.actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.bottom-nav{position:fixed;z-index:40;left:14px;right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;width:auto;max-width:760px;margin:0 auto;padding:6px;border:1px solid var(--border);border-radius:28px;background:var(--header);box-shadow:var(--inset),0 12px 36px #00000030;-webkit-backdrop-filter:blur(28px);backdrop-filter:blur(28px)}
.bottom-nav a{min-width:0;min-height:60px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:9px 4px;border-radius:21px;color:var(--muted);font-size:11px;line-height:1.3}
.bottom-nav a.active{background:var(--soft);color:var(--text);box-shadow:var(--inset)}.bottom-nav .icon{width:22px;height:22px}.bottom-nav a:hover{color:var(--text)}
.hero{position:relative;display:grid;grid-template-columns:minmax(0,1.65fr) 1fr;min-height:230px;border:1px solid var(--border);border-radius:24px;overflow:hidden;background:linear-gradient(125deg,#ffffff05,transparent 65%),var(--surface);box-shadow:var(--inset);margin-bottom:24px}
.hero-copy{padding:28px;position:relative;z-index:1}.hero h2{font-size:clamp(24px,3.3vw,29px);letter-spacing:-.04em;line-height:1.22;max-width:420px}.hero p{font-size:13px;margin:12px 0 22px;max-width:43ch}
.book-art{position:relative;min-height:220px;display:grid;align-content:center;justify-items:center;padding:24px 18px;overflow:hidden}
.book-art::before,.book-art::after{content:'';position:absolute;width:245px;height:245px;border:1px solid var(--line);border-radius:50%;opacity:.65}
.book-art::after{width:175px;height:175px;opacity:.8}
.book-art img{position:relative;z-index:1;width:136px;height:136px;border-radius:32px;transform:rotate(-9deg);box-shadow:0 12px 32px #0003}
.art-caption{z-index:2;display:flex;align-items:center;gap:7px;margin-top:18px;padding:7px 12px;border:1px solid var(--border);border-radius:20px;background:var(--surface);font-size:10px;white-space:nowrap;box-shadow:var(--inset)}.art-caption .icon{width:14px;height:14px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:36px}
.stat{min-width:0;display:flex;align-items:center;gap:12px;padding:18px 16px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.stat-symbol{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:var(--soft);color:var(--text)}
.stat b{display:block;font-size:25px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums}.stat span{font-size:11px;color:var(--muted)}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:32px 0 16px}
.section-head h2{font-size:20px}.section-head a{font-size:12px;color:var(--muted);white-space:nowrap}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.material{display:flex;flex-direction:column;gap:16px;min-width:0;padding:22px;border:1px solid var(--border);border-radius:22px;background:linear-gradient(130deg,#ffffff04,transparent 60%),var(--panel);box-shadow:var(--inset);transition:border-color .16s,transform .16s}
.material:hover{border-color:var(--muted);transform:translateY(-2px)}
.material-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.material-icon{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.material h3{font-size:20px;line-height:1.3;margin-bottom:8px}.material p{font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.material-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;margin-top:auto;border-top:1px solid var(--line);font-size:12px}.material-foot .icon{width:17px;height:17px}
.badge{display:inline-flex;align-items:center;gap:5px;width:fit-content;padding:4px 8px;border:1px solid var(--border);border-radius:8px;font-size:10px;font-weight:500;color:var(--text);background:var(--soft)}
.badge.neutral{color:var(--muted);background:transparent;border-color:var(--line)}
.progress{height:5px;border-radius:8px;background:var(--line);overflow:hidden}.progress>span{display:block;height:100%;border-radius:8px;background:var(--text);transition:width .3s}
.progress-label{display:flex;justify-content:space-between;gap:12px;margin:9px 0 0;font-size:11px;color:var(--muted)}
.empty{padding:40px 0;max-width:54ch;border-top:1px solid var(--line)}.empty>.icon{width:30px;height:30px;color:var(--muted);margin-bottom:16px}.empty h3{margin-bottom:8px;font-size:20px}.empty p{font-size:14px;margin-bottom:20px;max-width:44ch}
.tip{display:flex;align-items:flex-start;gap:10px;padding:18px 0;border-top:1px solid var(--line);margin-top:28px;font-size:13px;color:var(--muted)}.tip>.icon{width:19px;height:19px;margin-top:2px}.tip p{margin:0;color:inherit}.tip.warning{color:var(--red);border-color:color-mix(in srgb,var(--red) 40%,transparent)}
.panel{border:1px solid var(--line);border-radius:22px;padding:26px;margin:24px 0;background:var(--surface)}
.narrow{max-width:720px;margin:0 auto}.narrow>h1{margin-bottom:12px}.narrow>p{font-size:14px;margin-bottom:24px}
.steps{display:flex;align-items:center;gap:16px;margin-bottom:28px;font-size:12px;color:var(--muted)}
.steps span{display:flex;align-items:center;gap:8px}.steps b{display:grid;place-items:center;width:28px;height:28px;font-size:12px;font-weight:500;border:1px solid var(--border);border-radius:10px}
.steps .active{color:var(--text)}.steps .active b{background:var(--text);color:var(--bg);border-color:var(--text)}
label.field{display:block;min-width:0;font-size:13px;font-weight:500;margin-bottom:24px}
input[type=text],input[type=password],textarea,select{display:block;width:100%;min-width:0;min-height:52px;border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--text);padding:13px 15px;margin-top:8px;font-size:16px;box-shadow:none}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}input:focus,textarea:focus{border-color:var(--muted)}
textarea{min-height:220px;resize:vertical;line-height:1.65}input[type=radio],input[type=checkbox]{accent-color:var(--text)}
.segmented,.auth-tabs{display:flex;align-items:stretch;gap:8px;padding:0;margin-bottom:24px}
.segmented button,.auth-tabs button{flex:1;min-width:0;min-height:46px;padding:10px 12px;background:color-mix(in srgb,var(--text) 4%,transparent);color:var(--muted);border:1px solid var(--border);border-radius:14px;font-size:13px;line-height:1.4}
.segmented button.selected,.auth-tabs button.selected{color:var(--text);font-weight:650;background:var(--input);box-shadow:inset 0 -2px 0 var(--text);border-color:var(--muted)}
.dropzone{display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 16px;margin:16px 0 28px;border:1px dashed var(--border);border-radius:18px;background:var(--input);cursor:pointer}
.dropzone.drag{background:var(--soft);border-color:var(--text)}.dropzone>.icon{width:28px;height:28px;margin-bottom:16px}.dropzone strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.dropzone small{color:var(--muted);display:block;margin:8px 0 18px;font-size:12px}.dropzone input{max-width:100%;color:var(--muted);font-size:12px}
.dropzone input::file-selector-button{min-height:36px;border:1px solid var(--border);border-radius:10px;padding:7px 12px;margin-right:10px;color:var(--text);background:var(--soft);cursor:pointer}
.field-title{font-size:14px;font-weight:600;margin:28px 0 12px}
.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 28px}
.choice{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:16px;background:transparent;cursor:pointer}
.choice:has(input:checked){border-color:var(--muted);background:var(--soft);box-shadow:var(--inset)}.choice input{margin:5px 0 0;flex:none}.choice strong{display:block;font-size:13px;font-weight:600}.choice small{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--muted)}
.form-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:30px}.form-error{color:var(--red);font-size:13px;line-height:1.6}.form-error:not(:empty){margin-bottom:18px}
.back{display:inline-flex;align-items:center;gap:8px;min-height:36px;margin-bottom:24px;font-size:12px;color:var(--muted)}.back .icon{width:17px;height:17px}
.course-banner{padding:28px;margin-bottom:32px;border:1px solid var(--border);border-radius:24px;background:linear-gradient(125deg,#ffffff05,transparent 70%),var(--surface)}
.course-banner h1{font-size:32px;margin-bottom:16px}.course-banner>p{font-size:14px;max-width:65ch}
.course-metrics{display:flex;gap:32px;flex-wrap:wrap;margin:26px 0}.course-metrics b{display:block;font-size:25px;font-weight:600}.course-metrics small{font-size:12px;color:var(--muted)}
.chapter{border:1px solid var(--line);border-radius:20px;margin-bottom:12px;background:var(--surface);overflow:hidden}
.chapter>summary{display:flex;align-items:center;gap:14px;min-height:84px;padding:20px;list-style:none;cursor:pointer}.chapter>summary::-webkit-details-marker{display:none}
.chapter>summary>.icon{width:17px;transition:transform .16s;color:var(--muted)}.chapter[open]>summary>.icon{transform:rotate(90deg)}
.chapter-num{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);color:var(--text);background:var(--soft);font-size:13px}
.chapter-heading{flex:1;min-width:0}.chapter-heading h3{font-size:15px;margin-bottom:4px}.chapter-heading small{color:var(--muted);font-size:11px}
.chapter-body{padding:0 20px 8px 74px}.chapter-body>p{margin-bottom:16px}
.block{display:flex;align-items:center;gap:16px;padding:18px 0;border-top:1px solid var(--line)}.block>div{flex:1;min-width:0}.block strong{font-size:13px;font-weight:600}.block small{display:block;margin-top:5px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.exam-box{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 0;margin-top:20px;border-top:1px solid var(--line)}.exam-box h3{font-size:17px;margin-bottom:8px}.exam-box p{font-size:12px}
.loading-box{text-align:center;padding:48px 28px}.loading-box h1{margin:20px 0 12px}.loading-box>p{margin-bottom:20px}.loading-box .progress{max-width:380px;margin:28px auto}.loading-box h3{margin-bottom:12px}
.spinner{width:32px;height:32px;border:2px solid var(--line);border-top-color:var(--text);border-radius:50%;margin:0 auto 24px;animation:spin 1s linear infinite}
.quiz-wrap{max-width:720px;margin:0 auto}.quiz-top{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px;margin-bottom:20px}
.quiz-card{margin-top:26px;padding:28px}.quiz-card h1{font-size:clamp(23px,3vw,29px);line-height:1.4;margin:20px 0 28px}.question-meta{font-size:11px;color:var(--muted);letter-spacing:.03em}
.answers{display:grid;gap:10px}
.answer{display:flex;align-items:center;gap:13px;min-height:58px;width:100%;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--input);color:var(--text);font-size:14px;line-height:1.5;text-align:left}
.answer:hover{background:var(--soft)}.answer.selected{border-color:var(--text);background:var(--soft);box-shadow:inset 0 0 0 1px var(--text)}
.answer-letter{display:grid;place-items:center;width:28px;height:28px;flex:none;border:1px solid var(--border);border-radius:8px;color:var(--muted);font-size:12px}.answer.selected .answer-letter{background:var(--text);color:var(--bg);border-color:var(--text)}
.quiz-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:28px}.quiz-footer .helper{max-width:34ch;font-size:12px}
.feedback{margin:22px 0;padding:22px;border:1px solid color-mix(in srgb,var(--success) 35%,var(--line));border-radius:16px;background:color-mix(in srgb,var(--success) 4%,transparent)}
.feedback.incorrect{border-color:color-mix(in srgb,var(--red) 35%,var(--line));background:var(--red-bg)}
.feedback h3{display:flex;align-items:center;gap:9px;color:var(--success);margin-bottom:18px;font-size:17px}.feedback.incorrect h3{color:var(--red)}.feedback p{color:var(--text);font-size:14px;margin:12px 0}
.source{margin-top:18px;font-size:12px;color:var(--muted)}.source summary{cursor:pointer;padding:6px 0}
blockquote{padding:4px 0 4px 14px;margin:12px 0 0;border-left:2px solid var(--muted);font-size:13px;white-space:pre-wrap}
.result-heading{text-align:center;padding:20px 0 28px}
.result-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 24px;border:1px solid var(--border);border-radius:20px;background:var(--soft)}.result-icon .icon{width:30px;height:30px}
.result-heading p{max-width:52ch;font-size:14px;margin:16px auto 0}
.result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:28px}.result-stats>div{padding:20px 12px;border:1px solid var(--line);border-radius:16px;text-align:center;background:var(--surface)}.result-stats b{display:block;font-size:27px;font-weight:600;margin-bottom:4px}.result-stats small{font-size:11px;color:var(--muted)}
.review-item{border-bottom:1px solid var(--line);padding:18px 0}.review-item>summary{display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer;line-height:1.5}.review-item .good{color:var(--success)}.review-item .bad{color:var(--red)}.review-detail{padding:18px 0 0 32px;font-size:13px}.review-detail p{margin:8px 0}
.history-list{display:grid;gap:12px}.history-item{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.history-main{flex:1;min-width:0}.history-item h3{font-size:15px;margin-bottom:8px}.history-item p{font-size:12px;margin-top:3px}.history-item>.icon{width:16px}.history-score{text-align:right;font-size:23px;font-weight:500}.history-score .helper{font-size:10px;font-weight:400}
.settings-grid{max-width:720px;margin:0 auto}
.settings-grid .panel{padding:28px 0 0;margin-top:32px;margin-bottom:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.settings-grid form>.panel:first-child{padding-top:0;margin-top:0;border-top:0}.settings-grid .panel h2{margin-bottom:12px}
.theme-options{grid-template-columns:repeat(3,minmax(0,1fr))}.theme-options .choice{position:relative;flex-direction:column;gap:12px}.theme-options .choice input{position:absolute;opacity:0}.theme-options .choice:has(input:focus-visible){outline:2px solid var(--text);outline-offset:4px}
.theme-preview{display:block;width:100%;height:68px;border:1px solid #b4b4bc;border-radius:8px;padding:9px;background:#f4f4f5}
.theme-preview::before,.theme-preview::after{content:'';display:block;border-radius:4px;background:#d4d4d8;height:10px;width:66%}.theme-preview::after{height:22px;width:100%;margin-top:8px;background:#fff;border:1px solid #d4d4d8}
.theme-preview.dark{background:#09090b;border-color:#45454e}.theme-preview.dark::before{background:#45454e}.theme-preview.dark::after{background:#242428;border-color:#45454e}
.theme-preview.system{background:linear-gradient(90deg,#f4f4f5 50%,#09090b 50%);border-color:#71717a}.theme-preview.system::after{background:linear-gradient(90deg,#fff 50%,#242428 50%);border-color:#71717a}
.account-summary{display:flex;align-items:center;gap:12px;margin:22px 0 28px}.account-avatar{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--border);border-radius:50%;background:var(--soft);font-size:15px;font-weight:600}
.account-summary strong{display:block;font-size:15px}.account-summary small{color:var(--muted);font-size:12px}
.install-row{display:flex;align-items:center;gap:18px;margin:22px 0}.install-row img{width:64px;height:64px;border:1px solid var(--line);border-radius:16px}.install-row strong{display:block;font-size:16px;margin-bottom:4px}.install-row p{font-size:13px}
.install-help{margin-top:18px;font-size:13px}.install-help summary{cursor:pointer;min-height:44px;padding:10px 0}.install-help p{margin:10px 0}
.auth-main{max-width:480px;margin:0 auto;padding-top:48px}.auth-intro{text-align:center}.auth-logo{display:block;width:112px;height:112px;margin:0 auto 24px}
.auth-intro h1{font-size:39px;margin-bottom:18px;letter-spacing:-.035em}.auth-intro p{font-size:14px;max-width:34ch;margin:0 auto;line-height:1.75}
.auth-tabs{margin-top:32px;margin-bottom:26px}.auth-form label.field{margin-bottom:24px;font-size:13px}.auth-form .button{width:100%;margin-top:8px}.auth-form input{min-height:54px}
.auth-footnote{margin:28px 0 0;font-size:12px;text-align:center;color:var(--muted);line-height:1.7}
.auth-footer{max-width:440px;margin:40px auto 0;padding-top:20px;border-top:1px solid var(--line);text-align:center;color:var(--muted);font-size:11px}
.initial{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;font-size:25px;font-weight:600}.initial img{width:88px;height:88px;border-radius:22px}.initial span{font-size:13px;font-weight:400;color:var(--muted)}
#toast{position:fixed;z-index:100;left:50%;bottom:calc(106px + env(safe-area-inset-bottom,0px));transform:translate(-50%,10px);width:max-content;max-width:min(560px,calc(100% - 32px));padding:16px 20px;border:1px solid var(--border);border-radius:18px;color:var(--text);background:var(--surface);box-shadow:var(--shadow);font-size:13px;line-height:1.6;opacity:0;pointer-events:none;transition:opacity .16s,transform .16s}
#toast.show{opacity:1;transform:translate(-50%,0)}
dialog{position:relative;width:min(450px,calc(100% - 32px));max-height:85dvh;overflow:auto;padding:26px;border:1px solid var(--border);border-radius:24px;background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
dialog::backdrop{background:#0009;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
dialog h2{padding-right:32px;margin:0 0 14px}dialog p{font-size:14px;margin-bottom:24px}
.dialog-close{position:absolute;right:14px;top:14px;width:32px;height:32px;min-width:32px;border-radius:10px}.dialog-close .icon{width:17px;height:17px}
.skip{position:fixed;top:-100px;left:12px;z-index:200;padding:12px 16px;background:var(--panel);color:var(--text);border-radius:12px}.skip:focus{top:12px}
.search{margin:0 0 24px}.search input{max-width:none;background:var(--input)}.deleted-link{color:var(--red);font-size:12px}
@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:900px){main{padding-top:42px}.page-heading{margin-bottom:36px}.settings-grid{max-width:680px}}
@media(max-width:620px){
 .app-shell{padding-inline:12px}.app-header{padding:10px;gap:6px;min-height:72px;border-radius:26px}.brand-capsule{padding:4px 14px;font-size:15px;min-height:34px}.header-title>span{font-size:9px}.header-leading,.header-actions{gap:5px}
 main{padding:28px 8px 0}h1{font-size:29px}.page-heading{gap:12px;margin-bottom:24px}.page-heading p{font-size:13px;margin-top:10px}.page-heading>.button{width:42px;min-height:42px;flex:0 0 42px;padding:10px;border-radius:12px;font-size:0;gap:0}.page-heading>.button .icon{width:21px}
 .hero{grid-template-columns:minmax(0,1fr) 124px;min-height:220px;border-radius:22px}.hero-copy{padding:23px 0 23px 22px}.hero h2{font-size:24px}.hero p{font-size:12px;margin-bottom:18px}.hero .eyebrow{font-size:9px;letter-spacing:.08em}.hero .button{padding:11px 13px;font-size:12px}
 .book-art{padding:16px 10px;min-height:220px}.book-art img{width:94px;height:94px;border-radius:23px}.book-art::before{width:185px;height:185px}.book-art::after{width:135px;height:135px}.art-caption{font-size:0;gap:0;padding:6px;margin-top:16px}.art-caption .icon{width:15px;height:15px}
 .stats{gap:8px;margin-bottom:28px}.stat{padding:15px 11px;display:block;border-radius:16px}.stat .stat-symbol{display:none}.stat b{font-size:23px}.stat span{display:inline-block;margin-top:5px;font-size:10px;line-height:1.5}.stat b>span{font-size:12px;margin:0}
 .cards{grid-template-columns:minmax(0,1fr);gap:12px}.material{padding:21px;gap:14px}.material h3{font-size:20px}.section-head{margin:28px 0 16px}.section-head h2{font-size:20px}.section-head a{font-size:11px}
 .bottom-nav{left:12px;right:12px;gap:2px}.bottom-nav a{font-size:9px;min-height:58px}.panel{padding:20px;border-radius:20px}
 .choice{padding:14px;gap:9px}.choices{gap:10px}.choice strong{font-size:12px}.choice small{font-size:11px}
 .form-footer .helper{font-size:11px;max-width:18ch}.form-footer .button{padding:12px 14px;font-size:12px}
 .course-banner{padding:22px;border-radius:22px}.course-banner h1{font-size:28px}.course-banner>p{font-size:13px}.course-metrics{gap:22px}.course-metrics b{font-size:23px}.course-metrics small{font-size:11px}
 .chapter>summary{padding:18px 16px;gap:12px}.chapter-heading h3{font-size:14px}.chapter-body{padding:0 16px 6px}.chapter-num{width:36px;height:36px}.block{gap:12px}.block .button{padding:8px 11px;font-size:11px}.exam-box{flex-direction:column;align-items:flex-start}
 .quiz-card{padding:22px 18px}.quiz-card h1{font-size:24px;margin-bottom:24px}.quiz-top{align-items:flex-start;font-size:10px}.quiz-top .back{font-size:11px}.quiz-top>.muted{text-align:right;max-width:16ch}
 .answer{font-size:13px;padding:13px 12px;gap:11px}.quiz-footer{flex-direction:column;align-items:stretch;gap:16px}.quiz-footer .helper{max-width:none}.feedback{padding:18px 16px}.feedback p{font-size:13px}
 .result-heading h1{font-size:28px}.result-stats{gap:8px}.result-stats>div{padding:17px 8px}.result-stats b{font-size:24px}.result-stats small{font-size:10px}
 .history-item{padding:18px 16px;gap:12px}.history-item>.stat-symbol{display:none}.history-item p{font-size:11px}.history-score{font-size:21px}
 .settings-grid .panel{padding-top:26px;margin-top:28px}.theme-options{gap:8px}.theme-options .choice{padding:12px 10px}.theme-options .choice strong{font-size:12px}.theme-options .choice small{font-size:10px}.theme-preview{padding:7px;height:60px}
 .auth-main{padding:30px 20px 0}.auth-logo{width:76px;height:76px;margin-bottom:18px}.auth-intro h1{font-size:30px;margin-bottom:14px}.auth-intro p{font-size:13px;max-width:33ch}.auth-tabs{margin-top:26px;margin-bottom:24px}.auth-form input{min-height:52px}.auth-footer{margin-top:30px}
}
@media(max-width:370px){
 .app-header{column-gap:3px;padding:8px}.header-leading,.header-actions{gap:4px}.brand-capsule{padding-inline:10px;font-size:14px}.brand-capsule>.icon{display:none}.icon-button{flex-basis:36px;width:36px;height:36px;border-radius:11px}
 .hero{grid-template-columns:1fr}.hero-copy{padding:22px}.hero .book-art{display:none}.choices:not(.theme-options){grid-template-columns:1fr}.steps{gap:10px;font-size:11px}.steps span{gap:6px}.auth-main{padding-inline:12px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce){.app-header,.bottom-nav{background:var(--surface);-webkit-backdrop-filter:none;backdrop-filter:none}}
