@charset "UTF-8";
/* ==========================================================================
   历史必备问题 · Liquid Glass 设计系统
   --------------------------------------------------------------------------
   1. 设计令牌与重置
   2. 彩色壁纸（玻璃需要"可折射"的内容）
   3. 玻璃材质核心（.glass / 折射带 / 动态镜面高光 / 渐变边缘）
   4. 悬浮 Dock
   5. 通用组件（按钮、输入、标签、面板、弹窗、Toast）
   6. 题库管理视图
   7. 背诵视图（设置 / 答题 / 结果）
   8. 动画
   9. 响应式与降级
   ========================================================================== */

/* ------------------------------ 1. 令牌 ---------------------------------- */
:root {
  --ink:        #1b2033;
  --ink-2:      #545c75;
  --ink-3:      #8a91a8;
  --accent:     #4a63e7;
  --accent-2:   #8257ea;
  --accent-soft:rgba(74, 99, 231, .12);
  --good:       #0d9b6c;
  --good-soft:  rgba(13, 155, 108, .12);
  --bad:        #df4f66;
  --bad-soft:   rgba(223, 79, 102, .12);

  --glass-a:    rgba(255, 255, 255, .68);
  --glass-b:    rgba(255, 255, 255, .28);
  --glass-line: rgba(255, 255, 255, .72);
  --shadow:     0 20px 52px rgba(38, 50, 105, .13), 0 3px 10px rgba(38, 50, 105, .06);

  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-soft: cubic-bezier(.22, .8, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: #eef1fb;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
::selection { background: rgba(74, 99, 231, .22); }
body.modal-open { overflow: hidden; }

/* ------------------------------ 2. 壁纸 ---------------------------------- */
.wallpaper {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 760px at 6% 2%,  #dce5ff 0%, transparent 62%),
    radial-gradient(920px 720px at 94% 8%,  #ffe2ee 0%, transparent 62%),
    radial-gradient(1000px 900px at 14% 94%, #d6f4ec 0%, transparent 62%),
    radial-gradient(900px 820px at 90% 92%, #e9dfff 0%, transparent 62%),
    linear-gradient(158deg, #f7f9ff 0%, #e9eefb 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(64px); opacity: .5;
  will-change: transform; animation: drift 20s var(--ease-soft) infinite alternate;
}
.blob-a { width: 430px; height: 430px; left: -90px;  top: 8%;   background: linear-gradient(135deg, #8fb4ff, #c2a4ff); }
.blob-b { width: 380px; height: 380px; right: -70px; top: 2%;   background: linear-gradient(135deg, #ffb3d1, #ffd6ae); animation-duration: 24s; animation-delay: -6s; }
.blob-c { width: 460px; height: 460px; left: 22%;    bottom: -180px; background: linear-gradient(135deg, #8ce8d2, #9ec9ff); animation-duration: 26s; animation-delay: -11s; }
.blob-d { width: 330px; height: 330px; right: 16%;   bottom: -120px; background: linear-gradient(135deg, #d9b6ff, #ffc2d8); animation-duration: 22s; animation-delay: -3s; }
.blob-e { width: 260px; height: 260px; left: 48%;    top: 32%;  opacity: .28; background: linear-gradient(135deg, #ffd9a8, #a8d8ff); animation-duration: 18s; animation-delay: -9s; }
.wallpaper-grain {
  position: absolute; inset: 0; opacity: .16; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

/* --------------------------- 3. Liquid Glass ----------------------------- */
/* 核心材质：半透明渐变 + 背景模糊与增艳 + 内高光 + 外阴影 */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(135deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(24px) saturate(185%) brightness(1.045);
  backdrop-filter: blur(24px) saturate(185%) brightness(1.045);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 1px 0 0 rgba(255, 255, 255, .42),
    inset 0 -1px 0 rgba(255, 255, 255, .34),
    inset 0 -14px 28px -22px rgba(74, 99, 231, .55);
  --mx: 50%; --my: 0%;
}
/* 玻璃内的真实内容永远位于特效层之上，保证文字锐利 */
.glass > * { position: relative; z-index: 2; }

/* 边缘折射带：遮罩只保留圆角矩形的外圈，模拟镜片边缘的透镜畸变 */
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; pointer-events: none;
  padding: 26px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.04) 46%, rgba(255,255,255,.22));
  opacity: .55;
}
/* 浏览器支持 SVG 滤镜型 backdrop-filter 时，追加真实的噪声位移折射 */
html.lg-refraction .glass::before {
  -webkit-backdrop-filter: url(#glass-warp);
  backdrop-filter: url(#glass-warp);
}

/* 动态镜面高光：跟随光源（指针）移动，并叠加一圈渐变边缘光 */
.glass::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.42), transparent 68%),
    linear-gradient(135deg, rgba(255,255,255,.30), transparent 30%, transparent 70%, rgba(255,255,255,.14));
  opacity: .72;
  transition: opacity .35s ease;
}
.glass:hover::after { opacity: .95; }

.glass-deep {
  --glass-a: rgba(255,255,255,.78);
  --glass-b: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(34px) saturate(200%) brightness(1.06);
  backdrop-filter: blur(34px) saturate(200%) brightness(1.06);
  box-shadow:
    0 30px 70px rgba(38, 50, 105, .18), 0 4px 14px rgba(38, 50, 105, .07),
    inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(255,255,255,.5);
}
.glass-soft {
  --glass-a: rgba(255,255,255,.50);
  --glass-b: rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  backdrop-filter: blur(16px) saturate(165%);
  box-shadow: 0 10px 30px rgba(38,50,105,.09), inset 0 1px 0 rgba(255,255,255,.85);
}
.glass-inset {
  border-radius: var(--r-md);
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 2px 8px rgba(50,64,120,.08), inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ------------------------------ 4. Dock ---------------------------------- */
.dock {
  position: fixed; z-index: 60; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(1120px, calc(100% - 32px));
  display: flex; align-items: center; gap: 16px;
  padding: 9px 12px 9px 16px; border-radius: 22px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.brand-mark {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 13px; font-size: 19px; font-weight: 700; color: #fff; letter-spacing: 1px;
  background: linear-gradient(145deg, #6c86ff, #8a5bf0 70%, #b370ee);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -3px 8px rgba(30,30,90,.22), 0 8px 18px rgba(90,90,220,.3);
  animation: wobble 7s var(--ease-soft) infinite;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; letter-spacing: .3px; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: .6px; }
.dock-nav { display: flex; gap: 6px; margin: 0 auto; padding: 4px; border-radius: 16px;
  background: rgba(255,255,255,.32); box-shadow: inset 0 1px 4px rgba(50,64,120,.09); }
.dock-tab {
  display: flex; align-items: center; gap: 8px; padding: 9px 20px; border: 0; border-radius: 13px;
  background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600;
  transition: all .38s var(--ease); white-space: nowrap;
}
.dock-tab .ico { width: 17px; height: 17px; }
.dock-tab:hover { color: var(--ink); background: rgba(255,255,255,.42); }
.dock-tab.is-active {
  color: var(--accent);
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.62));
  box-shadow: 0 4px 14px rgba(50,64,120,.12), inset 0 1px 0 #fff;
  transform: translateY(-1px);
}
.dock-meta {
  flex: none; min-width: 76px; text-align: center; padding: 7px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(255,255,255,.75);
}

/* --------------------------- 5. 通用组件 --------------------------------- */
.stage { max-width: 1120px; margin: 0 auto; padding: 118px 20px 150px; }
.view { display: none; }
.view.is-active { display: block; animation: viewIn .55s var(--ease) both; }
.subview { display: none; }
.subview.is-active { display: block; animation: viewIn .5s var(--ease) both; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 10px 4px 26px; }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 2.4px; color: var(--accent); }
.view-head h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); font-weight: 750; letter-spacing: -.6px; line-height: 1.2; }
.lede { margin: 9px 0 0; font-size: 14px; color: var(--ink-2); }
.head-stats { display: flex; gap: 22px; padding: 14px 22px; border-radius: 18px; flex: none; }
.head-stats .hs { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.head-stats .hs b { font-size: 21px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.head-stats .hs span { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.panel { padding: 22px; border-radius: var(--r-xl); }
.panel-title { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; font-size: 16px; font-weight: 700; }
.panel-title .ico { color: var(--accent); }

/* 按钮：胶囊玻璃 + 内高光 + 点击涟漪 */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.82);
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.36));
  -webkit-backdrop-filter: blur(12px) saturate(170%); backdrop-filter: blur(12px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35), 0 6px 18px rgba(38,50,105,.11);
  color: var(--ink); font-size: 13.5px; font-weight: 650; white-space: nowrap;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s ease, opacity .2s;
}
.btn .ico { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 12px 26px rgba(38,50,105,.17); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  color: #fff; border-color: rgba(255,255,255,.46);
  background: linear-gradient(135deg, rgba(86,112,246,.94), rgba(126,88,238,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 8px rgba(30,30,110,.18), 0 12px 28px rgba(74,99,231,.34);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 18px 34px rgba(74,99,231,.42); }
.btn-ghost { background: rgba(255,255,255,.28); color: var(--ink-2); }
.btn-icon { padding: 10px 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 20px; }
.btn-danger-solid { color: #fff; background: linear-gradient(135deg, #e86174, #d8415c); border-color: rgba(255,255,255,.4); box-shadow: 0 10px 24px rgba(223,79,102,.3); }
.ripple { position: absolute; width: 12px; height: 12px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.8), rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%) scale(0); animation: ripple .62s var(--ease-soft) forwards; z-index: 4; }

.glass-input, .glass-select, .search-box, textarea, input[type="text"], input[type="number"], input[type="search"] {
  border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.86);
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 1px 3px rgba(50,64,120,.09), inset 0 1px 0 rgba(255,255,255,.9);
  outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
textarea:focus, .glass-input:focus, .glass-select:focus, .search-box:focus-within {
  border-color: rgba(74,99,231,.55); background: rgba(255,255,255,.78);
  box-shadow: 0 0 0 3px rgba(74,99,231,.14), inset 0 1px 0 #fff;
}
.glass-input, .glass-select { padding: 10px 13px; font-size: 13.5px; }
.glass-select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23545c75' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
textarea { width: 100%; padding: 12px 14px; resize: vertical; font-size: 14px; line-height: 1.65; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
:focus-visible { outline: 2px solid rgba(74,99,231,.6); outline-offset: 2px; }

.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent;
  background: rgba(255,255,255,.42); color: var(--ink-2); transition: all .3s var(--ease); }
.icon-btn:hover { background: #fff; color: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 14px rgba(38,50,105,.13); }
.icon-btn.danger-icon:hover { color: var(--bad); }
.link-btn { border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 650; padding: 4px; }
.link-btn:hover { text-decoration: underline; }

.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 650;
  color: var(--ink-2); background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 #fff; white-space: nowrap; }
.tag-cat { color: var(--accent); background: var(--accent-soft); border-color: rgba(74,99,231,.16); }
.tag-light { color: var(--ink-3); background: rgba(255,255,255,.38); }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; background: var(--accent-soft); color: var(--accent); }

/* 弹窗 */
.modal-layer { position: fixed; inset: 0; z-index: 100; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(24,32,66,.28);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); animation: fadeIn .3s ease both; }
.modal-card { position: relative; width: min(620px, 100%); max-height: 88vh; overflow-y: auto; padding: 24px 26px;
  border-radius: 28px; animation: modalIn .5s var(--ease) both; }
.modal-small { width: min(430px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 720; }
.modal-lede { margin: 0 0 16px; font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.modal-lede b { color: var(--ink); }
.form-field { display: block; margin-bottom: 14px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.form-field em { color: var(--bad); font-style: normal; }
.form-field small { font-weight: 400; color: var(--ink-3); }
.form-field > textarea, .form-field > input, .form-field > select { display: block; margin-top: 7px; width: 100%; }
.form-grid { display: grid; gap: 12px 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.form-grid .glass-input, .form-grid .glass-select { display: block; width: 100%; margin-top: 6px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.8); }
.modal-foot .spacer { flex: 1; }
.form-tip { margin-right: auto; font-size: 11.5px; color: var(--ink-3); }
.import-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.import-file span { font-size: 12px; color: var(--ink-3); }
.import-options { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 14px 0; font-size: 12.5px; color: var(--ink-2); }
.import-options label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.import-preview { padding: 12px 14px; font-size: 12px; line-height: 1.7; color: var(--ink-2); max-height: 110px; overflow: auto; }
.import-preview b { color: var(--accent); }

/* Toast */
.toast-stack { position: fixed; z-index: 200; top: 90px; right: 20px; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: min(340px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 16px; font-size: 13px; font-weight: 600;
  color: var(--ink); background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.56));
  border: 1px solid rgba(255,255,255,.85); box-shadow: 0 14px 34px rgba(38,50,105,.18), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  animation: toastIn .45s var(--ease) both; }
.toast.ok { border-left: 3px solid var(--good); }
.toast.warn { border-left: 3px solid #e6a23c; }
.toast.err { border-left: 3px solid var(--bad); }
.toast.is-out { animation: toastOut .35s ease both; }

/* --------------------------- 6. 题库管理 -------------------------------- */
.bank-panel { margin-bottom: 22px; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(120px, 1fr)) minmax(120px, .9fr); gap: 10px; }
.search-box { display: flex; align-items: center; gap: 9px; padding: 0 12px; height: 41px; color: var(--ink-3); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; box-shadow: none; font-size: 13.5px; }
.search-box input:focus { outline: none; box-shadow: none; }
.search-box .search-clear { border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; padding: 2px; }
.search-box .search-clear .ico { width: 15px; height: 15px; }
.toolbar .glass-select { height: 41px; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.42); font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: all .35s var(--ease); }
.chip:hover { background: #fff; transform: translateY(-2px); }
.chip.is-active { color: #fff; background: linear-gradient(135deg, #6d84f5, #9a6ff0); border-color: rgba(255,255,255,.5);
  box-shadow: 0 6px 16px rgba(90,100,230,.3); }
.action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.more-wrap { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 190px; padding: 7px;
  border-radius: 16px; animation: modalIn .3s var(--ease) both; }
.popover > * { position: relative; z-index: 2; }
.popover button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px;
  background: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: left; }
.popover button:hover { background: rgba(255,255,255,.82); color: var(--accent); }
.popover button.danger:hover { color: var(--bad); background: var(--bad-soft); }
.list-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.75); font-size: 12px; color: var(--ink-3); }

.q-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.q-card { padding: 18px 20px; border-radius: var(--r-lg); animation: cardIn .55s var(--ease) both; animation-delay: var(--d, 0s); }
.q-card:hover { transform: translateY(-3px); }
.q-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.q-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.q-card-actions { display: flex; gap: 5px; flex: none; }
.q-card-stem { margin: 13px 0 12px; font-size: 15.5px; font-weight: 680; line-height: 1.55; letter-spacing: -.1px; }
.q-card-answer { border-top: 1px solid rgba(255,255,255,.8); padding-top: 11px; }
.answer-toggle { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0;
  font-size: 12px; font-weight: 650; color: var(--accent); }
.answer-toggle .caret { transition: transform .35s var(--ease); font-size: 10px; }
.answer-toggle.is-open .caret { transform: rotate(180deg); }
.answer-text { margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.2px; line-height: 1.72; color: var(--ink-2);
  background: rgba(255,255,255,.56); border: 1px solid rgba(255,255,255,.8); animation: reveal .4s var(--ease) both; }
.answer-text b { color: var(--ink); }
.answer-text .note { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(90,100,150,.2);
  font-size: 12px; color: var(--ink-3); }
.empty { padding: 56px 24px; text-align: center; border-radius: var(--r-xl); }
.empty-ico { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent); }
.empty-ico .ico { width: 28px; height: 28px; }
.empty h3 { margin: 16px 0 6px; font-size: 19px; }
.empty p { margin: 0 0 20px; color: var(--ink-2); font-size: 13.5px; }

/* --------------------------- 7. 背诵视图 -------------------------------- */
.setup-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.setup-card { padding: 26px; border-radius: var(--r-xl); }
.field-label { display: block; margin: 4px 0 10px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.size-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; padding: 5px;
  border-radius: 16px; background: rgba(255,255,255,.34); box-shadow: inset 0 1px 5px rgba(50,64,120,.1); }
.size-picker button { padding: 11px 0; border: 0; border-radius: 12px; background: transparent; font-weight: 700;
  font-size: 15px; color: var(--ink-2); transition: all .4s var(--ease); }
.size-picker button:hover { background: rgba(255,255,255,.6); }
.size-picker button.is-active { color: #fff; background: linear-gradient(135deg, #6d84f5, #966cf0);
  box-shadow: 0 7px 18px rgba(90,100,230,.32), inset 0 1px 0 rgba(255,255,255,.5); transform: translateY(-2px); }
.setup-card .glass-input { width: 100%; }
.setup-card .form-grid { margin-top: 18px; }
.pool-info { margin-top: 18px; padding: 13px 16px; font-size: 12.8px; line-height: 1.7; color: var(--ink-2); }
.pool-info b { color: var(--accent); font-size: 15px; }
.setup-side { display: flex; flex-direction: column; }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rule-list li { display: flex; gap: 12px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.rule-list b { flex: none; font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: 1px;
  padding: 1px 7px; height: fit-content; border-radius: 7px; background: var(--accent-soft); }
.side-note { margin: auto 0 0; padding-top: 16px; font-size: 11.5px; color: var(--ink-3); }
.resume-card { margin-top: 20px; padding: 14px 16px; border-radius: 16px; font-size: 12.5px;
  background: linear-gradient(135deg, rgba(74,99,231,.12), rgba(130,87,234,.08));
  border: 1px solid rgba(255,255,255,.8); }
.resume-card strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.resume-card .btn { margin-top: 10px; width: 100%; }

/* 答题顶部进度 */
.play-top { padding: 16px 22px; border-radius: 20px; margin-bottom: 16px; }
.play-top-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 13px; }
.progress-info { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress-info strong { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.progress-info span { font-size: 11.5px; color: var(--ink-3); }
.play-chips { display: flex; gap: 8px; }
.stat-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255,255,255,.8); }
.stat-chip .ico { width: 14px; height: 14px; }
.progress-track { height: 9px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 3px rgba(50,64,120,.13), inset 0 1px 0 #fff; }
.progress-fill { height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #6d84f5, #966cf0 60%, #d084ee);
  box-shadow: 0 0 14px rgba(120,110,240,.55), inset 0 1px 0 rgba(255,255,255,.7);
  transition: width .65s var(--ease); }

/* 题卡 */
.question-card { padding: 34px 38px 26px; border-radius: 34px; min-height: 430px; }
.q-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.q-index { margin: 20px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 2.2px; color: var(--accent); }
.q-stem { margin: 0 0 26px; font-size: clamp(20px, 3vw, 27px); line-height: 1.5; font-weight: 720; letter-spacing: -.4px; }
.q-stem.swap-in, .q-tags.swap-in { animation: swapIn .5s var(--ease) both; }
.answer-area label { display: block; margin-bottom: 9px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.answer-area label small { font-weight: 400; color: var(--ink-3); }
.answer-area textarea { min-height: 104px; font-size: 14.5px; }
.answer-area textarea::placeholder { color: #a5abc0; }

.answer-panel { margin-top: 18px; padding: 20px 22px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(232,244,255,.5));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(38,50,105,.1);
  animation: reveal .5s var(--ease) both; }
.answer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 750; color: var(--good); }
.answer-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.match-badge { padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); }
.answer-body { font-size: 16px; line-height: 1.85; font-weight: 560; white-space: pre-wrap; }
.answer-note { margin-top: 12px; padding-top: 11px; border-top: 1px dashed rgba(90,100,150,.24);
  font-size: 12.8px; line-height: 1.7; color: var(--ink-2); }
.grade-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.9); }
.grade-label { margin-right: auto; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.grade-btn.is-picked { transform: translateY(-2px); }
.grade-yes { color: var(--good); }
.grade-yes.is-picked { color: #fff; background: linear-gradient(135deg, #21b481, #0d9b6c); border-color: rgba(255,255,255,.5);
  box-shadow: 0 10px 22px rgba(13,155,108,.3); }
.grade-no { color: var(--bad); }
.grade-no.is-picked { color: #fff; background: linear-gradient(135deg, #ee7183, #df4f66); border-color: rgba(255,255,255,.5);
  box-shadow: 0 10px 22px rgba(223,79,102,.3); }
.q-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.q-actions-right { display: flex; gap: 10px; }
.kbd-hint { margin: 16px 0 0; text-align: center; font-size: 11px; color: var(--ink-3); }

/* 结果页 */
.result-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 16px; }
.result-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px 24px; border-radius: var(--r-xl); }
.ring { --pct: 0; width: 176px; height: 176px; border-radius: 50%; position: relative; flex: none;
  background: conic-gradient(from -90deg, #6d84f5 0%, #966cf0 calc(var(--pct) * 1%), rgba(255,255,255,.62) calc(var(--pct) * 1%));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), 0 14px 34px rgba(70,90,190,.18);
  transition: --pct 1s ease; }
.ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: rgba(255,255,255,.68);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 #fff; }
.ring-inner { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; text-align: center; }
.ring-inner strong { font-size: 42px; line-height: 1; font-weight: 780; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.ring-inner strong small { font-size: 18px; margin-left: 2px; font-weight: 650; }
.ring-inner span { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.result-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.rs-item { padding: 11px 14px; border-radius: 14px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.85); }
.rs-item b { display: block; font-size: 19px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rs-item span { font-size: 11.5px; color: var(--ink-3); }
.rs-item.good b { color: var(--good); }
.rs-item.bad b { color: var(--bad); }

.result-wrongs { padding: 26px; border-radius: var(--r-xl); }
.wrong-list { display: grid; gap: 11px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.wrong-item { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.52);
  border: 1px solid rgba(255,255,255,.86); box-shadow: inset 0 1px 0 #fff; }
.wrong-item h4 { margin: 0 0 8px; font-size: 14px; font-weight: 680; line-height: 1.55; }
.wrong-item .wi-num { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px;
  border-radius: 7px; font-size: 11px; color: var(--bad); background: var(--bad-soft); vertical-align: 1px; }
.wrong-line { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.65; margin-top: 5px; }
.wrong-line i { flex: none; font-style: normal; font-weight: 700; color: var(--ink-3); }
.wrong-line.mine i { color: var(--bad); }
.wrong-line.right i { color: var(--good); }
.wrong-line span { color: var(--ink-2); word-break: break-word; }
.wrong-empty { padding: 34px 16px; text-align: center; color: var(--ink-2); font-size: 13.5px; }
.wrong-empty b { display: block; font-size: 30px; margin-bottom: 8px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* ------------------------------ 8. 动画 ---------------------------------- */
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(50px, -36px, 0) scale(1.12); }
  100% { transform: translate3d(-34px, 48px, 0) scale(.94); }
}
@keyframes wobble { 0%,100% { border-radius: 13px; } 50% { border-radius: 18px 11px 16px 12px; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes swapIn { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes ripple { to { transform: translate(-50%,-50%) scale(24); opacity: 0; } }

/* ------------------------- 9. 响应式 / 降级 ------------------------------ */
@media (max-width: 960px) {
  .toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar .search-box { grid-column: 1 / -1; }
  .q-list { grid-template-columns: 1fr; }
  .setup-grid, .result-grid { grid-template-columns: 1fr; }
  .result-hero { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .result-stats { max-width: 340px; }
}
@media (max-width: 700px) {
  .stage { padding: 96px 14px 130px; }
  .dock { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px);
    padding: 7px; gap: 0; border-radius: 20px; }
  .brand, .dock-meta { display: none; }
  .dock-nav { width: 100%; margin: 0; padding: 3px; }
  .dock-tab { flex: 1; justify-content: center; padding: 10px 6px; font-size: 12.5px; }
  .dock-tab.is-active { transform: none; }
  .view-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .head-stats { justify-content: space-around; padding: 12px; }
  .toolbar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .toolbar .search-box { grid-column: 1 / -1; }
  .panel { padding: 16px; border-radius: 22px; }
  .action-row { flex-direction: column; align-items: stretch; }
  .action-buttons { display: grid; grid-template-columns: repeat(3, 1fr); }
  .action-buttons .btn { padding: 10px 6px; font-size: 12.5px; }
  .more-wrap { grid-column: 3; justify-self: end; }
  .q-card { padding: 16px; }
  .q-card-stem { font-size: 14.5px; }
  .question-card { padding: 24px 20px 22px; min-height: 0; border-radius: 26px; }
  .q-stem { font-size: 20px; margin-bottom: 20px; }
  .q-actions { flex-direction: column-reverse; align-items: stretch; }
  .q-actions-right { display: grid; grid-template-columns: 1fr; }
  .q-actions-right .btn { width: 100%; }
  .grade-label { width: 100%; }
  .grade-row .btn { flex: 1; }
  .kbd-hint { display: none; }
  .play-top { padding: 13px 15px; }
  .progress-info strong { font-size: 15px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .modal { padding: 10px; align-items: flex-end; }
  .modal-card { max-height: 90vh; padding: 20px 18px; border-radius: 24px; }
  .toast-stack { top: auto; bottom: 88px; right: 12px; left: 12px; max-width: none; }
  .result-actions .btn { flex: 1; min-width: 130px; }
  .ring { width: 148px; height: 148px; }
  .ring-inner strong { font-size: 34px; }
}
@media (max-width: 380px) {
  .toolbar { grid-template-columns: 1fr; }
  .action-buttons { grid-template-columns: repeat(2, 1fr); }
  .more-wrap { grid-column: 2; }
}

/* 不支持 backdrop-filter 的浏览器：加厚半透明底色，仍保持玻璃观感 */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass { background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.82)); }
  .glass-deep { background: linear-gradient(135deg, #fff, rgba(255,255,255,.94)); }
  .glass-soft { background: rgba(255,255,255,.9); }
  .glass::before { opacity: .3; }
  .glass::after { opacity: .25; }
  .btn { background: rgba(255,255,255,.92); }
  .modal-backdrop { background: rgba(24,32,66,.5); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .blob { animation: none; }
}
