/* =========================================================
   杏林刷题 · 视觉系统
   ========================================================= */
:root {
  --bg: #f3f5f1;
  --bg-deep: #eef2ec;
  --panel: #ffffff;
  --panel-soft: #f9fbf8;
  --ink: #142520;
  --ink-2: #31453f;
  --muted: #75847e;
  --muted-2: #9aa7a1;
  --line: #e2e9e3;
  --line-strong: #d3ded6;
  --brand: #0f7a65;
  --brand-dark: #0b5e4f;
  --brand-deep: #0a2c25;
  --brand-soft: #e8f4ef;
  --brand-soft-2: #d7eee5;
  --mint: #8fe3c7;
  --accent: #e8a15c;
  --accent-soft: #fdf3e6;
  --ok: #218a63;
  --ok-soft: #eaf8f1;
  --bad: #d65454;
  --bad-soft: #fdf0ef;
  --warn: #b8781f;
  --warn-soft: #fdf6e7;
  --blue: #4f78c7;
  --blue-soft: #eef3fd;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow-sm: 0 1px 2px rgba(18, 40, 32, .04), 0 8px 24px rgba(18, 40, 32, .05);
  --shadow-md: 0 18px 44px rgba(14, 47, 39, .10);
  --shadow-lg: 0 30px 80px rgba(8, 35, 29, .18);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(143, 227, 199, .16), transparent 65%),
    radial-gradient(700px 360px at 20% 0%, rgba(232, 161, 92, .06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--brand-soft-2); color: var(--brand-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------- Shell ---------------- */
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  padding: 26px 18px 20px;
  color: #deeee8;
  background:
    radial-gradient(360px 260px at 10% 0%, rgba(127, 220, 189, .16), transparent 60%),
    radial-gradient(300px 260px at 100% 90%, rgba(232, 161, 92, .08), transparent 60%),
    linear-gradient(180deg, #0c2f27 0%, #09251f 60%, #071f1a 100%);
  border-right: 1px solid rgba(255, 255, 255, .05);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  color: #0b3027;
  background: linear-gradient(145deg, #a6efd5, #7bd9ba);
  box-shadow: 0 8px 22px rgba(83, 209, 168, .28);
}
.brand-mark svg { width: 31px; height: 31px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 18px; letter-spacing: .06em; color: #f2fbf7; font-weight: 700; }
.brand-copy small { font-size: 9px; letter-spacing: .27em; color: #75a99a; margin-top: 5px; font-weight: 600; }
.side-label {
  margin: 6px 12px 10px;
  font-size: 10px; letter-spacing: .18em; color: #6e9b8e;
  text-transform: uppercase; font-weight: 700;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  position: relative;
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border: 0; border-radius: 12px;
  color: #a9c8bd; background: transparent;
  font-size: 14px; text-align: left;
  transition: background .18s, color .18s, transform .18s;
}
.side-link .ico { width: 18px; height: 18px; opacity: .9; }
.side-link span { flex: 1; }
.side-link em {
  font-style: normal; font-size: 11px; font-weight: 700;
  min-width: 22px; padding: 1px 7px; text-align: center;
  color: #9bc7b9; background: rgba(255, 255, 255, .07); border-radius: 20px;
}
.side-link:hover { color: #ecf9f4; background: rgba(255, 255, 255, .055); }
.side-link.active {
  color: #f4fffb;
  background: linear-gradient(90deg, rgba(123, 217, 186, .19), rgba(123, 217, 186, .07));
  box-shadow: inset 2px 0 0 #84e3c5;
}
.side-link.active .ico { color: #9cf0d5; }
.side-link.active em { background: #7bd9ba; color: #073028; }
.dot-new {
  width: 6px; height: 6px; border-radius: 50%;
  background: #efb16e; box-shadow: 0 0 0 3px rgba(239, 177, 110, .14);
}
.side-spacer { flex: 1; min-height: 26px; }
.local-card {
  margin: 10px 4px 18px; padding: 14px;
  display: flex; gap: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .06);
}
.local-icon {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; flex: none;
  color: #8fe3c7; background: rgba(123, 217, 186, .14);
}
.local-icon .ico { width: 16px; height: 16px; }
.local-card b { font-size: 12px; color: #d9eee6; font-weight: 700; }
.local-card p { font-size: 10.5px; line-height: 1.6; color: #83a99d; margin-top: 4px; }
.side-help {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 0 2px 12px;
  border: 0; border-radius: 10px; background: transparent;
  color: #83a99d; font-size: 12px; text-align: left;
}
.side-help:hover { color: #d9eee6; background: rgba(255, 255, 255, .05); }
.side-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #0b3027; background: linear-gradient(145deg, #f2d2a9, #e8b87b);
  font-weight: 800; font-size: 14px; flex: none;
}
.side-profile div { display: flex; flex-direction: column; min-width: 0; }
.side-profile b { font-size: 11.5px; color: #dcefe8; font-weight: 600; }
.side-profile small { font-size: 9.5px; color: #6e9589; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #6fe0b8; margin-left: auto; box-shadow: 0 0 0 3px rgba(111, 224, 184, .1); }

.main-column { margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 66px; flex: none;
  display: flex; align-items: center; gap: 18px;
  padding: 0 34px;
  background: rgba(243, 245, 241, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(211, 222, 214, .65);
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.crumb b { font-weight: 400; color: var(--line-strong); }
.crumb strong { color: var(--ink); font-weight: 650; font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.streak-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 20px;
  background: #fff8ee; border: 1px solid #f3e2c9;
  color: #9a6628; font-size: 11.5px;
}
.streak-pill .ico { width: 14px; height: 14px; color: #d88832; fill: rgba(216, 136, 50, .14); }
.streak-pill b { font-weight: 700; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: .18s;
}
.icon-btn:hover { background: #fff; border-color: var(--line); color: var(--brand); }
.mobile-menu { display: none; }
.view { width: 100%; max-width: 1460px; margin: 0 auto; padding: 30px 34px 70px; outline: none; }
.mobile-nav { display: none; }

/* ---------------- Atoms ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 17px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 13px; font-weight: 650; white-space: nowrap;
  transition: transform .15s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #128a71, #0b6d5a);
  box-shadow: 0 8px 20px rgba(15, 122, 101, .20);
}
.btn-primary:hover { background: linear-gradient(135deg, #159078, #0a6251); box-shadow: 0 10px 24px rgba(15, 122, 101, .28); }
.btn-soft { color: var(--brand-dark); background: #e9f4ef; border-color: #d7eae2; }
.btn-soft:hover { background: #def0e8; border-color: #c4e1d6; }
.btn-ghost { color: var(--ink-2); background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.btn-danger { color: var(--bad); background: var(--bad-soft); border-color: #f1d2d0; }
.btn-danger:hover { background: #fbe4e2; }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.btn-lg { min-height: 50px; padding: 0 24px; border-radius: 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.text-btn {
  border: 0; background: transparent; color: var(--brand); font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px;
}
.text-btn:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 10.5px; line-height: 1.5; font-weight: 700;
  color: var(--brand-dark); background: var(--brand-soft);
  white-space: nowrap;
}
.tag.single { color: #226f5b; background: #e8f5ef; }
.tag.multi { color: #86601f; background: #fbf1dc; }
.tag.judge { color: #4b64a8; background: #edf1fb; }
.tag.fill { color: #8a4b74; background: #f9ecf4; }
.tag.plain { color: var(--muted); background: #f2f5f2; }
.tag.danger { color: var(--bad); background: var(--bad-soft); }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--brand); font-size: 10.5px; font-weight: 750;
  letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(26px, 2.3vw, 36px); line-height: 1.28; letter-spacing: -.035em; font-weight: 750; margin-top: 7px; }
.page-head h1 em { font-style: normal; color: var(--brand); position: relative; }
.page-head h1 em::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 2px; height: 7px;
  background: linear-gradient(90deg, rgba(143, 227, 199, .5), rgba(143, 227, 199, .08));
  border-radius: 5px; z-index: -1;
}
.page-head p { color: var(--muted); font-size: 13px; margin-top: 8px; max-width: 650px; }
.page-head.compact { align-items: center; }
.page-head.compact h1 { font-size: 27px; }
.head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.date-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .62); color: var(--muted); font-size: 11.5px;
}
.date-chip b { color: var(--ink-2); font-weight: 650; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 30px 0 14px; }
.section-head h2 { font-size: 18px; letter-spacing: -.02em; font-weight: 700; }
.section-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.empty-state {
  padding: 44px 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: rgba(255, 255, 255, .48);
}
.empty-icon {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; color: var(--brand);
  background: var(--brand-soft);
}
.empty-icon .ico { width: 25px; height: 25px; }
.empty-state h3 { font-size: 16px; font-weight: 700; }
.empty-state p { font-size: 12px; color: var(--muted); margin: 7px auto 16px; max-width: 380px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 11px; padding: 10px 12px; outline: none;
  font-size: 13px; color: var(--ink); transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: #8cc9b7; box-shadow: 0 0 0 4px rgba(15, 122, 101, .08);
}
.textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2375847e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.checkbox input { accent-color: var(--brand); width: 15px; height: 15px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }

/* ---------------- Home ---------------- */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .8fr); gap: 18px; align-items: stretch; }
.upload-card {
  position: relative; overflow: hidden;
  min-height: 280px; padding: 26px;
  color: #e9f7f1;
  background:
    radial-gradient(420px 230px at 100% 0%, rgba(144, 232, 201, .2), transparent 65%),
    radial-gradient(260px 180px at 0% 100%, rgba(232, 161, 92, .13), transparent 70%),
    linear-gradient(135deg, #0d3b31, #092a23 65%, #08251f);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(8, 43, 35, .15);
}
.upload-card::after {
  content: ""; position: absolute; right: -80px; bottom: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(143, 227, 199, .15);
  box-shadow: 0 0 0 34px rgba(143, 227, 199, .035), 0 0 0 70px rgba(143, 227, 199, .02);
  pointer-events: none;
}
.upload-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; position: relative; z-index: 1; }
.upload-card h2 { font-size: 23px; line-height: 1.35; letter-spacing: -.025em; font-weight: 720; margin-top: 7px; }
.upload-card h2 span { color: #8fe3c7; }
.upload-card p { font-size: 12px; color: #95c1b3; margin-top: 6px; max-width: 480px; }
.upload-card .eyebrow { color: #89d9bf; }
.upload-card .eyebrow::before { background: #89d9bf; box-shadow: 0 0 0 3px rgba(137, 217, 191, .13); }
.file-stack { display: flex; align-items: center; padding-top: 4px; }
.file-stack span {
  width: 34px; height: 40px; border-radius: 8px; margin-left: -8px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  display: grid; place-items: center;
  font-size: 8px; color: #c5e6db; font-weight: 700; letter-spacing: .02em;
  backdrop-filter: blur(6px);
}
.file-stack span:nth-child(1) { transform: rotate(-8deg) translateY(2px); background: rgba(234, 156, 112, .2); }
.file-stack span:nth-child(2) { transform: rotate(-2deg); background: rgba(132, 189, 235, .18); }
.file-stack span:nth-child(3) { transform: rotate(6deg) translateY(1px); background: rgba(143, 227, 199, .16); }
.dropzone {
  position: relative; z-index: 1;
  margin-top: 21px; padding: 19px 20px;
  display: flex; align-items: center; gap: 14px;
  border: 1px dashed rgba(178, 237, 217, .36);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  cursor: pointer; transition: .2s;
}
.dropzone:hover, .dropzone.dragging { background: rgba(255, 255, 255, .095); border-color: rgba(178, 237, 217, .7); }
.dropzone .dz-icon {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(143, 227, 199, .14); color: #9cebd2;
}
.dropzone .dz-icon .ico { width: 21px; height: 21px; }
.dz-copy { min-width: 0; flex: 1; }
.dz-copy b { display: block; font-size: 13px; color: #f2fcf8; font-weight: 650; }
.dz-copy span { display: block; font-size: 10.5px; color: #8eb7aa; margin-top: 2px; }
.dz-btn {
  flex: none; padding: 8px 13px; border-radius: 9px;
  color: #0a3128; background: #9cebd2; font-size: 11.5px; font-weight: 750;
}
.upload-foot { position: relative; z-index: 1; margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.format-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.format-chips span { font-size: 9px; letter-spacing: .08em; color: #7fa99c; padding: 3px 7px; border-radius: 5px; border: 1px solid rgba(255,255,255,.09); }
.demo-link { border: 0; background: transparent; color: #eebd88; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; padding: 3px; }
.demo-link:hover { color: #ffd7ad; text-decoration: underline; text-underline-offset: 3px; }
.demo-link .ico { width: 13px; height: 13px; }

.overview-card { padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.overview-card::before { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(143, 227, 199, .22), transparent 68%); }
.overview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; }
.overview-head h3 { font-size: 14px; font-weight: 700; }
.overview-head p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.goal-wrap { display: flex; align-items: center; gap: 20px; margin: 20px 0 14px; position: relative; }
.goal-ring {
  --p: 0;
  width: 118px; height: 118px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e9efe9 0);
  position: relative; display: grid; place-items: center;
  transition: --p .6s;
  box-shadow: inset 0 0 0 1px rgba(15, 122, 101, .03);
}
.goal-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(17, 66, 53, .06); }
.goal-ring > div { position: relative; text-align: center; line-height: 1.1; }
.goal-ring b { display: block; font-size: 30px; letter-spacing: -.05em; font-weight: 750; color: var(--ink); }
.goal-ring span { font-size: 9.5px; color: var(--muted); }
.goal-copy { flex: 1; }
.goal-copy strong { display: block; font-size: 12.5px; font-weight: 700; }
.goal-copy p { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.goal-copy .mini-streak { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: #b27625; font-size: 10px; background: #fff8ee; padding: 4px 8px; border-radius: 6px; }
.goal-copy .mini-streak .ico { width: 12px; height: 12px; }
.overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 15px; gap: 8px; margin-top: auto; }
.overview-stats div { min-width: 0; }
.overview-stats b { display: block; font-size: 18px; letter-spacing: -.03em; font-weight: 720; }
.overview-stats span { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.overview-stats div + div { border-left: 1px solid var(--line); padding-left: 12px; }

.bank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bank-card {
  padding: 19px; border-radius: 17px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
}
.bank-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(20, 58, 46, .09); border-color: #cbdcd3; }
.bank-card::after { content: ""; position: absolute; inset: auto -30px -50px auto; width: 110px; height: 110px; border-radius: 50%; background: var(--tone-soft, #eef7f2); opacity: .6; pointer-events: none; }
.bank-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.bank-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand));
}
.bank-mark .ico { width: 19px; height: 19px; }
.bank-more { border: 0; background: transparent; color: var(--muted-2); padding: 4px; border-radius: 6px; }
.bank-more:hover { color: var(--ink); background: var(--panel-soft); }
.bank-card h3 { font-size: 15px; font-weight: 700; margin-top: 14px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }
.bank-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; position: relative; z-index: 1; }
.bank-progress { height: 5px; border-radius: 5px; background: #edf1ed; margin: 14px 0 9px; overflow: hidden; position: relative; z-index: 1; }
.bank-progress i { display: block; height: 100%; border-radius: 5px; background: var(--tone, var(--brand)); transition: width .4s; }
.bank-meta { display: flex; gap: 12px; align-items: center; font-size: 10px; color: var(--muted); position: relative; z-index: 1; }
.bank-meta b { color: var(--ink-2); font-weight: 700; }
.bank-actions { display: flex; gap: 7px; margin-top: 14px; position: relative; z-index: 1; }
.bank-actions .btn { flex: 1; min-height: 33px; font-size: 11px; border-radius: 8px; }
.bank-actions .icon-only { flex: none; width: 34px; }
.bank-new {
  border: 1px dashed var(--line-strong); border-radius: 17px;
  min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: rgba(255, 255, 255, .34); color: var(--muted);
  cursor: pointer; transition: .18s;
}
.bank-new:hover { border-color: #9fc8b8; background: rgba(255, 255, 255, .7); color: var(--brand); }
.bank-new span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); }
.bank-new b { font-size: 12px; font-weight: 650; }
.bank-new small { font-size: 10px; color: var(--muted-2); }
.feature-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.feature-item { padding: 16px; border-radius: 15px; background: rgba(255,255,255,.55); border: 1px solid rgba(226,233,227,.8); }
.feature-item .ico { width: 18px; height: 18px; color: var(--brand); margin-bottom: 9px; }
.feature-item b { display: block; font-size: 12px; font-weight: 700; }
.feature-item p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.55; }

/* ---------------- Import ---------------- */
.import-upload-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr); gap: 18px; }
.import-panel { padding: 24px; }
.import-panel h2 { font-size: 18px; font-weight: 700; }
.import-panel > p { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.import-drop {
  margin-top: 17px; padding: 28px 18px; text-align: center;
  border: 1.5px dashed #b9d5c8; border-radius: 16px; background: #f8fbf8;
  cursor: pointer; transition: .18s;
}
.import-drop:hover, .import-drop.dragging { border-color: var(--brand); background: var(--brand-soft); }
.import-drop .up-circle {
  width: 52px; height: 52px; margin: 0 auto 11px; border-radius: 16px;
  display: grid; place-items: center; color: var(--brand); background: #e7f4ee;
}
.import-drop .up-circle .ico { width: 23px; height: 23px; }
.import-drop b { font-size: 13.5px; font-weight: 700; }
.import-drop p { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.import-drop .format-chips { justify-content: center; margin-top: 12px; }
.import-drop .format-chips span { color: var(--muted); border-color: var(--line); background: #fff; }
.paste-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.paste-title h3 { font-size: 12.5px; font-weight: 700; }
.paste-title span { font-size: 10px; color: var(--muted-2); }
.paste-box { margin-top: 8px; position: relative; }
.paste-box textarea { min-height: 150px; font-size: 12px; padding-bottom: 44px; background: #fcfdfc; }
.paste-actions { position: absolute; right: 9px; bottom: 9px; display: flex; gap: 6px; }
.import-side { padding: 22px; align-self: start; }
.import-side h3 { font-size: 14px; font-weight: 700; }
.side-step { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.side-step:last-child { border-bottom: 0; }
.side-step .n {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; color: var(--brand-dark); background: var(--brand-soft);
  font-size: 10px; font-weight: 750;
}
.side-step b { display: block; font-size: 11.5px; font-weight: 650; }
.side-step p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.55; }
.format-accordion { margin-top: 13px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.format-accordion summary { padding: 10px 12px; font-size: 11px; color: var(--ink-2); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; background: #fbfcfb; }
.format-accordion summary::-webkit-details-marker { display: none; }
.format-accordion summary::after { content: "＋"; color: var(--muted-2); font-size: 12px; }
.format-accordion[open] summary::after { content: "－"; }
.format-accordion pre {
  margin: 0; padding: 12px; background: #0e2a24; color: #c9e9dd;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px; line-height: 1.75; white-space: pre-wrap; word-break: break-all;
}
.parse-banner { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #eaf7f1, #f7fbf8); border: 1px solid #d6eae0; margin-bottom: 16px; }
.parse-check { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #d8eee4; color: var(--brand); flex: none; }
.parse-banner h3 { font-size: 14px; font-weight: 700; }
.parse-banner p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.parse-warnings { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; }
.parse-warnings span { font-size: 10.5px; color: #9a6c28; display: flex; align-items: flex-start; gap: 5px; }
.parse-warnings .ico { width: 11px; height: 11px; margin-top: 3px; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.import-list-panel { padding: 0; overflow: hidden; }
.import-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.import-toolbar .name-field { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; }
.import-toolbar .name-field label { font-size: 10px; color: var(--muted); flex: none; }
.import-toolbar .input { height: 36px; padding: 7px 10px; }
.toolbar-actions { display: flex; gap: 7px; }
.preview-list { padding: 6px 16px 4px; }
.preview-card { padding: 15px 2px; border-bottom: 1px solid var(--line); }
.preview-card:last-child { border-bottom: 0; }
.preview-head { display: flex; align-items: center; gap: 8px; }
.preview-head .checkbox { flex: none; }
.preview-num { font-size: 10px; font-weight: 750; color: var(--muted-2); min-width: 20px; }
.preview-head .spacer { flex: 1; }
.preview-actions { display: flex; gap: 2px; opacity: .35; transition: opacity .15s; }
.preview-card:hover .preview-actions { opacity: 1; }
.mini-btn { width: 27px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.mini-btn:hover { background: var(--panel-soft); color: var(--brand); }
.mini-btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.mini-btn .ico { width: 14px; height: 14px; }
.preview-stem { font-size: 13px; line-height: 1.7; margin: 7px 0 7px 23px; color: var(--ink); }
.preview-options { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: 23px; }
.preview-opt { font-size: 10.5px; color: var(--muted); display: flex; gap: 4px; max-width: 100%; }
.preview-opt b { color: var(--ink-2); font-weight: 700; }
.preview-answer { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 0 23px; font-size: 10.5px; color: var(--muted); }
.preview-answer b { color: var(--ok); font-weight: 700; }
.preview-answer.missing b { color: var(--warn); }
.preview-answer .exp { color: var(--muted-2); border-left: 1px solid var(--line); padding-left: 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; border-top: 1px solid var(--line); }
.pagination span { font-size: 10.5px; color: var(--muted); }
.page-btns { display: flex; gap: 5px; }
.page-btns button { min-width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 11px; color: var(--ink-2); }
.page-btns button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btns button:disabled { opacity: .4; }
.import-summary { padding: 19px; position: sticky; top: 84px; }
.import-summary h3 { font-size: 14px; font-weight: 700; }
.import-summary .sum-name { font-size: 11px; color: var(--muted); margin-top: 3px; word-break: break-all; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }
.sum-cell { padding: 10px; border-radius: 10px; background: var(--panel-soft); }
.sum-cell b { display: block; font-size: 17px; font-weight: 720; letter-spacing: -.02em; }
.sum-cell span { font-size: 9.5px; color: var(--muted); }
.sum-types { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.sum-type { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.sum-type .bar { flex: 1; height: 4px; background: #edf1ed; border-radius: 4px; overflow: hidden; }
.sum-type .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.sum-type b { width: 24px; text-align: right; color: var(--ink-2); font-weight: 700; font-size: 10px; }
.split-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 12px 0 13px; padding: 11px 12px;
  border: 1px solid #d4e9de; border-radius: 10px;
  background: linear-gradient(135deg, #f0faf5, #fbfdfb);
}
.split-note .ico { width: 15px; height: 15px; color: var(--brand); margin-top: 2px; flex: none; }
.split-note b { display: block; font-size: 10.5px; font-weight: 750; color: var(--brand-dark); }
.split-note span { display: block; font-size: 9.5px; line-height: 1.55; color: var(--muted); margin-top: 2px; }
.import-tip { display: flex; gap: 7px; font-size: 9.5px; color: var(--muted-2); line-height: 1.55; margin-top: 12px; }
.import-tip .ico { width: 12px; height: 12px; margin-top: 3px; flex: none; }
.raw-preview { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.raw-preview summary { padding: 9px 12px; font-size: 10.5px; color: var(--muted); cursor: pointer; background: var(--panel-soft); }
.raw-preview pre { margin: 0; padding: 12px; max-height: 240px; overflow: auto; font-size: 10px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; background: #fcfdfc; }

/* ---------------- Bank ---------------- */
.bank-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.back-btn { width: 36px; height: 36px; margin-top: 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); flex: none; }
.back-btn:hover { color: var(--brand); border-color: #bcd8cc; }
.bank-title-wrap { flex: 1; min-width: 0; }
.bank-title-wrap h1 { font-size: clamp(23px, 2vw, 30px); line-height: 1.35; letter-spacing: -.03em; overflow-wrap: anywhere; }
.bank-title-wrap p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bank-header-actions { display: flex; gap: 6px; align-items: center; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 16px; }
.stat-card { padding: 16px 17px; border-radius: 15px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat-card .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-card span { font-size: 10px; color: var(--muted); }
.stat-card .ico { width: 14px; height: 14px; color: var(--muted-2); }
.stat-card b { display: block; font-size: 25px; line-height: 1.2; font-weight: 740; letter-spacing: -.04em; margin-top: 5px; }
.stat-card small { font-size: 9.5px; color: var(--muted-2); }
.stat-card.accent { background: linear-gradient(135deg, #0f7a65, #0b5e4f); border-color: transparent; color: #fff; }
.stat-card.accent span, .stat-card.accent small { color: #a9d8c9; }
.stat-card.accent .ico { color: #93e3c9; }
.bank-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .72fr); gap: 16px; align-items: start; }
.bank-main-panel { padding: 21px; }
.bank-main-panel h2 { font-size: 15px; font-weight: 700; }
.panel-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.big-progress { margin: 19px 0 12px; }
.big-progress-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 7px; }
.big-progress-head b { font-size: 26px; letter-spacing: -.04em; font-weight: 750; }
.big-progress-head b span { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.big-progress-head span { font-size: 10px; color: var(--muted); }
.big-bar { height: 9px; border-radius: 9px; background: #edf2ee; overflow: hidden; }
.big-bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #1a9a7e, #74d3b7); transition: width .5s; }
.type-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-top: 19px; }
.type-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.type-row .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.type-row .bar { flex: 1; height: 4px; border-radius: 4px; background: #eef2ee; overflow: hidden; }
.type-row .bar i { display: block; height: 100%; background: var(--c); }
.type-row b { width: 30px; text-align: right; color: var(--ink-2); font-size: 10px; }
.recent-wrong { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.recent-wrong-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.recent-wrong-head h3 { font-size: 12px; font-weight: 700; }
.wrong-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f3f0; cursor: pointer; }
.wrong-row:last-child { border-bottom: 0; }
.wrong-row .n { width: 21px; height: 21px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; font-size: 9px; font-weight: 700; flex: none; }
.wrong-row p { flex: 1; font-size: 11px; color: var(--ink-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.wrong-row .ico { width: 13px; height: 13px; color: var(--muted-2); margin-top: 4px; }
.bank-side-panel { padding: 19px; }
.bank-side-panel h3 { font-size: 13px; font-weight: 700; }
.start-options { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.start-option {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  text-align: left; transition: .17s;
}
.start-option:hover { border-color: #acd1c2; background: #fbfdfb; transform: translateX(2px); }
.start-option .so-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.start-option .so-icon.exam { background: #fbf1dc; color: #a16d21; }
.start-option .so-icon.recite { background: #edf1fb; color: #526aa9; }
.start-option .so-icon .ico { width: 15px; height: 15px; }
.start-option div { flex: 1; }
.start-option b { display: block; font-size: 11.5px; font-weight: 650; }
.start-option span { display: block; font-size: 9.5px; color: var(--muted); }
.start-option > .ico { width: 13px; height: 13px; color: var(--muted-2); }
.side-links { display: flex; flex-direction: column; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.side-links button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 7px 2px; font-size: 10.5px; color: var(--muted); text-align: left; }
.side-links button:hover { color: var(--brand); }
.side-links .ico { width: 13px; height: 13px; }
.side-links .danger { color: var(--bad); margin-left: auto; }

/* ---------------- Quiz ---------------- */
body.quiz-active { background: #f2f5f1; }
body.quiz-active .sidebar,
body.quiz-active .topbar,
body.quiz-active .mobile-nav { display: none; }
body.quiz-active .main-column { margin-left: 0; width: 100%; }
body.quiz-active .view { padding: 0; max-width: none; }
.quiz-head {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 24px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.quiz-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; padding: 7px 8px 7px 4px; border-radius: 8px; }
.quiz-back:hover { color: var(--ink); background: var(--panel-soft); }
.quiz-back .ico { width: 15px; height: 15px; }
.quiz-title { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.quiz-title b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 440px; }
.quiz-title span { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-head-right { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.quiz-timer { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; padding: 6px 10px; border-radius: 8px; background: var(--panel-soft); border: 1px solid var(--line); }
.quiz-timer .ico { width: 13px; height: 13px; }
.quiz-progress { height: 3px; background: #e6ece6; position: sticky; top: 64px; z-index: 24; }
.quiz-progress i { display: block; height: 100%; background: linear-gradient(90deg, #1b9c7f, #87ddc1); transition: width .3s; }
.quiz-wrap { max-width: 1170px; margin: 0 auto; padding: 22px 24px 50px; }
.quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 246px; gap: 18px; align-items: start; }
.question-panel { padding: 28px 30px 22px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.question-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.q-index { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.q-index b { color: var(--ink); font-size: 15px; letter-spacing: -.02em; }
.q-star { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: #b7c2bc; border-radius: 8px; }
.q-star:hover { background: #fff9ed; color: #d99b35; }
.q-star.on { color: #dd9a2e; }
.q-star.on .ico { fill: rgba(221, 154, 46, .18); }
.q-star .ico { width: 17px; height: 17px; }
.question-stem { margin-top: 15px; font-size: 17px; line-height: 1.85; color: #172a24; font-weight: 520; letter-spacing: .005em; overflow-wrap: anywhere; }
.question-stem.fill { margin-bottom: 4px; }
.option-list { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.option {
  width: 100%; display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 13px; background: #fff;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.option:hover:not(.locked) { border-color: #afd2c4; background: #fbfdfb; box-shadow: 0 4px 12px rgba(20, 58, 46, .04); }
.opt-key {
  width: 27px; height: 27px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: #f2f5f2; color: var(--ink-2); font-size: 11px; font-weight: 750;
  transition: .16s; margin-top: 1px;
}
.opt-text { flex: 1; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); padding-top: 1px; overflow-wrap: anywhere; }
.opt-indicator { width: 18px; flex: none; color: var(--muted-2); display: grid; place-items: center; padding-top: 4px; }
.opt-indicator .ico { width: 15px; height: 15px; }
.option.selected { border-color: #73bfa9; background: #f0faf6; box-shadow: inset 0 0 0 1px #73bfa9; }
.option.selected .opt-key { background: var(--brand); color: #fff; }
.option.correct { border-color: #4fbb8f; background: var(--ok-soft); }
.option.correct .opt-key { background: #2e9c70; color: #fff; }
.option.correct .opt-indicator { color: var(--ok); }
.option.wrong { border-color: #e6a3a3; background: var(--bad-soft); }
.option.wrong .opt-key { background: #d66a6a; color: #fff; }
.option.wrong .opt-indicator { color: var(--bad); }
.option.muted { opacity: .62; }
.option.locked { cursor: default; }
.fill-area { margin-top: 20px; }
.fill-input {
  width: 100%; padding: 14px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: #fbfcfb; font-size: 15px; outline: none; transition: .18s;
}
.fill-input:focus { border-color: #78bda8; background: #fff; box-shadow: 0 0 0 4px rgba(15,122,101,.08); }
.fill-hint { font-size: 10px; color: var(--muted-2); margin-top: 6px; }
.feedback {
  margin-top: 17px; padding: 12px 14px; border-radius: 11px;
  display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.6;
}
.feedback .ico { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.feedback.ok { background: var(--ok-soft); color: #1d7153; border: 1px solid #d3ecdf; }
.feedback.bad { background: var(--bad-soft); color: #a84444; border: 1px solid #f2d5d3; }
.feedback.info { background: var(--blue-soft); color: #4c6498; border: 1px solid #dbe4f7; }
.feedback b { font-weight: 750; }
.feedback span { opacity: .85; }
.self-eval { display: flex; gap: 7px; margin-left: auto; flex: none; }
.self-eval button { border: 1px solid currentColor; background: transparent; border-radius: 7px; padding: 3px 8px; font-size: 10px; color: inherit; }
.explain-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfa; overflow: hidden; }
.explain-head { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--brand-dark); font-size: 10.5px; font-weight: 700; background: #f5faf7; }
.explain-head .ico { width: 14px; height: 14px; }
.explain-head span { margin-left: auto; font-weight: 500; color: var(--muted-2); font-size: 9.5px; }
.explain-body { padding: 13px 15px 15px; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-banner { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #f4faf7; border: 1px solid #dbeee4; border-radius: 10px; margin-top: 17px; font-size: 11.5px; color: var(--muted); }
.answer-banner b { color: var(--brand-dark); font-weight: 750; font-size: 14px; letter-spacing: .04em; }
.answer-banner .tag { margin-left: auto; }
.question-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.question-actions .spacer { flex: 1; }
.auto-hint { font-size: 10px; color: var(--muted-2); display: flex; align-items: center; gap: 5px; }
.auto-hint .ico { width: 12px; height: 12px; }
.answer-sheet { padding: 17px; border-radius: 17px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: sticky; top: 86px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h3 { font-size: 12px; font-weight: 700; }
.sheet-head button { display: none; }
.sheet-count { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 13px 0 14px; }
.sheet-cell {
  aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 10px; font-weight: 650;
  display: grid; place-items: center; position: relative; transition: .15s;
}
.sheet-cell:hover { border-color: #a4cdbd; color: var(--brand); }
.sheet-cell.current { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; box-shadow: 0 4px 10px rgba(10,44,37,.18); }
.sheet-cell.done { background: var(--brand-soft); border-color: #cfe8de; color: var(--brand-dark); }
.sheet-cell.ok { background: #def3e8; border-color: #bfe5d2; color: #1e7958; }
.sheet-cell.bad { background: #fbe5e3; border-color: #f0cbc8; color: #b84d4d; }
.sheet-cell.star::after { content: ""; position: absolute; top: 3px; right: 3px; width: 4px; height: 4px; border-radius: 50%; background: #e4a342; }
.sheet-legend { display: flex; flex-wrap: wrap; gap: 9px 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--line); background: #fff; }
.legend-dot.current { background: var(--brand-deep); border-color: var(--brand-deep); }
.legend-dot.done { background: var(--brand-soft); border-color: #cfe8de; }
.legend-dot.bad { background: #fbe5e3; border-color: #f0cbc8; }
.legend-dot.star { background: #e4a342; border-color: #e4a342; }
.sheet-submit { margin-top: 13px; }
.sheet-tip { display: flex; gap: 6px; font-size: 8.5px; line-height: 1.55; color: var(--muted-2); margin-top: 10px; }
.sheet-tip .ico { width: 11px; height: 11px; margin-top: 2px; flex: none; }
.sheet-toggle { display: none; }
.sheet-scrim { display: none; }

/* ---------------- Result ---------------- */
.result-wrap { max-width: 880px; margin: 0 auto; }
.result-hero { text-align: center; padding: 26px 20px 22px; }
.result-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 700; }
.score-ring {
  --score: 0;
  width: 154px; height: 154px; margin: 19px auto 13px;
  border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--ring, var(--brand)) calc(var(--score) * 1%), #e8eee9 0);
}
.score-ring::before { content: ""; position: absolute; inset: 10px; background: var(--bg); border-radius: 50%; }
.score-ring > div { position: relative; text-align: center; line-height: 1; }
.score-ring b { display: block; font-size: 45px; font-weight: 760; letter-spacing: -.06em; }
.score-ring span { font-size: 10px; color: var(--muted); }
.result-hero h1 { font-size: 27px; letter-spacing: -.03em; }
.result-hero > p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.result-stats { display: flex; justify-content: center; gap: 0; margin: 21px auto 0; max-width: 480px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 0; }
.result-stats div { flex: 1; text-align: center; }
.result-stats div + div { border-left: 1px solid var(--line); }
.result-stats b { display: block; font-size: 19px; font-weight: 720; }
.result-stats span { font-size: 9.5px; color: var(--muted); }
.result-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin: 22px 0 26px; }
.review-panel { padding: 20px; }
.review-panel h2 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.review-panel h2 .tag { font-size: 9px; }
.review-list { margin-top: 8px; }
.review-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-item-head { display: flex; align-items: center; gap: 7px; }
.review-item p { font-size: 12.5px; line-height: 1.7; margin-top: 6px; }
.review-answer { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 10.5px; color: var(--muted); margin-top: 7px; }
.review-answer b { color: var(--ok); }
.review-answer .yours { color: var(--bad); }
.review-exp { font-size: 10.5px; color: var(--muted); margin-top: 6px; border-left: 2px solid var(--line); padding-left: 9px; line-height: 1.7; }
.perfect { padding: 34px; text-align: center; }
.perfect .empty-icon { color: #b77b22; background: #fdf5e5; }

/* ---------------- Review / Stats ---------------- */
.review-bank-list { display: flex; flex-direction: column; gap: 9px; }
.review-bank-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.review-bank-row .bank-mark { width: 36px; height: 36px; }
.review-bank-row .info { flex: 1; min-width: 0; }
.review-bank-row .info b { display: block; font-size: 12.5px; font-weight: 650; }
.review-bank-row .info span { display: block; font-size: 10px; color: var(--muted); }
.review-bank-row .num { font-size: 18px; font-weight: 720; color: var(--bad); margin-right: 8px; }
.review-bank-row .num.star { color: #c88a2d; }
.stats-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 16px; }
.stats-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 16px; align-items: start; }
.chart-panel { padding: 20px; }
.chart-panel h2 { font-size: 14px; font-weight: 700; }
.week-chart { display: flex; align-items: flex-end; gap: 12px; height: 150px; margin-top: 20px; padding-bottom: 2px; }
.week-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-col b { font-size: 9px; font-weight: 650; color: var(--muted); }
.week-col .bar { width: 100%; max-width: 36px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #62c9ad, #16846c); min-height: 3px; transition: height .4s; }
.week-col .bar.zero { background: #e8eee9; }
.week-col span { font-size: 9px; color: var(--muted-2); }
.bank-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.bank-table th { text-align: left; font-size: 9px; font-weight: 600; color: var(--muted-2); letter-spacing: .04em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.bank-table td { padding: 11px 6px; border-bottom: 1px solid #f0f3f0; font-size: 11px; color: var(--ink-2); }
.bank-table tr:last-child td { border-bottom: 0; }
.bank-table td b { font-weight: 650; }
.bank-table .mini-bar { width: 55px; height: 4px; background: #edf1ed; border-radius: 4px; overflow: hidden; }
.bank-table .mini-bar i { display: block; height: 100%; background: var(--brand); }
.sessions { padding: 20px; }
.sessions h2 { font-size: 14px; font-weight: 700; }
.session-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f0f3f0; }
.session-row:last-child { border-bottom: 0; }
.session-icon { width: 29px; height: 29px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.session-icon.exam { background: #fbf1dc; color: #a16d21; }
.session-icon.recite { background: #edf1fb; color: #526aa9; }
.session-icon .ico { width: 14px; height: 14px; }
.session-row .info { flex: 1; min-width: 0; }
.session-row b { display: block; font-size: 10.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-row span { display: block; font-size: 9px; color: var(--muted); }
.session-row .score { font-size: 13px; font-weight: 720; color: var(--brand); }
.empty-mini { text-align: center; padding: 28px 10px; color: var(--muted-2); font-size: 10.5px; }

/* ---------------- Modal / Toast / Loading ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7, 28, 23, .46); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .16s ease;
}
.modal {
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.2,.8,.2,1);
}
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 18px; letter-spacing: -.02em; font-weight: 720; }
.modal-head p { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.modal-close { margin-left: auto; width: 30px; height: 30px; border: 0; background: var(--panel-soft); border-radius: 9px; color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { background: #eef3ee; color: var(--ink); }
.modal-body { padding: 18px 22px 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 22px 18px;
  position: sticky; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
}
.modal .form-grid { margin-bottom: 13px; }
.modal .field + .field { margin-top: 12px; }
.modal-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.modal-icon.warn { background: var(--warn-soft); color: var(--warn); }
.modal-icon.danger { background: var(--bad-soft); color: var(--bad); }
.modal-icon .ico { width: 21px; height: 21px; }
.confirm-copy { font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.confirm-copy b { color: var(--ink); }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-card { padding: 13px 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; transition: .16s; }
.mode-card:hover { border-color: #acd1c2; }
.mode-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.mode-card .ico { width: 17px; height: 17px; color: var(--brand); margin-bottom: 7px; }
.mode-card b { display: block; font-size: 11.5px; font-weight: 700; }
.mode-card span { display: block; font-size: 9px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.start-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.start-fields .span2 { grid-column: 1 / -1; }
@media (max-width: 860px) { .start-fields .span2 { grid-column: auto; } }
.start-summary { margin-top: 15px; padding: 11px 13px; border-radius: 10px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.start-summary b { color: var(--brand); font-weight: 750; }
.start-summary .ico { width: 13px; height: 13px; color: var(--brand); }
.option-edit-list { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.opt-edit-row { display: flex; align-items: center; gap: 7px; }
.opt-edit-row .key { width: 26px; height: 34px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 10px; font-weight: 750; flex: none; }
.opt-edit-row .input { flex: 1; padding: 7px 9px; font-size: 12px; }
.opt-edit-row .mini-btn { flex: none; }
.option-edit-head { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.option-edit-head .field-label { margin: 0; }
.toast {
  position: fixed; z-index: 300; left: 50%; bottom: 30px;
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 11px;
  color: #eafff8; background: #10352c; box-shadow: var(--shadow-md);
  font-size: 12px; transition: .22s; max-width: min(520px, calc(100vw - 30px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #6d2d2d; }
.toast .ico { width: 15px; height: 15px; color: #8fe3c7; }
.toast.error .ico { color: #ffc4c4; }
.loading { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: rgba(7, 28, 23, .5); backdrop-filter: blur(6px); padding: 20px; }
.loading[hidden] { display: none; }
.loader-card { width: min(340px, 100%); padding: 30px 26px; border-radius: 20px; background: #fff; text-align: center; box-shadow: var(--shadow-lg); }
.spinner { width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid #e2efe9; border-top-color: var(--brand); animation: spin .8s linear infinite; }
.loader-card h3 { font-size: 15px; font-weight: 700; }
.loader-card p { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.drag-veil {
  position: fixed; inset: 0; z-index: 240; display: none;
  align-items: center; justify-content: center;
  background: rgba(7, 34, 27, .7); backdrop-filter: blur(6px);
  color: #e9fbf4; pointer-events: none;
}
.drag-veil.show { display: flex; }
.drag-veil > div { text-align: center; padding: 38px 54px; border: 2px dashed rgba(150, 235, 208, .45); border-radius: 24px; }
.drag-veil .ico { width: 38px; height: 38px; margin: 0 auto 12px; color: #94e5cb; }
.drag-veil b { display: block; font-size: 18px; }
.drag-veil span { display: block; font-size: 11px; color: #8cb9ab; margin-top: 4px; }

/* ---------------- Animations ---------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.view > * { animation: rise .32s ease both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
/* 刷题页不要保留 transform，否则移动端答题卡 fixed 会相对内容定位 */
body.quiz-active .view > * { animation: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(290px, .85fr); }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  :root { --sidebar-w: 224px; }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .view { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .overview-card { min-height: 0; }
  .overview-stats { margin-top: 4px; }
  .goal-wrap { margin: 15px 0 10px; }
  .bank-layout { grid-template-columns: 1fr; }
  .stats-layout { grid-template-columns: 1fr; }
  .import-layout { grid-template-columns: 1fr; }
  .import-summary { position: static; }
  .import-upload-grid { grid-template-columns: 1fr; }
  .quiz-grid { grid-template-columns: 1fr; }
  .answer-sheet {
    position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; top: auto;
    max-height: 72vh; overflow: auto; display: none;
    border-radius: 20px; box-shadow: 0 -12px 50px rgba(8,35,29,.22);
  }
  .answer-sheet.open { display: block; animation: modalIn .2s ease; }
  .sheet-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(7, 28, 23, .3); backdrop-filter: blur(2px);
    animation: fadeIn .18s ease;
  }
  .sheet-head button { display: grid; }
  .sheet-toggle { display: inline-flex; }
  .quiz-wrap { padding: 18px 20px 90px; }
}
@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%); transition: transform .24s ease;
    width: 252px; box-shadow: 20px 0 60px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: none; }
  .main-column { margin-left: 0; width: 100%; }
  .mobile-menu { display: grid; }
  .topbar { height: 60px; padding: 0 16px; gap: 8px; }
  .crumb span, .crumb b { display: none; }
  .crumb strong { font-size: 12.5px; }
  .streak-pill { display: none; }
  .top-actions .icon-btn { display: none; }
  .view { padding: 20px 16px 92px; }
  .mobile-nav {
    position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom));
    display: flex; align-items: flex-start; justify-content: space-around;
    padding: 7px 7px env(safe-area-inset-bottom);
    background: rgba(255,255,255,.94); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .mobile-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font-size: 9px; padding: 2px 0; }
  .mobile-nav .ico { width: 20px; height: 20px; }
  .mobile-nav button.active { color: var(--brand); }
  .mobile-import { position: relative; }
  .mobile-plus { width: 38px; height: 38px; margin-top: -16px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg,#138a71,#0b6554); color: #fff; box-shadow: 0 7px 18px rgba(15,122,101,.28); }
  .mobile-plus .ico { width: 20px; height: 20px; }
  .mobile-nav .mobile-import span:last-child { color: var(--brand); font-weight: 650; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 25px; }
  .credit { display: none; }
  .bank-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-hero { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr 1fr; }
  .upload-card { padding: 21px; }
  .upload-card h2 { font-size: 20px; }
  .file-stack { display: none; }
  .dropzone { padding: 16px; flex-wrap: wrap; }
  .dz-btn { margin-left: 58px; }
  .question-panel { padding: 21px 18px 18px; border-radius: 16px; }
  .question-stem { font-size: 16px; }
  .quiz-head { padding: 0 12px; height: 58px; gap: 8px; }
  .quiz-title b { max-width: 210px; }
  .quiz-head-right .btn span { display: none; }
  .quiz-head-right .btn { padding: 0 11px; }
  .quiz-wrap { padding: 14px 12px 84px; }
  .quiz-progress { top: 58px; }
  .question-actions { flex-wrap: wrap; }
  .question-actions .btn { flex: 1; }
  .question-actions .spacer { display: none; }
  .bank-header { flex-wrap: wrap; }
  .bank-header-actions { width: 100%; padding-left: 50px; }
  .result-hero h1 { font-size: 23px; }
  .review-bank-row .num { font-size: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .start-fields { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-card { padding: 11px 8px; }
  .mode-card .ico { width: 15px; height: 15px; margin-bottom: 5px; }
  .mode-card b { font-size: 10.5px; line-height: 1.35; }
  .mode-card span { font-size: 8px; line-height: 1.4; }
  .modal { border-radius: 18px; }
  .modal-body { padding: 15px 17px 17px; }
  .modal-head { padding: 17px 17px 0; }
  .modal-foot { padding: 0 17px 17px; }
}
@media (max-width: 560px) {
  .page-head { flex-direction: column; gap: 12px; }
  .page-head .head-actions { width: 100%; }
  .date-chip { width: 100%; justify-content: center; }
  .overview-stats b { font-size: 16px; }
  .goal-ring { width: 102px; height: 102px; }
  .goal-ring b { font-size: 26px; }
  .overview-card { padding: 19px; }
  .upload-foot { flex-direction: column; align-items: flex-start; gap: 9px; }
  .dropzone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .dz-copy b { font-size: 12.5px; line-height: 1.5; }
  .dz-copy span { font-size: 10px; line-height: 1.5; }
  .dz-btn { grid-column: 1 / -1; margin: 2px 0 0; text-align: center; padding: 9px; }
  .bank-actions .btn { font-size: 10.5px; }
  .bank-header-actions { padding-left: 0; }
  .bank-title-wrap h1 { font-size: 22px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 13px; }
  .stat-card b { font-size: 22px; }
  .type-breakdown { grid-template-columns: 1fr; }
  .question-meta .tag.plain { display: none; }
  .question-stem { font-size: 15.5px; line-height: 1.8; }
  .opt-text { font-size: 13px; }
  .quiz-back span { display: none; }
  .quiz-title b { max-width: none; font-size: 12.5px; }
  .quiz-title span { font-size: 9px; }
  .quiz-timer { font-size: 10px; padding: 5px 7px; }
  .sheet-grid { grid-template-columns: repeat(6, 1fr); }
  .result-actions .btn { flex: 1; min-width: 120px; }
  .week-chart { gap: 7px; }
  .preview-options { gap: 3px 10px; }
  .import-toolbar .name-field { min-width: 100%; }
  .toast { bottom: 80px; }
}

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