:root{--bg: #f5f7fb;--panel: #ffffff;--ink: #1f2937;--muted: #6b7280;--line: #e5e7eb;--brand: #2f6fed;--brand-ink: #ffffff;--green: #16a34a;--red: #dc2626;--amber: #d97706;--radius: 12px;--shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}a{color:var(--brand);text-decoration:none}h1,h2,h3,h4{margin:0 0 12px}h1{font-size:22px}h2{font-size:18px}p{line-height:1.65}.app{display:flex;min-height:100vh}.sidebar{width:220px;flex:0 0 220px;background:var(--panel);border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;gap:4px;position:sticky;top:0;height:100vh}.brand{font-weight:700;font-size:18px;padding:6px 10px 16px;color:var(--brand)}.navlink{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:var(--ink);font-size:14px}.navlink:hover{background:#eef2ff}.navlink.active{background:var(--brand);color:var(--brand-ink)}.sidebar .spacer{flex:1}.sidebar .userbox{font-size:13px;color:var(--muted);padding:8px 10px}.main{flex:1;min-width:0;padding:26px}.topbar{display:none}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:16px}.grid{display:grid;gap:16px}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.spread{justify-content:space-between}.muted{color:var(--muted);font-size:13px}.center{text-align:center}button,.btn{font:inherit;cursor:pointer;border:1px solid var(--line);background:var(--panel);color:var(--ink);padding:9px 14px;border-radius:9px;transition:.15s}button:hover{border-color:#c7d2fe}.btn-primary{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}.btn-primary:hover{background:#2559c8}.btn-ghost{background:transparent}.btn-danger{color:var(--red);border-color:#fecaca}.btn-sm{padding:5px 10px;font-size:13px}button:disabled{opacity:.55;cursor:not-allowed}input,textarea,select{font:inherit;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}input:focus,textarea:focus,select:focus{outline:2px solid #c7d2fe;border-color:var(--brand)}label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px}textarea{resize:vertical;min-height:160px;line-height:1.6}.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px}.tag{font-size:12px;color:var(--muted)}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:8px;border-bottom:1px solid var(--line)}th{color:var(--muted);font-weight:600;font-size:13px}.para{padding:10px 12px;margin:0 -4px 10px;border-radius:10px;cursor:pointer;border:1px solid transparent;transition:background .15s,border-color .15s}.para:hover{background:#f8fafc;border-color:var(--line)}.para.active{background:#eef2ff;border-color:#c7d2fe}.para-icon{margin-right:6px;font-size:13px}.word-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:22px;text-align:center;box-shadow:var(--shadow);min-height:220px;display:flex;flex-direction:column;justify-content:center;gap:8px}.word-card .term{font-size:30px;font-weight:700}.word-card .phon{color:var(--muted)}.word-card .def{font-size:16px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.cal-cell{aspect-ratio:1;border-radius:6px;background:#eef1f6;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--muted)}.cal-cell.active{background:var(--brand);color:#fff;font-weight:600}.progress{height:10px;background:#eef1f6;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--brand)}.msg{padding:10px 12px;border-radius:9px;font-size:14px;margin:10px 0}.msg.err{background:#fef2f2;color:var(--red);border:1px solid #fecaca}.msg.ok{background:#f0fdf4;color:var(--green);border:1px solid #bbf7d0}.msg.info{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.auth-card{width:100%;max-width:380px}.opt{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;margin:6px 0;cursor:pointer}.opt:hover{background:#f8fafc}.opt input{width:auto}.opt.correct{border-color:#bbf7d0;background:#f0fdf4}.opt.wrong{border-color:#fecaca;background:#fef2f2}.chat{display:flex;flex-direction:column;gap:8px;max-height:340px;overflow-y:auto;padding:8px;background:#f8fafc;border-radius:10px}.bubble{padding:8px 12px;border-radius:12px;max-width:80%;font-size:14px;line-height:1.5}.bubble.me{align-self:flex-end;background:var(--brand);color:#fff}.bubble.ai{align-self:flex-start;background:#fff;border:1px solid var(--line)}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.tab{padding:7px 14px;border-radius:999px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:14px}.tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}.tab-n{font-size:12px;opacity:.72;margin-left:2px}.lv{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid transparent;white-space:nowrap}.lv-L1{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}.lv-L2{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.lv-L3{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.lv-L4{background:#fef2f2;color:#b91c1c;border-color:#fecaca}@media (max-width: 760px){.app{display:block}.sidebar{width:100%;height:auto;position:static;flex-direction:row;overflow-x:auto;padding:10px;gap:6px;border-right:none;border-bottom:1px solid var(--line)}.sidebar .brand,.sidebar .spacer,.sidebar .userbox{display:none}.navlink{white-space:nowrap;padding:8px 12px}.main{padding:16px}.grid.cols-2,.grid.cols-3{grid-template-columns:1fr}}
