/* ==========================================================================
   星火学堂 · 学生端 + 家长后台
   ========================================================================== */
:root {
    --bg: #f6f7fb;
    --bg-soft: #f0f1f8;
    --card: #ffffff;
    --ink: #171a2b;
    --ink-soft: #30344a;
    --muted: #71768c;
    --muted-2: #9a9fb2;
    --line: #e9eaf2;
    --line-strong: #dcdfea;
    --violet: #6d5dfb;
    --violet-2: #8b7cff;
    --violet-dark: #5546e6;
    --coral: #ff7a7a;
    --coral-soft: #fff0f0;
    --mint: #21c7b7;
    --mint-soft: #e9fbf8;
    --amber: #ffc857;
    --amber-soft: #fff8e5;
    --blue: #4f8cff;
    --pink: #f25f9e;
    --danger: #e5484d;
    --radius: 22px;
    --radius-lg: 30px;
    --radius-sm: 14px;
    --shadow: 0 18px 50px rgba(23, 26, 43, .07);
    --shadow-soft: 0 8px 26px rgba(23, 26, 43, .055);
    --shadow-lg: 0 30px 80px rgba(23, 26, 43, .14);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.student-body { padding-bottom: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(109, 93, 251, .22); }
:focus-visible { outline: 3px solid rgba(109, 93, 251, .28); outline-offset: 2px; }

.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico-sm { width: 16px; height: 16px; }
.brand-mark { flex: 0 0 auto; border-radius: 13px; box-shadow: 0 8px 18px rgba(109, 93, 251, .25); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- 背景光晕 ---------- */
.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    pointer-events: none;
    z-index: -1;
}
.ambient-a { width: 460px; height: 460px; background: #ddd7ff; top: -160px; left: -120px; }
.ambient-b { width: 380px; height: 380px; background: #ffe1d9; top: 40vh; right: -180px; opacity: .42; }
.ambient-c { width: 320px; height: 320px; background: #d5f8f1; bottom: -160px; left: 30%; opacity: .4; }

/* ---------- 基础组件 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .01em;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 18px; height: 18px; }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--violet), #8a72ff);
    box-shadow: 0 10px 24px rgba(109, 93, 251, .27);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(109, 93, 251, .34); }
.btn-soft { color: var(--ink-soft); background: #fff; border-color: var(--line); box-shadow: 0 4px 12px rgba(23,26,43,.04); }
.btn-soft:hover { border-color: #cfd3e3; background: #fbfbfe; }
.btn-ghost { color: var(--muted); background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(23,26,43,.05); color: var(--ink); }
.btn-light { color: var(--violet-dark); background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.btn-light:hover { background: #fbfaff; }
.btn-ghost-light { color: rgba(255,255,255,.9); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.24); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn-danger-ghost { color: var(--danger); background: #fff5f5; border-color: #ffdada; }
.btn-danger-ghost:hover { background: #ffecec; }
.btn-sm { min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 13px; }
.btn-xs { min-height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12px; gap: 5px; }
.btn-lg { min-height: 52px; padding: 0 26px; border-radius: 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .48; cursor: not-allowed; transform: none; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--violet);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.eyebrow .ico { width: 15px; height: 15px; }
.eyebrow-light { color: rgba(255,255,255,.72); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.pill .ico { width: 13px; height: 13px; }
.pill-mint { color: #087c70; background: #e4faf6; }
.pill-amber { color: #946200; background: #fff4d6; }
.pill-violet { color: #5847d6; background: #eeebff; }
.pill-coral { color: #b53c3c; background: #ffeaea; }
.pill-gray { color: #777c8f; background: #eef0f4; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tag-color, var(--violet)) 12%, white);
    color: var(--tag-color, var(--violet));
    font-size: 12px;
    font-weight: 700;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--violet);
    font-size: 13px;
    font-weight: 700;
}
.text-link .ico { width: 16px; height: 16px; transition: transform .2s ease; }
.text-link:hover .ico { transform: translateX(3px); }

.progress-line { height: 7px; border-radius: 999px; background: #ececf5; overflow: hidden; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--coral)); }
.progress-line.light { background: rgba(255,255,255,.22); }
.progress-line.light span { background: #fff; }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.field-hint { color: var(--muted-2); font-size: 12px; line-height: 1.5; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1.5px solid var(--line);
    border-radius: 13px;
    background: #fbfbfe;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #a6aabd; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(109, 93, 251, .65);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 93, 251, .1);
}
.input-wrap { position: relative; display: block; }
.input-wrap input { padding-left: 44px; }
.input-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9297aa; width: 19px; height: 19px; }
.input-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8d92a5;
}
.input-action:hover { background: #f0f0f7; }
.check-line { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--violet); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-hint { color: var(--muted-2); font-size: 12px; }
.stack-form { display: grid; gap: 14px; }

/* ---------- 顶部导航 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(246, 247, 251, .82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(23, 26, 43, .06);
}
.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 17px; letter-spacing: .02em; }
.brand-text small { color: var(--muted-2); font-size: 8px; letter-spacing: .18em; margin-top: 3px; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.desktop-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease;
}
.desktop-nav a .ico { width: 18px; height: 18px; }
.desktop-nav a:hover { color: var(--ink); background: rgba(255,255,255,.75); }
.desktop-nav a.active { color: var(--violet); background: #fff; box-shadow: 0 5px 16px rgba(23,26,43,.06); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #b36a00;
    background: #fff5db;
    font-size: 12px;
    font-weight: 800;
}
.streak-pill .ico { width: 15px; height: 15px; }
.user-menu { position: relative; }
.user-menu summary {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 9px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 4px 12px rgba(23,26,43,.04);
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f4f1ff, #ffe9e4);
    font-size: 18px;
}
.user-meta { display: grid; line-height: 1.25; padding-right: 3px; }
.user-meta strong { font-size: 12px; }
.user-meta small { color: var(--muted-2); font-size: 10px; }
.user-menu .chev { color: #a1a5b6; transition: transform .2s ease; }
.user-menu[open] .chev { transform: rotate(90deg); }
.user-pop {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    width: 190px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    z-index: 70;
}
.user-pop a, .user-pop button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}
.user-pop a:hover, .user-pop button:hover { background: #f6f5ff; color: var(--violet); }
.user-pop .ico { width: 17px; height: 17px; }
.user-pop form { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.link-danger { color: var(--danger) !important; }

.page-shell { max-width: 1240px; margin: 0 auto; padding: 34px 24px 76px; }
.site-footer {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 36px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted-2);
    font-size: 11px;
    letter-spacing: .03em;
}
.mobile-nav { display: none; }

/* ---------- 提示 ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 24px; z-index: 200; display: grid; gap: 9px; max-width: min(360px, calc(100vw - 32px)); }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    animation: toastIn .32s ease both;
}
.toast-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; flex: 0 0 auto; }
.toast-icon .ico { width: 15px; height: 15px; }
.toast-success .toast-icon { background: var(--mint-soft); color: #0b8d7e; }
.toast-error .toast-icon { background: var(--coral-soft); color: #c53b3b; }
.toast-info .toast-icon { background: #eef0ff; color: var(--violet); }
.toast.hide { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- 登录 ---------- */
.auth-body { min-height: 100vh; background: #f7f5ff; }
.auth-wrap { display: grid; grid-template-columns: 1.06fr .94fr; min-height: 100vh; }
.auth-hero {
    position: relative;
    padding: 54px 60px;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 8% 0%, rgba(255,255,255,.16), transparent 60%),
        radial-gradient(700px 500px at 95% 80%, rgba(255,122,122,.35), transparent 60%),
        linear-gradient(150deg, #2a2366 0%, #5e4ee8 48%, #8a72ff 100%);
}
.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 75%);
    pointer-events: none;
}
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; }
.auth-brand .brand-mark { box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.auth-hero-copy { position: relative; z-index: 2; margin-top: 11vh; max-width: 560px; }
.auth-hero-copy h1 { margin-top: 18px; font-size: clamp(42px, 5vw, 66px); line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
.auth-hero-copy h1 em { font-style: normal; color: #ffd166; }
.auth-hero-copy p { margin-top: 20px; color: rgba(255,255,255,.73); font-size: 15px; line-height: 1.9; }
.auth-float-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    background: rgba(255,255,255,.11);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 45px rgba(20, 12, 70, .2);
    animation: floaty 7s ease-in-out infinite;
}
.auth-float-card strong { display: block; font-size: 12px; }
.auth-float-card small { display: block; color: rgba(255,255,255,.62); font-size: 10px; margin-top: 2px; }
.mini-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.mini-icon .ico { width: 17px; height: 17px; }
.mini-icon.mint { color: #073f38; background: #7df3df; }
.mini-icon.amber { color: #6b4600; background: #ffd166; }
.mini-icon.coral { color: #6b1c1c; background: #ffadad; }
.float-1 { right: 8%; top: 26%; animation-delay: -1s; }
.float-2 { left: 7%; bottom: 24%; animation-delay: -3s; }
.float-3 { right: 12%; bottom: 11%; animation-delay: -5s; }
.auth-hero-foot { position: relative; z-index: 2; margin-top: auto; display: flex; gap: 26px; color: rgba(255,255,255,.34); font-size: 9px; letter-spacing: .22em; font-weight: 800; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 44px; background: linear-gradient(180deg, #fff, #fbfaff); }
.auth-panel-inner { width: 100%; max-width: 390px; }
.auth-welcome h2 { margin-top: 8px; font-size: 32px; letter-spacing: -.04em; line-height: 1.2; }
.auth-welcome p { margin-top: 9px; color: var(--muted); font-size: 13px; }
.auth-form { margin-top: 30px; display: grid; gap: 17px; }
.auth-submit { margin-top: 5px; }
.auth-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted-2); font-size: 11px; }
.note-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(33,199,183,.12); }
.auth-quote { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; color: var(--muted); }
.auth-quote span { font-family: Georgia, serif; font-size: 34px; line-height: .8; color: #d8d3f8; }
.auth-quote p { font-size: 12px; line-height: 1.8; }

/* ---------- 首页 Hero ---------- */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 40px 42px 0;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(700px 420px at 85% 0%, rgba(255,255,255,.16), transparent 60%),
        radial-gradient(520px 420px at 0% 100%, rgba(255,122,122,.32), transparent 65%),
        linear-gradient(135deg, #28215f 0%, #5b4be0 58%, #7d6bff 100%);
    box-shadow: 0 26px 70px rgba(61, 49, 160, .24);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(700px 400px at 80% 20%, #000, transparent 75%);
    pointer-events: none;
}
.hero-main { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 370px; gap: 20px; align-items: center; min-height: 290px; }
.hero-copy h1 { margin-top: 13px; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.1; letter-spacing: -.045em; font-weight: 800; }
.wave { display: inline-block; margin-left: 8px; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
.hero-sub { margin-top: 13px; color: rgba(255,255,255,.7); font-size: 14px; max-width: 540px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-art { position: relative; height: 275px; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.orbit-1 { inset: 10px; animation: spin 30s linear infinite; }
.orbit-2 { inset: 48px; border-style: dashed; animation: spin 24s linear infinite reverse; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 18px #ffd166; }
.orbit::before { top: 12%; left: 12%; }
.orbit::after { bottom: 8%; right: 17%; background: #7df3df; box-shadow: 0 0 18px #7df3df; }
.hero-badge { position: absolute; border: 1px solid rgba(255,255,255,.23); background: rgba(255,255,255,.12); backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(20,12,70,.22); }
.badge-main { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 218px; padding: 15px; border-radius: 20px; display: flex; align-items: center; gap: 11px; animation: floaty 7s ease-in-out infinite; }
.badge-emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 23px; }
.badge-main strong { display: block; font-size: 13px; }
.badge-main small { display: block; color: rgba(255,255,255,.58); font-size: 10px; }
.badge-level { margin-left: auto; padding: 3px 7px; border-radius: 7px; background: #ffd166; color: #6b4600; font-size: 9px; font-weight: 900; }
.badge-mini { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 12px; font-size: 10px; font-weight: 700; animation: floaty 6s ease-in-out infinite; }
.badge-mini .ico { width: 14px; height: 14px; color: #ffd166; }
.mini-a { right: 0; top: 14%; animation-delay: -2s; }
.mini-b { left: 1%; bottom: 11%; animation-delay: -4s; }
.hero-spark { position: absolute; right: 8%; bottom: 4%; color: #ffd166; animation: pulse 3s ease-in-out infinite; }
.hero-spark .ico { width: 30px; height: 30px; }
.hero-stats {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 18px -42px 0;
    padding: 0 42px;
    background: rgba(255,255,255,.11);
    border-top: 1px solid rgba(255,255,255,.14);
}
.stat-card { display: flex; align-items: center; gap: 10px; padding: 18px 4px; border-right: 1px solid rgba(255,255,255,.12); }
.stat-card:last-child { border-right: 0; }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.stat-ico .ico { width: 17px; height: 17px; }
.stat-ico.violet { background: rgba(255,255,255,.16); color: #ddd8ff; }
.stat-ico.mint { background: rgba(125,243,223,.16); color: #7df3df; }
.stat-ico.amber { background: rgba(255,209,102,.16); color: #ffd166; }
.stat-ico.coral { background: rgba(255,173,173,.16); color: #ffadad; }
.stat-card strong { display: block; font-size: 20px; line-height: 1.1; }
.stat-card strong small { font-size: 10px; font-weight: 600; margin-left: 2px; color: rgba(255,255,255,.6); }
.stat-card > div > span { color: rgba(255,255,255,.55); font-size: 10px; }

/* ---------- 区块 ---------- */
.section { margin-top: 42px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head h2 { margin-top: 5px; font-size: 23px; letter-spacing: -.025em; line-height: 1.25; }
.section-head h3 { margin-top: 4px; font-size: 18px; letter-spacing: -.02em; }
.section-head.small { margin-bottom: 12px; }
.section-head.small h3 { font-size: 16px; }
.grade-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-soft); }
.grade-switch a { padding: 7px 13px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.grade-switch a.active { color: #fff; background: var(--ink); }

/* 继续学习 */
.continue-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}
.continue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.continue-cover {
    position: relative;
    width: 190px;
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--subject-color) 75%, #1a1c2f), #1a1c2f);
}
.continue-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.continue-cover > span .ico { width: 28px; height: 28px; opacity: .8; }
.continue-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,15,30,.18); }
.continue-play .ico { width: 42px; height: 42px; padding: 11px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--violet); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.continue-info { min-width: 0; flex: 1; }
.continue-info h3 { margin-top: 5px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-info p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.continue-info .progress-line { margin-top: 12px; max-width: 360px; }
.continue-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #f6f5ff; color: var(--violet); flex: 0 0 auto; }
.continue-arrow .ico { width: 17px; height: 17px; }

/* 学科卡片 */
.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.subject-grid.large { grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.subject-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    min-height: 128px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(23,26,43,.035);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: rise .5s ease both;
    animation-delay: var(--delay, 0s);
}
.subject-card::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--subject-color); opacity: .8; }
.subject-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--subject-color) 35%, var(--line)); box-shadow: 0 14px 34px rgba(23,26,43,.09); }
.subject-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: color-mix(in srgb, var(--subject-color) 12%, white); font-size: 22px; }
.subject-body { min-width: 0; flex: 1; }
.subject-body h3 { font-size: 16px; letter-spacing: -.01em; }
.subject-body p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.subject-count { display: inline-block; margin-top: 9px; padding: 3px 8px; border-radius: 6px; color: var(--subject-color); background: color-mix(in srgb, var(--subject-color) 9%, white); font-size: 10px; font-weight: 800; }
.subject-arrow { align-self: flex-end; color: #c6c9d6; transition: transform .2s ease, color .2s ease; }
.subject-arrow .ico { width: 17px; height: 17px; }
.subject-card:hover .subject-arrow { color: var(--subject-color); transform: translateX(3px); }

/* 能量合集 */
.collection-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.collection-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 124px;
    padding: 18px;
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    transition: transform .2s ease, box-shadow .2s ease;
}
.collection-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(23,26,43,.16); }
.collection-card.theme-violet { background: linear-gradient(135deg, #5a4be0, #8f7bff); }
.collection-card.theme-coral { background: linear-gradient(135deg, #e65b6f, #ff9b86); }
.collection-card.theme-mint { background: linear-gradient(135deg, #0e9f93, #52dcc8); }
.collection-card.theme-amber { background: linear-gradient(135deg, #d79500, #ffcc66); color: #4a3100; }
.collection-card.theme-blue { background: linear-gradient(135deg, #336ce0, #6fb4ff); }
.collection-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.2); filter: blur(22px); right: -36px; bottom: -66px; }
.collection-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 23px; flex: 0 0 auto; }
.collection-body { display: grid; min-width: 0; }
.collection-body strong { font-size: 15px; }
.collection-body small { color: currentColor; opacity: .72; font-size: 10px; margin-top: 2px; }
.collection-body em { font-style: normal; font-size: 9px; opacity: .55; margin-top: 7px; letter-spacing: .08em; }
.collection-arrow { margin-left: auto; opacity: .7; }
.collection-arrow .ico { width: 18px; height: 18px; }
.empty-inline { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 13px; }

/* 最近练习 */
.attempt-list { display: grid; gap: 8px; }
.attempt-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .18s ease, transform .18s ease; }
.attempt-row:hover { border-color: #cfd2e6; transform: translateX(2px); }
.attempt-score { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.attempt-score small { font-size: 8px; font-weight: 600; margin-left: 1px; }
.attempt-score.great { background: #e7fbf7; color: #078679; }
.attempt-score.good { background: #eef0ff; color: #5b4be0; }
.attempt-score.ok { background: #fff7e2; color: #a47100; }
.attempt-score.low { background: #fff0f0; color: #c24141; }
.attempt-info { display: grid; min-width: 0; flex: 1; }
.attempt-info strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attempt-info small { color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.attempt-arrow { color: #c4c7d4; }
.attempt-arrow .ico { width: 16px; height: 16px; }
.attempt-list.compact .attempt-row { padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.attempt-list.compact .attempt-row:last-child { border-bottom: 0; }

.quote-banner { margin-top: 42px; padding: 26px 30px; border-radius: 22px; background: linear-gradient(135deg, #f1eeff, #fff4ef); border: 1px solid #e8e3ff; display: flex; align-items: center; gap: 16px; }
.quote-mark { font-family: Georgia, serif; font-size: 56px; line-height: .7; color: #b9aeff; }
.quote-banner p { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.quote-banner span { margin-left: auto; color: var(--muted-2); font-size: 11px; white-space: nowrap; }

/* ---------- 页面标题 / 面包屑 ---------- */
.breadcrumb { display: flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 11px; margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb .ico { width: 13px; height: 13px; }
.breadcrumb span { color: var(--muted); }
.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 34px 36px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.page-hero.compact { margin-bottom: 20px; }
.page-hero h1 { margin-top: 7px; font-size: 32px; letter-spacing: -.04em; line-height: 1.2; }
.page-hero p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.grade-tabs { display: flex; gap: 6px; margin: 18px 0 4px; }
.grade-tabs a { padding: 8px 15px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; }
.grade-tabs a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 学科页 */
.subject-hero, .chapter-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 36px 38px;
    border-radius: 28px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(520px 300px at 90% 0%, rgba(255,255,255,.2), transparent 60%),
        linear-gradient(135deg, color-mix(in srgb, var(--subject-color) 78%, #1a1c2f), #20223a 78%);
    box-shadow: 0 22px 55px rgba(23,26,43,.18);
}
.subject-hero::after, .chapter-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(110deg, transparent 35%, #000); pointer-events: none; }
.subject-hero-icon { width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 38px; flex: 0 0 auto; }
.subject-hero-copy { position: relative; z-index: 2; flex: 1; }
.subject-hero h1, .chapter-hero h1 { margin-top: 8px; font-size: clamp(28px, 3.3vw, 42px); letter-spacing: -.04em; line-height: 1.15; }
.subject-hero p { margin-top: 8px; color: rgba(255,255,255,.66); font-size: 13px; }
.subject-hero-meta { position: relative; z-index: 2; text-align: center; padding: 12px 22px; border-left: 1px solid rgba(255,255,255,.18); }
.subject-hero-meta strong { display: block; font-size: 34px; line-height: 1; }
.subject-hero-meta span { color: rgba(255,255,255,.58); font-size: 10px; }

.chapter-list { display: grid; gap: 10px; }
.chapter-card { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: rise .45s ease both; animation-delay: var(--delay, 0s); }
.chapter-card:hover { transform: translateY(-2px); border-color: #d4d3ea; box-shadow: var(--shadow); }
.chapter-num { font-family: var(--mono); font-size: 24px; font-weight: 800; color: #d3d0ee; flex: 0 0 auto; width: 42px; }
.chapter-body { flex: 1; min-width: 0; }
.chapter-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chapter-top strong { font-size: 16px; }
.mini-score { padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.mini-score.great { color: #087c70; background: #e4faf6; }
.mini-score.good { color: #5847d6; background: #eeebff; }
.mini-score.ok { color: #946200; background: #fff4d6; }
.mini-score.low { color: #b53c3c; background: #ffeaea; }
.chapter-desc { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.chapter-meta { display: flex; gap: 14px; margin-top: 9px; color: var(--muted-2); font-size: 11px; }
.chapter-meta span { display: inline-flex; align-items: center; gap: 4px; }
.chapter-meta .ico { width: 14px; height: 14px; }
.chapter-arrow { color: #c5c8d5; }
.chapter-arrow .ico { width: 18px; height: 18px; }
.chapter-card:hover .chapter-arrow { color: var(--violet); }

/* 章节页 */
.chapter-hero { align-items: center; justify-content: space-between; }
.chapter-hero-main { position: relative; z-index: 2; max-width: 730px; }
.chapter-hero p { margin-top: 8px; color: rgba(255,255,255,.66); font-size: 13px; }
.chapter-progress { display: flex; align-items: center; gap: 12px; margin-top: 20px; max-width: 420px; }
.chapter-progress .progress-line { width: 180px; flex: 0 0 auto; }
.chapter-progress span { color: rgba(255,255,255,.6); font-size: 10px; }
.chapter-hero-ring {
    --p: 0;
    position: relative;
    z-index: 2;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    text-align: center;
    flex: 0 0 auto;
    background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.18) 0);
}
.chapter-hero-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #2a2c49; }
.chapter-hero-ring strong, .chapter-hero-ring span { position: relative; z-index: 2; }
.chapter-hero-ring strong { font-size: 28px; line-height: 1; }
.chapter-hero-ring strong small { font-size: 12px; }
.chapter-hero-ring span { font-size: 9px; color: rgba(255,255,255,.55); margin-top: 4px; }

.kp-list { display: grid; gap: 10px; }
.kp-card { display: flex; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; animation: rise .45s ease both; animation-delay: var(--delay, 0s); }
.kp-card:hover { border-color: #d5d3ea; box-shadow: var(--shadow-soft); }
.kp-index { font-family: var(--mono); font-size: 15px; font-weight: 800; color: #cfcce8; padding-top: 2px; }
.kp-main { flex: 1; min-width: 0; }
.kp-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kp-title-row h3 { font-size: 16px; }
.kp-summary { margin-top: 4px; color: var(--muted); font-size: 12px; }
.kp-meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--muted-2); font-size: 11px; flex-wrap: wrap; }
.kp-meta span { display: inline-flex; align-items: center; gap: 4px; }
.kp-meta .ico { width: 14px; height: 14px; }
.kp-ready { color: #0b8d7e !important; font-weight: 700; }
.kp-wait { color: #a47100 !important; font-weight: 600; }
.kp-actions { display: flex; flex-direction: column; gap: 7px; justify-content: center; flex: 0 0 auto; }

/* ---------- 知识点学习 ---------- */
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.player-card { border: 1px solid var(--line); border-radius: 24px; background: #fff; overflow: hidden; box-shadow: var(--shadow-soft); }
.video-shell { position: relative; aspect-ratio: 16/9; background: #0b0c14; }
.video-shell video, .video-shell iframe { width: 100%; height: 100%; display: block; object-fit: contain; border: 0; background: #0b0c14; }
.video-player { background: #0b0c14; }
.player-meta { padding: 22px 24px; }
.player-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.player-title-row h1 { margin-top: 8px; font-size: 26px; letter-spacing: -.03em; line-height: 1.25; }
.player-sub { color: var(--muted); font-size: 12px; margin-top: 5px; }
.player-info { display: flex; gap: 16px; margin-top: 14px; color: var(--muted-2); font-size: 11px; flex-wrap: wrap; }
.player-info span { display: inline-flex; align-items: center; gap: 4px; }
.player-info .ico { width: 14px; height: 14px; }
.external-player {
    position: relative;
    aspect-ratio: 16/9;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #23203f, #48407e) center/cover no-repeat;
    color: #fff;
    overflow: hidden;
}
.external-player::before { content: ""; position: absolute; inset: 0; background: rgba(12, 11, 25, .58); backdrop-filter: blur(2px); }
.external-overlay { position: relative; z-index: 2; text-align: center; padding: 24px; }
.external-emoji { font-size: 42px; }
.external-overlay h2 { margin-top: 8px; font-size: 22px; }
.external-overlay p { margin-top: 6px; color: rgba(255,255,255,.65); font-size: 12px; }
.external-overlay .btn { margin-top: 16px; }
.video-placeholder { aspect-ratio: 16/9; display: grid; place-content: center; text-align: center; padding: 30px; background: linear-gradient(135deg, #f4f1ff, #fff5f1); }
.placeholder-emoji { font-size: 42px; }
.video-placeholder h2 { margin-top: 8px; font-size: 21px; }
.video-placeholder p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.playlist-card, .summary-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 18px; box-shadow: var(--shadow-soft); }
.playlist { display: grid; gap: 5px; }
.playlist-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; transition: background .18s ease; }
.playlist-item:hover { background: #f7f6ff; }
.playlist-item.active { background: #f1efff; }
.playlist-play { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f0eefc; color: var(--violet); flex: 0 0 auto; }
.playlist-play .ico { width: 14px; height: 14px; }
.playlist-title { display: grid; min-width: 0; flex: 1; }
.playlist-title strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-title small { color: var(--muted-2); font-size: 10px; }
.playlist-check { color: #0b8d7e; }
.playlist-check .ico { width: 15px; height: 15px; }
.summary-content { margin-top: 10px; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.learn-side { display: grid; gap: 12px; position: sticky; top: 92px; }
.side-card { padding: 19px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-soft); }
.side-card h3 { margin-top: 7px; font-size: 16px; letter-spacing: -.02em; line-height: 1.35; }
.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.side-stats div { text-align: center; }
.side-stats strong { display: block; font-size: 20px; line-height: 1.1; }
.side-stats span { color: var(--muted-2); font-size: 9px; }
.side-hint { margin-top: 10px; color: var(--muted-2); font-size: 11px; line-height: 1.6; }
.side-tip { background: linear-gradient(140deg, #fff9e8, #fff); border-color: #f3e8c7; }
.tip-emoji { font-size: 24px; }
.side-tip h3 { margin-top: 4px; }
.side-tip p { margin-top: 5px; color: #7b6a42; font-size: 12px; line-height: 1.7; }
.side-next { background: linear-gradient(140deg, #f3f1ff, #fff); border-color: #e5e1ff; }
.next-link { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: #fff; border: 1px solid #e9e5ff; }
.next-link span { display: grid; min-width: 0; flex: 1; }
.next-link strong { font-size: 12px; }
.next-link small { color: var(--muted-2); font-size: 10px; }
.next-link .ico { width: 16px; height: 16px; color: var(--violet); }
.side-back { display: inline-flex; align-items: center; gap: 5px; padding: 8px 4px; color: var(--muted-2); font-size: 11px; }
.side-back .ico { width: 14px; height: 14px; transform: rotate(180deg); }
.side-back:hover { color: var(--violet); }

/* ---------- 答题 ---------- */
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.quiz-main { min-width: 0; }
.quiz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.quiz-head h1 { margin-top: 6px; font-size: 30px; letter-spacing: -.04em; }
.quiz-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.best-chip { padding: 9px 15px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow-soft); }
.best-chip small { display: block; color: var(--muted-2); font-size: 9px; }
.best-chip strong { font-size: 24px; line-height: 1.2; }
.best-chip em { font-style: normal; font-size: 10px; color: var(--muted); }
.quiz-progress { margin-bottom: 12px; }
.quiz-progress-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.quiz-progress-bar { height: 7px; border-radius: 999px; background: #e9e8f3; overflow: hidden; }
.quiz-progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--coral)); border-radius: inherit; transition: width .3s ease; }
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: rise .3s ease both; }
.question-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-soft); min-height: 360px; }
.question-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.question-index { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.question-type { padding: 4px 9px; border-radius: 6px; font-size: 10px; font-weight: 800; }
.type-single { color: #5546e6; background: #eeebff; }
.type-multiple { color: #a15600; background: #fff2d9; }
.type-judge { color: #087c70; background: #e4faf6; }
.type-fill { color: #b43b6b; background: #ffeef5; }
.question-hint { color: var(--muted-2); font-size: 10px; margin-left: auto; }
.question-stem { margin-top: 20px; font-size: 17px; font-weight: 600; line-height: 1.8; letter-spacing: -.01em; }
.option-list { display: grid; gap: 9px; margin-top: 20px; }
.option { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fbfbfe; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.option:hover { border-color: #cfc9ff; background: #faf9ff; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-key { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; flex: 0 0 auto; transition: all .18s ease; }
.option-text { flex: 1; font-size: 14px; }
.option-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d9dbe7; display: grid; place-items: center; color: transparent; flex: 0 0 auto; transition: all .18s ease; }
.option-check .ico { width: 13px; height: 13px; }
.option:has(input:checked) { border-color: var(--violet); background: #f4f1ff; box-shadow: 0 0 0 3px rgba(109,93,251,.07); }
.option:has(input:checked) .option-key { background: var(--violet); border-color: var(--violet); color: #fff; }
.option:has(input:checked) .option-check { background: var(--violet); border-color: var(--violet); color: #fff; }
.option-multi .option-check { border-radius: 7px; }
.fill-answer { display: grid; gap: 8px; margin-top: 24px; }
.fill-answer span { color: var(--muted); font-size: 12px; font-weight: 700; }
.fill-answer input { max-width: 360px; font-size: 16px; }
.quiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.quiz-note { text-align: center; color: var(--muted-2); font-size: 10px; margin-top: 9px; }
.quiz-side { display: grid; gap: 12px; position: sticky; top: 92px; }
.answer-sheet { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.sheet-dot { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 9px; background: #fafafe; color: var(--muted); font-size: 12px; font-weight: 700; }
.sheet-dot:hover { border-color: #cfc9ff; }
.sheet-dot.current { border-color: var(--violet); color: var(--violet); background: #f2efff; }
.sheet-dot.done { background: var(--violet); border-color: var(--violet); color: #fff; }
.sheet-legend { display: flex; gap: 14px; margin-top: 12px; color: var(--muted-2); font-size: 9px; }
.sheet-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 3px; background: #eef0f4; }
.dot.current { background: #f2efff; border: 1px solid var(--violet); }
.dot.done { background: var(--violet); }

/* ---------- 结果 ---------- */
.result-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 36px 40px;
    border-radius: 28px;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #28215f, #6a58ea 70%, #8c78ff);
    box-shadow: 0 24px 60px rgba(61,49,160,.24);
}
.result-hero.tone-good { background: linear-gradient(135deg, #123d5c, #0e8f9c 65%, #39cdb2); }
.result-hero.tone-ok { background: linear-gradient(135deg, #4c3200, #b07a00 65%, #ffc857); }
.result-hero.tone-low { background: linear-gradient(135deg, #3b2030, #a3475f 65%, #ff8b9a); }
.result-ring { width: 150px; height: 150px; border-radius: 50%; padding: 10px; flex: 0 0 auto; background: conic-gradient(#fff calc(var(--score) * 1%), rgba(255,255,255,.18) 0); position: relative; z-index: 2; }
.result-ring-inner { width: 100%; height: 100%; border-radius: 50%; background: rgba(20,15,50,.42); display: grid; place-content: center; text-align: center; backdrop-filter: blur(4px); }
.result-ring-inner strong { font-size: 45px; line-height: 1; letter-spacing: -.04em; }
.result-ring-inner strong small { font-size: 13px; margin-left: 1px; }
.result-ring-inner span { margin-top: 6px; color: rgba(255,255,255,.55); font-size: 8px; letter-spacing: .18em; }
.result-copy { position: relative; z-index: 2; flex: 1; }
.result-copy h1 { margin-top: 9px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.2; }
.result-copy > p { color: rgba(255,255,255,.62); font-size: 12px; margin-top: 6px; }
.result-admin-note { color: #ffd166 !important; }
.result-stats { display: flex; gap: 8px; margin-top: 18px; }
.result-stats div { padding: 8px 16px; border-radius: 11px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); text-align: center; }
.result-stats strong { display: block; font-size: 17px; line-height: 1.2; }
.result-stats span { color: rgba(255,255,255,.55); font-size: 9px; }
.result-actions { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.result-review { margin-top: 34px; }
.filter-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.filter-tabs button { padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-tabs button.active { background: var(--ink); color: #fff; }
.review-list { display: grid; gap: 12px; }
.review-card { padding: 21px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; border-left: 4px solid var(--mint); }
.review-card.is-wrong { border-left-color: var(--coral); }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-index { font-family: var(--mono); font-size: 12px; font-weight: 800; color: #b9bccb; }
.review-status { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; }
.is-correct .review-status { color: #0b8d7e; }
.is-wrong .review-status { color: #d14a4a; }
.review-status .ico { width: 14px; height: 14px; }
.review-stem { margin-top: 9px; font-size: 14px; font-weight: 600; line-height: 1.8; }
.answer-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.answer-box { padding: 10px 13px; border-radius: 11px; background: #fafafe; border: 1px solid var(--line); }
.answer-box span { display: block; color: var(--muted-2); font-size: 9px; font-weight: 700; margin-bottom: 3px; }
.answer-box strong { font-size: 13px; font-weight: 600; line-height: 1.6; }
.answer-box.wrong { background: #fff7f7; border-color: #ffe0e0; }
.answer-box.wrong strong { color: #c24141; }
.answer-box.right { background: #f2fcfa; border-color: #d5f3ed; }
.answer-box.right strong { color: #087c70; }
.answer-compare.compact { margin-top: 10px; }
.explanation { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #f7f6ff; border: 1px dashed #ddd8ff; }
.explanation-label { display: inline-flex; align-items: center; gap: 5px; color: var(--violet); font-size: 10px; font-weight: 800; }
.explanation-label .ico { width: 14px; height: 14px; }
.explanation div { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.result-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; padding: 22px 26px; border-radius: 18px; background: linear-gradient(135deg, #f1eeff, #fff4ef); border: 1px solid #e8e3ff; }
.result-bottom strong { font-size: 15px; }
.result-bottom p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti i { position: absolute; top: -10px; width: 7px; height: 12px; border-radius: 2px; animation: confettiFall 3.2s linear infinite; }

/* ---------- 能量站 ---------- */
.energy-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 48px 46px;
    border-radius: 30px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(600px 400px at 85% 10%, rgba(255,209,102,.24), transparent 60%),
        radial-gradient(500px 400px at 10% 100%, rgba(125,243,223,.2), transparent 65%),
        linear-gradient(140deg, #142f33, #1d5d58 55%, #2d8c7e);
    box-shadow: 0 24px 60px rgba(18,73,66,.24);
}
.energy-hero-copy { position: relative; z-index: 2; flex: 1; }
.energy-hero h1 { margin-top: 11px; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.12; letter-spacing: -.045em; }
.energy-hero h1 em { font-style: normal; color: #ffd166; }
.energy-hero p { margin-top: 12px; max-width: 580px; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.85; }
.energy-tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.energy-tags span { padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); font-size: 11px; }
.energy-emoji { position: relative; z-index: 2; font-size: 100px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); animation: floaty 6s ease-in-out infinite; }
.energy-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.orbit-a { width: 380px; height: 380px; right: -60px; top: -120px; }
.orbit-b { width: 280px; height: 280px; right: 20px; top: -70px; border-style: dashed; }
.energy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.energy-card { position: relative; min-height: 230px; padding: 22px; border-radius: 24px; color: #fff; overflow: hidden; display: flex; flex-direction: column; isolation: isolate; transition: transform .2s ease, box-shadow .2s ease; animation: rise .5s ease both; animation-delay: var(--delay, 0s); }
.energy-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(23,26,43,.16); }
.energy-card.theme-violet { background: linear-gradient(145deg, #4e3ed1, #8b78ff); }
.energy-card.theme-coral { background: linear-gradient(145deg, #ce4d62, #ff9b86); }
.energy-card.theme-mint { background: linear-gradient(145deg, #087d73, #4bd8c4); }
.energy-card.theme-amber { background: linear-gradient(145deg, #b87b00, #ffd166); color: #4a3100; }
.energy-card.theme-blue { background: linear-gradient(145deg, #2c5fd0, #6fb4ff); }
.energy-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.2); filter: blur(30px); right: -70px; bottom: -100px; }
.energy-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 2; }
.energy-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.17); font-size: 27px; }
.energy-count { font-size: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.13); }
.energy-body { position: relative; z-index: 2; margin-top: auto; padding-top: 26px; }
.energy-body h3 { font-size: 22px; letter-spacing: -.03em; }
.energy-body p { margin-top: 4px; font-size: 12px; opacity: .72; }
.energy-cta { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 5px; margin-top: 16px; font-size: 11px; font-weight: 800; }
.energy-cta .ico { width: 15px; height: 15px; }
.energy-note { display: flex; align-items: center; gap: 16px; margin-top: 34px; padding: 22px 26px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.energy-note-emoji { font-size: 30px; }
.energy-note strong { font-size: 14px; }
.energy-note p { margin-top: 2px; color: var(--muted); font-size: 12px; }

.collection-hero { display: flex; align-items: center; gap: 24px; padding: 34px 36px; border-radius: 26px; color: #fff; overflow: hidden; background: linear-gradient(135deg, #3a2f8f, #7c68ff); }
.collection-hero.theme-coral { background: linear-gradient(135deg, #a53c4d, #ff8f7a); }
.collection-hero.theme-mint { background: linear-gradient(135deg, #086b62, #3bc7b4); }
.collection-hero.theme-amber { background: linear-gradient(135deg, #8d5d00, #ffc857); color: #412c00; }
.collection-hero.theme-blue { background: linear-gradient(135deg, #234a9f, #609dff); }
.collection-hero-icon { width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 38px; flex: 0 0 auto; }
.collection-hero h1 { margin-top: 7px; font-size: 36px; letter-spacing: -.04em; }
.collection-hero p { margin-top: 5px; color: rgba(255,255,255,.68); font-size: 13px; }
.collection-hero .collection-desc { max-width: 720px; font-size: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.video-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; animation: rise .5s ease both; animation-delay: var(--delay, 0s); }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-cover { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #2a2650, #6c5ce7); overflow: hidden; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), transparent 55%); }
.video-cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.5); }
.video-cover-fallback .ico { width: 36px; height: 36px; }
.video-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #fff; }
.video-play .ico { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--violet); box-shadow: 0 8px 22px rgba(0,0,0,.2); opacity: .92; }
.video-duration { position: absolute; right: 8px; bottom: 7px; z-index: 3; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.55); color: #fff; font-size: 9px; }
.video-source { position: absolute; left: 8px; top: 7px; z-index: 3; padding: 2px 7px; border-radius: 5px; background: rgba(0,0,0,.48); color: #fff; font-size: 9px; }
.video-watched { position: absolute; left: 8px; bottom: 7px; z-index: 3; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 5px; background: rgba(12,120,105,.78); color: #fff; font-size: 9px; }
.video-watched .ico { width: 10px; height: 10px; }
.video-info { padding: 12px 13px 14px; }
.video-info h3 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-info p { color: var(--muted-2); font-size: 10px; margin-top: 3px; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.watch-side { display: grid; gap: 12px; position: sticky; top: 92px; }
.watch-note { display: flex; gap: 12px; margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: #f3fbf9; border: 1px solid #d9f3ee; }
.watch-note span { font-size: 22px; }
.watch-note p { color: #316c64; font-size: 12px; line-height: 1.7; }

/* ---------- 错题本 / 我的 ---------- */
.wrong-hero { background: linear-gradient(135deg, #fff, #fff6f4); }
.wrong-count { text-align: center; padding: 10px 24px; border-left: 1px solid var(--line); }
.wrong-count strong { display: block; font-size: 38px; line-height: 1; color: var(--coral); }
.wrong-count span { color: var(--muted-2); font-size: 10px; }
.wrong-list { display: grid; gap: 12px; margin-top: 22px; }
.wrong-card { padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-soft); animation: rise .45s ease both; animation-delay: var(--delay, 0s); }
.wrong-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wrong-subject { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--subject-color) 11%, white); color: var(--subject-color); font-size: 10px; font-weight: 700; }
.wrong-date { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.wrong-card h3 { margin-top: 9px; font-size: 15px; }
.wrong-stem { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.8; }
.wrong-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.empty-state { display: grid; place-items: center; text-align: center; padding: 54px 20px; border: 1px dashed var(--line-strong); border-radius: 22px; background: rgba(255,255,255,.6); }
.empty-emoji { font-size: 44px; }
.empty-state h3 { margin-top: 10px; font-size: 18px; }
.empty-state p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.empty-state .btn { margin-top: 16px; }

.profile-hero { display: flex; align-items: center; gap: 18px; padding: 30px 34px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.profile-avatar { width: 78px; height: 78px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #f0edff, #ffe9e3); font-size: 38px; flex: 0 0 auto; }
.profile-id { flex: 1; }
.profile-id h1 { margin-top: 4px; font-size: 30px; letter-spacing: -.04em; line-height: 1.2; }
.profile-id p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.profile-actions { display: flex; gap: 8px; align-items: center; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.profile-stats div { padding: 18px 20px; border-radius: 17px; background: #fff; border: 1px solid var(--line); }
.profile-stats strong { display: block; font-size: 26px; line-height: 1.1; }
.profile-stats strong small { font-size: 10px; color: var(--muted); margin-left: 2px; }
.profile-stats span { color: var(--muted-2); font-size: 10px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.profile-card { padding: 20px 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.profile-tip { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 18px 22px; border-radius: 18px; background: #fff9e8; border: 1px solid #f3e8c7; }
.profile-tip span { font-size: 25px; }
.profile-tip p { color: #7b6a42; font-size: 12px; }

/* ---------- 错误页 ---------- */
.error-page { min-height: 55vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 60px 20px; }
.error-code { font-family: var(--mono); font-size: 90px; font-weight: 900; line-height: 1; color: #e3e0f7; letter-spacing: -.08em; }
.error-page h1 { margin-top: -10px; font-size: 28px; }
.error-page p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.error-actions { display: flex; gap: 9px; margin-top: 20px; }

/* ==========================================================================
   家长后台
   ========================================================================== */
.admin-body { background: #f4f5f9; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 248px;
    display: flex;
    flex-direction: column;
    padding: 22px 15px;
    background: #151827;
    color: #fff;
    z-index: 100;
    overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-brand span { display: grid; line-height: 1.2; }
.admin-brand strong { font-size: 15px; }
.admin-brand small { color: rgba(255,255,255,.4); font-size: 9px; margin-top: 3px; letter-spacing: .08em; }
.admin-nav { display: grid; gap: 3px; margin-top: 18px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.55); font-size: 13px; font-weight: 600; transition: background .18s ease, color .18s ease; }
.admin-nav a .ico { width: 18px; height: 18px; }
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-nav a.active { color: #fff; background: linear-gradient(135deg, rgba(109,93,251,.95), rgba(139,124,255,.8)); box-shadow: 0 8px 20px rgba(80,60,220,.28); }
.admin-sidebar-bottom { margin-top: auto; padding-top: 20px; }
.admin-site-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.5); font-size: 11px; }
.admin-site-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-site-link .ico { width: 15px; height: 15px; }
.admin-user { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-user .avatar { width: 32px; height: 32px; background: rgba(255,255,255,.1); font-size: 16px; }
.admin-user > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.admin-user strong { font-size: 11px; }
.admin-user small { color: rgba(255,255,255,.4); font-size: 9px; }
.admin-user button { border: 0; background: transparent; color: rgba(255,255,255,.45); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; }
.admin-user button:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-user button .ico { width: 15px; height: 15px; }
.admin-main { margin-left: 248px; min-width: 0; flex: 1; }
.admin-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 16px 28px; background: rgba(255,255,255,.86); backdrop-filter: blur(14px); border-bottom: 1px solid #e7e8ef; }
.admin-menu-btn { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; place-items: center; }
.admin-topbar-title { flex: 1; min-width: 0; }
.admin-kicker { color: var(--muted-2); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.admin-topbar-title h1 { font-size: 20px; letter-spacing: -.02em; line-height: 1.3; }
.admin-topbar-actions { display: flex; gap: 7px; }
.admin-content { padding: 24px 28px 60px; max-width: 1500px; margin: 0 auto; }
.admin-eyebrow { display: inline-flex; align-items: center; gap: 5px; color: #83889c; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-eyebrow .ico { width: 13px; height: 13px; }
.security-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid #ffd9a0; border-radius: 14px; background: #fff8e8; }
.security-banner > span { font-size: 22px; }
.security-banner > div { flex: 1; }
.security-banner strong { display: block; color: #7a4b00; font-size: 12px; }
.security-banner p { color: #9a6b1f; font-size: 10px; margin-top: 1px; }
.security-banner .btn { flex: 0 0 auto; }

.admin-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 32px; border-radius: 22px; color: #fff; background: radial-gradient(500px 300px at 90% 0%, rgba(255,255,255,.16), transparent 60%), linear-gradient(135deg, #29235f, #6251e4); box-shadow: 0 16px 40px rgba(61,49,160,.2); }
.admin-welcome h2 { margin-top: 7px; font-size: 26px; letter-spacing: -.035em; line-height: 1.25; }
.admin-welcome p { margin-top: 6px; color: rgba(255,255,255,.6); font-size: 12px; max-width: 620px; }
.admin-welcome-actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-welcome .admin-eyebrow { color: rgba(255,255,255,.55); }
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 16px; }
.admin-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 15px 16px; border-radius: 15px; background: #fff; border: 1px solid #e7e8ef; transition: border-color .18s ease, transform .18s ease; }
.admin-stat:hover { border-color: #cfc9ff; transform: translateY(-2px); }
.admin-stat-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 5px; }
.admin-stat-ico .ico { width: 15px; height: 15px; }
.admin-stat-ico.violet { color: #5b4be0; background: #efecff; }
.admin-stat-ico.blue { color: #2c65d8; background: #eaf1ff; }
.admin-stat-ico.mint { color: #087c70; background: #e4faf6; }
.admin-stat-ico.coral { color: #d14949; background: #ffeded; }
.admin-stat-ico.amber { color: #a47100; background: #fff5d8; }
.admin-stat-ico.pink { color: #b43b6b; background: #ffeef5; }
.admin-stat strong { font-size: 24px; line-height: 1.1; }
.admin-stat > span:last-child { color: var(--muted-2); font-size: 10px; }
.onboarding-card { margin-top: 16px; padding: 22px 24px; border-radius: 19px; border: 1px solid #e5e0ff; background: linear-gradient(135deg, #f7f4ff, #fff); }
.onboarding-head { display: flex; align-items: center; gap: 11px; }
.onboarding-emoji { font-size: 27px; }
.onboarding-head h3 { font-size: 15px; }
.onboarding-head p { color: var(--muted); font-size: 11px; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.onboarding-step { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 13px; background: #fff; border: 1px solid #e9e5ff; }
.onboarding-step > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f0edff; color: var(--violet); font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.onboarding-step strong { display: block; font-size: 12px; }
.onboarding-step small { display: block; color: var(--muted-2); font-size: 10px; }
.onboarding-step.done > span { background: #e4faf6; color: #087c70; }
.admin-grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 16px; }
.admin-panel { padding: 20px 22px; border-radius: 19px; background: #fff; border: 1px solid #e7e8ef; }
.admin-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-panel-head h3 { margin-top: 4px; font-size: 15px; letter-spacing: -.01em; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { text-align: left; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 8px; border-bottom: 1px solid #eceef3; white-space: nowrap; }
.admin-table td { padding: 10px 8px; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table.wide { min-width: 760px; }
.table-user { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; margin-right: 7px; background: #f0edff; color: #5b4be0; font-size: 10px; font-weight: 800; }
.table-ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-kp { display: block; font-size: 12px; }
.table-sub { display: block; color: var(--muted-2); font-size: 9px; margin-top: 2px; }
.table-link { color: var(--violet); font-size: 11px; font-weight: 700; white-space: nowrap; }
.score-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.score-badge.great { color: #087c70; background: #e4faf6; }
.score-badge.good { color: #5847d6; background: #eeebff; }
.score-badge.ok { color: #946200; background: #fff4d6; }
.score-badge.low { color: #b53c3c; background: #ffeaea; }
.weak-list { display: grid; gap: 6px; }
.weak-item { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; }
.weak-item:hover { background: #f8f7ff; }
.weak-score { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.weak-score.great { background: #e4faf6; color: #087c70; }
.weak-score.good { background: #eeebff; color: #5847d6; }
.weak-score.ok { background: #fff4d6; color: #946200; }
.weak-score.low { background: #ffeaea; color: #b53c3c; }
.weak-info { display: grid; min-width: 0; flex: 1; }
.weak-info strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weak-info small { color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weak-item > .ico { width: 14px; height: 14px; color: #c5c8d5; }
.admin-empty { padding: 26px 18px; text-align: center; color: var(--muted-2); font-size: 11px; background: #fafbfc; border: 1px dashed #e1e3eb; border-radius: 12px; }
.admin-empty.small { padding: 16px 10px; font-size: 10px; }
.admin-tip { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px 18px; border-radius: 13px; background: #fff9e8; border: 1px solid #f3e8c7; }
.admin-tip span { font-size: 19px; }
.admin-tip p { color: #7b6a42; font-size: 11px; line-height: 1.7; }

/* 内容录入 */
.content-toolbar { display: flex; flex-wrap: wrap; gap: 18px 34px; padding: 16px 20px; border-radius: 16px; background: #fff; border: 1px solid #e7e8ef; margin-bottom: 16px; }
.toolbar-simple { align-items: flex-end; justify-content: space-between; }
.toolbar-simple h2 { margin-top: 4px; font-size: 22px; letter-spacing: -.03em; }
.toolbar-simple p { color: var(--muted); font-size: 11px; margin-top: 2px; }
.toolbar-block { min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid #e5e7ef; border-radius: 8px; background: #fafbfc; color: var(--muted); font-size: 11px; font-weight: 700; }
.chip:hover { border-color: #cfc9ff; color: var(--violet); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.content-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.chapter-panel { padding: 16px; border-radius: 17px; background: #fff; border: 1px solid #e7e8ef; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.chapter-panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 11px; }
.chapter-panel-head h3 { margin-top: 3px; font-size: 15px; }
.quick-add { border: 1px dashed #d8d4f2; border-radius: 11px; background: #fbfaff; margin-bottom: 12px; }
.quick-add summary { display: flex; align-items: center; gap: 6px; padding: 9px 11px; color: var(--violet); font-size: 11px; font-weight: 800; cursor: pointer; list-style: none; }
.quick-add summary::-webkit-details-marker { display: none; }
.quick-form { display: grid; gap: 10px; padding: 0 11px 11px; }
.quick-form .field-label { font-size: 10px; }
.quick-form input, .quick-form select, .quick-form textarea { min-height: 38px; padding: 7px 9px; font-size: 12px; border-radius: 9px; }
.quick-form textarea { min-height: 60px; }
.chapter-nav { display: grid; gap: 3px; }
.chapter-nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 8px; border-radius: 9px; color: var(--ink-soft); }
.chapter-nav-item:hover { background: #f7f6ff; }
.chapter-nav-item.active { background: #f0edff; color: var(--violet); }
.chapter-nav-num { font-family: var(--mono); font-size: 9px; font-weight: 800; color: #bdbfd0; }
.chapter-nav-item > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.chapter-nav-item strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-nav-item small { color: var(--muted-2); font-size: 9px; }
.chapter-nav-item .ico { width: 13px; height: 13px; color: #c5c8d5; }
.editor-panel { min-width: 0; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid #e7e8ef; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #eceef3; }
.editor-head h2 { margin-top: 4px; font-size: 22px; letter-spacing: -.03em; }
.editor-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.editor-head-actions { flex: 0 0 auto; }
.kp-editor-list { display: grid; gap: 7px; margin-top: 15px; }
.kp-editor-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #eceef3; border-radius: 12px; }
.kp-editor-card:hover { border-color: #dcd7ff; background: #fdfcff; }
.kp-editor-num { font-family: var(--mono); font-size: 10px; font-weight: 800; color: #c0c2d1; }
.kp-editor-main { flex: 1; min-width: 0; }
.kp-editor-main h3 { font-size: 13px; }
.kp-editor-main p { color: var(--muted-2); font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-editor-meta { display: flex; gap: 10px; margin-top: 5px; font-size: 9px; }
.kp-editor-meta span { display: inline-flex; align-items: center; gap: 3px; }
.kp-editor-meta .ico { width: 12px; height: 12px; }
.kp-editor-meta .ok { color: #0b8d7e; }
.kp-editor-meta .warn { color: #b27a00; }
.add-kp-card { margin-top: 15px; padding: 16px; border-radius: 14px; background: #faf9ff; border: 1px dashed #d8d3f2; }
.add-kp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.add-kp-emoji { font-size: 21px; }
.add-kp-head h3 { font-size: 13px; }
.add-kp-head p { color: var(--muted-2); font-size: 10px; }
.add-kp-form { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: end; }
.add-kp-form .full { grid-column: 1 / -1; }
.add-kp-form .grow { grid-column: 1; }
.add-kp-form button { grid-column: 2; justify-self: end; }
.add-kp-form input, .add-kp-form textarea { min-height: 40px; font-size: 12px; }
.editor-empty { display: grid; place-items: center; text-align: center; padding: 70px 20px; }
.editor-empty span { font-size: 48px; }
.editor-empty h2 { margin-top: 9px; font-size: 19px; }
.editor-empty p { margin-top: 5px; color: var(--muted); font-size: 11px; max-width: 380px; }
.inline-details { position: relative; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-pop { position: absolute; right: 0; top: calc(100% + 7px); z-index: 80; width: 310px; padding: 14px; border: 1px solid #e7e8ef; border-radius: 14px; background: #fff; box-shadow: 0 18px 45px rgba(23,26,43,.16); }
.inline-pop.wide { width: 390px; }
.inline-pop .quick-form { padding: 0; }
.inline-pop .btn-danger-ghost { margin-top: 8px; }

/* 知识点工作台 */
.kp-workbench-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-radius: 18px; background: #fff; border: 1px solid #e7e8ef; }
.kp-workbench-title h2 { margin-top: 5px; font-size: 24px; letter-spacing: -.03em; }
.kp-workbench-title p { margin-top: 4px; color: var(--muted); font-size: 11px; max-width: 780px; }
.kp-workbench-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.kp-tabs { display: flex; gap: 4px; margin: 14px 0; padding: 4px; border-radius: 11px; background: #eceef4; width: fit-content; }
.kp-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.kp-tabs a.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(23,26,43,.07); }
.kp-tabs a span { padding: 0 5px; border-radius: 5px; background: #eef0f4; font-size: 9px; }
.workbench-section { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid #e7e8ef; margin-bottom: 16px; }
.workbench-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.workbench-head h3 { margin-top: 4px; font-size: 17px; letter-spacing: -.02em; }
.workbench-head p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.workbench-count { padding: 4px 10px; border-radius: 999px; background: #f0edff; color: var(--violet); font-size: 10px; font-weight: 800; white-space: nowrap; }
.video-admin-list { display: grid; gap: 8px; }
.video-admin-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #eceef3; border-radius: 12px; }
.video-admin-cover { position: relative; width: 108px; aspect-ratio: 16/9; border-radius: 8px; background: linear-gradient(135deg, #2b2654, #6e5bea); overflow: hidden; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.video-admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-admin-cover .ico { width: 22px; height: 22px; opacity: .65; }
.video-admin-cover small { position: absolute; right: 4px; bottom: 3px; padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,.55); font-size: 8px; }
.video-admin-info { flex: 1; min-width: 0; }
.video-admin-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.video-admin-title strong { font-size: 12px; }
.video-admin-url { margin-top: 3px; color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-admin-meta { display: flex; gap: 10px; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.video-admin-actions { display: flex; gap: 5px; align-items: center; flex: 0 0 auto; }
.video-admin-actions form { display: flex; }
.add-video-box, .question-form-box { margin-top: 13px; border: 1px dashed #d8d4f2; border-radius: 13px; background: #fbfaff; }
.add-video-box summary, .question-form-box summary { display: flex; align-items: center; gap: 7px; padding: 12px 14px; color: var(--violet); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.add-video-box summary::-webkit-details-marker, .question-form-box summary::-webkit-details-marker { display: none; }
.video-form, .question-form { padding: 0 14px 15px; }
.video-source-tabs { display: flex; gap: 6px; margin-bottom: 13px; flex-wrap: wrap; }
.source-tab { cursor: pointer; }
.source-tab input { position: absolute; opacity: 0; }
.source-tab span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border: 1px solid #e5e2f4; border-radius: 9px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.source-tab span .ico { width: 14px; height: 14px; }
.source-tab.active span { border-color: var(--violet); color: var(--violet); background: #f2efff; }
.video-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.span-2 { grid-column: 1 / -1; }
.video-form input, .video-form select, .question-form input, .question-form select, .question-form textarea { min-height: 40px; font-size: 12px; background: #fff; }
.video-form .form-actions, .question-form .form-actions { margin-top: 13px; }
.question-admin-list { display: grid; gap: 8px; }
.question-admin-card { padding: 13px 14px; border: 1px solid #eceef3; border-radius: 12px; }
.question-admin-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.q-num { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: #f0f1f6; color: var(--muted); font-size: 9px; font-weight: 800; }
.q-diff { color: #b9bccb; font-size: 9px; letter-spacing: 1px; }
.q-diff span { color: #e1e3eb; }
.q-actions { margin-left: auto; display: flex; gap: 5px; align-items: center; }
.q-actions form { display: flex; }
.q-stem { margin-top: 7px; font-size: 12px; font-weight: 600; line-height: 1.7; }
.q-options-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.q-options-preview span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; background: #f7f8fa; color: var(--muted); font-size: 9px; }
.q-options-preview b { color: var(--ink-soft); }
.q-options-preview span.right { background: #e9fbf7; color: #087c70; }
.q-answer-line { margin-top: 6px; color: #087c70; font-size: 10px; }
.q-explanation { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.question-form-top { display: grid; grid-template-columns: 1fr 1fr 100px; gap: 11px; margin-bottom: 11px; }
.options-builder { margin-top: 11px; }
.options-builder-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.option-rows { display: grid; gap: 6px; margin-bottom: 7px; }
.option-row { display: flex; align-items: center; gap: 7px; }
.option-row-key { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: #f0edff; color: var(--violet); font-size: 10px; font-weight: 800; flex: 0 0 auto; }
.option-row input { flex: 1; min-height: 36px; font-size: 12px; background: #fff; }
.row-remove { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #b9bccb; display: grid; place-items: center; }
.row-remove:hover { background: #fff0f0; color: var(--danger); }
.row-remove .ico { width: 14px; height: 14px; }
.answer-builder { margin-top: 12px; }
.answer-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.answer-pill { cursor: pointer; }
.answer-pill input { position: absolute; opacity: 0; }
.answer-pill span { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid #e1e3eb; border-radius: 9px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; }
.answer-pill.wide span { width: auto; padding: 0 14px; }
.answer-pill:has(input:checked) span { border-color: var(--violet); background: var(--violet); color: #fff; }
.answer-builder textarea { margin-top: 5px; background: #fff; }
.question-form .check-line { margin-top: 0; }

/* 学生账号 */
.add-account-details { position: relative; flex: 0 0 auto; }
.add-account-details summary { list-style: none; }
.add-account-details summary::-webkit-details-marker { display: none; }
.add-account-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; width: 430px; padding: 16px; border: 1px solid #e7e8ef; border-radius: 15px; background: #fff; box-shadow: 0 20px 50px rgba(23,26,43,.18); }
.add-account-pop .quick-form { padding: 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.account-card { padding: 16px; border: 1px solid #e7e8ef; border-radius: 15px; background: #fff; }
.account-card.inactive { opacity: .7; background: #fafbfc; }
.account-top { display: flex; align-items: center; gap: 11px; }
.account-avatar { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #f0edff, #ffeae4); font-size: 23px; flex: 0 0 auto; }
.account-id { min-width: 0; }
.account-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.account-name-row h3 { font-size: 14px; }
.account-id p { color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.account-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 9px; border-top: 1px solid #f0f1f5; color: var(--muted-2); font-size: 10px; }
.account-meta strong { color: var(--ink-soft); }
.account-actions { display: flex; gap: 5px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.account-actions form { display: flex; }
.filter-form { display: flex; align-items: flex-end; gap: 8px; }
.field.inline { display: flex; align-items: center; gap: 8px; }
.field.inline .field-label { white-space: nowrap; }
.field.inline select { min-height: 36px; padding: 5px 9px; font-size: 11px; }

/* 设置 */
.settings-form { display: grid; gap: 14px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-actions { display: flex; align-items: center; gap: 14px; }
.settings-info { margin-top: 14px; }
.info-list { display: grid; gap: 8px; }
.info-list div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #f0f1f5; font-size: 11px; }
.info-list div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted-2); }
.info-list strong { font-family: var(--mono); font-size: 10px; font-weight: 600; text-align: right; word-break: break-all; }

/* 动画 */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .45; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes wave { 0%,100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(12deg); } 80% { transform: rotate(-3deg); } }
@keyframes confettiFall { 0% { transform: translate3d(0,-20px,0) rotate(0); opacity: 1; } 100% { transform: translate3d(var(--dx, 0), 420px, 0) rotate(720deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
    .hero-main { grid-template-columns: 1fr 320px; }
    .subject-grid { grid-template-columns: repeat(3, 1fr); }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    .desktop-nav { display: none; }
    .hero { padding: 34px 32px 0; }
    .hero-main { grid-template-columns: 1fr; min-height: 0; padding-bottom: 25px; }
    .hero-art { display: none; }
    .hero-stats { margin: 0 -32px; padding: 0 32px; }
    .learn-layout, .quiz-layout, .watch-layout { grid-template-columns: 1fr; }
    .learn-side, .quiz-side, .watch-side { position: static; grid-template-columns: repeat(2, 1fr); }
    .learn-side .side-back, .quiz-side .side-back, .watch-side .side-back { grid-column: 1 / -1; }
    .subject-grid.large { grid-template-columns: repeat(2, 1fr); }
    .auth-hero { padding: 44px 40px; }
    .auth-float-card { display: none; }
    .admin-shell { display: block; }
    .admin-sidebar { transform: translateX(-100%); transition: transform .26s ease; width: 240px; }
    .admin-sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
    .admin-main { margin-left: 0; }
    .admin-menu-btn { display: grid; }
    .admin-content { padding: 18px 18px 50px; }
    .content-layout { grid-template-columns: 1fr; }
    .chapter-panel { position: static; max-height: none; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .admin-welcome { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-hero { min-height: 330px; padding: 34px 30px; }
    .auth-hero-copy { margin-top: 34px; }
    .auth-hero-copy h1 { font-size: 42px; }
    .auth-hero-copy p { display: none; }
    .auth-hero-foot { display: none; }
    .auth-panel { padding: 34px 24px 50px; }
    .page-shell { padding: 24px 18px 70px; }
    .topbar-inner { min-height: 68px; padding: 0 18px; }
    .brand-text small { display: none; }
    .site-footer { display: none; }
    .mobile-nav {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 90;
        justify-content: space-around;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        border: 1px solid rgba(23,26,43,.08);
        border-radius: 20px;
        background: rgba(255,255,255,.94);
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 45px rgba(23,26,43,.16);
    }
    .mobile-nav a { display: grid; justify-items: center; gap: 2px; padding: 5px 10px; border-radius: 12px; color: #9498aa; font-size: 9px; font-weight: 700; }
    .mobile-nav a .ico { width: 20px; height: 20px; }
    .mobile-nav a.active { color: var(--violet); background: #f2efff; }
    body.student-body { padding-bottom: 86px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-card:nth-child(2) { border-right: 0; }
    .stat-card:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
    .subject-grid { grid-template-columns: repeat(2, 1fr); }
    .collection-row { grid-template-columns: 1fr; }
    .energy-grid { grid-template-columns: repeat(2, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-grid { grid-template-columns: 1fr; }
    .result-hero { flex-direction: column; align-items: flex-start; padding: 30px; }
    .result-ring { width: 120px; height: 120px; }
    .result-copy h1 { font-size: 27px; }
    .chapter-hero { align-items: flex-start; }
    .chapter-hero-ring { width: 88px; height: 88px; }
    .chapter-hero-ring strong { font-size: 22px; }
    .page-hero { flex-direction: column; align-items: flex-start; padding: 26px; }
    .subject-hero { padding: 28px; }
    .subject-hero-icon { width: 60px; height: 60px; font-size: 29px; }
    .subject-hero-meta { display: none; }
    .quiz-head { flex-direction: column; align-items: flex-start; }
    .question-card { padding: 20px; min-height: 320px; }
    .quiz-side { grid-template-columns: 1fr; }
    .learn-side { grid-template-columns: 1fr; }
    .watch-side { grid-template-columns: 1fr; }
    .kp-card { flex-wrap: wrap; }
    .kp-actions { flex-direction: row; width: 100%; }
    .kp-actions .btn { flex: 1; }
    .kp-index { display: none; }
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .account-grid { grid-template-columns: 1fr; }
    .onboarding-steps { grid-template-columns: 1fr; }
    .onboarding-step { padding: 10px; }
    .admin-welcome { padding: 24px; }
    .admin-topbar-actions .btn-soft { display: none; }
}
@media (max-width: 620px) {
    .quiz-head { gap: 7px; margin-bottom: 9px; }
    .quiz-head h1 { font-size: 25px; }
    .best-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 10px; }
    .best-chip small { display: inline; font-size: 8px; }
    .best-chip strong { font-size: 17px; }
    .question-card { min-height: 250px; padding: 17px; }
    .quiz-actions { margin-top: 10px; }
}

@media (max-width: 860px) {
    body.quiz-focus { padding-bottom: 24px; }
    .quiz-focus .mobile-nav { display: none; }
    .quiz-focus .site-footer { display: none; }
}

@media (max-width: 620px) {
    .hero { padding: 27px 22px 0; border-radius: 24px; }
    .hero-copy h1 { font-size: 32px; }
    .hero-sub { font-size: 12px; }
    .hero-actions { margin-top: 18px; }
    .hero-actions .btn { flex: 1; padding: 0 12px; font-size: 12px; }
    .hero-actions .btn-ghost-light { flex: 0 0 auto; }
    .hero-stats { margin: 0 -22px; padding: 0 22px; }
    .stat-card { padding: 14px 2px; }
    .stat-card strong { font-size: 17px; }
    .stat-ico { width: 28px; height: 28px; }
    .section { margin-top: 30px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-head h2 { font-size: 20px; }
    .subject-grid { gap: 9px; }
    .subject-card { padding: 14px; min-height: 122px; gap: 9px; }
    .subject-icon { width: 37px; height: 37px; border-radius: 11px; font-size: 19px; }
    .subject-body h3 { font-size: 14px; }
    .subject-body p { font-size: 10px; }
    .subject-count { font-size: 9px; }
    .subject-arrow { display: none; }
    .page-hero h1 { font-size: 25px; }
    .page-shell { padding: 20px 14px 60px; }
    .topbar-inner { gap: 10px; padding: 0 14px; }
    .brand-text strong { font-size: 15px; }
    .streak-pill { display: none; }
    .user-meta { display: none; }
    .user-menu summary { padding: 4px; border: 0; background: transparent; box-shadow: none; }
    .user-menu .chev { display: none; }
    .avatar { width: 34px; height: 34px; }
    .continue-card { flex-wrap: wrap; }
    .continue-cover { width: 100%; }
    .continue-info { padding: 0 4px 5px; }
    .continue-arrow { display: none; }
    .quote-banner { flex-wrap: wrap; padding: 20px; }
    .quote-banner span { margin-left: 0; width: 100%; }
    .collection-row { grid-template-columns: 1fr; }
    .collection-card { min-height: 108px; }
    .energy-hero { padding: 28px 24px; border-radius: 24px; }
    .energy-hero h1 { font-size: 33px; }
    .energy-emoji { display: none; }
    .energy-grid { grid-template-columns: 1fr; }
    .energy-card { min-height: 200px; }
    .video-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .video-info { padding: 9px 10px 11px; }
    .video-info h3 { font-size: 11px; }
    .video-info p { font-size: 9px; }
    .collection-hero { padding: 24px; align-items: flex-start; }
    .collection-hero-icon { width: 55px; height: 55px; font-size: 27px; border-radius: 15px; }
    .collection-hero h1 { font-size: 26px; }
    .auth-hero { min-height: 300px; padding: 28px 24px; }
    .auth-hero-copy h1 { font-size: 36px; }
    .auth-panel { padding: 28px 20px 46px; }
    .auth-welcome h2 { font-size: 27px; }
    .breadcrumb { font-size: 10px; margin-bottom: 12px; }
    .subject-hero h1 { font-size: 26px; }
    .subject-hero-icon { display: none; }
    .subject-hero { padding: 24px; }
    .subject-hero p { font-size: 11px; }
    .chapter-hero { padding: 24px; flex-direction: column; }
    .chapter-hero-ring { display: none; }
    .chapter-progress .progress-line { width: 120px; }
    .chapter-card { padding: 13px; gap: 9px; }
    .chapter-num { font-size: 18px; width: 28px; }
    .chapter-top strong { font-size: 14px; }
    .chapter-desc { font-size: 10px; }
    .chapter-meta { gap: 8px; font-size: 9px; }
    .kp-card { padding: 14px; }
    .kp-title-row h3 { font-size: 14px; }
    .kp-summary { font-size: 11px; }
    .kp-meta { gap: 8px; font-size: 9px; }
    .player-meta { padding: 16px; }
    .player-title-row h1 { font-size: 21px; }
    .player-info { gap: 10px; }
    .learn-side .side-card, .quiz-side .side-card { padding: 15px; }
    .quiz-head h1 { font-size: 24px; }
    .question-card { min-height: 300px; padding: 17px; }
    .question-stem { font-size: 15px; }
    .option { padding: 11px 12px; }
    .option-text { font-size: 13px; }
    .quiz-actions .btn { flex: 1; }
    .answer-sheet { grid-template-columns: repeat(6, 1fr); }
    .result-hero { padding: 24px; gap: 20px; }
    .result-ring { width: 100px; height: 100px; }
    .result-ring-inner strong { font-size: 32px; }
    .result-stats div { padding: 6px 12px; }
    .answer-compare { grid-template-columns: 1fr; }
    .result-bottom { flex-direction: column; align-items: flex-start; }
    .wrong-hero { align-items: flex-start; }
    .wrong-count { border-left: 0; border-top: 1px solid var(--line); padding: 8px 0 0; display: flex; align-items: baseline; gap: 6px; }
    .wrong-count strong { font-size: 24px; }
    .profile-hero { flex-wrap: wrap; padding: 22px; }
    .profile-avatar { width: 58px; height: 58px; font-size: 28px; border-radius: 18px; }
    .profile-id h1 { font-size: 23px; }
    .profile-actions { width: 100%; }
    .profile-stats { grid-template-columns: 1fr 1fr; }
    .profile-stats div { padding: 14px; }
    .filter-tabs { width: 100%; }
    .filter-tabs button { flex: 1; }
    .admin-topbar { padding: 12px 14px; gap: 10px; }
    .admin-topbar-title h1 { font-size: 17px; }
    .admin-topbar-actions { display: none; }
    .admin-content { padding: 14px 12px 40px; }
    .admin-welcome { padding: 22px 20px; }
    .admin-welcome h2 { font-size: 21px; }
    .admin-welcome-actions { width: 100%; }
    .admin-welcome-actions .btn { flex: 1; padding: 0 10px; font-size: 12px; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-stat { padding: 12px; }
    .admin-panel { padding: 15px; }
    .content-toolbar { padding: 13px 14px; gap: 12px; flex-direction: column; align-items: stretch; }
    .toolbar-simple { align-items: flex-start; }
    .editor-panel { padding: 15px; }
    .editor-head { flex-direction: column; }
    .add-kp-form { grid-template-columns: 1fr; }
    .add-kp-form .grow, .add-kp-form button { grid-column: 1; justify-self: stretch; }
    .add-kp-form .field:not(.full) { grid-column: 1; }
    .kp-workbench-head { flex-direction: column; padding: 16px; }
    .kp-workbench-title h2 { font-size: 20px; }
    .workbench-section { padding: 15px; }
    .workbench-head { flex-direction: column; gap: 8px; }
    .video-admin-card { flex-wrap: wrap; }
    .video-admin-cover { width: 92px; }
    .video-admin-actions { width: 100%; justify-content: flex-end; }
    .video-form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: 1; }
    .question-form-top { grid-template-columns: 1fr 1fr; }
    .inline-pop, .inline-pop.wide, .add-account-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 78vh; overflow-y: auto; z-index: 130; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-grid .span-2 { grid-column: 1; }
    .account-actions { gap: 6px; }
    .admin-table th, .admin-table td { padding: 8px 6px; }
    .admin-tip { padding: 12px 14px; }
    .admin-grid-2 { gap: 10px; }
}
