/* ============================================================
   Voca · UI
   Blue & white, quiet luxury, light / dark, responsive
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
html, body { touch-action: pan-y; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
button, input, textarea, select { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

:root {
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Times New Roman", "Songti SC", serif;
  --bg: #f4f7fd;
  --bg-tint: #ebf2ff;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --surface-3: #eef4ff;
  --surface-glass: rgba(255, 255, 255, .78);
  --border: #e5ebf5;
  --border-strong: #d7e0ee;
  --text: #101c33;
  --text-2: #586780;
  --text-3: #8b99af;
  --primary: #2563eb;
  --primary-2: #3b82f6;
  --primary-3: #60a5fa;
  --primary-deep: #1746b3;
  --primary-soft: #eaf1ff;
  --primary-softer: #f3f7ff;
  --success: #0f9f72;
  --success-soft: #e7f8f1;
  --warning: #d98a0b;
  --warning-soft: #fff5e5;
  --danger: #e5484d;
  --danger-soft: #fff0f0;
  --violet: #7c6cf2;
  --shadow-xs: 0 1px 2px rgba(20, 45, 90, .04);
  --shadow-sm: 0 6px 18px rgba(25, 55, 110, .06);
  --shadow: 0 16px 40px rgba(25, 55, 110, .08);
  --shadow-lg: 0 28px 80px rgba(18, 45, 100, .14);
  --gradient: linear-gradient(135deg, #1d4ed8 0%, #2f74ef 46%, #62a8fa 100%);
  --gradient-soft: linear-gradient(135deg, #eef5ff 0%, #f9fbff 70%);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --sidebar-w: 250px;
  --sidebar-gap: 16px;
  --topbar-h: 62px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
[data-theme="dark"] {
  --bg: #070e1a;
  --bg-tint: #0a1526;
  --surface: #0f1a2c;
  --surface-2: #111f34;
  --surface-3: #162741;
  --surface-glass: rgba(13, 25, 43, .78);
  --border: rgba(148, 177, 219, .12);
  --border-strong: rgba(148, 177, 219, .2);
  --text: #e9f0fb;
  --text-2: #9aabc4;
  --text-3: #6f819d;
  --primary: #63a4ff;
  --primary-2: #7cb6ff;
  --primary-3: #9bcaff;
  --primary-deep: #b9d9ff;
  --primary-soft: rgba(70, 135, 240, .17);
  --primary-softer: rgba(70, 135, 240, .08);
  --success: #38cfa0;
  --success-soft: rgba(31, 180, 133, .13);
  --warning: #f3b34b;
  --warning-soft: rgba(230, 157, 38, .12);
  --danger: #ff7377;
  --danger-soft: rgba(230, 70, 75, .12);
  --violet: #9d91ff;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow: 0 20px 50px rgba(0, 0, 0, .28);
  --shadow-lg: 0 36px 100px rgba(0, 0, 0, .45);
  --gradient: linear-gradient(135deg, #143c85 0%, #1d5fbf 48%, #3b8ce7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(38, 82, 153, .22) 0%, rgba(12, 24, 43, .1) 70%);
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1000px 600px at 108% -10%, rgba(80, 150, 255, .10), transparent 60%),
    radial-gradient(800px 500px at -10% 105%, rgba(70, 130, 240, .07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 600px at 108% -10%, rgba(58, 119, 210, .15), transparent 60%),
    radial-gradient(800px 500px at -10% 105%, rgba(35, 80, 160, .10), transparent 60%);
}
::selection { background: rgba(59, 130, 246, .2); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
.hidden { display: none !important; }

/* ---------- boot ---------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg); transition: opacity .45s var(--ease), visibility .45s;
}
.boot-screen.done { opacity: 0; visibility: hidden; }
.boot-mark { width: 58px; height: 58px; border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px rgba(37, 99, 235, .25); animation: bootFloat 1.8s ease-in-out infinite; }
.boot-word { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.boot-line { width: 92px; height: 3px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.boot-line span { display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--primary); animation: bootSlide 1.1s var(--ease) infinite; }
@keyframes bootFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes bootSlide { 0% { transform: translateX(-120%) } 100% { transform: translateX(330%) } }

/* ---------- shared ---------- */
.eyebrow, .tiny-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--primary);
  text-transform: uppercase;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 8px 0 28px; }
.page-head h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.18; letter-spacing: -.035em; font-weight: 740; margin: 6px 0 7px; }
.page-head p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-label h2, .card-title { font-size: 16px; font-weight: 680; letter-spacing: -.015em; }
.section-label p, .card-subtitle { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.link-btn { font-size: 12.5px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; }
.link-btn:hover { gap: 7px; }
.link-btn svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.muted { color: var(--text-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px;
  font-size: 13px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent; transition: all .2s var(--ease); user-select: none;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 9px 24px rgba(37, 99, 235, .24); }
.btn-primary:hover { background: var(--primary-deep); box-shadow: 0 12px 28px rgba(37, 99, 235, .32); }
[data-theme="dark"] .btn-primary { color: #061224; }
[data-theme="dark"] .btn-primary:hover { background: var(--primary-3); }
.btn-white { background: #fff; color: #1d4ed8; box-shadow: 0 8px 20px rgba(0, 20, 60, .12); }
.btn-white:hover { background: #f6f9ff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: color-mix(in srgb, var(--primary-soft) 76%, var(--primary) 10%); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger-soft) 80%, var(--danger) 8%); }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12px; }
.btn-lg { min-height: 50px; padding: 0 24px; border-radius: 14px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; color: var(--text-2); border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.card {
  min-width: 0; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.card.flush { padding: 0; overflow: hidden; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--surface-3); color: var(--text-2);
}
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.orange { background: var(--warning-soft); color: var(--warning); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.violet { background: rgba(124, 108, 242, .12); color: var(--violet); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 12px; font-weight: 650; color: var(--text-2); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .field-icon { width: 18px; height: 18px; position: absolute; left: 14px; color: var(--text-3); pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input, .textarea, .select {
  width: 100%; min-height: 44px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 0 14px; font-size: 13.5px;
  transition: all .2s var(--ease); outline: none;
}
.input-wrap .input { padding-left: 42px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-softer); outline: none; }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: none; }
.textarea { min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b99af' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.eye-btn { position: absolute; right: 8px; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.eye-btn:hover { color: var(--text); background: var(--surface-3); }
.eye-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.help-text { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.error-text { font-size: 12px; color: var(--danger); }

/* switch */
.switch { width: 42px; height: 24px; border-radius: 20px; background: var(--border-strong); position: relative; transition: .25s; flex: none; }
.switch span { position: absolute; width: 18px; height: 18px; border-radius: 50%; left: 3px; top: 3px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .25s var(--ease); }
.switch.on { background: var(--primary); }
.switch.on span { transform: translateX(18px); }

/* ---------- login ---------- */
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr); }
.login-visual {
  position: relative; overflow: hidden; color: #fff; padding: 42px clamp(36px, 5vw, 76px);
  background: linear-gradient(145deg, #0b1c3d 0%, #123372 40%, #1e5bb8 100%);
  display: flex; flex-direction: column;
}
.visual-grid {
  position: absolute; inset: 0; opacity: .13;
  background-image: linear-gradient(rgba(255,255,255,.32) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.32) 1px, transparent 1px);
  background-size: 58px 58px; mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 78%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(8px); pointer-events: none; }
.orb-a { width: 460px; height: 460px; right: -190px; top: 8%; background: radial-gradient(circle at 35% 35%, rgba(96,165,250,.42), transparent 65%); animation: orbFloat 11s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; left: -150px; bottom: 4%; background: radial-gradient(circle at 60% 60%, rgba(124,108,242,.30), transparent 68%); animation: orbFloat 14s ease-in-out infinite reverse; }
@keyframes orbFloat { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(24px,-20px) scale(1.06) } }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark svg rect { fill: #3b82f6; }
.brand-mark { width: 38px; height: 38px; display: inline-flex; color: #fff; flex: none; filter: drop-shadow(0 8px 20px rgba(56, 120, 230, .35)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; font-size: 20px; font-weight: 720; letter-spacing: -.03em; line-height: 1; }
.brand-text small { font-size: 7.5px; font-weight: 600; letter-spacing: .24em; opacity: .62; margin-top: 5px; }
.visual-copy { position: relative; z-index: 2; margin: auto 0; padding: 40px 0 100px; max-width: 590px; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 29px; padding: 0 13px; border-radius: 20px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  font-size: 9px; font-weight: 650; letter-spacing: .16em; color: rgba(255,255,255,.8);
}
.eyebrow-pill i { width: 5px; height: 5px; border-radius: 50%; background: #7cc4ff; box-shadow: 0 0 0 4px rgba(124,196,255,.15); }
.visual-copy h1 { font-size: clamp(38px, 4.4vw, 64px); line-height: 1.16; letter-spacing: -.05em; font-weight: 700; margin: 22px 0 20px; }
.visual-copy h1 span { background: linear-gradient(100deg, #9ed1ff 0%, #5fa8ff 50%, #c5e3ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.visual-copy p { font-size: 14px; line-height: 1.9; color: rgba(226,239,255,.63); max-width: 470px; }
.visual-features { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.visual-features span { padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.055); font-size: 10.5px; color: rgba(235,245,255,.75); letter-spacing: .03em; }
.floating-word {
  position: relative; z-index: 2; width: min(360px, 72%); margin-left: auto; margin-top: -52px; margin-bottom: 20px;
  padding: 20px 22px 18px; border-radius: 20px;
  background: rgba(255,255,255,.085); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 70px rgba(0,8,30,.25); backdrop-filter: blur(18px);
  transform: rotate(-2deg); animation: cardFloat 7s ease-in-out infinite;
}
@keyframes cardFloat { 0%,100% { transform: rotate(-2deg) translateY(0) } 50% { transform: rotate(-1.2deg) translateY(-9px) } }
.floating-word-top { display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: .16em; color: rgba(255,255,255,.45); text-transform: uppercase; }
.sound-wave { display: flex; align-items: center; gap: 2px; height: 12px; }
.sound-wave i { width: 2px; border-radius: 2px; background: #8cc8ff; animation: wave 1s ease-in-out infinite; }
.sound-wave i:nth-child(1) { height: 5px; animation-delay: .1s }.sound-wave i:nth-child(2) { height: 10px; animation-delay: .25s }.sound-wave i:nth-child(3) { height: 7px; animation-delay: .4s }.sound-wave i:nth-child(4) { height: 4px; animation-delay: .55s }
@keyframes wave { 0%,100% { transform: scaleY(.6) } 50% { transform: scaleY(1.2) } }
.floating-word strong { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 14px; }
.floating-word em { display: block; font-style: normal; font-size: 11px; color: #8cc8ff; margin-top: 5px; letter-spacing: .02em; }
.floating-word p { font-size: 11.5px; color: rgba(255,255,255,.6); margin-top: 10px; }
.floating-progress { height: 2px; border-radius: 3px; background: rgba(255,255,255,.1); margin-top: 15px; overflow: hidden; }
.floating-progress span { display: block; width: 64%; height: 100%; background: #78bdff; border-radius: 3px; }
.visual-foot { position: relative; z-index: 2; font-size: 8.5px; letter-spacing: .2em; color: rgba(255,255,255,.28); }
.login-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px clamp(24px, 5vw, 80px); background: var(--bg); }
.login-card { width: min(400px, 100%); animation: fadeUp .7s var(--ease) both; }
.mobile-brand { display: none; align-items: center; gap: 10px; font-size: 19px; font-weight: 720; margin-bottom: 30px; }
.mobile-brand .brand-mark { color: var(--primary); }
.login-heading .tiny-label { color: var(--text-3); }
.login-heading h2 { font-size: clamp(26px, 2.5vw, 32px); letter-spacing: -.04em; font-weight: 720; margin: 12px 0 8px; }
.login-heading p { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.auth-tabs {
  position: relative; display: flex; align-items: center; gap: 4px; padding: 5px;
  background: var(--surface-3); border-radius: 12px; margin: 28px 0 24px; isolation: isolate;
}
.auth-tabs button { position: relative; z-index: 2; flex: 1; height: 38px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--text-2); transition: color .25s; }
.auth-tabs button.active { color: var(--text); }
.tab-slider { position: absolute; z-index: 1; top: 5px; left: 5px; width: calc(50% - 7px); height: 38px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease); }
.auth-tabs.register .tab-slider { transform: translateX(calc(100% + 4px)); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.btn-auth { height: 50px; border-radius: 13px; margin-top: 4px; position: relative; }
.btn-auth .arrow-icon { width: 18px; height: 18px; margin-left: auto; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn-auth .btn-label { margin-left: auto; }
.btn-auth .btn-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-auth.loading .btn-spinner { display: block; }
.btn-auth.loading .btn-label { margin-left: 0; }
.btn-auth.loading .arrow-icon { display: none; }
.auth-error { min-height: 0; font-size: 12px; color: var(--danger); line-height: 1.5; display: none; padding: 10px 12px; border-radius: 9px; background: var(--danger-soft); }
.auth-error.show { display: block; }
.secure-note { display: flex; gap: 11px; margin-top: 24px; padding: 13px 14px; border-radius: 12px; background: var(--primary-softer); border: 1px solid var(--primary-soft); }
.secure-icon { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.secure-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.secure-note p { display: flex; flex-direction: column; gap: 3px; }
.secure-note strong { font-size: 11px; font-weight: 700; }
.secure-note span { font-size: 10px; color: var(--text-2); line-height: 1.55; }
.login-foot { text-align: center; font-size: 9.5px; color: var(--text-3); margin-top: 22px; line-height: 1.6; }
.theme-orb {
  position: absolute; top: 28px; right: 30px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs); transition: .25s;
}
.theme-orb:hover { color: var(--primary); border-color: var(--primary); transform: rotate(12deg); }
.icon-sun, .icon-moon { width: 17px; height: 17px; display: block; }
.icon-sun svg, .icon-moon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ---------- app shell ---------- */
.app-view { min-height: 100vh; width: 100%; max-width: 100%; }
.sidebar {
  position: fixed; left: var(--sidebar-gap); top: var(--sidebar-gap); bottom: var(--sidebar-gap); width: var(--sidebar-w);
  display: flex; flex-direction: column; z-index: 100; padding: 18px 14px 14px;
  border: 1px solid var(--border); border-radius: 24px;
  background: var(--surface-glass); backdrop-filter: blur(26px) saturate(140%);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s var(--ease);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 21px; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; color: var(--primary); filter: drop-shadow(0 7px 16px rgba(37,99,235,.2)); }
.sidebar-brand div { display: flex; flex-direction: column; }
.sidebar-brand strong { font-size: 18px; font-weight: 730; letter-spacing: -.03em; line-height: 1; }
.sidebar-brand span { font-size: 7px; font-weight: 650; letter-spacing: .2em; color: var(--text-3); margin-top: 5px; }
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; overflow-x: hidden; }
.nav::-webkit-scrollbar { width: 0; }
.nav-caption { font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; margin: 17px 12px 7px; }
.nav-caption:first-child { margin-top: 4px; }
.nav-caption.admin-caption { color: var(--primary); opacity: .75; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 41px; padding: 0 12px; border-radius: 11px;
  font-size: 12.5px; font-weight: 540; color: var(--text-2); position: relative;
  transition: all .2s var(--ease);
}
.nav-item .nav-icon { width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; flex: none; opacity: .88; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--surface-3); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .22); font-weight: 620; }
[data-theme="dark"] .nav-item.active { color: #061224; }
.nav-item.active::after { content: ""; position: absolute; right: 9px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.sidebar-spacer { flex: 1; min-height: 16px; }
.sidebar-theme { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin: 4px 2px 8px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.sidebar-theme > div { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--text-2); font-weight: 550; }
.sidebar-theme .nav-icon { width: 17px; height: 17px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 9px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); }
.avatar, .top-avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 700;
  width: 34px; height: 34px; font-size: 13px; flex: none;
  box-shadow: 0 5px 14px rgba(37,99,235,.25);
}
[data-theme="dark"] .avatar, [data-theme="dark"] .top-avatar { color: #061224; }
.user-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.user-meta strong { font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 9.5px; color: var(--text-3); }
.sidebar-user .icon-btn { width: 31px; height: 31px; }
.sidebar-user .icon-btn svg { width: 16px; height: 16px; }
.main { margin-left: calc(var(--sidebar-w) + var(--sidebar-gap) * 2); min-height: 100vh; min-width: 0; max-width: 100%; padding: 0 clamp(22px, 3.5vw, 52px) 60px; }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--text-3); }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.crumb-sep { opacity: .45; }
.secure-session { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-3); padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.secure-session svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-quick { background: var(--surface); border-color: var(--border); }
.top-avatar { width: 36px; height: 36px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border), 0 5px 14px rgba(37,99,235,.18); }
.mobile-menu { display: none; }
.page { width: 100%; max-width: min(1280px, 100%); min-width: 0; margin: 0 auto; padding-top: 12px; animation: pageIn .35s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.sidebar-overlay { display: none; }

/* ---------- dashboard ---------- */
.dashboard-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 32px 36px;
  background: linear-gradient(122deg, #0e2b63 0%, #164a9e 46%, #2778d9 100%);
  color: #fff; box-shadow: 0 28px 70px rgba(22, 66, 150, .26);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center;
  margin-bottom: 20px;
}
[data-theme="dark"] .dashboard-hero { background: linear-gradient(122deg, #0a2049 0%, #123c80 50%, #1c5ca8 100%); box-shadow: 0 28px 70px rgba(0,0,0,.35); }
.dashboard-hero::before {
  content: ""; position: absolute; width: 440px; height: 440px; right: -120px; top: -210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 190, 255, .30), transparent 66%);
}
.dashboard-hero::after { pointer-events: none;
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(to right, #000, transparent 78%);
}
.hero-copy { position: relative; z-index: 2; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 650; letter-spacing: .16em; color: rgba(197, 225, 255, .8); }
.hero-kicker i { width: 5px; height: 5px; border-radius: 50%; background: #7dd3fc; }
.hero-copy h2 { font-size: clamp(26px, 2.7vw, 38px); letter-spacing: -.04em; font-weight: 700; line-height: 1.2; margin: 12px 0 10px; }
.hero-copy h2 span { color: #9ccdff; }
.hero-copy p { font-size: 12.5px; line-height: 1.75; color: rgba(222, 237, 255, .62); max-width: 460px; }
.hero-actions { display: flex; align-items: center; gap: 9px; margin-top: 24px; flex-wrap: wrap; }
.hero-actions .btn { min-height: 44px; border-radius: 11px; }
.hero-actions .btn-hero {
  background: #fff; color: #15458f; box-shadow: 0 10px 26px rgba(0,20,60,.22);
}
.hero-actions .btn-hero:hover { background: #f2f8ff; }
.hero-actions .btn-hero-2 {
  background: rgba(255,255,255,.09); color: #fff; border: 1px solid rgba(255,255,255,.17);
}
.hero-actions .btn-hero-2:hover { background: rgba(255,255,255,.15); }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; overflow: hidden; backdrop-filter: blur(10px); }
.hero-stat { padding: 20px 20px 18px; background: rgba(7, 28, 67, .26); }
.hero-stat span { font-size: 9px; letter-spacing: .1em; color: rgba(218,235,255,.56); text-transform: uppercase; display: block; }
.hero-stat strong { display: block; font-size: 27px; font-weight: 700; letter-spacing: -.04em; margin-top: 7px; }
.hero-stat strong small { font-size: 11px; font-weight: 500; color: rgba(218,235,255,.5); margin-left: 4px; letter-spacing: 0; }
.hero-progress { grid-column: 1 / -1; padding: 13px 20px; background: rgba(7, 28, 67, .38); display: flex; align-items: center; gap: 11px; }
.hero-progress span { font-size: 9.5px; color: rgba(218,235,255,.62); white-space: nowrap; }
.hero-progress .bar { flex: 1; height: 3px; background: rgba(255,255,255,.15); border-radius: 4px; overflow: hidden; }
.hero-progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, #68b5ff, #c7e6ff); border-radius: 4px; transition: width .8s var(--ease); }
.hero-progress b { font-size: 10px; font-weight: 600; color: #dbeeff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 19px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.orange { background: var(--warning-soft); color: var(--warning); }
.stat-icon.violet { background: rgba(124,108,242,.11); color: var(--violet); }
.stat-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.stat-body { min-width: 0; }
.stat-body span { display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 5px; }
.stat-body strong { font-size: 23px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.stat-body strong small { font-size: 10px; color: var(--text-3); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.stat-body em { display: block; font-style: normal; font-size: 10px; color: var(--text-3); margin-top: 5px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 16px; margin-bottom: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-head h3 { font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.card-head p { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.chart-wrap { position: relative; }
.activity-chart { height: 190px; display: flex; align-items: flex-end; gap: 9px; padding-top: 8px; }
.chart-zero { position: absolute; inset: 0 0 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 55%, transparent), var(--surface)); border-radius: 10px; color: var(--text-3); font-size: 11px; pointer-events: none; }
.chart-zero strong { color: var(--text-2); font-size: 12px; font-weight: 620; }
.chart-zero span { font-size: 9.5px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; justify-content: center; }
.chart-bars i { display: block; width: min(9px, 38%); border-radius: 4px 4px 2px 2px; background: var(--primary-soft); min-height: 4px; transition: height .6s var(--ease); }
.chart-bars i.hi { background: linear-gradient(180deg, var(--primary-3), var(--primary)); }
.chart-col span { font-size: 8.5px; color: var(--text-3); white-space: nowrap; }
.chart-col.today span { color: var(--primary); font-weight: 700; }
.chart-legend { display: flex; gap: 15px; margin-top: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--text-3); }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--primary); }
.chart-legend i.light { background: var(--primary-soft); border: 1px solid var(--primary-3); }
.quote-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--gradient-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
}
.quote-card::after { content: "“"; pointer-events: none; position: absolute; right: 18px; bottom: -22px; font-family: Georgia, serif; font-size: 130px; line-height: 1; color: var(--primary); opacity: .08; }
.quote-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--primary); font-family: Georgia, serif; font-size: 23px; }
.quote-card blockquote { font-family: var(--serif); font-size: 17px; line-height: 1.65; letter-spacing: -.01em; margin: 25px 0 9px; position: relative; z-index: 2; }
.quote-translation { font-size: 10.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; position: relative; z-index: 2; max-width: 92%; }
.quote-card blockquote span { color: var(--primary); }
.quote-card cite { font-style: normal; font-size: 10px; color: var(--text-3); letter-spacing: .06em; }
.review-list { display: flex; flex-direction: column; }
.review-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: 0; padding-bottom: 0; }
.review-item:first-child { padding-top: 0; }
.word-avatar { width: 35px; height: 35px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.review-meta { flex: 1; min-width: 0; }
.review-meta strong { display: block; font-size: 12.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-meta span { display: block; font-size: 10px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-item .badge { flex: none; }
.empty-compact { padding: 30px 10px; text-align: center; }
.empty-compact .empty-icon { margin: 0 auto 10px; }
.empty-compact p { font-size: 11px; color: var(--text-3); }
.progress-ring { position: relative; width: 62px; height: 62px; flex: none; }
.progress-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.progress-ring circle { fill: none; stroke-width: 5; }
.progress-ring .track { stroke: var(--surface-3); }
.progress-ring .value { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.progress-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.plan-snapshot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); margin-top: 16px; }
.plan-snapshot p { font-size: 11px; color: var(--text-2); line-height: 1.6; }

/* ---------- books ---------- */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.seg-tabs { display: inline-flex; gap: 3px; padding: 4px; background: var(--surface-3); border-radius: 10px; overflow-x: auto; max-width: 100%; }
.seg-tabs button { padding: 7px 13px; border-radius: 7px; font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: .2s; }
.seg-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.filter-actions { display: flex; align-items: center; gap: 9px; }
.filter-actions > span { flex: none; white-space: nowrap; }
.search-box { position: relative; width: 230px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; pointer-events: none; }
.search-box input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px 0 35px; font-size: 11.5px; color: var(--text); outline: none; transition: .2s; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-softer); }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.book-card {
  position: relative; display: flex; flex-direction: column; min-height: 210px;
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; overflow: hidden;
}
.book-card::after { content: ""; pointer-events: none; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -70px; top: -70px; background: var(--ba, var(--primary)); opacity: .05; transition: transform .4s var(--ease); }
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.book-card:hover::after { transform: scale(1.25); }
.book-card.create { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; border-style: dashed; background: var(--surface-2); color: var(--text-3); min-height: 210px; }
.book-card.create:hover { border-color: var(--primary); color: var(--primary); }
.book-card.create .plus-circle { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; }
.book-card.create .plus-circle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.book-card.create span { font-size: 11.5px; font-weight: 600; }
.book-card.create small { font-size: 9.5px; color: var(--text-3); }
.book-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.book-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--ba, var(--gradient)); font-size: 16px; font-weight: 720; box-shadow: 0 8px 18px color-mix(in srgb, var(--ba, #2563eb) 28%, transparent); }
.book-menu-btn { opacity: .6; }
.book-card:hover .book-menu-btn { opacity: 1; }
.book-body { margin-top: 18px; }
.book-body h3 { font-size: 16px; font-weight: 680; letter-spacing: -.015em; line-height: 1.35; }
.book-body p { font-size: 10.5px; color: var(--text-3); margin-top: 5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.book-tags { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.book-foot { margin-top: auto; padding-top: 18px; }
.book-numbers { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--text-3); margin-bottom: 8px; }
.book-numbers strong { color: var(--text); font-weight: 650; font-size: 11px; }
.book-bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.book-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ba, var(--primary)); transition: width .5s var(--ease); }
.book-hidden-tag { position: absolute; top: 12px; right: 12px; }
.empty-state { padding: 65px 20px; text-align: center; }
.empty-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.empty-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.empty-state h3 { font-size: 16px; font-weight: 680; margin-bottom: 6px; }
.empty-state p { font-size: 11.5px; color: var(--text-3); line-height: 1.7; margin-bottom: 18px; }

/* ---------- book detail ---------- */
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); margin-bottom: 18px; transition: .2s; }
.back-link:hover { color: var(--primary); gap: 10px; }
.back-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.book-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 27px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.book-detail-title { display: flex; align-items: center; gap: 16px; }
.book-detail-title .book-icon { width: 52px; height: 52px; font-size: 19px; border-radius: 15px; }
.book-detail-title h1 { font-size: 25px; letter-spacing: -.035em; font-weight: 720; }
.book-detail-title p { font-size: 11px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-stats { display: flex; gap: 22px; margin-top: 18px; padding-left: 68px; flex-wrap: wrap; }
.detail-stat span { display: block; font-size: 9.5px; color: var(--text-3); margin-bottom: 3px; }
.detail-stat strong { font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.word-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.word-table { width: 100%; border-collapse: collapse; }
.word-table th { text-align: left; font-size: 9.5px; font-weight: 700; letter-spacing: .09em; color: var(--text-3); text-transform: uppercase; padding: 13px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.word-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
.word-table tr:last-child td { border-bottom: 0; }
.word-table tbody tr { transition: background .15s; }
.word-table tbody tr:hover { background: var(--primary-softer); }
.word-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.word-cell .word-avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 0; color: var(--primary); font-family: inherit; line-height: 1; }
.word-cell strong { display: block; font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.word-cell span:not(.word-avatar) { display: block; font-size: 10px; color: var(--text-3); font-family: var(--serif); margin-top: 2px; }
.meaning-cell { color: var(--text-2); line-height: 1.6; max-width: 500px; }
.meaning-cell .note-line { display: block; font-size: 10px; color: var(--text-3); margin-top: 3px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; opacity: .55; transition: .2s; }
tr:hover .row-actions { opacity: 1; }
.check { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--surface); appearance: none; cursor: pointer; position: relative; flex: none; transition: .15s; }
.check:checked { background: var(--primary); border-color: var(--primary); }
.check:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
[data-theme="dark"] .check:checked::after { border-color: #061224; }
.bulk-bar { position: sticky; bottom: 18px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 0; padding: 11px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: fadeUp .2s var(--ease); }
.bulk-bar span { font-size: 11.5px; color: var(--text-2); }
.bulk-bar strong { color: var(--primary); }
.table-empty { padding: 55px 20px; text-align: center; color: var(--text-3); font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 15px; border-top: 1px solid var(--border); background: var(--surface-2); }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; font-size: 10.5px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.page-btn:hover { background: var(--surface-3); }
.page-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.page-btn.active { background: var(--primary); color: #fff; }
[data-theme="dark"] .page-btn.active { color: #061224; }

/* ---------- plan ---------- */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; min-width: 0; }
.plan-layout > *, .plan-form, .form-section, .number-grid { min-width: 0; }
.plan-form { display: flex; flex-direction: column; gap: 26px; }
.form-section { padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.form-section:last-child { padding-bottom: 0; border-bottom: 0; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.form-section-head h3 { font-size: 14px; font-weight: 680; display: flex; align-items: center; gap: 8px; }
.form-section-head h3 svg { width: 17px; height: 17px; fill: none; stroke: var(--primary); stroke-width: 1.7; }
.form-section-head p { font-size: 10.5px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }
.number-row { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.number-copy { flex: 1; min-width: 0; }
.number-box { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.number-box button { width: 38px; height: 42px; color: var(--text-2); font-size: 17px; transition: .15s; }
.number-box button:hover { background: var(--surface-3); color: var(--primary); }
.number-box input { width: 54px; height: 42px; border: 0; background: transparent; text-align: center; font-size: 14px; font-weight: 700; color: var(--text); outline: none; }
.number-copy { font-size: 10.5px; color: var(--text-3); line-height: 1.6; }
.number-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.book-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.book-check { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: .2s; background: var(--surface-2); }
.book-check:hover { border-color: var(--border-strong); background: var(--surface); }
.book-check.selected { border-color: var(--primary); background: var(--primary-softer); }
.book-check input { display: none; }
.checkmark { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex: none; color: #fff; transition: .15s; }
.book-check.selected .checkmark { background: var(--primary); border-color: var(--primary); }
.checkmark svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.5; opacity: 0; }
.book-check.selected .checkmark svg { opacity: 1; }
[data-theme="dark"] .book-check.selected .checkmark svg { color: #061224; }
.book-check div { min-width: 0; }
.book-check strong { display: block; font-size: 11.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-check span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-option { position: relative; padding: 17px; border: 1px solid var(--border); border-radius: 13px; cursor: pointer; background: var(--surface-2); transition: .2s; }
.mode-option:hover { border-color: var(--border-strong); }
.mode-option.selected { border-color: var(--primary); background: var(--primary-softer); box-shadow: inset 0 0 0 1px var(--primary); }
.mode-option input { display: none; }
.mode-option .mode-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 11px; }
.mode-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mode-option strong { display: block; font-size: 12px; font-weight: 650; }
.mode-option span:not(.mode-icon) { display: block; font-size: 10px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }
.mode-option .mode-check { position: absolute; right: 12px; top: 12px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
.mode-option.selected .mode-check { border-color: var(--primary); background: var(--primary); }
.mode-option.selected .mode-check::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
[data-theme="dark"] .mode-option.selected .mode-check::after { background: #061224; }
.plan-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.plan-switch-row strong { display: block; font-size: 12px; font-weight: 620; }
.plan-switch-row > div > span { display: block; font-size: 10px; color: var(--text-3); margin-top: 3px; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; padding-top: 3px; }
.today-card { position: sticky; top: 76px; height: fit-content; }
.today-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.today-summary div { padding: 13px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.today-summary span { display: block; font-size: 9.5px; color: var(--text-3); }
.today-summary strong { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.today-summary strong small { font-size: 9px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.today-list { display: flex; flex-direction: column; max-height: 440px; overflow-y: auto; margin: 0 -4px; padding: 2px 6px 8px 4px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.today-list::-webkit-scrollbar { width: 6px; }
.today-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.today-list::-webkit-scrollbar-track { background: transparent; }
.today-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.today-item:last-child { border-bottom: 0; }
.today-item .word-avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 0; color: var(--primary); font-family: inherit; line-height: 1; }
.today-item div { flex: 1; min-width: 0; }
.today-item strong { display: block; font-size: 11.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-item span:not(.word-avatar) { display: block; font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.today-item .badge { height: 20px; font-size: 9px; }
.today-item .icon-btn { width: 26px; height: 26px; opacity: .5; }
.today-item:hover .icon-btn { opacity: 1; }
.today-actions { display: flex; gap: 8px; margin-top: 15px; }
.today-actions .btn { flex: 1; }
.plan-tip { display: flex; gap: 9px; padding: 12px 13px; border-radius: 10px; background: var(--primary-softer); border: 1px solid var(--primary-soft); margin-top: 15px; }
.plan-tip svg { width: 15px; height: 15px; flex: none; stroke: var(--primary); fill: none; stroke-width: 1.8; margin-top: 1px; }
.plan-tip p { font-size: 9.5px; color: var(--text-2); line-height: 1.65; }

/* ---------- stats ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.kpi-card span { font-size: 10px; color: var(--text-3); }
.kpi-card strong { display: block; font-size: 25px; font-weight: 720; letter-spacing: -.04em; margin: 6px 0 3px; }
.kpi-card em { font-style: normal; font-size: 9.5px; color: var(--text-3); }
.kpi-card em.up { color: var(--success); }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); gap: 16px; margin-bottom: 16px; }
.big-chart { height: 230px; display: flex; align-items: flex-end; gap: 8px; padding-top: 10px; }
.big-chart .chart-col { gap: 6px; }
.big-chart .chart-bars i { width: min(10px, 34%); }
.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 4px 0 8px; }
.donut { width: 150px; height: 150px; flex: none; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 26px; font-weight: 720; letter-spacing: -.04em; }
.donut-center span { font-size: 9px; color: var(--text-3); margin-top: 1px; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--text-2); }
.donut-legend i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; font-size: 11px; color: var(--text); }
.heatmap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin-top: 15px; }
.heatmap.wide { grid-template-columns: repeat(12, 1fr); }
.heat-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.heat-summary div { display: flex; flex-direction: column; gap: 3px; }
.heat-summary strong { font-family: var(--serif); font-size: 18px; letter-spacing: -.02em; }
.heat-summary span { font-size: 9px; color: var(--text-3); }
.heat-cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); min-width: 0; transition: transform .2s var(--ease); }
.heat-cell:hover { transform: scale(1.24); }
.heat-cell.l1 { background: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
.heat-cell.l2 { background: color-mix(in srgb, var(--primary) 42%, var(--surface)); }
.heat-cell.l3 { background: color-mix(in srgb, var(--primary) 64%, var(--surface)); }
.heat-cell.l4 { background: var(--primary); }
.heat-foot { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 9px; font-size: 8.5px; color: var(--text-3); }
.heat-foot i { width: 10px; height: 10px; border-radius: 2px; background: var(--surface-3); }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { text-align: left; padding: 9px 10px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); }
.history-table td { padding: 11px 10px; font-size: 11px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.history-table tr:last-child td { border-bottom: 0; }
.history-table td strong { color: var(--text); font-weight: 620; }
.session-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--text-3); }
.session-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.checkin-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; margin-bottom: 16px; border-radius: 15px; border: 1px solid var(--primary-soft); background: var(--gradient-soft); }
.checkin-banner div { display: flex; align-items: center; gap: 12px; }
.checkin-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.checkin-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.checkin-banner strong { display: block; font-size: 12px; font-weight: 650; }
.checkin-banner span { display: block; font-size: 10px; color: var(--text-2); margin-top: 3px; }

/* ---------- study ---------- */
.study-page {
  position: fixed; inset: 0; z-index: 300;
  width: 100%; max-width: none; height: 100vh; height: 100dvh;
  margin: 0; padding: max(22px, env(safe-area-inset-top)) max(clamp(18px, 4vw, 36px), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(clamp(18px, 4vw, 36px), env(safe-area-inset-left));
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  background-image:
    radial-gradient(1000px 600px at 108% -10%, rgba(80, 150, 255, .12), transparent 60%),
    radial-gradient(800px 500px at -10% 105%, rgba(70, 130, 240, .08), transparent 60%);
}
.study-page > * { width: 100%; max-width: 900px; flex: 0 0 auto; margin-left: auto; margin-right: auto; }
[data-theme="dark"] .study-page { background-image:
    radial-gradient(1100px 600px at 108% -10%, rgba(58, 119, 210, .17), transparent 60%),
    radial-gradient(800px 500px at -10% 105%, rgba(35, 80, 160, .12), transparent 60%); }
body.study-active { overflow: hidden; }
body.study-active .sidebar, body.study-active .topbar, body.study-active .sidebar-overlay { visibility: hidden; pointer-events: none; }
body.study-active .page { animation: none; transform: none; }
.study-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.study-top-left, .study-top-right { display: flex; align-items: center; gap: 12px; }
.study-exit { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); transition: .2s; }
.study-exit:hover { color: var(--danger); border-color: var(--danger); }
.study-exit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.study-mode-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 650; letter-spacing: .06em; color: var(--primary); background: var(--primary-soft); padding: 7px 11px; border-radius: 8px; }
.study-mode-tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.study-counter { font-size: 10.5px; color: var(--text-3); }
.study-counter b { color: var(--text); font-weight: 650; }
.study-progress { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-bottom: 22px; }
.study-progress i { display: block; height: 100%; border-radius: 5px; background: var(--gradient); transition: width .5s var(--ease); }
.study-card {
  position: relative; overflow: hidden; min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 52px 44px 40px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); text-align: center;
}
.study-card::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, var(--primary-soft), transparent 70%); top: -170px; left: -120px; opacity: .7; }
.study-card::after { content: ""; pointer-events: none; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,242,.08), transparent 70%); bottom: -170px; right: -100px; }
.study-inner { position: relative; z-index: 2; width: 100%; }
.study-label { font-size: 9px; font-weight: 700; letter-spacing: .18em; color: var(--text-3); text-transform: uppercase; margin-bottom: 24px; }
.study-word { font-family: var(--serif); font-size: clamp(48px, 8vw, 76px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; word-break: break-word; }
.study-phonetic { font-size: 14px; color: var(--text-2); margin-top: 14px; font-family: var(--serif); letter-spacing: .02em; }
.study-pronounce { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 13px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 600; transition: .2s; }
.study-pronounce:hover { transform: scale(1.04); }
.study-pronounce svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.study-reveal { margin-top: 22px; min-height: 64px; }
.reveal-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); border-bottom: 1px dashed var(--border-strong); padding-bottom: 4px; transition: .2s; white-space: nowrap; }
.reveal-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
.reveal-btn:hover { color: var(--primary); border-color: var(--primary); }
.reveal-content { animation: fadeUp .3s var(--ease); }
.reveal-content .meaning { font-size: 16px; color: var(--text); line-height: 1.7; font-weight: 520; }
.reveal-content .example { font-size: 11.5px; color: var(--text-2); font-style: italic; line-height: 1.7; margin-top: 8px; max-width: 540px; }
.study-actions { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 34px; }
.study-actions .btn { min-width: 150px; height: 50px; border-radius: 13px; }
.btn-unknown { background: var(--surface-2); color: var(--warning); border: 1px solid var(--border-strong); }
.btn-unknown:hover { background: var(--warning-soft); border-color: var(--warning); }
.btn-known { background: var(--primary); color: #fff; box-shadow: 0 10px 26px rgba(37,99,235,.25); }
[data-theme="dark"] .btn-known { color: #061224; }
.study-actions .btn:disabled { cursor: default; }
.study-actions .btn:not(.chosen-known):not(.chosen-unknown):disabled { opacity: .42; }
.study-actions .btn.chosen-known:disabled { opacity: 1; outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.study-actions .btn.chosen-unknown:disabled { opacity: 1; background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.reveal-feedback { min-height: 18px; margin-top: 14px; text-align: center; font-size: 11px; color: var(--text-3); }
.reveal-feedback.known { color: var(--primary); }
.reveal-feedback.unknown { color: var(--warning); }
.study-hint { text-align: center; font-size: 9.5px; color: var(--text-3); margin-top: 18px; line-height: 1.8; }
.study-hint kbd { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); font-family: var(--font); font-size: 8px; padding: 0 4px; margin: 0 2px; }
.study-shuffle-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 6px 11px; border-radius: 20px; transition: .2s; }
.study-shuffle-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-softer); }
.study-shuffle-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.queue-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); padding: 6px 10px; border-radius: 20px; }
.queue-pill strong { color: var(--primary); font-weight: 700; }
.study-complete { text-align: center; padding: 30px 0 10px; }
.trophy { width: 76px; height: 76px; border-radius: 23px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; background: var(--gradient); color: #fff; box-shadow: 0 18px 40px rgba(37,99,235,.28); }
.trophy svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.study-complete h2 { font-size: 30px; letter-spacing: -.04em; font-weight: 730; }
.study-complete p { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.complete-stats { display: flex; justify-content: center; gap: 10px; margin: 26px 0; flex-wrap: wrap; }
.complete-stat { min-width: 85px; padding: 13px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.complete-stat strong { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.complete-stat span { display: block; font-size: 9px; color: var(--text-3); margin-top: 2px; }
.complete-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }

/* spelling */
.spell-card { text-align: left; align-items: stretch; padding: 38px 42px 30px; }
.spell-card::before { left: auto; right: -100px; top: -190px; }
.spell-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.spell-top .study-label { margin: 0; }
.spell-meaning { font-size: clamp(18px, 2.3vw, 24px); line-height: 1.55; font-weight: 560; color: var(--text); letter-spacing: -.01em; }
.spell-example { font-family: var(--serif); font-style: italic; font-size: 12.5px; line-height: 1.8; color: var(--text-2); margin-top: 11px; padding-left: 13px; border-left: 2px solid var(--primary-3); }
.spell-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 9.5px; color: var(--text-3); }
.spell-note .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--warning); }
.spell-answer { min-height: 72px; margin: 27px 0 14px; padding: 17px 18px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; transition: border-color .2s, background .2s; }
.spell-answer.focus { border-color: var(--primary); background: var(--primary-softer); }
.spell-answer.correct { border-color: var(--success); background: var(--success-soft); }
.spell-answer.wrong { border-color: var(--danger); background: var(--danger-soft); animation: shake .35s ease; }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }
.spell-letter { min-width: 16px; font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: .03em; color: var(--text); border-bottom: 2px solid var(--border-strong); line-height: 1.3; text-align: center; transition: .15s; }
.spell-letter.placeholder { color: var(--text-3); border-color: var(--border); }
.spell-letter.space { min-width: 10px; border-color: transparent; }
.caret { width: 2px; height: 27px; border-radius: 2px; background: var(--primary); animation: blink 1s step-end infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0 } }
.spell-feedback { min-height: 25px; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.spell-feedback.ok { color: var(--success); }
.spell-feedback.bad { color: var(--danger); }
.spell-feedback svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.security-keyboard-note { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--text-3); margin-bottom: 10px; }
.security-keyboard-note svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.virtual-keyboard { background: var(--surface-2); border: 1px solid var(--border); border-radius: 15px; padding: 8px; user-select: none; }
.kb-row { display: flex; justify-content: center; gap: 5px; margin-bottom: 5px; }
.kb-row:last-child { margin-bottom: 0; }
.kb-key { height: 43px; min-width: 34px; flex: 1; max-width: 48px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 560; box-shadow: 0 2px 0 var(--border); transition: .08s; display: flex; align-items: center; justify-content: center; }
.kb-key:hover { background: var(--primary-softer); border-color: var(--primary-3); }
.kb-key:active { transform: translateY(2px); box-shadow: none; }
.kb-key.wide { flex: 2; max-width: none; font-size: 10px; color: var(--text-2); }
.kb-key.space { flex: 4; max-width: none; font-size: 9px; color: var(--text-3); }
.kb-key.confirm { flex: 2.2; max-width: none; background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 0 var(--primary-deep); font-size: 10.5px; }
[data-theme="dark"] .kb-key.confirm { color: #061224; }
.spell-submit { margin-top: 12px; }
.spell-submit .btn { width: 100%; height: 46px; border-radius: 11px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; min-width: 0; max-width: 100%; }
.settings-grid > * { min-width: 0; max-width: 100%; }
.stats-grid.lower { align-items: start; }
.settings-card { padding: 25px; }
.settings-card h3 { font-size: 14px; font-weight: 680; margin-bottom: 5px; }
.settings-card > p { font-size: 10.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 20px; }
.profile-row { display: flex; align-items: center; gap: 15px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.profile-avatar { width: 56px; height: 56px; border-radius: 17px; font-size: 21px; }
.profile-info strong { display: block; font-size: 16px; font-weight: 680; letter-spacing: -.02em; }
.profile-info span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.profile-details { display: flex; flex-direction: column; gap: 11px; }
.profile-details div { display: flex; justify-content: space-between; gap: 16px; font-size: 11px; }
.profile-details span { color: var(--text-3); }
.profile-details strong { font-weight: 600; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-option { border: 1.5px solid var(--border); border-radius: 13px; padding: 9px; cursor: pointer; transition: .2s; }
.theme-option:hover { border-color: var(--border-strong); }
.theme-option.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-softer); }
.theme-preview { height: 82px; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.theme-preview.light { background: #f4f7fd; }
.theme-preview.dark { background: #0a1322; }
.theme-preview .tp-side { position: absolute; left: 7px; top: 7px; bottom: 7px; width: 22%; border-radius: 5px; }
.theme-preview.light .tp-side { background: #fff; box-shadow: 0 2px 8px rgba(30,64,175,.1); }
.theme-preview.dark .tp-side { background: #121f34; }
.theme-preview .tp-main { position: absolute; left: 32%; right: 7px; top: 7px; height: 31px; border-radius: 5px; }
.theme-preview.light .tp-main { background: linear-gradient(120deg,#1e4fae,#3d8ae8); }
.theme-preview.dark .tp-main { background: linear-gradient(120deg,#12366e,#2464b4); }
.theme-preview .tp-line { position: absolute; left: 32%; right: 7px; height: 6px; border-radius: 3px; }
.theme-preview.light .tp-line { background: #fff; box-shadow: 0 1px 4px rgba(30,64,175,.08); }
.theme-preview.dark .tp-line { background: #15243b; }
.theme-option strong { display: block; font-size: 10.5px; font-weight: 620; text-align: center; margin-top: 8px; }
.security-list { display: flex; flex-direction: column; gap: 12px; }
.security-item { display: flex; align-items: flex-start; gap: 10px; }
.security-item .s-icon { width: 31px; height: 31px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.security-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.security-item strong { display: block; font-size: 10.5px; font-weight: 620; }
.security-item span { display: block; font-size: 9.5px; color: var(--text-3); line-height: 1.5; margin-top: 3px; }
.role-card { display: flex; align-items: center; gap: 12px; padding: 15px; border-radius: 12px; background: var(--primary-softer); border: 1px solid var(--primary-soft); }
.role-card .stat-icon { width: 36px; height: 36px; }
.role-card strong { display: block; font-size: 11.5px; font-weight: 650; }
.role-card span { display: block; font-size: 9.5px; color: var(--text-2); margin-top: 2px; }
.role-card > svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }

/* ---------- admin ---------- */
.admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border-radius: var(--radius-lg); background: linear-gradient(120deg, #0d2a5e, #1a55aa 55%, #2b7ad5); color: #fff; margin-bottom: 16px; position: relative; overflow: hidden; }
.admin-hero::after { content: ""; pointer-events: none; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -200px; background: radial-gradient(circle, rgba(124,190,255,.25), transparent 65%); }
.admin-hero h2 { font-size: 22px; letter-spacing: -.03em; font-weight: 700; }
.admin-hero p { font-size: 11px; color: rgba(220,236,255,.6); margin-top: 6px; }
.admin-hero .badge { background: rgba(255,255,255,.11); color: #d8ebff; border: 1px solid rgba(255,255,255,.12); }
.admin-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; min-width: 0; max-width: 100%; }
.admin-kpi { min-width: 0; }
.admin-kpi { padding: 17px 18px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.admin-kpi span { font-size: 9.5px; color: var(--text-3); }
.admin-kpi strong { display: block; font-size: 22px; font-weight: 720; letter-spacing: -.04em; margin-top: 5px; }
.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 16px; min-width: 0; max-width: 100%; }
.admin-grid > * { min-width: 0; max-width: 100%; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 10px 12px; text-align: left; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 12px; font-size: 11px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td strong { color: var(--text); font-weight: 620; }
.admin-table .user-line { display: flex; align-items: center; gap: 9px; }
.admin-table .avatar { width: 30px; height: 30px; font-size: 11px; }
.admin-table .row-actions { opacity: .45; }
.admin-table tr:hover .row-actions { opacity: 1; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-toolbar .search-box { width: 280px; }
.login-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.login-row:last-child { border-bottom: 0; }
.login-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }
.login-dot.fail { background: var(--danger); }
.login-row div { flex: 1; min-width: 0; }
.login-row strong { display: block; font-size: 10.5px; font-weight: 620; }
.login-row span { display: block; font-size: 9px; color: var(--text-3); margin-top: 2px; }
.login-row time { font-size: 8.5px; color: var(--text-3); white-space: nowrap; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row strong { display: block; font-size: 11.5px; font-weight: 620; }
.perm-row > div > span { display: block; font-size: 9.5px; color: var(--text-3); line-height: 1.6; margin-top: 3px; max-width: 440px; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.export-card { padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.export-card .stat-icon { width: 32px; height: 32px; margin-bottom: 11px; }
.export-card strong { display: block; font-size: 11.5px; font-weight: 620; }
.export-card span { display: block; font-size: 9.5px; color: var(--text-3); line-height: 1.5; margin: 3px 0 12px; }

/* ---------- modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(6, 14, 30, .46); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: overlayIn .2s ease; }
[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, .62); }
@keyframes overlayIn { from { opacity: 0 } to { opacity: 1 } }
.modal { width: min(520px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); animation: modalIn .28s var(--ease); overflow: hidden; }
.modal.wide { width: min(820px, 100%); }
.modal.xwide { width: min(1000px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 16px; flex: none; }
.modal-head-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.modal-head-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.modal-head-text { flex: 1; min-width: 0; }
.modal-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.modal-head p { font-size: 10.5px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); flex: none; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.modal-body { padding: 4px 24px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 24px; border-top: 1px solid var(--border); background: var(--surface-2); flex: none; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-note { padding: 11px 13px; border-radius: 9px; background: var(--primary-softer); border: 1px solid var(--primary-soft); font-size: 10px; color: var(--text-2); line-height: 1.65; display: flex; gap: 8px; }
.modal-note svg { width: 14px; height: 14px; flex: none; stroke: var(--primary); fill: none; stroke-width: 1.8; margin-top: 1px; }
.danger-note { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger-soft) 70%, var(--danger) 15%); color: var(--text-2); }
.danger-note svg { stroke: var(--danger); }
.modal-actions-list { display: flex; flex-direction: column; gap: 3px; }
.modal-action { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 9px; font-size: 12px; color: var(--text); transition: .15s; text-align: left; }
.modal-action:hover { background: var(--surface-2); }
.modal-action .ma-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); display: flex; align-items: center; justify-content: center; flex: none; }
.modal-action .ma-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.modal-action > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; opacity: .42; }
.modal-action.danger { color: var(--danger); }
.modal-action.danger .ma-icon { background: var(--danger-soft); color: var(--danger); }
.modal-action div { flex: 1; min-width: 0; }
.modal-action strong { display: block; font-size: 11.5px; font-weight: 620; }
.modal-action span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 13px; padding: 28px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-softer); }
.dropzone .empty-icon { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px; }
.dropzone .empty-icon svg { width: 21px; height: 21px; }
.dropzone strong { display: block; font-size: 11.5px; font-weight: 620; }
.dropzone span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 4px; }
.file-chip { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 10.5px; }
.file-chip button { color: currentColor; opacity: .7; }
.import-preview { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.import-preview-head { display: flex; justify-content: space-between; padding: 8px 11px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 9px; color: var(--text-3); }
.import-preview pre { margin: 0; padding: 10px 12px; max-height: 150px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; }
.radio-pills { display: flex; gap: 6px; }
.radio-pills label { flex: 1; padding: 9px; text-align: center; border: 1px solid var(--border); border-radius: 8px; font-size: 10.5px; color: var(--text-2); cursor: pointer; }
.radio-pills label:has(input:checked) { border-color: var(--primary); background: var(--primary-softer); color: var(--primary); font-weight: 600; }
.radio-pills input { display: none; }
.word-search-results { display: flex; flex-direction: column; gap: 2px; max-height: 290px; overflow-y: auto; margin-top: 12px; }
.word-search-item { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 8px; cursor: pointer; transition: .15s; }
.word-search-item:hover { background: var(--surface-2); }
.word-search-item .word-avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 0; color: var(--primary); font-family: inherit; line-height: 1; }
.word-search-item div { flex: 1; min-width: 0; }
.word-search-item strong { display: block; font-size: 11.5px; font-weight: 620; }
.word-search-item span:not(.word-avatar) { display: block; font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.result-meta { font-size: 10px; color: var(--text-3); margin-bottom: 10px; }
.admin-word-list { max-height: 54vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.withdraw-confirm { padding: 6px 2px 2px; }
.withdraw-confirm p { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.withdraw-confirm strong { color: var(--text); }

/* ---------- toast ---------- */
.toast-root { position: fixed; z-index: 2000; left: 50%; top: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px) } }
.toast-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.toast-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.toast.success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast.error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast.warn .toast-icon { background: var(--warning-soft); color: var(--warning); }
.toast div { flex: 1; }
.toast strong { display: block; font-size: 11px; font-weight: 650; }
.toast > div > span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }

/* ---------- loading / misc ---------- */
.loading-block { display: flex; align-items: center; justify-content: center; padding: 100px 20px; color: var(--text-3); font-size: 11px; gap: 10px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.skeleton-page { display: flex; flex-direction: column; gap: 15px; padding-top: 25px; }
.skeleton-page .s1 { width: 180px; height: 14px; }
.skeleton-page .s2 { width: 320px; height: 34px; }
.skeleton-page .s3 { width: 100%; height: 220px; border-radius: 24px; }
.skeleton-page .s4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skeleton-page .s4 i { display: block; height: 88px; border-radius: 16px; }
.load-more { text-align: center; padding: 12px; }

/* ---------- responsive ---------- */
@media (min-width: 861px) {
  .study-page { justify-content: safe center; }
}
@media (max-width: 1180px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-kpis { grid-template-columns: repeat(3, 1fr); }
  .hero-stat strong { font-size: 24px; }
}
@media (max-width: 1020px) {
  :root { --sidebar-w: 226px; --sidebar-gap: 12px; }
  .main { padding-left: 26px; padding-right: 26px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid, .stats-grid, .admin-grid { grid-template-columns: 1fr; }
  .plan-layout { grid-template-columns: 1fr; }
  .today-card { position: static; }
  .admin-kpis { grid-template-columns: repeat(3, 1fr); }
  .dashboard-hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-progress { grid-column: 1 / -1; }
  .hero-stat { padding: 15px; }
  .floating-word { display: none; }
  .visual-copy { padding-bottom: 30px; }
}
@media (max-width: 860px) {
  :root { --sidebar-gap: 12px; }
  .login-view { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 40px 22px; }
  .mobile-brand { display: flex; }
  .theme-orb { top: 22px; right: 22px; }
  .sidebar { transform: translateX(calc(-100% - 30px)); }
  .app-view.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(6, 14, 30, .42); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .3s; }
  .app-view.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
  .main { margin-left: 0; padding: 0 18px 45px; overflow-x: clip; }
  .mobile-menu { display: inline-flex; }
  .secure-session { display: none; }
  .topbar { height: 56px; }
  .page { padding-top: 2px; overflow-x: clip; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .book-grid { grid-template-columns: 1fr 1fr; }
  .book-detail-head { flex-direction: column; }
  .detail-actions { justify-content: flex-start; }
  .detail-stats { padding-left: 0; }
  .filter-bar { align-items: stretch; }
  .filter-actions { width: 100%; }
  .search-box { flex: 1; width: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .admin-kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-hero { align-items: flex-start; flex-direction: column; }
  .word-table th:nth-child(3), .word-table td:nth-child(3) { display: none; }
  .word-table th:nth-child(4), .word-table td:nth-child(4) { display: none; }
  .study-card { min-height: 400px; padding: 40px 24px 32px; }
  .spell-card { padding: 28px 22px 24px; }
  .study-actions .btn { min-width: 0; flex: 1; }
  .admin-toolbar .search-box { width: 100%; }
  .admin-toolbar { align-items: stretch; }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .topbar { gap: 8px; }
  .breadcrumb { font-size: 10.5px; gap: 6px; }
  .theme-quick { display: none; }
  .page-head h1 { font-size: 26px; }
  .page-head p { font-size: 12px; }
  .head-actions { flex-wrap: wrap; }
  .dashboard-hero { padding: 24px 22px; border-radius: 22px; }
  .hero-copy h2 { font-size: 27px; }
  .hero-copy p { font-size: 11.5px; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1; min-width: 120px; font-size: 11.5px; padding: 0 12px; }
  .hero-stats { border-radius: 13px; }
  .hero-stat { padding: 12px; }
  .hero-stat strong { font-size: 21px; }
  .hero-progress { padding: 10px 12px; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 14px 13px; gap: 10px; border-radius: 14px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-body strong { font-size: 19px; }
  .stat-body span { font-size: 9.5px; }
  .stat-body em { display: none; }
  .card { padding: 18px; border-radius: 17px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { min-height: 190px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .kpi-card { padding: 15px; border-radius: 14px; }
  .kpi-card strong { font-size: 21px; }
  .book-detail-head { padding: 18px; }
  .book-detail-title h1 { font-size: 21px; }
  .word-table th, .word-table td { padding: 10px 9px; }
  .word-table th:nth-child(5), .word-table td:nth-child(5) { display: none; }
  .meaning-cell { font-size: 11px; }
  .word-cell { min-width: 110px; }
  .word-cell .word-avatar { display: none; }
  .today-summary { gap: 7px; }
  .plan-form { gap: 22px; }
  .number-grid { grid-template-columns: 1fr; gap: 16px; }
  .book-select-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
  .donut-legend { width: 100%; }
  .chart-col span { font-size: 7.5px; }
  .activity-chart { gap: 5px; }
  .quote-card { padding: 20px; }
  .study-page { padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .study-top { align-items: flex-start; flex-direction: column; gap: 10px; }
  .study-top-right { width: 100%; justify-content: space-between; }
  .study-card { border-radius: 21px; min-height: 390px; }
  .study-word { font-size: 45px; }
  .study-actions { gap: 8px; }
  .study-actions .btn { height: 46px; }
  .spell-meaning { font-size: 18px; }
  .kb-key { height: 39px; min-width: 0; font-size: 12px; }
  .kb-row { gap: 4px; }
  .virtual-keyboard { padding: 6px; }
  .spell-answer { min-height: 62px; margin-top: 21px; }
  .spell-letter { font-size: 23px; }
  .complete-stat { min-width: 70px; padding: 10px 12px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { border-radius: 20px 20px 14px 14px; max-height: 92vh; }
  .modal-head { padding: 18px 18px 12px; }
  .modal-body { padding: 4px 18px 18px; }
  .modal-foot { padding: 12px 18px; }
  .toast-root { top: auto; bottom: 18px; left: 14px; right: 14px; transform: none; align-items: stretch; }
  .toast { min-width: 0; max-width: none; width: 100%; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .admin-kpis { gap: 8px; }
  .admin-kpi { padding: 13px; }
  .admin-kpi strong { font-size: 19px; }
  .admin-hero { padding: 20px; }
  .admin-hero h2 { font-size: 19px; }
  /* Admin overview rank table: card rows on phones, no sideways panning */
  .admin-grid .table-scroll { overflow-x: visible; }
  .admin-grid .admin-table, .admin-grid .admin-table tbody { display: block; width: 100%; }
  .admin-grid .admin-table thead { display: none; }
  .admin-grid .admin-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 6px 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
  .admin-grid .admin-table tr:last-child { border-bottom: 0; }
  .admin-grid .admin-table td { display: block; min-width: 0; padding: 0; border: 0; font-size: 11px; }
  .admin-grid .admin-table td:first-child { grid-column: 1 / 3; grid-row: 1; }
  .admin-grid .admin-table td:nth-child(2) { grid-column: 3; grid-row: 1; text-align: right; }
  .admin-grid .admin-table td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .admin-grid .admin-table td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .admin-grid .admin-table td:nth-child(5) { grid-column: 3; grid-row: 2; }
  .admin-grid .admin-table td:nth-child(n+3) { display: flex; flex-direction: column; gap: 1px; color: var(--text-2); }
  .admin-grid .admin-table td:nth-child(n+3)::before { content: attr(data-label); font-size: 8.5px; color: var(--text-3); letter-spacing: .02em; }
  .admin-grid .admin-table .user-line { min-width: 0; }
  .admin-grid .admin-table .user-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Remaining admin tables: stacked cards on phones, never sideways */
  .admin-table { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: block; width: 100%; }
  .admin-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-width: 0; padding: 3px 0; border: 0; text-align: right; }
  .admin-table td::before { content: attr(data-label); flex: none; text-align: left; font-size: 9px; letter-spacing: .02em; color: var(--text-3); }
  .admin-table td:first-child { display: block; padding: 0 0 7px; text-align: left; }
  .admin-table td:first-child::before { display: none; }
  .admin-table td[colspan] { display: block; }
  .admin-table td[colspan]::before { display: none; }
  .admin-table .row-actions { justify-content: flex-start; flex-wrap: wrap; opacity: 1; }

  .admin-table.log-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; padding: 9px 0; }
  .admin-table.log-table td { display: inline-flex; width: auto; padding: 0; justify-content: flex-start; font-size: 9.5px; text-align: left; }
  .admin-table.log-table td::before { display: none; }
  .admin-table.log-table td:first-child { width: 100%; padding: 0 0 2px; font-size: 11.5px; }
  .admin-table.log-table td:nth-child(3) { flex: 1; min-width: 0; color: var(--text-3); }
  .admin-table.log-table td:nth-child(5) { margin-left: auto; color: var(--text-3); font-size: 9px; }

  .checkin-banner { flex-direction: column; align-items: flex-start; }
  .checkin-banner .btn { width: 100%; }
  .theme-options { gap: 8px; }
}

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

/* ============================================================
   Iteration 2 · learning prefs / search / public library
   ============================================================ */

/* ---------- unified icon geometry ---------- */
.btn > svg, .icon-btn > svg, .link-btn > svg, .badge > svg,
.modal-action > svg, .modal-close > svg, .page-btn > svg, .kb-key > svg {
  flex: none; display: block;
}
.btn > svg, .icon-btn > svg { stroke-linecap: round; stroke-linejoin: round; }
.icon-btn, .btn, .stat-icon, .s-icon, .ma-icon, .modal-head-icon, .empty-icon, .trophy,
.plus-circle, .mode-icon, .nav-icon, .eye-btn, .checkin-icon, .profile-avatar, .word-avatar {
  line-height: 1;
}
.icon-btn, .stat-icon, .s-icon, .ma-icon, .empty-icon, .modal-head-icon, .trophy,
.plus-circle, .mode-icon, .nav-icon, .eye-btn, .checkin-icon, .kb-key, .page-btn {
  align-items: center; justify-content: center;
}
.stat-icon svg, .s-icon svg, .ma-icon svg, .empty-icon svg, .modal-head-icon svg,
.checkin-icon svg, .mode-icon svg, .page-btn svg { flex: none; }
.secure-session, .study-exit, .study-mode-tag, .study-pronounce, .reveal-btn,
.security-keyboard-note, .modal-note, .plan-tip, .back-link, .link-btn { line-height: 1.4; }

/* ---------- preferences card ---------- */
.pref-card { grid-column: 1 / -1; }
.pref-group { padding: 16px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 11px; }
.pref-group:first-of-type { border-top: 0; padding-top: 2px; }
.pref-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pref-head strong { font-size: 12px; font-weight: 650; }
.pref-head span { font-size: 10px; color: var(--text-3); }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.pref-row label, .pref-row strong { font-size: 11.5px; font-weight: 600; }
.pref-row.is-muted { opacity: .55; }
.pref-row .pref-sub { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.pref-card .seg-tabs { align-self: flex-start; }
.pref-card .form-grid { gap: 12px 16px; }
.pref-card .input { min-height: 40px; }
.pref-card > .btn { margin-top: 4px; }

/* ---------- spell input ---------- */
.spell-input {
  width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent;
  text-align: center; font-family: var(--serif); font-size: clamp(22px, 3vw, 29px);
  font-weight: 600; letter-spacing: .04em; color: var(--text); padding: 0 4px;
}
.spell-input::placeholder { color: var(--text-3); font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.spell-answer input:-webkit-autofill { -webkit-text-fill-color: var(--text); transition: background-color 9999s; }
.next-word-btn { margin-top: 6px; }
.reveal-next-wrap { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.auto-hint { font-size: 9.5px; color: var(--text-3); }
.spell-repeat-note { font-size: 9.5px; color: var(--text-3); margin-left: 8px; }
.reveal-feedback-text { display: block; }
.reveal-feedback { line-height: 1.7; }

/* ---------- global search ---------- */
.search-hero {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm); position: relative;
}
.search-hero:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-softer), var(--shadow-sm); }
.search-hero-icon { width: 20px; height: 20px; flex: none; color: var(--text-3); }
.search-hero-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-hero input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); height: 44px; }
.search-hero input::placeholder { color: var(--text-3); font-size: 13px; }
.search-hero .btn { min-height: 44px; border-radius: 12px; }
.search-scope-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.search-scope { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-2); padding: 6px 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); }
.search-scope svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.search-scope-tip { font-size: 9.5px; color: var(--text-3); margin-left: 2px; }
.search-section { margin-bottom: 16px; }
.search-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.search-section-head h3 { font-size: 14px; font-weight: 680; }
.search-section-head p { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.online-card { background: linear-gradient(135deg, var(--surface), var(--primary-softer) 160%); border-color: var(--primary-soft); }
.online-title .eyebrow { font-size: 9px; }
.online-word-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; }
.online-word-line h2 { font-family: var(--serif); font-size: clamp(27px, 3.4vw, 36px); font-weight: 620; letter-spacing: -.03em; line-height: 1.1; }
.online-phonetic { font-family: var(--serif); font-size: 13px; color: var(--text-2); }
.online-meanings { display: flex; flex-direction: column; gap: 7px; }
.online-meanings p { font-size: 12.5px; color: var(--text); line-height: 1.7; padding-left: 11px; position: relative; }
.online-meanings p::before { content: ""; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary-3); }
.online-example { margin-top: 13px; padding: 11px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.online-example strong { display: block; font-family: var(--serif); font-style: italic; font-size: 11.5px; font-weight: 500; line-height: 1.7; color: var(--text); }
.online-example span { display: block; font-size: 10px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }
.search-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.result-list { display: flex; flex-direction: column; gap: 1px; }
.result-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--border); }
.result-row:first-child { border-top: 0; }
.result-word strong { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; word-break: break-word; }
.result-word span { display: block; font-size: 10px; color: var(--text-3); font-family: var(--serif); margin-top: 2px; }
.result-meaning { font-size: 11.5px; color: var(--text-2); line-height: 1.6; min-width: 0; }
.result-example { display: block; font-size: 10px; color: var(--text-3); font-style: italic; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-source { min-width: 0; }
.result-source .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; gap: 2px; justify-content: flex-end; }
.result-empty { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--text-3); padding: 12px 2px; }
.result-empty svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.search-empty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.search-guide { text-align: center; padding: 40px 24px; }
.search-guide-icon { width: 62px; height: 62px; border-radius: 19px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.search-guide-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.search-guide h3 { font-size: 17px; font-weight: 680; }
.search-guide p { font-size: 11.5px; color: var(--text-2); margin-top: 8px; line-height: 2; }
.search-guide-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.word-chip { display: inline; font-size: 11.5px; color: var(--primary); border-bottom: 1px dashed var(--primary-3); padding: 0 2px; }
.word-chip:hover { color: var(--primary-deep); }
.suggest-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.suggest-item { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); max-width: 100%; transition: .2s; }
.suggest-item:hover { border-color: var(--primary-3); background: var(--primary-softer); }
.suggest-item strong { font-size: 12px; font-weight: 650; }
.suggest-item span { font-size: 9.5px; color: var(--text-3); line-height: 1.5; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- book picker / detail modal ---------- */
.book-pick-list { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.book-pick { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: .2s; background: var(--surface-2); }
.book-pick:hover { border-color: var(--border-strong); }
.book-pick.selected { border-color: var(--primary); background: var(--primary-softer); box-shadow: 0 0 0 3px var(--primary-softer); }
.book-pick input { position: absolute; opacity: 0; pointer-events: none; }
.book-pick strong { display: block; font-size: 12px; font-weight: 650; }
.book-pick span:not(.word-avatar) { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.book-pick .word-avatar { display: flex; align-items: center; justify-content: center; margin-top: 0; color: var(--primary); font-family: inherit; line-height: 1; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-2); cursor: pointer; }
.check-line input { width: 15px; height: 15px; accent-color: var(--primary); }
.detail-block h4 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.detail-block h4:first-of-type { margin-top: 6px; }
.detail-speak { margin-bottom: 4px; }
.detail-meaning { font-size: 13px; line-height: 1.8; }
.detail-example { font-family: var(--serif); font-style: italic; font-size: 12px; line-height: 1.8; color: var(--text-2); }
.detail-note { font-size: 11px; color: var(--text-3); }

/* ---------- public library ---------- */
.public-book-card .book-bar i { background: linear-gradient(90deg, var(--violet), var(--primary-3)); }
.public-manage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.public-manage-bar .search-box { min-width: 220px; flex: 1; max-width: 340px; }
.page-info { font-size: 10px; color: var(--text-3); padding: 0 8px; }
@media (max-width: 760px) {
  .result-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .result-meaning { grid-column: 1 / -1; }
  .result-source { grid-column: 1; }
  .result-actions { grid-column: 2; grid-row: 1; }
  .search-hero { padding: 8px 8px 8px 14px; border-radius: 15px; }
  .search-hero .btn { padding: 0 13px; }
  .search-scope-tip { display: none; }
  .pref-card { grid-column: auto; }
  .pref-row { align-items: flex-start; }
  .search-section-head { flex-direction: column; gap: 8px; }
}

/* icon boxes inside text-heavy cards: keep flex centering above generic span rules */
.role-card .stat-icon,
.export-card .stat-icon,
.checkin-banner .checkin-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  margin: 0; font-size: inherit; line-height: 1; color: var(--primary);
}
.role-card .stat-icon { margin-right: 0; }
.checkin-banner .checkin-icon { flex: none; }
.sidebar-theme .nav-icon { width: 18px; height: 18px; }
.sidebar-theme .nav-icon svg { width: 17px; height: 17px; }
.book-pick { position: relative; }
.book-pick.selected::after { content: "✓"; margin-left: auto; color: var(--primary); font-size: 14px; font-weight: 700; flex: none; }

@media (max-width: 860px) {
  .input, .textarea, .select, .search-box input, .search-hero input, .number-box input { font-size: 16px !important; }
}

/* ============================================================
   ZZ · 政治刷题专属样式（追加层）
   设计语言与 Voca 一致：极简蓝白 / 昼夜双模 / 图标居中 / 响应式
   ============================================================ */

/* ---------- 图标居中兜底 ---------- */
.btn > svg, .icon-btn > svg, .link-btn > svg, .nav-icon > svg,
.badge > svg, .chip > svg, .step-btn > svg, .opt-answer > svg,
.empty-icon > svg, .stat-icon > svg, .scope-icon > svg, .mode-icon > svg,
.complete-badge > svg, .toast-icon > svg, .search-hero-icon > svg,
.search-guide-icon > svg, .ma-icon > svg, .s-icon > svg, .sample-tag > svg,
.src-badge > svg, .qtype-badge > svg, .mod-badge > svg, .mis-stat > svg {
  display: block; flex: none;
}
.btn, .icon-btn, .link-btn, .chip, .step-btn, .opt-answer, .badge,
.src-badge, .qtype-badge, .mod-badge, .sample-tag, .mis-stat, .rate-tag,
.mini-avatar, .q-avatar, .avatar, .complete-badge, .scope-icon, .stat-icon,
.ma-icon, .s-icon, .empty-icon, .toast-icon, .search-hero-icon,
.search-guide-icon, .cover-pill, .scope-count, .card-head-tag, .plan-mini-row {
  display: inline-flex; align-items: center; justify-content: center;
}
.btn, .icon-btn, .link-btn, .chip, .step-btn, .scope-card, .book-pick { text-align: center; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ---------- 通用 ---------- */
.hidden { display: none !important; }
.muted { color: var(--text-3); font-size: 11.5px; }
.danger-text { color: var(--danger) !important; }
.danger-text:hover { background: var(--danger-soft) !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: 0; }
.meta-sep { color: var(--text-3); opacity: .7; }
.page-gap { display: inline-flex; align-items: center; padding: 0 5px; color: var(--text-3); font-size: 11px; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 17px; padding: 0 6px; border-radius: 9px;
  background: var(--danger-soft); color: var(--danger); font-size: 9.5px; font-style: normal;
  font-weight: 800; letter-spacing: 0;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .9); }
.mini-avatar {
  width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft);
  color: var(--primary); font-size: 11px; font-weight: 800; flex: none;
}
.q-avatar {
  width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft);
  color: var(--primary); font-size: 12px; font-weight: 800; flex: none;
}
.cell-main { display: inline-flex; flex-direction: column; vertical-align: middle; margin-left: 8px; }
.cell-main strong { font-size: 11.5px; font-weight: 650; }
.cell-main span { font-size: 9.5px; color: var(--text-3); margin-top: 1px; }
.table-empty { text-align: center !important; color: var(--text-3); padding: 30px 0 !important; font-size: 11.5px; }

/* ---------- 徽章 ---------- */
.src-badge {
  height: 19px; padding: 0 8px; border-radius: 6px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .03em; flex: none; white-space: nowrap;
  background: color-mix(in srgb, var(--src, var(--primary)) 13%, transparent);
  color: color-mix(in srgb, var(--src, var(--primary)) 88%, var(--text));
}
[data-theme="dark"] .src-badge {
  background: color-mix(in srgb, var(--src, var(--primary)) 22%, transparent);
  color: color-mix(in srgb, var(--src, var(--primary)) 70%, #fff);
}
.qtype-badge {
  height: 19px; padding: 0 7px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); flex: none; white-space: nowrap;
}
.qtype-badge.multi { background: var(--warning-soft); color: var(--warning); }
.mod-badge {
  height: 19px; padding: 0 7px; border-radius: 6px; font-size: 9.5px; font-weight: 650;
  background: var(--surface-3); color: var(--text-2); flex: none; white-space: nowrap;
}
.q-chapter, .qz-chapter {
  font-size: 9.5px; color: var(--text-3); max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; padding: 0 2px;
}
.sample-tag {
  height: 19px; padding: 0 7px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); flex: none;
}
.mis-stat {
  height: 19px; padding: 0 7px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  background: var(--danger-soft); color: var(--danger); flex: none;
}
.mis-stat.mastered { background: var(--success-soft); color: var(--success); }
.rate-tag {
  min-width: 48px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10px;
  font-weight: 800; background: var(--surface-3); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.rate-tag.high { background: var(--success-soft); color: var(--success); }
.rate-tag.mid { background: var(--warning-soft); color: var(--warning); }
.rate-tag.low { background: var(--danger-soft); color: var(--danger); }
.card-head-tag {
  flex: none; padding: 5px 11px; border-radius: 8px; font-size: 10px; font-weight: 650;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}

/* ---------- 提示条 ---------- */
.notice-bar {
  display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 13px 16px;
  border-radius: 13px; border: 1px solid var(--border); background: var(--primary-softer);
  color: var(--text-2); font-size: 11.5px; line-height: 1.65;
}
.notice-bar > svg { width: 17px; height: 17px; flex: none; color: var(--primary); }
.notice-bar strong { color: var(--text); font-weight: 750; }
.notice-bar > .btn, .notice-bar > a { margin-left: auto; flex: none; }
.notice-bar.warn {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}
.notice-bar.warn > svg { color: var(--warning); }

/* ---------- 登录页题卡 ---------- */
.floating-question { display: flex; flex-direction: column; }
.floating-question strong {
  display: block; margin: 10px 0 13px; font-size: 14.5px; line-height: 1.5; font-weight: 650;
}
.floating-opts { display: flex; flex-direction: column; gap: 7px; list-style: none; }
.floating-opts li {
  padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-size: 11px; line-height: 1.5;
  transition: .25s;
}
.floating-opts li.on {
  border-color: var(--primary); background: var(--primary-softer);
  color: var(--primary); font-weight: 700;
}
.qtype-chip {
  height: 19px; padding: 0 8px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center;
}

/* ---------- 题目卡片 ---------- */
.q-list { display: flex; flex-direction: column; gap: 13px; }
.q-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; transition: border-color .2s, box-shadow .2s;
}
.q-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.q-card.expanded { border-color: color-mix(in srgb, var(--primary) 32%, transparent); }
.q-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 11px;
}
.q-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.q-id {
  flex: none; font-size: 10px; font-weight: 700; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.q-stem { font-size: 13px; line-height: 1.8; font-weight: 550; margin-bottom: 12px; }
.q-opts { display: flex; flex-direction: column; gap: 7px; }
.q-opt {
  padding: 8px 11px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid transparent; color: var(--text-2); font-size: 11.5px; line-height: 1.65;
}
.q-opt.right {
  background: var(--success-soft); color: var(--success); font-weight: 700;
  border-color: color-mix(in srgb, var(--success) 26%, transparent);
}
.q-detail {
  display: flex; flex-direction: column; gap: 10px; margin-top: 13px; padding-top: 13px;
  border-top: 1px dashed var(--border);
}
.q-answer-line { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--text-2); }
.q-answer-line span { color: var(--text-3); }
.q-answer-line strong {
  min-width: 34px; height: 24px; padding: 0 10px; border-radius: 7px; font-size: 12px;
  letter-spacing: .07em; background: var(--success-soft); color: var(--success); font-weight: 800;
}
.q-analysis { padding: 13px 14px; border-radius: 11px; background: var(--surface-2); }
.qa-label {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px;
  font-size: 10.5px; font-weight: 750; color: var(--primary);
}
.qa-label svg { width: 13px; height: 13px; }
.q-analysis p { font-size: 11.5px; line-height: 1.85; color: var(--text-2); }
.q-keypoint { font-size: 10.5px; color: var(--text-3); }
.q-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.qz-text, .modal-stem { word-break: break-word; }

/* ---------- 开始刷题页 ---------- */
.practice-hero, .plan-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 26px;
  padding: 26px 30px; margin-bottom: 22px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--gradient-soft);
}
.plan-hero-left, .ph-copy { min-width: 0; }
.practice-hero h2, .plan-hero h2 {
  margin: 11px 0 9px; font-size: 21px; font-weight: 750; letter-spacing: -.015em; line-height: 1.35;
}
.practice-hero h2 span, .plan-hero h2 span { color: var(--primary); }
.practice-hero p, .plan-hero p { max-width: 560px; font-size: 11.5px; line-height: 1.8; color: var(--text-2); }
.plan-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.ring-wrap { position: relative; width: 142px; height: 142px; flex: none; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-fg {
  fill: none; stroke: var(--primary); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.7; transition: stroke-dashoffset .85s var(--ease);
}
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ring-text strong { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.ring-text span { font-size: 10px; color: var(--text-3); }

.scope-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 13px; margin-bottom: 22px;
}
.scope-card {
  display: flex; align-items: center; gap: 13px; padding: 16px 17px; border-radius: 15px;
  border: 1px solid var(--border); background: var(--surface); text-align: left; transition: .2s;
}
.scope-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: var(--shadow-sm); transform: translateY(-2px);
}
.scope-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--primary-soft); color: var(--primary);
}
.scope-icon svg { width: 19px; height: 19px; }
.scope-body { flex: 1; min-width: 0; }
.scope-body strong { display: block; font-size: 12px; font-weight: 700; }
.scope-body span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.55; color: var(--text-3); }
.scope-count {
  flex: none; padding: 5px 9px; border-radius: 8px; font-size: 10px; font-weight: 800;
  background: var(--primary-softer); color: var(--primary); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.scope-card > svg { width: 15px; height: 15px; flex: none; color: var(--text-3); }

.compose-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px;
}
.compose-grid .field > label {
  display: block; margin-bottom: 10px; font-size: 10.5px; font-weight: 700;
  color: var(--text-2); letter-spacing: .02em;
}
.compose-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.compose-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pref-inline { display: flex; align-items: center; gap: 12px; }
.pref-inline strong { display: block; font-size: 11px; font-weight: 650; }
.pref-inline span { display: block; margin-top: 2px; font-size: 10px; color: var(--text-3); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  height: 32px; padding: 0 11px; border-radius: 9px; font-size: 11px; font-weight: 650;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
  gap: 6px; transition: .16s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--primary-soft); color: var(--primary); font-weight: 750;
  border-color: color-mix(in srgb, var(--primary) 42%, transparent);
}
.chip em {
  font-style: normal; padding: 1px 5px; border-radius: 5px; font-size: 9px;
  font-weight: 700; background: var(--surface); color: var(--text-3);
}

/* 题库覆盖 */
.cover-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.cover-item { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.cover-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.cover-head > span:last-child { font-size: 10.5px; font-weight: 800; color: var(--text-2); }
.cover-bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cover-bar i { display: block; height: 100%; border-radius: 4px; transition: width .7s var(--ease); }
.cover-item p { margin-top: 9px; font-size: 10px; line-height: 1.6; color: var(--text-3); }
.cover-pill { gap: 6px; font-size: 10.5px; font-weight: 750; color: var(--text-2); }
.module-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.module-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px;
  background: var(--surface-2); font-size: 10.5px; font-weight: 650; color: var(--text-2);
}
.module-pill em { font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--primary); }

/* ---------- 筛选 ---------- */
.filter-card { padding: 16px 18px 18px; margin-bottom: 18px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row .select { max-width: 178px; height: 38px; }
.filter-row .search-box { flex: 1; min-width: 200px; max-width: 320px; }
.bank-search { max-width: 340px; }
.compact-search { width: 200px; flex: none; }
.bank-summary { margin-top: 13px; font-size: 10.5px; color: var(--text-3); }
.bank-summary strong { color: var(--primary); font-weight: 800; }

/* ---------- 刷题页 ---------- */
.qz-page { display: flex; flex-direction: column; gap: 16px; }
.qz-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.qz-top-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qz-mode-tag {
  height: 25px; padding: 0 11px; border-radius: 8px; font-size: 10.5px; font-weight: 750;
  background: var(--primary-soft); color: var(--primary);
}
.qz-scope-tag {
  height: 25px; padding: 0 10px; border-radius: 8px; font-size: 10.5px; font-weight: 650;
  background: var(--surface-2); color: var(--text-2);
}
.qz-top-right { display: flex; align-items: center; gap: 11px; flex: none; }
.qz-progress-text { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.qz-progress-text strong { font-size: 13.5px; font-weight: 800; color: var(--text); }
.qz-progress { width: 120px; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.qz-progress i { display: block; height: 100%; border-radius: 4px; background: var(--gradient); transition: width .45s var(--ease); }
.qz-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.qz-card {
  padding: 28px 30px 24px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.qz-stem { font-size: 15.5px; line-height: 1.9; font-weight: 650; letter-spacing: -.005em; }
.qz-entrance-hint {
  display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 15px;
  border-radius: 12px; background: var(--surface-2); color: var(--text-3);
  font-size: 11px; line-height: 1.6; animation: fadeIn .28s var(--ease);
}
.qz-entrance-hint svg { width: 15px; height: 15px; flex: none; color: var(--primary); }

.qz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.qz-option {
  display: flex; align-items: flex-start; gap: 13px; min-height: 54px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2);
  text-align: left; transition: .16s;
}
.qz-option:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-softer);
}
.qz-option:disabled { cursor: default; }
.qz-key {
  width: 27px; height: 27px; border-radius: 9px; flex: none; font-size: 12px; font-weight: 800;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; transition: .16s;
}
.qz-option .qz-text { flex: 1; padding-top: 3px; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.qz-mark {
  flex: none; width: 20px; height: 20px; margin-top: 3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.qz-mark svg { width: 17px; height: 17px; }
.qz-option.picked { border-color: var(--primary); background: var(--primary-softer); }
.qz-option.picked .qz-key { background: var(--primary); color: #fff; border-color: var(--primary); }
.qz-option.picked .qz-text { color: var(--text); font-weight: 650; }
.qz-option.right {
  border-color: color-mix(in srgb, var(--success) 45%, transparent); background: var(--success-soft);
}
.qz-option.right .qz-key { background: var(--success); color: #fff; border-color: var(--success); }
.qz-option.right .qz-text { color: var(--text); font-weight: 650; }
.qz-option.right .qz-mark { color: var(--success); }
.qz-option.wrong {
  border-color: color-mix(in srgb, var(--danger) 42%, transparent); background: var(--danger-soft);
}
.qz-option.wrong .qz-key { background: var(--danger); color: #fff; border-color: var(--danger); }
.qz-option.wrong .qz-text { color: var(--text); }
.qz-option.wrong .qz-mark { color: var(--danger); }
.qz-option.muted { opacity: .55; }

.qz-answer {
  display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 15px;
  border-radius: 12px; background: var(--success-soft); animation: fadeIn .26s var(--ease);
}
.qz-answer span { font-size: 11px; font-weight: 650; color: var(--text-2); }
.qz-answer strong {
  padding: 4px 12px; border-radius: 8px; font-size: 14px; font-weight: 850;
  letter-spacing: .1em; background: var(--surface); color: var(--success);
}
.qz-analysis {
  margin-top: 13px; padding: 16px 17px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--border); animation: fadeIn .26s var(--ease);
}
.qz-analysis-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px;
  font-size: 11.5px; font-weight: 750; color: var(--primary);
}
.qz-analysis-head svg { width: 15px; height: 15px; flex: none; }
.qz-analysis-head em {
  margin-left: auto; padding: 3px 8px; border-radius: 6px; font-style: normal;
  font-size: 10px; font-weight: 650; color: var(--text-3); background: var(--surface);
}
.qz-analysis p { font-size: 12px; line-height: 1.9; color: var(--text-2); }
.qz-analysis-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 11px; border-top: 1px dashed var(--border);
  font-size: 10px; color: var(--text-3);
}

.qz-submit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.qz-submit-hint { flex: 1; min-width: 170px; font-size: 10.5px; line-height: 1.65; color: var(--text-3); }
.qz-self-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 24px; }
.qz-self-actions .btn { flex: 1; min-width: 170px; height: 46px; font-size: 12px; }
.qz-hint { margin-top: 12px; text-align: center; font-size: 10.5px; color: var(--text-3); }
.qz-next-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 22px; }
.qz-next-row .btn-next { min-width: 148px; height: 44px; }
.qz-auto-hint { font-size: 10.5px; color: var(--text-3); }
.qz-auto-hint b { font-size: 12px; color: var(--primary); font-variant-numeric: tabular-nums; }
.qz-requeue-hint {
  margin-left: auto; padding: 6px 10px; border-radius: 8px; font-size: 10px;
  color: var(--text-3); background: var(--surface-2);
}
.qz-foot-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 15px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 10.5px; color: var(--text-3);
}
.qz-kbd-hint { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qz-kbd-hint kbd, .qz-key-hint kbd {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 5px; font-size: 9.5px;
  font-family: inherit; font-weight: 700; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-submit-hint { font-size: 10px; opacity: .75; }

/* 完成页 */
.qz-complete { text-align: center; padding: 40px 26px 34px; }
.complete-badge {
  width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 18px;
  background: var(--success-soft); color: var(--success);
}
.complete-badge svg { width: 30px; height: 30px; }
.qz-complete h2 { font-size: 21px; font-weight: 750; letter-spacing: -.015em; }
.complete-note { margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
.complete-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin: 26px 0; text-align: left;
}
.complete-stats .cs-item { padding: 15px 16px; border-radius: 13px; background: var(--surface-2); }
.complete-stats .cs-item span { display: block; font-size: 10px; color: var(--text-3); }
.complete-stats .cs-item strong {
  display: block; margin-top: 5px; font-size: 20px; font-weight: 800; letter-spacing: -.02em;
}
.cs-item.good strong { color: var(--success); }
.cs-item.bad strong { color: var(--danger); }
.complete-actions { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.qz-empty { padding: 50px 20px; text-align: center; }
.qz-empty-icon {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px;
  background: var(--surface-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.qz-empty-icon svg { width: 26px; height: 26px; }
.qz-empty h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.qz-empty p { font-size: 11.5px; color: var(--text-3); line-height: 1.7; max-width: 420px; margin: 0 auto 20px; }

/* ---------- 数据统计 ---------- */
.dual { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.donut-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut-svg { width: 132px; height: 132px; flex: none; transform: rotate(-90deg); }
.donut-bg { fill: none; stroke: var(--surface-3); stroke-width: 11; }
.donut-fg {
  fill: none; stroke: var(--primary); stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset .9s var(--ease);
}
.donut-legend, .legend-list { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 130px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-2); }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.legend-item strong { margin-left: auto; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

.weak-list { display: flex; flex-direction: column; gap: 11px; }
.weak-item { display: flex; flex-direction: column; gap: 7px; }
.weak-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 10.5px; color: var(--text-2); font-weight: 600;
}
.weak-meta em { font-style: normal; font-weight: 800; color: var(--text-3); font-variant-numeric: tabular-nums; }
.weak-bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.weak-bar i { display: block; height: 100%; border-radius: 4px; transition: width .7s var(--ease); }

.history-mini { display: flex; flex-direction: column; gap: 6px; }
.hm-row { display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--text-3); }
.hm-day { width: 46px; flex: none; font-variant-numeric: tabular-nums; }
.hm-bar { flex: 1; height: 18px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hm-bar i { display: block; height: 100%; border-radius: 6px; background: var(--primary-soft); transition: width .7s var(--ease); }
.hm-num { width: 44px; flex: none; text-align: right; font-weight: 750; color: var(--text-2); font-variant-numeric: tabular-nums; }

.source-stat-list { display: flex; flex-direction: column; gap: 13px; }
.source-stat { display: flex; flex-direction: column; gap: 7px; }
.ss-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.ss-head strong { font-weight: 750; font-variant-numeric: tabular-nums; }
.ss-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: flex; }
.ss-bar i { display: block; height: 100%; transition: width .7s var(--ease); }
.ss-bar i.right { background: var(--success); }
.ss-bar i.wrong { background: var(--danger); }

/* ---------- 刷题计划 ---------- */
.plan-side { display: flex; flex-direction: column; gap: 16px; }
.plan-mini { display: flex; flex-direction: column; gap: 0; }
.plan-mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-2);
}
.plan-mini-row:last-child { border-bottom: 0; }
.plan-mini-row strong { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-progress-row { margin-top: 4px; }
.plan-tip {
  display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 11px;
  background: var(--primary-softer); font-size: 10.5px; line-height: 1.65; color: var(--text-2);
}
.plan-tip svg { width: 14px; height: 14px; flex: none; color: var(--primary); margin-top: 1px; }
.target-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.target-input { width: 110px; }

/* ---------- 搜索页 ---------- */
.search-hero-box { margin-bottom: 20px; }
.hot-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.hot-tag {
  padding: 5px 10px; border-radius: 8px; font-size: 10.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid transparent; transition: .16s;
}
.hot-tag:hover { border-color: var(--border-strong); color: var(--primary); }
.quick-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 错题本 / 收藏 ---------- */
.fav-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px; border-radius: 12px; background: var(--surface-2);
  font-size: 11px; color: var(--text-2); margin-bottom: 16px;
}
.fav-summary strong { color: var(--text); font-weight: 800; }
.fav-count { margin-left: auto; font-size: 10.5px; color: var(--text-3); }
.fav-mix { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 管理后台 ---------- */
.admin-hero { margin-bottom: 18px; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; }
.kpi-card {
  display: flex; align-items: center; gap: 13px; padding: 16px 17px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--border);
}
.kpi-card .stat-icon { width: 38px; height: 38px; border-radius: 11px; flex: none; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; margin-bottom: 18px; }
.admin-bars { display: flex; flex-direction: column; gap: 11px; }
.ab-row { display: flex; align-items: center; gap: 11px; font-size: 10.5px; }
.ab-label { width: 78px; flex: none; color: var(--text-2); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-track { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ab-track i { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .7s var(--ease); }
.ab-row strong { width: 42px; flex: none; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.admin-q-list { display: flex; flex-direction: column; gap: 12px; }
.admin-q-item {
  padding: 15px 17px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); transition: .18s;
}
.admin-q-item:hover { border-color: var(--border-strong); }
.admin-q-item.offline { opacity: .68; background: var(--surface-2); }
.aq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.aq-stem { font-size: 12px; line-height: 1.75; font-weight: 550; margin-bottom: 9px; }
.aq-opts { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.aq-opts span { font-size: 10.5px; line-height: 1.6; color: var(--text-3); }
.aq-opts span.right { color: var(--success); font-weight: 650; }
.aq-foot { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 10px; color: var(--text-3); }
.aq-ans strong { color: var(--success); font-weight: 800; letter-spacing: .06em; }
.aq-chap { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }

.login-feed { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
.lf-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.lf-row:last-child { border-bottom: 0; }
.lf-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-3); }
.lf-dot.ok { background: var(--success); }
.lf-dot.bad { background: var(--danger); }
.lf-main { flex: 1; min-width: 0; }
.lf-main strong { display: block; font-size: 11px; font-weight: 650; }
.lf-main span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-time { flex: none; font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.user-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.ud-block h4 { font-size: 11.5px; font-weight: 750; margin-bottom: 10px; color: var(--text-2); }
.ud-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow: auto; }
.ud-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ud-row:last-child { border-bottom: 0; }
.ud-row > div { flex: 1; min-width: 0; }
.ud-row strong { display: block; font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-row span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 1px; }
.ud-row em { flex: none; font-style: normal; font-size: 9.5px; color: var(--text-3); }
.ud-plan {
  margin-top: 16px; padding: 12px 15px; border-radius: 11px; background: var(--surface-2);
  font-size: 10.5px; color: var(--text-2);
}

/* 题目编辑 */
.q-edit-form .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.q-edit-form .form-grid.three { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt-editor { display: flex; flex-direction: column; gap: 8px; }
.opt-row { display: flex; align-items: center; gap: 9px; }
.opt-answer {
  width: 34px; height: 34px; flex: none; border-radius: 9px; font-size: 12px; font-weight: 800;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); transition: .16s;
}
.opt-answer:hover { border-color: var(--border-strong); }
.opt-editor.multi-mode .opt-answer { border-radius: 8px; }
.opt-answer.on { background: var(--success); color: #fff; border-color: var(--success); }
.opt-row .input { flex: 1; }
.opt-toolbar { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 10px; }
.import-preview { margin-top: 6px; }
.ip-head { font-size: 10.5px; color: var(--text-3); margin-bottom: 8px; }
.ip-item { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); margin-bottom: 7px; }
.ip-item strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.6; }
.ip-item span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--text-3); }

/* ---------- 表格 & 分页 ---------- */
.table-scroll { width: 100%; overflow-x: auto; }
.slim th, .slim td { padding: 10px 11px; font-size: 10.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .practice-hero, .plan-hero { grid-template-columns: 1fr; gap: 20px; padding: 22px 22px; }
  .ring-wrap { width: 118px; height: 118px; }
  .ring-text strong { font-size: 20px; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .qz-card { padding: 20px 16px 18px; border-radius: 16px; }
  .qz-stem { font-size: 14.5px; line-height: 1.85; }
  .qz-option { padding: 12px 13px; gap: 11px; border-radius: 12px; }
  .qz-option .qz-text { font-size: 12px; }
  .qz-top { gap: 10px; }
  .qz-progress { width: 90px; }
  .qz-self-actions .btn { min-width: 130px; height: 44px; }
  .qz-next-row .btn-next { flex: 1; }
  .qz-requeue-hint { margin-left: 0; }
  .qz-kbd-hint { display: none; }
  .scope-grid { grid-template-columns: 1fr; gap: 10px; }
  .scope-card { padding: 14px 15px; }
  .compose-grid { grid-template-columns: 1fr; gap: 18px; }
  .compose-foot { flex-direction: column; align-items: stretch; }
  .compose-foot .btn { width: 100%; }
  .practice-hero, .plan-hero { padding: 20px 18px; border-radius: 16px; }
  .practice-hero h2, .plan-hero h2 { font-size: 18.5px; }
  .ring-wrap { display: none; }
  .filter-row .select, .filter-row .search-box, .compact-search { max-width: none; width: 100%; }
  .aq-actions { margin-left: 0; width: 100%; }
  .admin-kpis { grid-template-columns: repeat(2, 1fr); }
  .complete-stats { grid-template-columns: repeat(2, 1fr); }
  .notice-bar { flex-wrap: wrap; align-items: flex-start; }
  .notice-bar > .btn { margin-left: 0; width: 100%; justify-content: center; }
  .q-card { padding: 15px 16px; border-radius: 14px; }
  .donut-svg { width: 108px; height: 108px; }
  .ud-row em { display: none; }
}

@media (max-width: 420px) {
  .admin-kpis { grid-template-columns: 1fr; }
  .qz-key { width: 24px; height: 24px; font-size: 11px; }
  .qz-mode-tag, .qz-scope-tag { height: 23px; font-size: 10px; }
  .qz-progress-text strong { font-size: 12.5px; }
}

@media print {
  .sidebar, .topbar, .qz-foot-bar, .complete-actions { display: none !important; }
  .qz-card, .q-card { box-shadow: none; break-inside: avoid; }
}

/* ---------- 补齐细节 ---------- */
.ph-ring { display: flex; align-items: center; justify-content: center; }
.next-label { font-weight: 700; }
.btn-submit { min-width: 128px; height: 42px; }
.btn:disabled, button:disabled { opacity: .5; cursor: not-allowed; }
.stat-grid.compact { gap: 11px; margin-bottom: 16px; }
.activity-chart.tall { height: 190px; }

.book-select-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.book-pick {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); text-align: left; transition: .18s;
}
.book-pick:hover { border-color: var(--border-strong); }
.book-pick.selected {
  border-color: color-mix(in srgb, var(--primary) 48%, transparent);
  background: var(--primary-softer);
}
.bp-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bp-body { flex: 1; min-width: 0; }
.bp-body strong { display: block; font-size: 11.5px; font-weight: 700; }
.bp-body span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--text-3); }
.book-pick em {
  flex: none; font-style: normal; font-size: 10px; font-weight: 800;
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.book-pick.selected em { color: var(--primary); }

/* ---------- 快捷入口 ---------- */
.quick-links { display: flex; gap: 9px; flex-wrap: wrap; }
.quick-links a {
  display: inline-flex; align-items: center; gap: 7px; flex: 1; min-width: 130px;
  padding: 11px 13px; border-radius: 11px; font-size: 11px; font-weight: 650;
  color: var(--text-2); background: var(--surface-2); border: 1px solid transparent;
  transition: .16s;
}
.quick-links a:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary); }
.quick-links a > svg { width: 15px; height: 15px; flex: none; }
.quick-links a em {
  margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800;
  color: var(--primary); font-variant-numeric: tabular-nums;
}

/* 浅色 hero 中的按钮（开始刷题 / 计划） */
.practice-hero .hero-actions, .plan-hero .hero-actions { margin-top: 18px; }
.practice-hero .btn-hero, .plan-hero .btn-hero {
  background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
  border: 1px solid var(--primary);
}
.practice-hero .btn-hero:hover, .plan-hero .btn-hero:hover { background: var(--primary-2); border-color: var(--primary-2); }
.practice-hero .btn-hero-2, .plan-hero .btn-hero-2 {
  background: var(--surface); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 34%, transparent);
}
.practice-hero .btn-hero-2:hover, .plan-hero .btn-hero-2:hover {
  background: var(--primary-softer); border-color: var(--primary);
}
.practice-hero .hero-kicker, .plan-hero .hero-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 9.5px; font-weight: 750; letter-spacing: .1em;
  color: var(--primary); text-transform: uppercase;
}
.practice-hero .hero-kicker i, .plan-hero .hero-kicker i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* 近14天 记录行：防换行拥挤 */
.hm-row { gap: 8px; }
.hm-day { width: 40px; font-size: 9.5px; }
.hm-num {
  width: auto; min-width: 34px; white-space: nowrap; font-size: 9.5px;
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px;
}
.hm-num em { font-style: normal; font-weight: 800; color: var(--text-2); }
.hm-num span { color: var(--text-3); font-weight: 600; }

/* ============================================================
   修复层 v2：布局塌陷 / 偏移 / 图表错位
   ============================================================ */

/* ---------- 通用进度条 ---------- */
.bar { position: relative; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--gradient); transition: width .7s var(--ease); }
.plan-progress-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.plan-progress-row .bar { flex: 1; min-width: 60px; height: 6px; }
.plan-progress-row b { flex: none; font-size: 11px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.ok { color: var(--success); }
.bad { color: var(--danger); }

/* ---------- 计划页 hero 统计 ---------- */
.plan-hero-stats {
  display: grid; grid-template-columns: repeat(2, minmax(88px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; flex: none; min-width: 200px;
}
.plan-hero-stats > div { padding: 13px 16px; background: var(--surface); text-align: left; }
.plan-hero-stats span { display: block; font-size: 9.5px; font-weight: 650; color: var(--text-3); letter-spacing: .02em; }
.plan-hero-stats strong {
  display: block; margin-top: 4px; font-size: 20px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.plan-hero-stats strong.ok { color: var(--success); }
.plan-hero-stats strong.bad { color: var(--danger); }

/* ---------- 计划页表单区块 ---------- */
.form-section { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.form-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 13px; flex-wrap: wrap;
}
.form-section-head > strong {
  font-size: 13px; font-weight: 750; color: var(--text); letter-spacing: -.01em;
}
.form-section-head > span {
  font-size: 10px; font-weight: 600; color: var(--text-3); text-align: right;
}
.form-section-head > p { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.plan-form { gap: 22px !important; }

/* 每日题量步进器 */
.target-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.target-input {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 0 12px; height: 44px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.target-input input {
  width: 54px; border: 0; background: transparent; outline: 0; text-align: right;
  font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--text);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.target-input input::-webkit-outer-spin-button,
.target-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.target-input span { font-size: 10px; font-weight: 650; color: var(--text-3); white-space: nowrap; }
.step-btn {
  width: 44px; height: 44px; flex: none; border-radius: 12px; font-size: 12px; font-weight: 800;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); transition: .16s;
}
.step-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.step-btn:active { transform: scale(.96); }

/* 来源选择：3 列自适应，避免两列留空 */
.book-select-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 9px; }
.book-pick { padding: 11px 13px; gap: 10px; min-height: 58px; }
.book-pick .bp-body strong { font-size: 11.5px; }
.book-pick .bp-body span { font-size: 9.5px; line-height: 1.45; }
.book-pick em { font-size: 10px; }

/* 计划侧栏 */
.plan-side { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.plan-mini-row { padding: 10px 0; font-size: 11px; }
.plan-mini-row > span { color: var(--text-3); }
.plan-mini-row > strong { font-size: 12.5px; font-weight: 800; }

/* 近 14 天列表：定宽栅格，杜绝竖排 */
.history-mini { display: flex; flex-direction: column; gap: 5px; }
.hm-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 52px; align-items: center; gap: 8px; }
.hm-day { width: auto; font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-bar { height: 16px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.hm-bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary-3), var(--primary)); }
.hm-num {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 5px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.hm-num em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--text-2); }
.hm-num span { font-size: 9px; color: var(--text-3); font-weight: 600; }
.hm-row.is-zero .hm-num em { color: var(--text-3); }
.hm-row.is-today .hm-day { color: var(--primary); font-weight: 800; }

/* ---------- 环形图（修正定位） ---------- */
.donut-row { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.donut-wrap { position: relative; width: 132px; height: 132px; flex: none; }
.donut-wrap svg, .donut-svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.donut-bg { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.donut-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; text-align: center; padding: 0 8px;
}
.donut-center strong { font-size: 22px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.donut-center span { font-size: 9px; font-weight: 650; color: var(--text-3); white-space: nowrap; }
.donut-center em { font-style: normal; font-size: 8.5px; color: var(--text-3); opacity: .85; white-space: nowrap; }
.donut-item { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.donut-item > span {
  font-size: 10px; font-weight: 700; color: var(--text-2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.donut-item > span i { width: 7px; height: 7px; border-radius: 3px; flex: none; }

/* ---------- 柱状图（修正绝对定位逃逸） ---------- */
.chart-wrap { position: relative; }
.chart-bars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100%; min-height: 0; }
.chart-bars > i { display: block; border-radius: 4px 4px 2px 2px; transition: height .6s var(--ease); }
.chart-bars.dual { gap: 2px; align-items: flex-end; }
.chart-bars.dual > i.total { background: var(--primary); opacity: .9; }
.chart-bars.dual > i.right { background: var(--success); opacity: .85; }
.chart-bars > i.zero { background: var(--surface-3); height: 3px !important; border-radius: 2px; }
.chart-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 7px; height: 100%; justify-content: flex-end; }
.chart-col .chart-value {
  font-size: 8px; font-weight: 800; color: var(--text-3); text-align: center;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.chart-col.today .chart-value { color: var(--primary); }
.chart-col > span {
  font-size: 8.5px; color: var(--text-3); text-align: center; white-space: nowrap;
  font-variant-numeric: tabular-nums; height: 12px; line-height: 12px;
}
.chart-col.today > span { color: var(--primary); font-weight: 800; }
.chart-legend { display: flex; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-3); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--primary); flex: none; }
.chart-legend i.right { background: var(--success); }
.chart-legend b { color: var(--text-2); font-weight: 750; }

/* ---------- 搜索页（重建） ---------- */
.sr-hero {
  padding: 26px 28px 24px; border-radius: 20px; margin-bottom: 20px;
  background: var(--gradient-soft); border: 1px solid var(--border);
}
.sr-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.sr-head-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--surface); border: 1px solid var(--border); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.sr-head-icon svg { width: 18px; height: 18px; }
.sr-head h2 { font-size: 18px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; }
.sr-head p { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }

.sr-input {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
  box-shadow: var(--shadow-xs); transition: .2s;
}
.sr-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-softer); }
.sr-input > svg { width: 17px; height: 17px; flex: none; color: var(--text-3); }
.sr-input input {
  flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; outline: 0;
  font-size: 14px; color: var(--text);
}
.sr-input input::placeholder { color: var(--text-3); font-size: 12.5px; }
.sr-input .btn { flex: none; height: 40px; min-height: 40px; padding: 0 20px; border-radius: 11px; font-size: 12px; }

.sr-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 15px; }
.sr-meta > label { font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.sr-hot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 15px; }
.sr-hot > label { font-size: 10px; font-weight: 700; color: var(--text-3); margin-right: 2px; letter-spacing: .04em; }
.hot-tag {
  height: 28px; padding: 0 11px; border-radius: 8px; font-size: 10.5px; font-weight: 600;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border); transition: .16s;
}
.hot-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }

/* 搜索引导空态 */
.sr-guide { text-align: center; padding: 46px 24px 40px; }
.sr-guide-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.sr-guide-icon svg { width: 26px; height: 26px; }
.sr-guide h3 { font-size: 15px; font-weight: 750; }
.sr-guide p { font-size: 11px; color: var(--text-3); line-height: 1.75; margin-top: 7px; max-width: 420px; margin-left: auto; margin-right: auto; }
.sr-guide-links { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.sr-guide-links a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  font-size: 11px; font-weight: 650; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border); transition: .16s;
}
.sr-guide-links a:hover { border-color: var(--primary); color: var(--primary); }
.sr-guide-links svg { width: 14px; height: 14px; flex: none; }

.sr-result-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sr-result-head h3 { font-size: 13px; font-weight: 700; color: var(--text-2); }
.sr-result-head h3 strong { color: var(--primary); font-weight: 800; }

/* ---------- 数据统计栅格 ---------- */
.stats-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .72fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.stats-grid > *, .stats-grid .card { min-width: 0; }
.weak-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.weak-meta { display: contents; }
.weak-meta > strong { font-size: 11px; font-weight: 700; grid-column: 1; }
.weak-meta > span { font-size: 10px; color: var(--text-3); grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }
.weak-bar { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.weak-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .7s var(--ease); }
.weak-bar > i.rate-high { background: var(--success); }
.weak-bar > i.rate-mid { background: var(--warning); }
.weak-bar > i.rate-low { background: var(--danger); }
.weak-item > .btn { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
.weak-list { display: flex; flex-direction: column; gap: 14px; }

/* 来源分布 */
.source-stat-list { display: flex; flex-direction: column; gap: 15px; }
.source-stat { display: flex; flex-direction: column; gap: 7px; }
.ss-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ss-head strong { font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ss-bar { display: flex; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ss-bar > i { display: block; height: 100%; border-radius: 4px; }
.source-stat > p { font-size: 9.5px; color: var(--text-3); }

/* 响应式 */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: 1fr; }
  .plan-hero-stats { min-width: 0; width: 100%; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .sr-hero { padding: 20px 16px; border-radius: 16px; }
  .sr-input { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .sr-input > svg { display: none; }
  .sr-input input { flex: 1 1 100%; height: 38px; font-size: 16px; padding: 0 4px; }
  .sr-input .btn { flex: 1 1 100%; min-height: 40px; }
  .plan-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .donut-row { gap: 18px; }
  .donut-wrap { width: 112px; height: 112px; }
  .donut-center strong { font-size: 18px; }
  .chart-col > span { font-size: 7.5px; }
  .chart-col .chart-value { display: none; }
  .hm-row { grid-template-columns: 40px minmax(0, 1fr) 46px; gap: 6px; }
  .form-section-head { flex-direction: column; align-items: flex-start; gap: 3px; }
  .form-section-head > span { text-align: left; }
}

/* ============================================================
 * Politics · 题库导入（文件 / 粘贴 / 手动）
 * ============================================================ */
.im-tabs { margin-bottom: 14px; }
.im-tabs button { display: inline-flex; align-items: center; gap: 7px; }
.im-tabs button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.im-defaults {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); margin-bottom: 14px;
}
.im-defaults label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.im-defaults label > span { font-size: 10px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.im-defaults .input, .im-defaults .select { min-width: 0; }
.im-pane[hidden] { display: none !important; }
.im-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 30px 20px; border: 1.5px dashed var(--border-strong, var(--border)); border-radius: 14px;
  background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color .18s, background .18s, transform .18s;
}
.im-drop:hover, .im-drop.over { border-color: var(--primary); background: var(--primary-softer); }
.im-drop.over { transform: scale(.995); }
.im-drop svg { width: 26px; height: 26px; stroke: var(--primary); fill: none; stroke-width: 1.6; }
.im-drop strong { font-size: 13px; font-weight: 650; color: var(--text-1); }
.im-drop span { font-size: 11px; color: var(--text-3); }
.im-drop em { font-style: normal; font-size: 10px; color: var(--text-3); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.im-actions .help-text { flex: 1; min-width: 180px; }
.im-manual-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2);
}
.im-manual-card > svg { width: 30px; height: 30px; flex: none; stroke: var(--primary); fill: none; stroke-width: 1.5; }
.im-manual-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.im-manual-card strong { font-size: 13px; }
.im-manual-card span { font-size: 11px; color: var(--text-3); line-height: 1.6; }
.im-status { margin-top: 14px; display: none; padding: 11px 13px; border-radius: 11px; font-size: 11px; line-height: 1.7; border: 1px solid var(--border); background: var(--surface-2); }
.im-status.ok, .im-status.warn, .im-status.error, .im-status.loading { display: block; }
.im-status.ok { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); background: var(--success-soft); }
.im-status.warn { border-color: color-mix(in srgb, var(--warning) 32%, var(--border)); background: var(--warning-soft); }
.im-status.error { border-color: color-mix(in srgb, var(--danger) 32%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.im-status strong { display: block; font-size: 12px; margin-bottom: 2px; }
.im-status span { color: var(--text-2); }
.im-status ul { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); }
.im-status li { margin: 2px 0; }
.im-spinner {
  display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px;
  border: 2px solid color-mix(in srgb, var(--primary) 22%, transparent); border-top-color: var(--primary);
  border-radius: 50%; animation: im-spin .7s linear infinite;
}
@keyframes im-spin { to { transform: rotate(360deg); } }
.im-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2);
}
.im-sum-left, .im-sum-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.im-count { font-size: 11px; color: var(--text-3); }
.im-count strong { color: var(--primary); }
.im-list { margin-top: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.im-q {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card, var(--surface-1, #fff));
  margin-bottom: 8px; transition: border-color .15s, background .15s;
}
.im-q.on { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.im-q.bad { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); background: color-mix(in srgb, var(--warning-soft) 35%, var(--card, #fff)); }
.im-check { display: inline-flex; align-items: center; gap: 6px; padding-top: 2px; cursor: pointer; font-size: 11px; }
.im-check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.im-q-body { min-width: 0; }
.im-q-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.im-no { font-size: 10px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.im-ans { margin-left: auto; font-size: 10px; color: var(--text-3); }
.im-ans strong { color: var(--success); font-size: 11px; letter-spacing: .04em; }
.im-stem { margin: 0 0 5px; font-size: 12px; line-height: 1.6; color: var(--text-1); font-weight: 550; }
.im-opts { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.im-opts span { font-size: 10.5px; line-height: 1.5; color: var(--text-3); }
.im-opts span.right { color: var(--success); font-weight: 600; }
.im-err { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 10px; color: var(--warning); }
.im-err svg { width: 12px; height: 12px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; }
.im-q-actions { display: flex; flex-direction: column; gap: 5px; }
.im-more { width: 100%; margin: 4px 0 6px; }
.im-purge { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.chip.ok { background: var(--success-soft); color: var(--success); }
.chip.warn { background: var(--warning-soft); color: var(--warning); }

@media (max-width: 760px) {
  .im-defaults { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .im-defaults { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .im-q { grid-template-columns: 22px minmax(0, 1fr); }
  .im-q-actions { grid-column: 2; flex-direction: row; justify-content: flex-end; }
  .im-ans { margin-left: 0; }
  .im-drop { padding: 22px 12px; }
  .im-tabs { display: flex; overflow-x: auto; }
  .im-tabs button { flex: none; }
  .im-list { max-height: none; }
}

@media (max-width: 560px) {
  #imText { max-height: 32vh; }
}
.im-status[hidden], .im-summary[hidden], .im-list[hidden], .im-purge[hidden] { display: none !important; }
.import-modal #imText { max-height: 30vh; }

/* ============================================================
 * Politics · 数据统计图表
 * ============================================================ */
.zz-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 210px;
  padding: 10px 4px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.zz-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.zz-col-top {
  height: 12px;
  font-size: 9px;
  line-height: 1;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.zz-bars {
  flex: 1 1 auto;
  width: 100%;
  max-width: 34px;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.zz-bar {
  display: block;
  width: 44%;
  min-height: 0;
  border-radius: 3px 3px 0 0;
}
.zz-bar.is-total { background: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.zz-bar.is-ok { background: var(--primary); }
.zz-bar.is-empty { width: 100%; height: 2px; border-radius: 2px; background: var(--border); }
.zz-col.is-today .zz-col-label { color: var(--primary); font-weight: 700; }
.zz-col.is-today .zz-bar.is-ok { background: var(--success); }
.zz-col-label {
  height: 12px;
  font-size: 8.5px;
  line-height: 1;
  color: var(--text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.zz-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-3);
}
.zz-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
}
.zz-dot.is-total { background: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.zz-dot.is-ok { background: var(--primary); }

.zz-donut { position: relative; width: 132px; height: 132px; flex: none; }
.zz-donut > svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.zz-donut-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.zz-donut-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.zz-donut-mid {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 18px;
}
.zz-donut-mid strong { font-size: 23px; line-height: 1.05; font-weight: 700; color: var(--text-1); }
.zz-donut-mid strong em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--text-3); margin-left: 1px; }
.zz-donut-mid span { margin-top: 3px; font-size: 9px; font-weight: 600; color: var(--text-2); }
.zz-donut-mid b { margin-top: 2px; font-size: 8px; font-weight: 500; color: var(--text-3); }

@media (max-width: 640px) {
  .zz-chart { gap: 3px; height: 170px; padding-left: 0; padding-right: 0; }
  .zz-col { gap: 4px; }
  .zz-col-top { font-size: 7.5px; }
  .zz-col-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    height: 34px;
    font-size: 7.5px;
    letter-spacing: 0;
  }
  .zz-donut { width: 116px; height: 116px; }
  .zz-donut-mid strong { font-size: 20px; }
  .donut-row { gap: 14px; justify-content: space-between; }
}
@media (max-width: 640px) {
  .zz-col:nth-child(odd) .zz-col-label { visibility: hidden; }
}

/* ============================================================
   考点背诵 · Knowledge Points
   ============================================================ */
.nav-item .nav-icon { line-height: 0; }
.nav-item .nav-icon svg { display: block; margin: auto; }
.stat-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid.five .stat-card { min-width: 0; }

.kp-stat-grid { margin-bottom: 18px; }
.kp-filter-card { padding: 16px 18px; margin-bottom: 18px; }
.kp-filter-row { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(120px, .65fr)) auto; gap: 10px; align-items: center; }
.kp-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.kp-search svg { width: 16px; height: 16px; color: var(--text-3); flex: none; stroke: currentColor; fill: none; }
.kp-search .input { border: 0; background: transparent; padding: 0; min-height: 40px; box-shadow: none; }
.kp-filter-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.kp-filter-tabs .chip { display: inline-flex; align-items: center; gap: 5px; }
.kp-filter-tabs .chip svg { width: 14px; height: 14px; }
.kp-filter-count { margin-left: auto; font-size: 12px; color: var(--text-3); }

.kp-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 12px; }
.kp-section-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.kp-section-head p { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kp-list { display: grid; gap: 12px; }
.kp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-xs); transition: border-color .2s, box-shadow .2s, transform .2s; }
.kp-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.kp-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kp-check { display: inline-flex; align-items: center; flex: none; cursor: pointer; }
.kp-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kp-check span { width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface); display: block; transition: .18s; }
.kp-check input:checked + span { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--surface); }
.kp-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.kp-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.kp-tag.subject { color: var(--primary); background: var(--primary-soft); }
.kp-tag.source { color: var(--violet); background: rgba(124, 108, 242, .12); }
.kp-tag.special { color: var(--warning); background: var(--warning-soft); }
[data-theme="dark"] .kp-tag.source { background: rgba(157, 145, 255, .14); }
.kp-status { font-size: 10.5px; font-weight: 650; color: var(--text-3); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); white-space: nowrap; }
.kp-status.mastered { color: var(--success); background: var(--success-soft); }
.kp-status.learning { color: var(--warning); background: var(--warning-soft); }
.kp-group { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.kp-stars { display: inline-flex; align-items: center; gap: 1px; margin-left: auto; flex: none; }
.kp-star { font-size: 15px; line-height: 1; color: var(--border-strong); padding: 2px; transition: color .15s, transform .15s; }
.kp-star:hover { transform: scale(1.12); }
.kp-star.on { color: #f4a51c; }
.kp-stars.compact .kp-star { font-size: 14px; }
.kp-text-btn { display: block; width: 100%; text-align: left; padding: 9px 0 2px; }
.kp-preview { font-size: 14px; line-height: 1.8; color: var(--text); word-break: break-word; writing-mode: horizontal-tb; }
.kp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; padding-top: 10px; border-top: 1px dashed var(--border); }
.kp-meta { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.kp-card-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kp-card-actions .btn { min-height: 30px; padding: 0 8px; font-size: 11.5px; }
.kp-fav.on { color: var(--primary); background: var(--primary-soft); }
.kp-selbar { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-glass); backdrop-filter: blur(14px); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; }
.kp-selbar.show { opacity: 1; visibility: visible; transform: translateY(0); }
.kp-selbar > div:first-child { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.kp-selbar strong { color: var(--primary); font-size: 15px; }
.kp-sel-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.kp-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr); gap: 16px; align-items: start; }
.kp-detail-main { min-width: 0; }
.kp-detail-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.kp-detail-top .kp-stars { margin-left: 0; }
.kp-detail-text { font-size: 15px; line-height: 2; color: var(--text); word-break: break-word; writing-mode: horizontal-tb; max-width: 100%; }
.kp-detail-text .kp-keyword { margin: 0 1px; }
.kp-detail-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.kp-note-box { margin-top: 18px; padding: 14px 15px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.kp-note-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kp-note-head strong { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.kp-note-head svg { width: 15px; height: 15px; }
.kp-note-box p { margin-top: 7px; font-size: 12.5px; line-height: 1.8; color: var(--text-2); }
.kp-detail-side { display: grid; gap: 14px; min-width: 0; }
.kp-detail-side .card { padding: 16px; }
.kp-q-list { display: grid; gap: 8px; margin-bottom: 12px; }
.kp-q-row { display: flex; gap: 9px; align-items: flex-start; }
.kp-q-row > div { min-width: 0; }
.kp-q-row strong { display: block; font-size: 12px; line-height: 1.55; font-weight: 600; }
.kp-q-row span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.kp-side-empty { font-size: 12px; line-height: 1.7; }
.kp-confuse-mini a, .kp-related a { display: block; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kp-confuse-mini a:last-child, .kp-related a:last-child { border-bottom: 0; padding-bottom: 0; }
.kp-confuse-mini strong { display: block; font-size: 12px; line-height: 1.55; font-weight: 600; }
.kp-confuse-mini span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.kp-related a { font-size: 12px; line-height: 1.6; color: var(--text-2); }
.kp-related a:hover { color: var(--primary); }
.kp-keyword { display: inline; background: var(--text); color: transparent; border-radius: 4px; padding: 0 3px; user-select: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.kp-detail-text.masked .kp-keyword, .kpr-text .kp-keyword { cursor: help; }

.kp-recite-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; margin-bottom: 18px; border-radius: var(--radius-lg); background: var(--gradient); color: #fff; box-shadow: var(--shadow); }
.kp-recite-hero h2 { font-size: clamp(22px, 2.5vw, 30px); line-height: 1.35; font-weight: 720; letter-spacing: -.03em; margin: 6px 0 5px; }
.kp-recite-hero h2 span { color: #d8e9ff; }
.kp-recite-hero p { font-size: 12.5px; color: rgba(255,255,255,.78); }
.kp-recite-hero .hero-kicker { color: rgba(255,255,255,.78); }
.kp-recite-quick { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.kp-recite-quick .btn-primary { background: #fff; color: var(--primary-deep); border-color: #fff; }
.kp-recite-quick .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.kp-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kp-mode-card { text-align: left; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); transition: .2s; }
.kp-mode-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.kp-mode-card.primary { background: var(--primary-softer); border-color: var(--primary); }
.kp-mode-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.kp-mode-icon svg { width: 19px; height: 19px; }
.kp-mode-card strong { display: block; font-size: 14.5px; font-weight: 680; }
.kp-mode-card p { font-size: 12px; line-height: 1.75; color: var(--text-2); margin-top: 6px; }
.kp-mode-card em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); margin-top: 10px; }

.kpr-page { max-width: 920px; margin: 0 auto; }
.kpr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kpr-top-mid { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; }
.kpr-mode-tag { font-size: 11px; font-weight: 650; color: var(--primary); background: var(--primary-soft); padding: 4px 9px; border-radius: 7px; white-space: nowrap; }
.kpr-progress { display: flex; align-items: center; gap: 8px; flex: 1; }
.kpr-progress > span { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.kpr-progress .bar { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.kpr-progress .bar i { display: block; height: 100%; border-radius: 5px; background: var(--primary); transition: width .25s; }
.kpr-top-right { display: flex; align-items: center; gap: 6px; }
.kpr-rate { min-height: 34px; width: 76px; padding: 0 8px; font-size: 12px; }
.kpr-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 38px); box-shadow: var(--shadow); min-height: 270px; }
.kpr-card-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; }
.kpr-card-top .kp-stars { margin-left: 0; }
.kpr-text { font-size: clamp(17px, 2.2vw, 22px); line-height: 2.05; color: var(--text); letter-spacing: .01em; word-break: break-word; writing-mode: horizontal-tb; }
.kpr-card.text-hidden .kpr-text { display: none; }
.kpr-reveal { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 150px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-3); font-size: 13px; background: var(--surface-2); }
.kpr-note { margin-top: 20px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.8; color: var(--text-2); }
.kpr-note svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.kpr-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.kpr-tools .btn { min-height: 32px; padding: 0 9px; font-size: 11.5px; }
.kpr-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.kpr-actions .btn { min-width: 150px; min-height: 48px; border-radius: 14px; font-size: 14px; }
.btn-known { background: var(--success); color: #fff; }
.btn-known:hover { background: #0b8a61; color: #fff; }
.btn-unknown { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(217,138,11,.25); }
.btn-unknown:hover { background: var(--warning); color: #fff; }
[data-theme="dark"] .btn-known { color: #061224; }
[data-theme="dark"] .btn-unknown:hover { color: #061224; }
.kpr-hint { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 12px; }
.kpr-confuse-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kpr-confuse-head span { font-size: 12px; font-weight: 650; color: var(--primary); }
.kpr-confuse-head p { font-size: 12px; color: var(--text-3); }
.kpr-pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpr-pair-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-xs); min-width: 0; }
.kpr-pair-label { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 750; margin-bottom: 10px; }
.kpr-pair-card .kp-tag { margin-right: 4px; }
.kpr-pair-text { font-size: 14.5px; line-height: 1.95; margin: 12px 0 16px; word-break: break-word; writing-mode: horizontal-tb; }
.kpr-pair-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.kpr-complete { max-width: 620px; margin: 6vh auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px 28px; box-shadow: var(--shadow); }
.kpr-complete .complete-badge { width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--gradient); color: #fff; box-shadow: 0 14px 30px rgba(37,99,235,.25); }
.kpr-complete .complete-badge svg { width: 30px; height: 30px; }
.kpr-complete h2 { font-size: 24px; font-weight: 730; letter-spacing: -.03em; }
.kpr-complete > p { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.7; }
.kpr-complete-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.kpr-complete-stats > div { padding: 14px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.kpr-complete-stats span { display: block; font-size: 10.5px; color: var(--text-3); }
.kpr-complete-stats strong { display: block; font-size: 24px; margin-top: 3px; letter-spacing: -.03em; }
.kpr-complete-stats small { font-size: 10px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.kpr-complete-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.kpr-complete-note { font-size: 11px; color: var(--text-3); margin-top: 17px !important; }

.kp-plan-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.kp-plan-form { min-width: 0; }
.kp-plan-today { min-width: 0; }
.kp-plan-list { display: grid; gap: 0; }
.kp-plan-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.kp-plan-row:last-child { border-bottom: 0; }
.kp-plan-body { min-width: 0; flex: 1; }
.kp-plan-body strong { display: block; font-size: 12px; line-height: 1.65; font-weight: 600; word-break: break-word; }
.kp-plan-body span { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.kp-plan-tip { display: flex; gap: 8px; margin-top: 14px; padding: 11px 12px; border-radius: 11px; background: var(--primary-softer); color: var(--text-2); }
.kp-plan-tip svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.kp-plan-tip p { font-size: 11.5px; line-height: 1.7; }
.kp-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; padding: 10px 2px 0; }
.kp-chart-col { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; height: 100%; }
.kp-chart-num { font-size: 9px; color: var(--text-3); height: 13px; }
.kp-chart-track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.kp-chart-track i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--primary); opacity: .82; min-height: 0; transition: height .3s; }
.kp-chart-col.is-today .kp-chart-track i { opacity: 1; background: var(--success); }
.kp-chart-label { font-size: 9px; color: var(--text-3); white-space: nowrap; }
.kp-chart-col.is-today .kp-chart-label { color: var(--primary); font-weight: 700; }
.kp-chart-legend { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-3); margin-top: 10px; }
.kp-chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }

.qz-linked-points { margin-top: 12px; padding: 13px 14px; border: 1px solid rgba(37,99,235,.2); border-radius: 12px; background: var(--primary-softer); }
.qlp-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--primary); margin-bottom: 7px; }
.qlp-head svg { width: 14px; height: 14px; }
.qlp-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed rgba(37,99,235,.16); font-size: 12px; line-height: 1.65; color: var(--text); }
.qlp-item:first-of-type { border-top: 0; }
.qlp-item svg { width: 13px; height: 13px; flex: none; margin-top: 4px; color: var(--primary); }
.qlp-item:hover span { color: var(--primary); }
.qlp-hint { font-size: 10.5px; color: var(--text-3); margin-top: 5px; }
.q-linked-points { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border); }
.qlp-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); margin-right: 6px; }
.qlp-label svg { width: 13px; height: 13px; }
.q-linked-points a { display: inline-flex; align-items: center; margin: 2px 5px 2px 0; padding: 2px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 10.5px; }

.kp-admin-table .ap-text-btn { display: block; text-align: left; font-size: 12.5px; line-height: 1.6; font-weight: 600; max-width: 430px; word-break: break-word; }
.kp-admin-table .ap-text-btn:hover { color: var(--primary); }
.kp-admin-table .ap-id { font-size: 10px; color: var(--text-3); }
.kp-tag-line { display: flex; gap: 3px; flex-wrap: wrap; }
.check-cell { width: 34px; text-align: center; }
.check-cell input { width: 15px; height: 15px; accent-color: var(--primary); }
.kp-bulkbar { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.kp-bulkbar.show { display: flex; }
.kp-bulkbar > span { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.kp-bulkbar .chip-row { flex: 1; min-width: 180px; }
.kp-bulkbar .select { min-height: 34px; max-width: 150px; }
.api-group-add { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; margin-bottom: 14px; }
.api-group-list { display: grid; gap: 7px; }
.api-group-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.api-group-row strong { display: block; font-size: 12.5px; }
.api-group-row span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.api-link-list { max-height: 380px; overflow: auto; display: grid; gap: 5px; margin-top: 11px; }
.api-link-row { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.api-link-row:hover { background: var(--surface-2); }
.api-link-row input { margin-top: 3px; accent-color: var(--primary); }
.api-link-row div { min-width: 0; }
.api-link-row strong { display: block; font-size: 12px; line-height: 1.55; font-weight: 600; word-break: break-word; }
.api-link-row span { display: block; font-size: 10px; color: var(--text-3); margin-top: 3px; }
.api-confuse-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.api-confuse-add .input { grid-column: 1 / -1; }
.api-confuse-add .btn { grid-column: 1 / -1; justify-self: flex-start; }
.api-confuse-list { display: grid; gap: 7px; }
.api-confuse-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.api-confuse-row div { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: baseline; }
.api-confuse-row strong { font-size: 11.5px; line-height: 1.6; font-weight: 600; }
.api-confuse-row span { font-size: 9.5px; color: var(--text-3); }
.api-confuse-row em { width: 100%; font-style: normal; font-size: 10.5px; color: var(--text-3); }

@media (max-width: 1180px) {
  .kp-filter-row { grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(110px, .7fr)); }
  .kp-filter-row #kpReset { grid-column: auto; }
  .kp-card-actions .btn span { display: none; }
  .api-group-add { grid-template-columns: 1fr 1fr; }
  .api-group-add .btn { grid-column: 1 / -1; justify-self: flex-start; }
}
@media (max-width: 1020px) {
  .stat-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kp-detail-grid, .kp-plan-layout { grid-template-columns: 1fr; }
  .kp-detail-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .stat-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-filter-row { grid-template-columns: 1fr 1fr; }
  .kp-filter-row .kp-search { grid-column: 1 / -1; }
  .kp-filter-count { display: none; }
  .kp-card-foot { align-items: flex-start; flex-direction: column; gap: 7px; }
  .kp-card-actions { width: 100%; }
  .kp-card-actions .btn { flex: 1; justify-content: center; }
  .kp-card-actions .btn span { display: inline; }
  .kp-detail-side { grid-template-columns: 1fr; }
  .kp-recite-hero { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
  .kp-recite-quick { width: 100%; }
  .kp-recite-quick .btn { flex: 1; }
  .kp-mode-grid { grid-template-columns: 1fr; }
  .kpr-pair-grid { grid-template-columns: 1fr; }
  .kpr-actions .btn { min-width: 0; flex: 1; }
  .kpr-complete-stats { gap: 6px; }
  .kp-selbar { flex-direction: column; align-items: flex-start; }
  .kp-sel-actions { width: 100%; }
  .kp-sel-actions .btn { flex: 1; justify-content: center; }
  .api-confuse-add { grid-template-columns: 1fr; }
  .api-confuse-add .input, .api-confuse-add .btn { grid-column: auto; }
  .kp-chart { gap: 3px; height: 160px; }
  .kp-chart-label { font-size: 7.5px; }
  .kp-chart-col:nth-child(even) .kp-chart-label { visibility: hidden; }
}
@media (max-width: 560px) {
  .kp-card { padding: 13px 14px; }
  .kp-stars.compact { margin-left: 0; }
  .kp-card-top { gap: 7px; }
  .kp-filter-row { grid-template-columns: 1fr; }
  .kp-filter-row .kp-search { grid-column: auto; }
  .kp-card-actions .btn span { display: none; }
  .kp-card-actions .btn { padding: 0 7px; }
  .kpr-card { padding: 18px 16px; }
  .kpr-tools .btn span { display: none; }
  .kpr-top-right { width: 100%; justify-content: flex-end; }
  .kpr-top-mid { order: 3; flex-basis: 100%; }
  .kpr-complete { margin: 2vh auto; padding: 28px 16px; }
  .api-group-add { grid-template-columns: 1fr; }
  .api-group-add .btn { grid-column: auto; }
  .kp-chart { height: 145px; }
  .kp-chart-col:nth-child(odd) .kp-chart-label { visibility: hidden; }
}

/* ---------- 侧边栏尺寸统一（普通 / 管理后台） ---------- */
.sidebar .nav-item,
.sidebar #adminNav .nav-item {
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.2;
  gap: 11px;
}
.sidebar .nav-item > span:not(.nav-icon),
.sidebar #adminNav .nav-item > span:not(.nav-icon) {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
}
.sidebar .nav-item .nav-icon,
.sidebar #adminNav .nav-item .nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
.sidebar .nav-item .nav-icon svg,
.sidebar #adminNav .nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
}
.sidebar .nav-caption,
.sidebar #adminCaption {
  font-size: 9.5px;
  line-height: 1.2;
}
.sidebar .sidebar-user .user-meta strong { font-size: 12.5px; }
.sidebar .sidebar-user .user-meta span { font-size: 10px; }

/* ---------- 找回密码 ---------- */
.forgot-link { border: 0; background: none; padding: 0; margin-right: 6px; color: var(--primary); font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.forgot-link:hover { text-decoration: underline; }
.forgot-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 20px; background: radial-gradient(circle at 18% 18%, rgba(37,99,235,.11), transparent 34%), radial-gradient(circle at 84% 78%, rgba(96,165,250,.14), transparent 32%), var(--bg); }
.forgot-card { width: min(430px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px 30px; box-shadow: var(--shadow); }
.forgot-back { border: 0; background: none; padding: 0; margin-bottom: 22px; color: var(--text-3); font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.forgot-back:hover { color: var(--primary); }
.forgot-card .login-heading h2 { font-size: 26px; margin: 10px 0 6px; }
.forgot-card .login-heading p { font-size: 12.5px; }
.forgot-steps { display: flex; align-items: center; gap: 7px; margin: 20px 0 22px; }
.forgot-steps i { display: block; height: 3px; border-radius: 3px; background: var(--surface-3); flex: 1; transition: background .3s; }
.forgot-steps i.on { background: var(--primary); }
.forgot-step { display: flex; flex-direction: column; gap: 16px; }
.forgot-step.hidden { display: none; }
.forgot-step .btn-auth { margin-top: 4px; }
.forgot-tip { font-size: 10.5px; color: var(--text-3); line-height: 1.7; margin-top: 16px; text-align: center; }
.forgot-card .auth-error { margin-top: 14px; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; min-width: 0; }
.code-btn { min-width: 104px; height: 42px; white-space: nowrap; }
.field-hint { font-size: 10.5px; color: var(--text-3); line-height: 1.6; margin-top: 7px; }
@media(max-width:520px){ .forgot-card { padding: 24px 20px; border-radius: 20px; } .code-btn { min-width: 96px; font-size: 11px; } }
