:root{--navy:#15284c;--deep:#111f3b;--blue:#456ff5;--blue-dark:#284eaa;--mint:#19a68a;--amber:#e5a844;--ink:#1e2d47;--muted:#74829a;--line:#e7ebf2;--bg:#f6f8fc;--paper:#fff;--soft:#edf2fc;--shadow:0 12px 40px rgba(31,55,94,.055)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}p,h1,h2,h3,h4{margin-top:0}h1{font-size:clamp(1.85rem,3.4vw,2.85rem);line-height:1.13;letter-spacing:-.045em;margin-bottom:14px}h2{font-size:clamp(1.45rem,2.4vw,1.98rem);letter-spacing:-.035em;margin-bottom:6px}h3{font-size:1.13rem;letter-spacing:-.02em;margin-bottom:6px}p{line-height:1.67}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #8ab6ff;outline-offset:3px}
#app-shell{min-height:100svh;display:grid;grid-template-columns:245px minmax(0,1fr)}.sidebar{background:var(--deep);color:#f0f5ff;position:sticky;top:0;height:100svh;display:flex;flex-direction:column;padding:29px 17px 21px;z-index:40}.brand{display:flex;align-items:center;gap:11px;padding:0 12px;margin-bottom:47px}.brand-symbol{display:grid;place-items:center;background:linear-gradient(140deg,#567bf6,#20b7a9);width:40px;height:40px;border-radius:12px;color:#fff;font-size:25px;font-weight:850;position:relative;box-shadow:0 7px 16px #11264b}.brand-symbol span{font-size:11px;position:absolute;top:0;right:3px;color:#f8da86}.brand strong{display:block;font-size:19px;letter-spacing:-.04em;line-height:1.05}.brand small{font-size:10px;color:#a2c0dc;letter-spacing:.155em;font-weight:850}.nav-kicker{font-size:10px;font-weight:850;letter-spacing:.14em;color:#7590b9;padding:0 13px;margin-bottom:13px}.side-links{display:grid;gap:5px}.side-links a,.side-settings{display:flex;align-items:center;gap:13px;padding:12px 14px;color:#a8b9d6;font-weight:680;border-radius:12px;transition:background .15s,color .15s}.side-links a.active,.side-links a:hover,.side-settings:hover{background:#293e66;color:white}.nav-ic{font-size:23px;line-height:1;width:22px;text-align:center;font-weight:350}.sidebar-grow{flex:1}.side-settings{font-size:13px}.sidebar-note{background:#243858;border:1px solid #3c5070;border-radius:16px;padding:14px 12px;display:flex;align-items:flex-start;gap:9px;margin-top:16px}.sidebar-note strong{display:block;font-size:12px}.sidebar-note small{display:block;font-size:11px;color:#a8b9d0;line-height:1.5}.soft-dot{margin-top:5px;flex:0 0 8px;height:8px;background:#59dcc0;border-radius:50%}
.workspace{min-width:0;display:flex;flex-direction:column}.topbar{height:76px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:13px;padding:0 clamp(20px,3vw,46px);border-bottom:1px solid var(--line)}.topbar-left{font-size:14px;color:#576781;font-weight:750;display:flex;align-items:center;gap:12px}.topbar-right{display:flex;align-items:center;gap:16px}.top-mini{font-size:10px;letter-spacing:.14em;font-weight:850;color:#8a98ad}.connection-pill{display:inline-flex;align-items:center;gap:7px;background:#f3f5fa;border:1px solid #e7ebf2;border-radius:999px;padding:7px 11px;color:#556782;font-size:11px;font-weight:800;white-space:nowrap}.status-dot{width:7px;height:7px;display:block;background:#e9a33b;border-radius:50%}.connection-pill.ready .status-dot{background:#12a786}.connection-pill.offline .status-dot{background:#7189b0}.avatar{width:36px;height:36px;border-radius:50%;background:#e0e7ff;color:#3152a0;display:grid;place-items:center;font-weight:850}.main{max-width:1360px;width:100%;margin:0 auto;padding:30px clamp(18px,3.1vw,46px) 44px;min-height:calc(100svh - 135px);flex:1}.site-footer{padding:14px 28px 23px;color:#9aa6b8;font-size:11px;text-align:center}.site-footer span{margin:0 9px}.icon-button{border:0;background:#eef2fa;border-radius:11px;width:40px;height:40px;align-items:center;justify-content:center;font-size:19px;display:inline-flex;color:#344c7a}.menu-toggle{display:none}
.welcome{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin:3px 0 24px}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:850;color:#3766b5;text-transform:uppercase;margin-bottom:9px}.muted{color:var(--muted)}.welcome h1{margin-bottom:8px}.welcome p{color:var(--muted);margin-bottom:0}.hero{background:linear-gradient(112deg,#203766 0%,#2f4f8c 67%,#2a7b8b 100%);border-radius:25px;color:#fff;min-height:235px;overflow:hidden;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 215px;align-items:center;padding:32px clamp(24px,4vw,47px);box-shadow:0 17px 30px #1e3d7612}.hero:before{content:"";position:absolute;right:-60px;top:-190px;width:360px;height:360px;border:65px solid #ffffff11;border-radius:50%}.hero:after{content:"";position:absolute;right:240px;bottom:-174px;width:270px;height:270px;border:44px solid #ffffff06;border-radius:50%}.hero-body,.hero-graphic{position:relative;z-index:2}.hero .eyebrow{color:#96e6e3}.hero h2{font-size:clamp(1.5rem,2.6vw,2.3rem);line-height:1.18;max-width:580px;letter-spacing:-.04em;margin-bottom:11px}.hero p{color:#d0dff0;max-width:510px;margin-bottom:22px;font-size:14px}.hero-graphic{display:grid;place-items:center}.hero-graphic .book{width:155px;height:135px;background:#ffffff19;border:1px solid #ffffff4c;border-radius:24px;transform:rotate(-9deg);display:grid;place-items:center;font-size:80px;box-shadow:20px 15px 0 #ffffff10}.hero-actions{display:flex;flex-wrap:wrap;gap:10px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 17px;border-radius:11px;border:1px solid transparent;background:#3665ec;color:white;font-weight:800;font-size:13px;text-align:center;min-height:42px}.btn:hover{filter:brightness(.965)}.btn.light{background:#fff;color:#254474}.btn.outline-light{background:#ffffff0d;border-color:#ffffff52;color:#fff}.btn.secondary{background:#eef2fc;color:#2d4a84;border:1px solid #dce5f6}.btn.ghost{background:transparent;color:#4263a1;border-color:#dce4f1}.btn.danger{background:#fff1f0;color:#bc454a;border-color:#ffd5d3}.btn.small{padding:8px 12px;font-size:12px;min-height:36px}.btn.full{width:100%}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:20px 0 34px}.stat{background:#fff;border:1px solid var(--line);padding:18px 22px;border-radius:18px;box-shadow:var(--shadow);display:flex;align-items:center;gap:14px}.stat-ic{height:44px;width:44px;border-radius:14px;display:grid;place-items:center;background:#edf1ff;color:#4d66e9;font-size:22px;flex-shrink:0}.stat:nth-child(2) .stat-ic{background:#e6f8f4;color:#12a987}.stat:nth-child(3) .stat-ic{background:#fff4e0;color:#d58b25}.stat strong{font-size:25px;line-height:1.1;display:block;letter-spacing:-.04em}.stat small{display:block;font-size:11px;color:#8190a5;font-weight:650}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.section-head p{color:#8793a6;margin-bottom:0;font-size:13px}.text-link{color:#4868b5;font-size:13px;font-weight:800;white-space:nowrap}.subject-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.subject-card{background:white;border:1px solid var(--line);border-radius:19px;padding:19px;position:relative;min-height:173px;display:flex;flex-direction:column;box-shadow:var(--shadow);transition:transform .15s,box-shadow .15s;border-top:3px solid transparent}.subject-card:hover{transform:translateY(-2px);box-shadow:0 14px 24px #1a377017}.subject-card .subject-emoji{width:49px;height:49px;background:var(--chip);border-radius:14px;display:grid;place-items:center;font-size:24px;margin-bottom:16px}.subject-card h3{font-size:14px;margin:0 0 4px;line-height:1.3}.subject-card p{color:#8794a6;font-size:11px;line-height:1.5;margin-bottom:0}.subject-card .corner-arrow{position:absolute;top:19px;right:18px;color:#a7b3c7;font-size:17px}.subject-card .available{font-size:10px;font-weight:800;color:#0d9379;margin-top:auto;padding-top:8px}.subject-card .pending{font-size:10px;font-weight:750;color:#8f9bad;margin-top:auto;padding-top:8px}.bottom-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:16px;margin-top:28px}.panel{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:22px}.panel h3{margin-bottom:14px}.next-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.next-row:last-child{border-bottom:0}.next-icon{width:41px;height:41px;border-radius:12px;display:grid;place-items:center;background:#ebf3ff;font-size:21px}.next-copy{flex:1}.next-copy strong{display:block;font-size:13px}.next-copy small{color:#8896aa;font-size:11px}.next-row .btn{min-height:34px;padding:7px 11px}.tip{background:#eef9f6;border-radius:15px;padding:15px;color:#3d746b;font-size:13px;line-height:1.6}.tip strong{color:#177864;display:block;margin-bottom:6px}
.subject-head{background:#fff;border:1px solid var(--line);border-radius:23px;padding:28px;display:flex;align-items:center;gap:19px;margin-bottom:22px}.subject-head-icon{height:76px;width:76px;display:grid;place-items:center;border-radius:20px;background:var(--chip);font-size:37px;flex-shrink:0}.subject-head h1{font-size:clamp(1.65rem,3vw,2.5rem);margin:0 0 8px}.subject-head p{color:#8b96a8;margin:0}.subject-head .head-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}.subject-content{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.75fr);gap:17px}.unit{border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff;display:flex;gap:15px;align-items:center;margin-bottom:11px}.unit-ic{width:52px;height:52px;flex:0 0 52px;border-radius:15px;display:grid;place-items:center;background:#eef2ff;font-size:27px}.unit h3{font-size:15px}.unit p{color:#8c98a8;font-size:12px;margin-bottom:0}.unit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}.aside-tip{background:#f4f7ff;border:1px solid #e0e7ff;border-radius:18px;padding:20px;margin-bottom:15px}.aside-tip h3{font-size:15px}.aside-tip p{color:#5f7297;font-size:13px;margin-bottom:0}.empty{padding:40px 24px;text-align:center;border:1px dashed #c6d2e6;background:#fff;border-radius:20px}.empty-art{font-size:38px;margin-bottom:11px}.empty h3{margin:7px 0}.empty p{color:#8492a6;font-size:13px;max-width:420px;margin:0 auto 17px}.library-row{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px 17px;margin:8px 0}.library-icon{font-size:24px;width:38px;text-align:center}.library-main{flex:1;min-width:0}.library-main strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.library-main small{font-size:11px;color:#8594a7}.pill{background:#edf5fa;border-radius:999px;padding:5px 11px;color:#456a9b;font-size:11px;font-weight:760;display:inline-block}.library-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.form-card{max-width:900px;background:white;border:1px solid var(--line);border-radius:21px;padding:26px;box-shadow:var(--shadow)}.field{margin:0 0 18px}.field label{display:block;font-weight:750;font-size:13px;margin-bottom:7px}.field input,.field select,.field textarea{width:100%;padding:12px 13px;border:1px solid #dbe3f1;border-radius:11px;background:#fff;color:#25354f;outline:none}.field textarea{min-height:150px;resize:vertical}.field input:focus,.field textarea:focus,.field select:focus{border-color:#6c86ea}.field .help{display:block;font-size:11px;color:#8794a7;margin-top:5px}.two-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-actions{display:flex;gap:10px;flex-wrap:wrap}.quiz-editor{border:1px solid #dbe5f2;border-radius:15px;padding:17px;background:#f8faff;margin:14px 0}.quiz-editor h4{margin:0 0 12px;font-size:14px}.question-builder{padding:13px;background:white;border:1px solid #dbe4f3;border-radius:13px;margin:12px 0}.question-builder .field{margin-bottom:11px}.question-builder .btn{margin-top:3px}.notice{border-left:4px solid #4a70d1;background:#eef3ff;border-radius:8px;padding:13px 15px;color:#455c88;font-size:13px;margin-bottom:17px}.notice.warn{border-color:#e1a344;background:#fff7e9;color:#85612c}.notice.good{border-color:#35ac90;background:#ecfaf5;color:#247966}.note-body{font-size:15px;white-space:pre-wrap;line-height:1.8;color:#41516b}.divider{height:1px;background:var(--line);margin:18px 0}.quiz-box{max-width:820px}.q-counter{font-size:12px;color:#5272b1;font-weight:850;letter-spacing:.12em}.answer-list{display:grid;gap:9px;margin:18px 0}.answer-choice{display:flex;gap:10px;align-items:center;padding:13px 15px;border:1.5px solid #dfe5f1;background:#fff;border-radius:13px;cursor:pointer}.answer-choice:has(input:checked){border-color:#5b7de6;background:#eff3ff}.answer-choice input{width:18px;height:18px;accent-color:#3b67e7}.answer-explain{border-radius:12px;background:#e9f7f0;border:1px solid #c1e9d2;padding:13px 15px;color:#1c755d;font-size:13px}.answer-explain.bad{background:#fff0f0;border-color:#f5ced0;color:#9c4050}.progress{height:8px;background:#e7ecf7;border-radius:10px;overflow:hidden}.progress > div{background:linear-gradient(90deg,#4b68e7,#20b5a5);height:100%;border-radius:10px;transition:width .2s}.score{font-weight:850;font-size:50px;line-height:1.1;color:#304e99;letter-spacing:-.06em}.score span{font-size:20px;color:#8d9ab0}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.result-card{padding:23px;border:1px solid var(--line);border-radius:17px;background:#fff}.result-card b{font-size:29px;display:block;color:#375ab4}.result-card small{color:#8792a5}.progress-mini{margin:10px 0;display:flex;justify-content:space-between;font-size:12px}.progress-mini b{color:#4d6090}.settings-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;margin:14px 0;max-width:920px}.settings-card p{font-size:13px;color:#7c899e;margin:0 0 17px}.settings-card h3{margin-bottom:7px}.store-steps{counter-reset:step;display:grid;gap:9px;max-width:720px}.store-step{display:flex;gap:12px;align-items:flex-start}.step-circle{width:26px;height:26px;border-radius:50%;background:#e0e9ff;color:#325bb0;font-size:12px;font-weight:850;display:grid;place-items:center;flex-shrink:0}.store-step p{font-size:13px;color:#556681;margin:0}.toast{position:fixed;left:50%;bottom:max(26px,env(safe-area-inset-bottom));transform:translateX(-50%);background:#1c355f;color:white;padding:13px 20px;border-radius:13px;z-index:100;box-shadow:0 12px 26px #1a284044;font-size:13px;max-width:calc(100% - 24px)}.invisible-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
@media(max-width:1300px){.subject-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{grid-template-columns:1fr 150px}.hero-graphic .book{width:130px;height:120px}}@media(max-width:1050px){#app-shell{grid-template-columns:210px minmax(0,1fr)}.sidebar{padding-left:10px;padding-right:10px}.top-mini{display:none}.subject-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bottom-grid,.subject-content{grid-template-columns:1fr}}@media(max-width:760px){#app-shell{display:block}.sidebar{position:fixed;left:0;top:0;bottom:0;width:min(290px,85vw);height:100dvh;transform:translateX(-105%);transition:transform .2s;box-shadow:12px 0 35px #15213a24}.sidebar.open{transform:translateX(0)}.sidebar-backdrop{position:fixed;inset:0;background:#0c20365c;z-index:30}.menu-toggle{display:inline-flex}.topbar{height:65px;padding:0 16px}.topbar-right{gap:9px}.connection-pill{max-width:180px;padding:6px 9px}.avatar{width:32px;height:32px}.main{padding:21px 15px 34px}.welcome{margin:3px 0 17px}.hero{padding:24px 23px;min-height:unset;grid-template-columns:1fr}.hero-graphic{display:none}.stats{gap:9px;margin:13px 0 27px}.stat{padding:12px 10px;gap:5px;flex-direction:column;text-align:center}.stat-ic{width:35px;height:35px;font-size:19px}.stat strong{font-size:23px}.stat small{font-size:10px}.subject-grid{gap:10px}.subject-card{padding:15px;min-height:153px}.subject-card .subject-emoji{width:43px;height:43px;font-size:21px;margin-bottom:12px}.subject-card h3{font-size:13px}.subject-card p{font-size:10px}.subject-card .corner-arrow{right:13px;top:13px}.subject-head{padding:18px;gap:13px;flex-wrap:wrap}.subject-head-icon{height:57px;width:57px;font-size:28px;border-radius:16px}.subject-head .head-actions{width:100%;margin-left:0}.subject-head .head-actions .btn{flex:1}.unit{flex-wrap:wrap;padding:14px}.unit-actions{width:100%;margin-left:0}.unit-actions .btn{flex:1}.panel{padding:18px}.topbar .connection-pill span:last-child{font-size:10px}.form-card{padding:19px}.two-cols,.result-grid{grid-template-columns:1fr}.site-footer{line-height:1.6}}@media(max-width:360px){.avatar{display:none}.subject-grid{grid-template-columns:1fr 1fr}.hero h2{font-size:1.48rem}.stat small{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.import-overlay{position:fixed;inset:0;background:#111e3859;z-index:90;display:grid;place-items:center;padding:16px}.import-modal{width:min(100%,470px);background:#fff;border-radius:20px;padding:26px;box-shadow:0 20px 70px #101f3440}.import-modal p{margin-bottom:20px}
