:root{color:#20241f;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#f7f8f5;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html{background:#f7f8f5;min-width:320px}body{min-width:320px;margin:0}#root{min-height:100svh}.app-shell{color:#20241f;background:linear-gradient(#2e7d6c14,#0000 260px),#f7f8f5;min-height:100svh;padding:18px}.top-panel,.control-panel,.layout{width:min(1180px,100%);margin:0 auto}.top-panel{gap:18px;padding:22px 0 16px;display:grid}.eyebrow{color:#2d6a5a;margin:0 0 8px;font-size:14px;font-weight:700}h1,h2,p{margin:0}h1{max-width:12em;font-size:34px;font-weight:800;line-height:1.12}.user-switch{background:#fff;border:1px solid #cfd8cc;border-radius:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:14px;padding:4px;display:inline-grid}.user-switch button{background:0 0;border:0;min-height:36px;padding:0 14px}.user-switch .active{color:#fff;background:#24584d}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(138px,1fr));gap:10px;display:grid}.stat{background:#ffffffd1;border:1px solid #dfe4dc;border-radius:8px;min-height:88px;padding:14px}.stat span,.stat small{color:#697166;font-size:13px;display:block}.stat strong{color:#1f4f45;margin:8px 0 4px;font-size:26px;line-height:1;display:block}.control-panel{background:#fff;border:1px solid #dfe4dc;border-radius:8px;gap:12px;padding:14px;display:grid}.setting-row,.quick-actions{justify-content:space-between;align-items:center;gap:10px;display:flex}label{color:#495148;align-items:center;gap:8px;font-size:14px;font-weight:700;display:inline-flex}input{color:#20241f;width:76px;height:40px;font:inherit;background:#fbfcfa;border:1px solid #cfd8cc;border-radius:6px;padding:0 10px}button{color:#20241f;min-height:42px;font:inherit;cursor:pointer;background:#fff;border:1px solid #cfd8cc;border-radius:7px;font-weight:700}button:disabled{cursor:not-allowed;opacity:.48}.segmented{background:#f1f3ee;border:1px solid #cfd8cc;border-radius:8px;grid-template-columns:repeat(2,1fr);padding:3px;display:inline-grid}.segmented button{background:0 0;border:0;min-height:36px;padding:0 14px}.segmented .active{color:#fff;background:#24584d}.source-switch{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.source-switch button{text-align:left;gap:3px;padding:10px;display:grid}.source-switch button span{color:#697166;font-size:12px;font-weight:700}.source-switch .active{color:#fff;background:#24584d;border-color:#24584d}.source-switch .active span{color:#ffffffd1}.quick-actions button{color:#fff;background:#24584d;border-color:#24584d;flex:1;padding:0 12px}.quick-actions button+button{color:#6c4d11;background:#fff7e5;border-color:#ead49b}.layout{gap:14px;padding:14px 0 28px;display:grid}.subject-list{align-content:start;gap:8px;display:grid}.section-title{color:#697166;justify-content:space-between;align-items:baseline;font-size:14px;display:flex}.section-title span{color:#20241f;font-weight:800}.subject{text-align:left;background:#fff;justify-content:space-between;align-items:center;min-height:68px;padding:12px;display:flex}.subject.active{border-color:#24584d;box-shadow:0 0 0 2px #24584d1f}.subject span,.subject small{display:block}.subject strong{margin-bottom:4px;display:block}.subject small{color:#697166;font-size:13px}.subject b{color:#2d6a5a;font-size:18px}.quiz-panel{background:#fff;border:1px solid #dfe4dc;border-radius:8px;min-height:520px;padding:16px}.question-meta{flex-wrap:wrap;gap:8px;margin-bottom:16px;display:flex}.question-meta span,.tags span{color:#31564e;background:#edf3ef;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700}.quiz-panel h2{color:#171a16;margin-bottom:18px;font-size:20px;line-height:1.55}.options{gap:10px;display:grid}.option{text-align:left;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:14px;width:100%;min-height:76px;padding:18px 20px;display:grid;overflow:hidden}.option span{color:#3d473b;background:#eef1ec;border-radius:50%;flex:none;place-items:center;width:42px;height:42px;font-size:20px;font-weight:800;line-height:1;display:grid}.option p{overflow-wrap:anywhere;word-break:break-word;white-space:normal;min-width:0;line-height:1.55}.option.selected{background:#f0f7f3;border-color:#2d6a5a}.option.correct{background:#edf9f1;border-color:#268b5b}.option.correct span{color:#fff;background:#268b5b}.option.wrong{background:#fff0ed;border-color:#b9473f}.option.wrong span{color:#fff;background:#b9473f}.submit-button{color:#fff;background:#24584d;border-color:#24584d;width:100%;margin-top:14px}.answer-card{border:1px solid #dfe4dc;border-radius:8px;gap:12px;margin-top:16px;padding:14px;display:grid}.answer-card.success{background:#f0f8f3;border-color:#b9ddc5}.answer-card.danger{background:#fff4ef;border-color:#efc6b6}.answer-head{color:#1e453e;justify-content:space-between;align-items:center;gap:10px;display:flex}.answer-card p{color:#343b32;line-height:1.65}.answer-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.answer-card button{color:#fff;background:#20241f;border-color:#20241f}.answer-actions button:first-child{background:#24584d;border-color:#24584d}.textbook-panel{color:#3f473d;background:#fbfcfa;border:1px solid #d6dfd2;border-radius:8px;gap:10px;padding:12px;display:grid}.textbook-title{justify-content:space-between;align-items:center;gap:8px;display:flex}.textbook-title strong{color:#1f4f45}.textbook-notice{color:#24584d;background:#eef6f1;border-radius:6px;padding:8px 10px;font-size:13px;font-weight:700}.textbook-notice.error{color:#9f392f;background:#fff4ef}.textbook-title span{color:#697166;font-size:12px}.textbook-hit{width:100%;color:inherit;text-align:left;background:#fff;border:1px solid #e3e8df;border-radius:7px;gap:8px;padding:10px;display:grid}.textbook-hit-clickable{cursor:pointer}.textbook-hit-clickable:hover{background:#f4faf6;border-color:#24584d}.textbook-hit-clickable:focus-visible{outline-offset:2px;outline:3px solid #24584d40}.textbook-hit div{gap:2px;display:grid}.textbook-hit strong{color:#20241f}.textbook-hit span{color:#697166;font-size:12px}.textbook-hit p{color:#343b32;line-height:1.58}.textbook-open-hint{color:#24584d;font-size:13px;font-weight:800}.textbook-actions{gap:7px;display:grid}.textbook-actions button,.textbook-file{color:#fff;background:#24584d;border:1px solid #24584d;border-radius:7px;place-items:center;width:fit-content;min-height:38px;padding:0 12px;font-size:14px;font-weight:800;display:inline-grid}.textbook-actions span{color:#697166;font-size:12px;line-height:1.45}.reader-backdrop{z-index:30;background:#1418146b;place-items:center;padding:14px;display:grid;position:fixed;inset:0}.reader-panel{background:#fffefb;border:1px solid #d6dfd2;border-radius:8px;grid-template-rows:auto minmax(0,1fr);width:min(860px,100%);max-height:min(86svh,760px);display:grid;overflow:hidden;box-shadow:0 24px 80px #1b221c3d}.reader-head{background:#f6f8f4;border-bottom:1px solid #e2e8df;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;display:flex}.reader-head div{gap:3px;display:grid}.reader-head strong{color:#1f4f45;font-size:18px}.reader-head span{color:#697166;font-size:13px}.reader-head button{color:#fff;background:#20241f;border-color:#20241f;min-width:64px;padding:0 12px}.reader-body{color:#242923;white-space:pre-wrap;gap:10px;padding:16px;line-height:1.75;display:grid;overflow:auto}.reader-body p{word-break:break-word}.tags{flex-wrap:wrap;gap:8px;display:flex}.empty-state{text-align:center;place-content:center;gap:10px;min-height:440px;display:grid}.empty-state p{color:#697166}@media (width>=760px){.app-shell{padding:26px}.top-panel{grid-template-columns:minmax(260px,.8fr) 1.2fr;align-items:end}h1{font-size:42px}.control-panel{grid-template-columns:1fr 1fr;align-items:center}.layout{grid-template-columns:300px minmax(0,1fr)}}@media (width<=430px){.app-shell{padding:12px}.setting-row,.quick-actions{flex-direction:column;align-items:stretch}label,.segmented{width:100%}input{flex:1}.answer-head{flex-direction:column;align-items:flex-start}.answer-actions{grid-template-columns:1fr}.reader-backdrop{place-items:stretch stretch;padding:0}.reader-panel{border-radius:0;width:100%;max-height:100svh}.reader-head{align-items:flex-start}}
