/* ==========================================================================
   Quiz · iOS 设计系统
   --------------------------------------------------------------------------
   一套令牌驱动前后台：iOS 系统色板、20px 卡片圆角、16px 控件圆角、玻璃拟态、
   上浮/回弹手感、滑入与呼吸动画。页面样式表（exam*.css）只做版式，不再自建
   颜色、圆角与阴影，避免同一界面出现两套观感。

   令牌命名保留 --text / --muted / --line / --background 等旧名，其他样式表与
   视图里的内联样式仍可继续读取。
   ========================================================================== */

:root {
  color-scheme: light;
  --font-text: "Times New Roman", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  /* iOS 系统色 */
  --ios-blue: var(--brand-color, #F79A3E);
  --ios-green: #34C759;
  --ios-gold: #FF9500;
  --ios-red: #FF3B30;
  --ios-dark: #1C1C1E;
  --ios-gray: #8E8E93;
  --ios-gray-2: #AEAEB2;
  --ios-gray-3: #C7C7CC;
  --ios-light: #F2F2F7;

  /* 品牌色由布局内联写入；--brand-text 在浅灰底上保证 4.5:1 对比度 */
  --brand-color: #F79A3E;
  --brand-soft: rgba(var(--brand-rgb), .12);
  --brand-rgb: 0, 122, 255;
  --brand-text: var(--brand-color);
  --brand-text: oklch(from var(--brand-color) min(l, 0.5) c h);

  /* 语义色 */
  --text: #1C1C1E;
  --text-2: #3A3A3C;
  --text-3: #63636A;
  --muted: #8E8E93;
  --line: #E5E5EA;
  --line-strong: #D1D1D6;
  --surface: #FFFFFF;
  --background: #F2F2F7;
  --fill: #F2F2F7;
  --fill-strong: #E9E9EE;
  --success-text: #1C6B34;
  --success-bg: #EFFAF1;
  --success-line: #C9EFD4;
  --warn-text: #8A4B00;
  --warn-bg: #FFF8ED;
  --warn-line: #FFD9A8;
  --danger-text: #C40010;
  --danger-bg: #FFF2F1;
  --danger-line: #FFC9C4;

  /* 形状 */
  --radius: 20px;
  --card-radius: 20px;
  --card-padding: 16px;
  --card-border: 0;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --control-radius: 16px;
  --button-radius: 16px;
  --field-radius: 14px;
  --pill-radius: 980px;

  /* 按钮 */
  --button-bg: #FFFFFF;
  --button-hover-bg: #F7F7F9;
  --button-weight: 550;

  /* 阴影与运动 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .10);
  --shadow-lg: 0 18px 60px rgba(0, 0, 0, .18);
  --ease: cubic-bezier(.25, .46, .45, .94);
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --header-bg: rgba(251, 251, 253, .82);
  --header-border: 0;
  --header-blur: saturate(180%) blur(20px);
}

* { box-sizing: border-box; }

/* 浏览器默认 <small> 是 0.8em，在 12px 表格文字里会掉到 9.6px。 */
small { font-size: max(12px, 0.8em); }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.62;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
table { max-width: 100%; }
input, textarea, select { min-width: 0; max-width: 100%; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand-color); flex-shrink: 0; }
[hidden] { display: none !important; }

/* 焦点环统一用品牌色的柔和外扩光圈，不改元素自身圆角：
   outline 会跟随元素已有的 border-radius，胶囊/圆钮保持原形状。
   Tailwind preflight 另给输入框写了硬编码 #007aff 的边框和 1px 蓝色 ring，
   这里覆盖掉，避免自定义搜索框、数字框里出现一个蓝色矩形。 */
:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), .35);
  outline-offset: 2px;
}
input[type]:focus,
select:focus,
textarea:focus {
  border-color: rgba(var(--brand-rgb), .5);
  box-shadow: none;
}
/* 与 preflight 同为 (0,2,0)，本文件在其后加载，因此生效；
   自带焦点样式的组件用更高特异度覆盖即可。 */
input[type]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), .25);
  outline-offset: 2px;
}

/* 跨文档过渡（Chromium）：换页淡入淡出，像原生 App 切页。 */
@view-transition { navigation: auto; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.public-main, .workspace-main, .auth-container { animation: page-in .28s var(--ease-out) both; }

/* 标题层级：Tailwind preflight 会把字体大小重置为继承，这里给出内容区默认值。 */
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
p { margin: 0 0 .75em; overflow-wrap: anywhere; }
p:last-child { margin-bottom: 0; }
.public-main h1, .workspace-main h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.035em; }
.public-main h2, .workspace-main h2 { font-size: 20px; font-weight: 650; }
.public-main h3, .workspace-main h3 { font-size: 16px; font-weight: 600; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  padding: .7rem 1rem; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-md); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ==========================================================================
   通用排版助手
   ========================================================================== */
.eyebrow, .nav-label {
  display: inline-block;
  font-size: 12px; font-weight: 650; letter-spacing: .06em;
  color: var(--brand-text); text-transform: none;
}
.quiet { color: var(--muted); }
.stack { display: grid; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row > div, .row > form, .form-grid > * { min-width: 0; }
.push { margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.container-wide { max-width: 1280px; margin: auto; }
.prose { max-width: none; }
.keyline { border-top: 1px solid var(--line); margin: 20px 0; }
.sr-feedback { font-size: 13px; color: var(--muted); }
.section-title { letter-spacing: -.025em; }

/* 阅读正文：英文材料用衬线体，中文回落到系统黑体。 */
.study-text {
  white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: var(--font-text);
  font-size: 17px; line-height: 1.9; letter-spacing: 0;
}
.study-text > strong:first-child { font-weight: 700; }
/* 材料正文按段落排版：首行缩进 2 字符并留出段间距，读者能一眼分清每段起止。
   标题行（Directions / 首行标题 / Part 等）不缩进，保持左对齐。 */
.study-text .exam-para { text-indent: 2em; margin: 0; }
.study-text .exam-para + .exam-para { margin-top: .7em; }
.study-text .exam-para.is-heading { text-indent: 0; margin-top: 0; margin-bottom: .4em; }
.study-text .exam-para.is-heading + .exam-para { margin-top: .2em; }
.study-text .exam-para > strong { font-weight: 700; }
/* 只让材料正文自然折行、两端对齐；保留任务、标题与提纲的原有排版。 */
.learn-material [data-material-text]:not(.is-task) .exam-para:not(.is-heading),
.learn-material .learn-paragraph .study-text {
  white-space: normal; text-align: justify; text-align-last: start;
}

/* 完形填空的空位：题号坐在一段固定宽度的下划线上，既看得出是“空”，
   也知道是第几题。裸数字会和正文里的 1%、30,000 混在一起。 */
.study-text .exam-blank {
  display: inline-block; min-width: 3em; margin: 0 .12em;
  padding: 0 .18em; border-bottom: 1.5px solid currentColor;
  /* 数字在横线正中间：inline-block 会继承正文的大行高，若不显式收窄，
     内部行盒比内容高，数字会被顶到上沿、看起来没坐在横线上。 */
  line-height: 1.2; text-align: center; text-indent: 0;
  vertical-align: baseline;
}
.study-text .exam-blank-no {
  display: inline-block; width: 100%;
  font-size: .82em; line-height: inherit; opacity: .7;
  font-variant-numeric: tabular-nums; text-align: center;
}

/* 材料里的数据表（写作题图表、表格作文）：去掉正文的 pre-wrap 与缩进，
   表头浅底、单元格加边框，窄屏可横向滚动。 */
.study-text { white-space: pre-wrap; }
.study-text .exam-table-wrap {
  white-space: normal; text-indent: 0;
  margin: .6em 0 .8em; overflow-x: auto;
}
.study-text .exam-data-table {
  border-collapse: collapse; width: 100%; min-width: 320px;
  font-size: 15px; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.study-text .exam-data-table th,
.study-text .exam-data-table td {
  border: 1px solid var(--line, #d9dee6);
  padding: .45em .7em; text-align: left;
}
.study-text .exam-data-table th {
  background: var(--background, #f3f6fa); font-weight: 700;
  text-align: center;
}
.study-text .exam-data-table td { text-align: center; }

/* 听力讲座笔记（Talk / 讲座填空）：逐条成行，● 一级、— 二级，
   小标题加粗但不再缩进，读起来就是原卷那张提纲。 */
.study-text .exam-outline { white-space: normal; text-indent: 0; }
.study-text .exam-outline > * { text-indent: 0; }
.study-text .exam-outline-title {
  font-weight: 700; font-size: 1.06em; margin: 0 0 .55em;
}
.study-text .exam-outline-heading {
  font-weight: 700; margin: 1.05em 0 .3em;
}
.study-text .exam-outline-heading:first-child { margin-top: 0; }
.study-text .exam-outline-note { margin: .55em 0 0; }
.study-text .exam-outline-item {
  display: flex; align-items: flex-start; gap: .5em;
  margin: .32em 0; line-height: 1.7;
}
.study-text .exam-outline-item.is-level-1 { padding-left: 1.55em; }
.study-text .exam-outline-bullet {
  flex: none; min-width: .95em; color: var(--muted);
  font-size: .92em; line-height: 1.9;
}
.study-text .exam-outline-text { min-width: 0; flex: 1; }
/* 正文里的分条（写作题的多条要求）：缩进挂到上一条之下，不能压成一段。 */
.study-text .exam-bullet-line { display: block; text-indent: 0; padding-left: 1.1em; }
.study-text .exam-bullet-line + .exam-bullet-line { margin-top: .18em; }

/* ==========================================================================
   卡片与容器
   ========================================================================== */
.card,
.glass-card {
  min-width: 0;
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
}
.glass-card {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
}
.shadow-soft { box-shadow: var(--card-shadow); }

/* 分区标题条：左标题右动作 */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.section-head h2 { font-size: 18px; margin: 0; }
.section-head > span, .section-head .quiet { font-size: 12px; }

/* ==========================================================================
   按钮：主＝墨黑实心，次＝浅灰，第三次＝纯文字
   参考稿 button-hover：悬停上浮 2px + 抬升阴影，按下回弹 0.98
   ========================================================================== */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 18px; max-width: 100%;
  border: 1px solid transparent; border-radius: var(--button-radius);
  background: var(--fill); color: var(--text);
  font-size: 14px; font-weight: var(--button-weight); line-height: 1.4;
  text-align: center; overflow-wrap: anywhere;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s, border-color .18s;
}
.button:hover { background: var(--fill-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.button:active { transform: translateY(0) scale(.98); box-shadow: none; transition-duration: .08s; }
.button-primary { background: var(--ios-dark); border-color: var(--ios-dark); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); }
.button-primary:hover { background: #2C2C2E; border-color: #2C2C2E; box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
.button-secondary { background: var(--surface); border-color: var(--line); }
/* VIP 入口统一形态：皇冠 + 功能名 + 「会员权益」。未开通用户看到的是可点的入口，
   而不是被隐藏的功能，也不会误以为是当前可用。 */
.vip-entry { gap: 6px; }
.vip-entry .vip-crown, .vip-entry-text .vip-crown { width: 17px; height: 17px; flex: 0 0 auto; }
.vip-entry-note { padding: 0 7px; border-radius: 999px; background: rgba(var(--brand-rgb, 0 122 255), .1); color: var(--brand-text, #0a66d0); font-size: 11px; font-weight: 650; line-height: 1.8; white-space: nowrap; }
.vip-entry-text { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.button-secondary:hover { background: var(--surface); border-color: var(--line-strong); }
.button-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-text); }
.button-danger:hover { background: #FFE7E5; border-color: #FFB4AE; }
.button[aria-pressed="true"] { background: var(--ios-dark); border-color: var(--ios-dark); color: #fff; }
.button-sm, .button.is-small { min-height: 34px; padding: 5px 13px; font-size: 13px; border-radius: 12px; }
.button-block { width: 100%; }

.icon-button {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  border: 0; border-radius: 50%; background: var(--fill);
  color: var(--text-2); font-size: 16px; line-height: 1;
  --tap-min: 38px;
  transition: transform .18s var(--ease), background .18s;
}
.icon-button:hover { background: var(--fill-strong); transform: translateY(-1px); }
.icon-button:active { transform: scale(.94); }

/* 分段控件：iOS 分段 + 滑动指示器（JS 设置 transform/width，CSS 负责过渡） */
.segmented {
  position: relative; display: inline-flex; align-items: stretch;
  padding: 3px; border-radius: 15px; background: var(--fill-strong);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented-scroller { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.segmented-scroller > .segmented { flex: 1 1 auto; min-width: 0; }
.segmented > a, .segmented > button, .segmented > label {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 15px; min-height: 34px; border: 0; background: none;
  font-size: 13px; font-weight: 600; color: var(--muted);
  white-space: nowrap; border-radius: 12px;
  transition: color .2s var(--ease);
}
.segmented > a:hover, .segmented > button:hover { color: var(--text); }
.segmented > [aria-current="page"], .segmented > [aria-selected="true"], .segmented > .is-active { color: var(--text); }
.segmented-indicator {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0;
  border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform .28s var(--ease-out), width .28s var(--ease-out), opacity .2s;
}
.segmented-indicator[data-ready="0"] { opacity: 0; }
/* 考试类别比屏幕宽时可以横向滑动：边缘渐隐提示还有选项，拖拽时禁用内部点按。 */
.segmented { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.segmented[data-overflow="start"] {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px);
  mask-image: linear-gradient(to right, transparent 0, #000 20px);
}
.segmented[data-overflow="end"] {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 20px);
  mask-image: linear-gradient(to left, transparent 0, #000 20px);
}
.segmented[data-overflow="both"] {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.segmented[data-dragging="1"] { cursor: grabbing; }
.segmented[data-dragging="1"] > * { pointer-events: none; }

/* 年份胶囊条：横向滚动，不换行。滚轮、拖动、两侧按钮都能翻页。 */
.chip-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 3px; border-radius: var(--pill-radius); }
.chip-row[data-dragging="1"] { cursor: grabbing; }
.chip-row[data-dragging="1"] .chip { pointer-events: none; }
/* 可横向溢出的胶囊条：两侧渐隐提示还有内容。 */
.chip-scroller { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.chip-scroller .chip-row { flex: 1 1 auto; min-width: 0; }
.chip-scroller[data-overflow="start"] .chip-row {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px);
  mask-image: linear-gradient(to right, transparent 0, #000 26px);
}
.chip-scroller[data-overflow="end"] .chip-row {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 26px);
  mask-image: linear-gradient(to left, transparent 0, #000 26px);
}
.chip-scroller[data-overflow="both"] .chip-row {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.chip-scroll-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 50%; background: var(--surface); color: var(--text-2);
  font-size: 16px; line-height: 1; cursor: pointer;
  --tap-min: 30px;
  transition: border-color .18s, color .18s, background .18s, opacity .18s;
}
/* 箭头用 SVG：文本 ‹ › 的字形在行框里偏上，靠 flex 居中很难真正对齐圆心。 */
.chip-scroll-btn > .ui-icon { width: 16px; height: 16px; }
.chip-scroll-btn:hover { border-color: var(--line-strong); color: var(--text); }
.chip-scroll-btn[hidden] { display: none; }
.chip-scroll-btn:disabled { opacity: .32; cursor: default; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; min-height: 34px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: var(--pill-radius);
  background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s;
}
.chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--ios-dark); border-color: var(--ios-dark); color: #fff;
}
.chip small { font-size: 12px; font-weight: 500; opacity: .6; }

/* 状态胶囊 */
.pill, .badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--pill-radius); padding: 3px 10px;
  font-size: 12px; line-height: 1.7; font-weight: 550;
  background: var(--fill); color: var(--muted);
  overflow-wrap: anywhere; white-space: nowrap;
}
.pill.blue { background: rgba(var(--brand-rgb), .10); color: var(--brand-text); }
.pill.good, .pill.success { background: var(--success-bg); color: var(--success-text); }
.pill.warn, .pill.warning { background: var(--warn-bg); color: var(--warn-text); }
.pill.danger { background: var(--danger-bg); color: var(--danger-text); }
.pill.live { background: var(--success-bg); color: var(--success-text); }
.pill.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ios-green); animation: pulse-dot 2s var(--ease) infinite;
}
.pill.outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }

/* ==========================================================================
   表单
   ========================================================================== */
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-field small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; min-height: 42px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: var(--field-radius);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: var(--line-strong); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: rgba(var(--brand-rgb), .65);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12);
}
.form-field textarea { padding: 11px 13px; line-height: 1.7; }
.form-field > label .form-optional {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--fill); color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}

/* 邮箱建议：输入 @ 后弹出常用后缀；非常用后缀显示纠错提示 */
.email-field { position: relative; }
.email-input-wrap { position: relative; min-width: 0; }
.email-input-wrap > input { padding-right: 13px; }
.email-suggest {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  /* 只显示约 4 项高度，减少遮挡下方「忘记密码 / 验证码」等控件。 */
  max-height: 176px; overflow-y: auto; overscroll-behavior: contain; padding: 5px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  -webkit-overflow-scrolling: touch;
}
/* 窄屏用更紧凑的行高，让列表不超过输入框下方一行提示的高度。 */
@media (max-width: 520px) {
  .email-suggest { max-height: 152px; }
  .email-suggest-item { padding: 7px 10px; }
}
.email-suggest[hidden] { display: none; }
.email-suggest-item {
  display: block; width: 100%; padding: 8px 11px;
  border: 0; border-radius: 10px; background: none;
  color: var(--text-2); font-size: 13.5px; font-weight: 550;
  text-align: left; cursor: pointer; white-space: nowrap;
}
.email-suggest-item:hover,
.email-suggest-item[aria-selected="true"] { background: rgba(var(--brand-rgb), .12); color: var(--text); }
.form-field small.is-warning { color: var(--warn-text); }
.form-field small.is-ok { color: var(--success-text); }
.email-correction {
  margin: 0; padding: 8px 11px; border-radius: 10px;
  background: var(--warn-bg); color: var(--warn-text);
  font-size: 12.5px; line-height: 1.6;
}
.email-correction[hidden] { display: none; }
.email-correction-apply {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.email-domain-warning {
  display: grid; gap: 8px; padding: 11px 13px; border-radius: 12px;
  background: var(--warn-bg); color: var(--warn-text);
  font-size: 12.5px; line-height: 1.65;
}
.email-domain-warning p { margin: 0; }
.email-domain-warning .email-confirm {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; font-weight: 550; cursor: pointer;
}
.email-domain-warning .email-confirm input { width: 15px; height: 15px; margin: 2px 0 0; flex: 0 0 auto; accent-color: currentColor; }

.notice {
  border: 0; border-radius: 14px; padding: 13px 16px;
  background: rgba(var(--brand-rgb), .08); color: var(--text);
  font-size: 13px; line-height: 1.7;
}
.error-box {
  border: 0; border-radius: 14px; padding: 13px 16px;
  background: var(--danger-bg); color: var(--danger-text);
  font-size: 13px; line-height: 1.7;
}

/* 提示条（flash） */
.flash { display: grid; gap: 8px; margin-bottom: 16px; }
.flash-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  font-size: 13px; line-height: 1.65;
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.flash-item::before {
  content: ''; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px;
  border-radius: 50%; background: var(--ios-blue);
}
.flash-item.success { background: var(--success-bg); color: var(--success-text); }
.flash-item.success::before { background: var(--ios-green); }
.flash-item.danger { background: var(--danger-bg); color: var(--danger-text); }
.flash-item.danger::before { background: var(--ios-red); }
.flash-item.warning { background: var(--warn-bg); color: var(--warn-text); }
.flash-item.warning::before { background: var(--ios-gold); }

/* ==========================================================================
   统计、进度、空状态
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-grid .card { padding: 16px 18px; }
.stat-number {
  font-size: 30px; line-height: 1.25; font-weight: 700;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums;
}
.stat-number small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.progress-track { height: 5px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.progress-track > span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-color), color-mix(in oklab, var(--brand-color), #fff 22%));
  transition: width .5s var(--ease-out);
}

.empty-state {
  text-align: center; padding: 56px 24px; color: var(--muted);
  display: grid; justify-items: center; gap: 6px;
}
.empty-state h2 { font-size: 19px; color: var(--text); margin: 0; }
.empty-state p { margin: 0; font-size: 14px; max-width: 52em; }
.empty-state .button, .empty-state a.button { margin-top: 12px; }
.empty-icon, .exam-empty-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--fill); color: var(--ios-gray);
  font-size: 22px; line-height: 1; margin-bottom: 6px;
}

/* ==========================================================================
   表格
   ========================================================================== */
.responsive-table, .overflow-x-auto {
  min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
}
.responsive-table table { width: 100%; min-width: 540px; border-collapse: collapse; }
/* 宽屏表格（如后台统计列较多）给更大的可读下限 */
.management-table { min-width: 720px; }
.responsive-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  background: transparent; white-space: nowrap; padding: 10px 14px;
}
.responsive-table td {
  padding: 12px 14px; font-size: 14px;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.responsive-table tbody tr:last-child td { border-bottom: 0; }
.responsive-table tbody tr { transition: background .16s; }
.responsive-table tbody tr:hover > td { background: #FAFAFC; }
.dashboard-activity-table td:first-child { min-width: 120px; }
.dashboard-activity-table td:last-child { white-space: nowrap; color: var(--muted); }

/* ==========================================================================
   站点外壳 · 公共页
   ========================================================================== */
.public-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg);
  border-bottom: var(--header-border);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}
.public-header-inner {
  max-width: 1440px; margin: auto;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 28px; min-height: 60px;
}
.public-nav {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 550; flex-shrink: 0; margin-left: auto;
}
.nav-user-group { display: flex; align-items: center; gap: 4px; margin-left: 5px; padding-left: 8px; border-left: 1px solid var(--line); }
.public-nav > a, .nav-user-group > a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 10px; border-radius: 12px; color: var(--text-2);
  transition: background .18s, color .18s;
}
.public-nav > a:hover, .nav-user-group > a:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.public-nav > a[aria-current="page"], .nav-user-group > a[aria-current="page"] { color: var(--brand-text); background: rgba(var(--brand-rgb), .20); }
/* 会员中心入口常亮：始终主题色文字 + 主题色底填充；选中页加深底色，与未选中拉开层次。
   选择器带 .nav-user-group 前缀：否则 (0,1,0) 压不过 .nav-user-group > a 的 (0,1,1)，文字会回落成深灰。 */
.nav-user-group .nav-member-entry { color: var(--brand-text); background: var(--fill); font-weight: 650; }
.nav-user-group .nav-member-entry:hover { color: var(--brand-text); background: var(--fill-strong); }
.nav-user-group .nav-member-entry[aria-current="page"] { color: var(--brand-text); background: rgba(var(--brand-rgb), .20); }
.nav-user-group .nav-member-entry .nav-plan-status { background: rgba(255, 255, 255, .72); color: var(--brand-text); font-weight: 650; }
.public-nav form { margin: 0; }
.nav-logout {
  border: 0; background: none; color: var(--muted); font-size: 14px;
  min-height: 40px; padding: 8px 12px; border-radius: 12px;
}
.nav-logout:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.header-login {
  display: inline-flex; align-items: center; min-height: 38px; padding: 8px 16px;
  background: var(--ios-dark); color: #fff !important;
  border-radius: var(--pill-radius); font-weight: 550; font-size: 13px;
  transition: transform .18s var(--ease), box-shadow .18s;
}
.header-login:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ui-icon { display: inline-block; width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.nav-plan-status { padding: 2px 5px; border-radius: 5px; background: rgba(var(--brand-rgb), .12); color: var(--brand-text); font-size: 10px; line-height: 1.4; }
.nav-account { position: relative; }
.nav-account-trigger { display: flex; align-items: center; gap: 7px; padding: 8px 10px; min-height: 40px; border-radius: 12px; color: var(--text-2); cursor: pointer; list-style: none; white-space: nowrap; }
.nav-account-trigger::-webkit-details-marker { display: none; }
.nav-account-trigger > .ui-icon:last-child { width: 14px; height: 14px; transition: transform .18s; }
.nav-account[open] .nav-account-trigger > .ui-icon:last-child { transform: rotate(180deg); }
.nav-account-trigger:hover, .nav-account[open] .nav-account-trigger { background: var(--fill); }
.nav-account-trigger.is-current { color: var(--brand-text); background: rgba(var(--brand-rgb), .10); }
.nav-account-panel { position: absolute; right: 0; top: calc(100% + 9px); z-index: 50; min-width: 220px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.nav-account-panel a, .nav-account-panel .nav-logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--text-2); text-align: left; font-size: 14px; }
.nav-account-panel a:hover, .nav-account-panel .nav-logout:hover { background: var(--fill); }
.nav-account-panel a[aria-current="page"] { color: var(--brand-text); background: rgba(var(--brand-rgb), .10); }
.nav-account-panel form { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.nav-section-label { margin: 15px 12px 5px; color: var(--text-3); font-size: 11px; font-weight: 650; }
.segmented a:has(.ui-icon) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.segmented .ui-icon { width: 16px; height: 16px; }
.sidebar-bottom a { display: inline-flex; align-items: center; gap: 7px; }
.nav-account-trigger:focus-visible, .nav-account-panel a:focus-visible, .nav-account-panel button:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 3px; }
@media (min-width: 1001px) and (max-width: 1180px) {
  .public-header-inner { gap: 12px; }
  .public-nav { font-size: 13px; gap: 2px; }
  .public-nav > a, .nav-user-group > a, .nav-account-trigger { padding-inline: 7px; gap: 6px; }
  .nav-user-group { gap: 2px; margin-left: 2px; padding-left: 5px; }
}
.public-main { max-width: 1680px; margin: auto; padding: 16px 28px 40px; min-height: 70vh; }
/* 普通内容页限宽；作答和录题保留各自工作区布局。 */
.learner-page { width: 100%; max-width: 1200px; min-width: 0; margin: 4px auto 0; }
.learner-page--wide { max-width: 1280px; }
/* PC 菜单页面与首页试卷列表保持相同的内容边界。 */
@media (min-width: 1001px) {
  .public-main > .membership-page,
  .public-main > .bug-feedback,
  .public-main > .profile-page,
  .public-main > .profile-page.profile-page-account { max-width: 1280px; }
}
.learner-page > .home-hero, .learner-page > .paper-hero, .learner-page > .compose-hero { margin-bottom: 22px; }
.membership-page > .membership-hero { margin-bottom: 22px; }
.membership-page > .membership-stack { gap: 20px; }
.know-page > .know-hero { margin-bottom: 22px; }
.know-groups { gap: 24px; }
.learner-page .know-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); }
.learner-page .vocab-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr)); }
.public-footer {
  max-width: 1680px; margin: auto; padding: 34px 28px 26px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.site-footer-main {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 26px 34px;
}
.site-footer-brand { flex: 1 1 320px; max-width: 540px; min-width: 0; }
.site-footer-brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.site-footer-brand-link .brand-image { height: 30px; max-width: 130px; }
.site-footer-brand-link strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.site-footer-brand-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.site-footer-description { max-width: 34em; margin: 12px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.75; }
.site-footer-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--brand-text); font-size: 13px; font-weight: 550;
}
.site-footer-cta span { transition: transform .18s var(--ease); }
.site-footer-cta:hover span { transform: translateX(3px); }
.site-footer-rights {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  margin: 12px 0 0; padding: 8px 14px; border-radius: 14px;
  background: rgba(var(--brand-rgb, 247 154 62), .10);
  color: var(--text-2); font-size: 12.5px; line-height: 1.6;
}
.site-footer-rights a { color: var(--brand-text); font-weight: 600; }
.site-footer-rights a.site-footer-cta { margin-top: 0; }
.site-footer-nav { flex: 0 1 130px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.site-footer-nav h2 {
  margin: 0 0 3px; color: var(--text); font-size: 12px; font-weight: 650;
  letter-spacing: .04em;
}
.site-footer-nav a { color: var(--text-2); font-size: 13px; line-height: 1.4; transition: color .16s, transform .16s; }
.site-footer-nav a:hover { color: var(--brand-text); transform: translateX(2px); }
.site-footer-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.6; color: var(--muted);
}
.site-footer-meta p { margin: 0; }
.site-footer-meta-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-footer-meta-links a { color: var(--muted); }
.site-footer-meta-links a:hover { color: var(--brand-text); }
/* 版权声明里的联系邮箱与正文同色，靠下划线表明可点击，不抢版面。 */
.site-footer-meta-links span a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer :focus-visible { outline: 2px solid var(--brand-color); outline-offset: 3px; }
@media (max-width: 700px) {
  .public-footer { padding: 26px 16px 22px; }
  .site-footer-main { gap: 22px 18px; }
  .site-footer-brand { flex-basis: 100%; max-width: none; }
  .site-footer-nav { flex: 1 1 40%; }
  .site-footer-meta { flex-direction: column; align-items: flex-start; margin-top: 20px; }
}

/* 品牌 */
.shell-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.shell-brand > span:last-child { min-width: 0; }
.shell-brand strong { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.021em; }
.shell-brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.brand-symbol { display: flex; align-items: center; flex: 0 0 auto; max-width: 140px; }
.brand-image { display: block; width: auto; height: 32px; max-width: 140px; object-fit: contain; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 12px;
  background: #fffaf2;
  color: var(--brand-color); font-size: 20px; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), 0 4px 14px rgba(var(--brand-rgb), .18);
}
.brand-mark-glyph { display: block; width: 74%; height: 74%; object-fit: contain; }

/* ==========================================================================
   站点外壳 · 后台
   ========================================================================== */
.workspace-shell {
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
.workspace-sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 18px 12px;
  background: rgba(251, 251, 253, .92);
  border-right: 1px solid rgba(0, 0, 0, .06);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  scrollbar-width: thin;
}
.workspace-sidebar .shell-brand { padding: 0 8px; margin-bottom: 16px; }
.nav-label { margin: 4px 12px 8px; color: var(--muted); font-weight: 600; letter-spacing: .05em; font-size: 11px; }
.shell-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0; border-radius: 12px;
  color: var(--text-2); font-weight: 550; font-size: 14px;
  transition: background .18s, color .18s, transform .18s;
  overflow-wrap: anywhere;
}
.shell-nav-link:hover { background: rgba(0, 0, 0, .045); color: var(--text); }
.shell-nav-link .nav-icon {
  display: inline-grid; place-items: center;
  width: 20px; flex: 0 0 auto;
  font-size: 13px; line-height: 1; color: var(--muted);
  transition: color .18s;
}
.shell-nav-link.current .nav-icon { color: var(--brand-text); }
.shell-nav-link:hover .nav-icon { color: var(--text-2); }
.shell-nav-link.current {
  background: #fff; color: var(--brand-text); font-weight: 650;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .05);
}
.sidebar-bottom {
  margin-top: auto; padding: 16px 12px 4px;
  border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.sidebar-bottom a { font-weight: 600; font-size: 13px; color: var(--brand-text); }
.sidebar-bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sidebar-bottom span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.workspace-body { min-width: 0; }
.workspace-header {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 58px; padding: 10px 24px;
  background: rgba(251, 251, 253, .82);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
}
.workspace-page-title { min-width: 0; flex: 1; }
.workspace-page-title h1 { font-size: 21px; font-weight: 650; letter-spacing: -.03em; margin: 0; }
.workspace-header .eyebrow { display: none; }
.workspace-main { padding: 16px 22px 40px; max-width: 1720px; margin: auto; }
.shell-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; max-width: 220px;
  border-radius: var(--pill-radius); background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 13px; font-weight: 550; color: var(--text-2);
  overflow-wrap: anywhere;
}
.shell-user:hover { box-shadow: var(--shadow-sm); }
.workspace-mobile-brand { display: none; }

/* 移动端抽屉 → iOS 风格底部抽屉（毛玻璃 + 抓握条 + 上滑入场） */
.shell-menu-toggle, .shell-menu-close {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  border: 0; border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 13px; font-weight: 600; flex-shrink: 0;
  --tap-min: 40px;
}
.shell-menu-toggle { display: none; }
.shell-menu-toggle > span { font-size: 17px; line-height: 1; }
.shell-menu-close { padding: 7px 13px; border-radius: 999px; background: rgba(0, 0, 0, .055); box-shadow: none; color: var(--text-2); }
.shell-menu-close:hover { background: rgba(0, 0, 0, .09); }
.shell-menu {
  position: fixed; inset: auto 0 0 0;
  width: auto; max-width: none; height: auto; max-height: calc(100dvh - 56px);
  margin: 0; padding: 4px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border: 0;
  border-radius: 26px 26px 0 0;
  background: rgba(251, 251, 253, .97);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  color: var(--text); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 -10px 44px rgba(0, 0, 0, .20);
}
.shell-menu::before {
  content: ""; display: block; width: 42px; height: 5px;
  margin: 8px auto 10px; border-radius: 999px; background: rgba(0, 0, 0, .15);
}
.shell-menu::backdrop { background: rgba(0, 0, 0, .40); backdrop-filter: blur(3px); }
.shell-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shell-menu-heading h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.shell-menu .shell-brand { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.shell-menu nav { display: grid; gap: 3px; }
.shell-menu nav > a, .shell-menu .nav-logout {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; min-height: 48px; border-radius: 16px; font-size: 15px;
  transition: background .18s, color .18s;
}
.shell-menu nav > a:active { background: rgba(0, 0, 0, .07); }
.shell-menu nav > a[aria-current="page"] { background: rgba(var(--brand-rgb), .12); color: var(--brand-text); font-weight: 650; }
.shell-menu nav form { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .shell-menu[open] { animation: shell-sheet-up .34s cubic-bezier(.32, .72, 0, 1); }
  .shell-menu[open]::backdrop { animation: shell-sheet-backdrop .28s ease; }
}
@keyframes shell-sheet-up { from { transform: translateY(55%); opacity: .3; } }
@keyframes shell-sheet-backdrop { from { opacity: 0; } }

/* ==========================================================================
   站点外壳 · 登录注册
   ========================================================================== */
.auth-body {
  /* 移动端键盘弹出时 dvh 会跟着缩小：若仍用 grid 垂直居中，卡片会被重新居中并触发滚动，
     部分浏览器会因此收起输入法（表现为"输入框点了又消失"）。改成顶部对齐，
     高度跟随内容，键盘弹出时卡片不再位移。 */
  min-height: 100dvh; display: block; padding: 32px 20px;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(var(--brand-rgb), .10), transparent 62%),
    var(--background);
}
@media (min-width: 761px) {
  /* 桌面端维持上下居中：此时没有软键盘，不会出现重排问题。 */
  .auth-body { display: grid; place-items: center; }
}
.auth-container { width: 100%; max-width: 480px; min-width: 0; margin: 0 auto; }
.auth-brand { justify-content: center; flex-direction: column; text-align: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .brand-image { height: 40px; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
.auth-brand strong { font-size: 18px; }
.auth-brand small { font-size: 12px; }
.auth-card { padding: 26px; border-radius: 24px; }
.auth-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -.035em; margin: 0 0 6px; }
.auth-lead { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-card .button-primary { min-height: 46px; border-radius: 16px; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--text); font-weight: 600; }
.auth-foot a:hover { color: var(--brand-text); }
.auth-back { display: block; text-align: center; margin-top: 18px; color: var(--muted); font-size: 13px; }
.auth-back:hover { color: var(--text); }
.account-page { max-width: 940px; margin: auto; }
.account-heading { font-size: 28px; margin: 4px 0 0; font-weight: 700; letter-spacing: -.035em; }

/* ==========================================================================
   后台数据页（沿用旧的管理页类名，统一到新观感）
   ========================================================================== */
.management-page { min-width: 0; }
.management-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.management-page .grid > *, .management-columns > * { min-width: 0; }
.management-page .glass-card { padding: 14px 16px; }
.management-heading {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 14px; margin-bottom: 16px;
}
.management-heading > div:first-child { flex: 1 1 280px; min-width: 0; }
.management-heading h2 { font-size: 19px; }
.management-heading p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.management-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.management-search { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.management-search .form-field { flex: 1; }
.management-search button { flex-shrink: 0; }
.management-page form button:not([data-select-trigger]),
.management-page a[class*=border] {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1.5;
}
.management-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.management-page textarea { min-height: 42px; border-radius: var(--field-radius); }
.management-page input[type=color] { width: 46px; flex-shrink: 0; }
.management-page .flex > input { min-width: 0; }
.management-page .text-xs { line-height: 1.65; }
.management-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.management-table th {
  padding: 9px 12px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--muted); background: transparent;
}
.management-table td { padding: 11px 12px; font-size: 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.management-table tbody tr:hover > td { background: #FAFAFC; }
.management-table tr:last-child td { border-bottom: 0; }
.management-table td:first-child { min-width: 160px; }
.management-table td:last-child { white-space: nowrap; }
.management-table td .flex { flex-wrap: wrap; }
.management-table td:last-child .flex { flex-wrap: nowrap; }
.management-table td:last-child a,
.management-table td:last-child button,
.management-table td:last-child span { flex-shrink: 0; white-space: nowrap; }
.management-memberships .management-table { min-width: 1040px; }
.management-audit .management-table { min-width: 650px; }

/* ==========================================================================
   动画
   ========================================================================== */
@keyframes pulse-dot {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes pulse-gentle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
@keyframes slide-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.animate-slide-in { animation: slide-in .3s var(--ease-out) both; }
.animate-pulse-gentle { animation: pulse-gentle 2s ease-in-out infinite; }

/* 卡片入场：一次性的轻微滑入，不做无限动画，避免答题时分心。 */
.card, .glass-card { animation: slide-in .32s var(--ease-out) backwards; }
.stat-grid .card:nth-child(1) { animation-delay: .02s; }
.stat-grid .card:nth-child(2) { animation-delay: .05s; }
.stat-grid .card:nth-child(3) { animation-delay: .08s; }
.stat-grid .card:nth-child(4) { animation-delay: .11s; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (min-width: 1500px) {
  .management-users.management-columns { grid-template-columns: minmax(0, 1.2fr) minmax(440px, 1fr); }
  .management-settings .management-columns { grid-template-columns: minmax(0, 1.3fr) minmax(380px, .85fr); }
  .management-audit .management-columns { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}
@media (max-width: 1180px) {
  .workspace-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .public-header-inner { padding: 10px 20px; }
  .public-main { padding: 18px 20px 48px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .workspace-shell { display: block; }
  .workspace-sidebar, .public-nav { display: none; }
  .shell-menu-toggle { display: inline-flex; }
  .workspace-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 18px; }
  .workspace-mobile-brand { display: flex; }
  .workspace-page-title { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--line); padding-top: 10px; }
  .workspace-header .shell-user { grid-column: 2; grid-row: 2; align-self: start; margin-top: 10px; max-width: 160px; }
  /* 三列布局：品牌 | 提醒铃铛 | 菜单按钮 同行排列，菜单不再被挤到第二行。 */
  .public-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 12px; }
  /* 移动端主内容自带 eyebrow + h1，顶栏再重复一次页面标题只会多出一行空档。 */
  .public-page-title { display: none; }
  .public-header .shell-brand strong, .public-header .shell-brand small,
  .workspace-header .workspace-mobile-brand strong, .workspace-header .workspace-mobile-brand small { display: none; }
  .public-header .brand-image, .workspace-mobile-brand .brand-image { height: 30px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .workspace-header { padding: 8px 14px; }
  .workspace-header h1 { font-size: 19px; }
  .workspace-main { padding: 14px 12px 40px; }
  .public-header-inner { padding: 9px 14px; }
  .public-main { padding: 14px 12px 40px; }
  .public-footer { margin: 0; padding: 18px 14px 26px; }
  :root { --card-padding: 16px; --card-radius: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { gap: 8px; }
  .stat-number { font-size: 25px; }
  .stat-grid .card { padding: 13px 14px; }
  .study-text { font-size: 16px; }
  .button { padding: 9px 14px; }
  .auth-card { padding: 20px; border-radius: 20px; }
  .account-heading { font-size: 23px; }
  .management-page .glass-card { padding: 14px; }
  .management-page .grid { grid-template-columns: minmax(0, 1fr); }
  .management-heading h2 { font-size: 18px; }
  .responsive-table td { padding: 10px 12px; }
  /* 输入框 16px：避免 iOS 聚焦时自动放大页面。 */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea, select,
  .form-field input, .form-field textarea, .form-field select,
  .management-page input, .management-page textarea, .auth-container input { font-size: 16px; }
}
@media (pointer: coarse) {
  /* 触屏补足点按面积。圆形/胶囊图标按钮用 --tap-min 声明自身尺寸，
     否则统一的 44px 最小高度会把它拉成竖椭圆（22×44 之类的畸形比例）。 */
  a.button,
  button:not(.chip):not(.segmented > button),
  summary { min-height: var(--tap-min, 44px); }
  .shell-nav-link { min-height: 44px; }
  .segmented > a, .segmented > button { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .button:hover, .icon-button:hover, .chip:hover, .header-login:hover { transform: none; }
}

/* ---- 会员中心：权益清单 / 模型额度 / 练习建议 ---- */
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.benefit-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: rgba(var(--brand-rgb, 0 122 255), .05); font-size: 14px; }
.benefit-list li.is-off { background: #f6f7f9; color: #8a9099; }
.benefit-icon { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(var(--brand-rgb, 0 122 255), .14); color: var(--brand-text, #0a66d0); }
.benefit-icon .ui-icon { width: 15px; height: 15px; stroke-width: 1.9; }
.benefit-list li.is-off .benefit-icon { background: #e9ebef; color: #717986; }
/* 未开通权益保持可见并可点击：图标 + 功能名 + 「VIP · 查看开通」，新标签页打开会员页。 */
.benefit-link { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.benefit-link strong { color: #5c6270; }
.benefit-link:hover strong { color: var(--brand-text, #0a66d0); text-decoration: underline; text-underline-offset: .2em; }
.benefit-state { flex: 0 0 auto; align-self: center; margin-left: auto; padding: 0 8px; border-radius: 999px; background: rgba(var(--brand-rgb, 0 122 255), .1); color: var(--brand-text, #0a66d0); font-size: 11px; font-weight: 650; line-height: 1.9; white-space: nowrap; }
.benefit-state.is-vip { background: #eceef2; color: #6b7280; }
.benefit-list li.is-off .benefit-state.is-vip { background: #e3e6ea; }
.advice-cat { margin: 6px 0 12px; }
.advice-bar { height: 8px; border-radius: 999px; background: #edf0f4; overflow: hidden; }
.advice-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand-color); transition: width .4s ease; }
.advice-bar-fill.is-weak { background: #ff9500; }
.advice-suggestion { align-items: flex-start; border-top: 1px solid #f0f2f5; padding-top: 10px; }
.advice-suggestion:first-of-type { border-top: 0; padding-top: 0; }

/* 学习建议：统计摘要、专项表现、可执行的下一步。 */
.advice-page { max-width: 1200px; margin: 6px auto 0; }
.advice-page .profile-head { align-items: center; gap: 24px; margin-bottom: 22px; }
.advice-page .profile-head h1 { margin: 5px 0 8px; font-size: clamp(26px, 3vw, 32px); }
.advice-page .profile-head .advice-intro { color: var(--text-2); font-size: 14px; line-height: 1.7; }
.advice-page .profile-head .profile-quota { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.advice-page .learn-tabs { max-width: 100%; margin-bottom: 24px; }
.advice-dashboard { display: grid; gap: 22px; }
.advice-page .card { animation: none; }
.advice-page .stat-grid { gap: 14px; }
.advice-page .stat-grid .card { padding: 20px; box-shadow: var(--shadow-xs); }
.advice-stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.advice-stat-label .ui-icon { width: 17px; height: 17px; color: var(--text-3); }
.advice-page .stat-number { margin: 14px 0 6px; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.advice-page .stat-number small { margin-left: 7px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.advice-page .stat-grid p { margin: 0; font-size: 11.5px; color: var(--text-3); }
.advice-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.advice-columns > .card, .advice-ai { padding: 24px; min-width: 0; }
.advice-section-head { margin-bottom: 22px; }
.advice-page h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 17px; font-weight: 650; margin: 0; }
.advice-page h2 > .ui-icon { color: var(--brand-text); }
.advice-section-head > p { margin: 7px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.7; }
.advice-category-list { display: grid; gap: 24px; }
.advice-page .advice-cat { margin: 0; }
.advice-category-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.advice-accuracy { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.advice-accuracy.is-weak { color: #B46113; }
.advice-page .advice-bar { height: 7px; }
.advice-category-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--text-3); }
.advice-trend { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.advice-trend > strong { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.advice-trend > p { margin: 7px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.8; }
.advice-suggestion-list { display: grid; gap: 16px; }
.advice-page .advice-suggestion { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-top: 16px; }
.advice-page .advice-suggestion:first-child { padding-top: 0; border-top: 0; }
.advice-suggestion-copy { min-width: 0; }
.advice-suggestion-copy > h3 { margin: 0; font-size: 14px; font-weight: 650; }
.advice-suggestion-copy > p { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.advice-page .advice-suggestion > .button { flex: 0 0 auto; display: inline-flex; gap: 6px; margin-top: 1px; }
.advice-page .advice-suggestion > .button .ui-icon { width: 14px; height: 14px; }
.advice-review-actions { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.advice-review-actions strong { font-size: 14px; }
.advice-review-actions p { margin: 5px 0 14px; font-size: 12px; color: var(--text-3); }
.advice-review-actions .row { gap: 14px; }
.advice-review-actions form { margin: 0; }
.advice-text-link { color: var(--brand-text); font-size: 13px; font-weight: 600; text-underline-offset: 4px; }
.advice-text-link:hover { text-decoration: underline; }
.advice-ai { box-shadow: var(--shadow-xs); }
.advice-ai > p { line-height: 1.8; font-size: 13px; }
/* Saved and freshly generated Markdown share this container, without .is-rich-text. */
.advice-page [data-study-plan-result] { overflow-wrap: anywhere; min-width: 0; max-width: 100%; overflow-x: auto; line-height: 1.8; }
.advice-page [data-study-plan-result] p { margin: .8em 0; }
.advice-page [data-study-plan-result] h1,
.advice-page [data-study-plan-result] h2,
.advice-page [data-study-plan-result] h3,
.advice-page [data-study-plan-result] h4,
.advice-page [data-study-plan-result] h5,
.advice-page [data-study-plan-result] h6 { display: block; margin: 1.2em 0 .5em; font-size: 1em; font-weight: 650; line-height: 1.5; }
.advice-page [data-study-plan-result] h1 { font-size: 1.3em; }
.advice-page [data-study-plan-result] h2 { font-size: 1.15em; }
.advice-page [data-study-plan-result] ul,
.advice-page [data-study-plan-result] ol { margin: .8em 0; padding-left: 1.6em; list-style-position: outside; }
.advice-page [data-study-plan-result] ul { list-style-type: disc; }
.advice-page [data-study-plan-result] ol { list-style-type: decimal; }
.advice-page [data-study-plan-result] ul ul { list-style-type: circle; }
.advice-page [data-study-plan-result] ul ul ul { list-style-type: square; }
.advice-page [data-study-plan-result] li { display: list-item; margin: .3em 0; }
.advice-page [data-study-plan-result] li > ul,
.advice-page [data-study-plan-result] li > ol { margin: .3em 0; }
.advice-page [data-study-plan-result] li > p { margin: .3em 0; }
.advice-page [data-study-plan-result] blockquote { margin: .8em 0; padding: .1em 0 .1em 1em; border-left: 3px solid var(--line); color: var(--text-2); }
.advice-page [data-study-plan-result] a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.advice-page [data-study-plan-result] code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.advice-page [data-study-plan-result] :not(pre) > code { padding: .12em .38em; border-radius: 5px; background: var(--fill, #f5f5f7); }
.advice-page [data-study-plan-result] pre { max-width: 100%; margin: .8em 0; padding: 12px; border-radius: 10px; background: var(--fill, #f5f5f7); white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.advice-page [data-study-plan-result] pre code { padding: 0; background: none; line-height: 1.6; }
.advice-page [data-study-plan-result] table { display: block; max-width: 100%; margin: .8em 0; overflow-x: auto; }
.advice-page [data-study-plan-result] th { background: var(--fill, #f5f5f7); font-weight: 650; }
.advice-page [data-study-plan-result] hr { margin: 1.2em 0; border: 0; border-top: 1px solid var(--line); }
.advice-page [data-study-plan-result] > :first-child { margin-top: 0; }
.advice-page [data-study-plan-result] > :last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .advice-columns { grid-template-columns: minmax(0, 1fr); }
  .advice-page .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .advice-page .profile-head { align-items: flex-start; gap: 16px; }
  .advice-page .learn-tabs { margin-bottom: 20px; }
  .advice-dashboard, .advice-columns { gap: 18px; }
  .advice-page .stat-grid { gap: 10px; }
  .advice-page .stat-grid .card { padding: 16px 14px; }
  .advice-stat-label { gap: 6px; font-size: 12px; }
  .advice-page .stat-number { font-size: 27px; }
  .advice-columns > .card, .advice-ai { padding: 20px 16px; }
  .advice-page .advice-suggestion { flex-wrap: wrap; gap: 10px; }
  .advice-page .advice-suggestion > .button { min-height: 38px; }
}
[data-study-plan-result] { margin-top: 8px; }
[data-study-plan-result] table { width: 100%; border-collapse: collapse; font-size: 13px; }
[data-study-plan-result] th, [data-study-plan-result] td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; }
.pill.warn { background: #fff7e6; color: #ad6800; border: 1px solid #ffd591; }
.plan-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.plan-card.is-current { border-color: var(--brand-color); box-shadow: 0 0 0 1px var(--brand-color) inset; }
.plan-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-card header strong { font-size: 15px; }
.plan-card .price { font-weight: 700; color: var(--brand-color); font-size: 14px; }
.nav-member-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; letter-spacing: .5px; }
[data-ai-assistant] .learn-ai-upsell { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(247, 183, 51, .12), rgba(252, 74, 26, .08)); border: 1px solid rgba(247, 183, 51, .35); font-size: 12.5px; line-height: 1.5; }
[data-ai-assistant] .learn-ai-upsell[hidden] { display: none; }
[data-ai-assistant] .learn-ai-upsell a { flex: 0 0 auto; font-weight: 650; color: var(--brand-text, #0a66d0); }
/* ---- 随机组卷页 ---- */
.compose-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
.compose-hero h1 { margin: 0; }
.compose-hero p { margin: 0; color: var(--quiet, #6b7280); max-width: 640px; line-height: 1.7; }
.compose-card { padding: 20px 22px; }
/* .learner-page 是普通块容器（没有 gap），同层卡片直接相邻时会贴在一起。
   当前实际出现的只有随机组卷页（生成练习 + 保存组卷方案），这里统一补足间距。
   带 .stack 的页面本身是 grid 且已有 gap，不能再叠加上边距；
   隐藏的卡片（如词库的三个面板）不参与间距计算。 */
.learner-page:not(.stack) > .card:not([hidden]) + .card { margin-top: 16px; }
.compose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.compose-option { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fff; transition: border-color .15s ease; }
.compose-option:focus-within { border-color: var(--brand-color); }
.compose-option.is-empty { opacity: .55; background: #f7f8fa; }
.compose-option-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.compose-option-label { font-weight: 650; font-size: 14px; }
.compose-option-count { font-size: 11px; color: var(--quiet, #6b7280); font-variant-numeric: tabular-nums; }
.compose-option select { width: 100%; }
.compose-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f2f5; flex-wrap: wrap; }
.compose-total { font-size: 14px; font-variant-numeric: tabular-nums; }
.compose-total strong { font-size: 17px; }
.compose-note { font-size: 12px; margin: 10px 0 0; }
.compose-history { margin-top: 16px; padding: 18px 22px; }
.compose-history h2 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.compose-history-list { display: flex; flex-direction: column; }
.compose-history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #f0f2f5; }
.compose-history-row:first-child { border-top: 0; padding-top: 0; }
.compose-history-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.compose-history-info strong { font-size: 14px; }
.compose-history-info .quiet { font-size: 12px; }
.compose-lock { align-items: center; text-align: center; }
.compose-lock .empty-icon { margin: 0 auto; }

/* 全站胶囊防内部折行（容器仍可换行） */
.pill { white-space: nowrap; }

/* 后台表格内的小圆片防折行截断 */
.management-table .rounded-full { white-space: nowrap; }

/* 按钮文字不折行：窄屏表格里避免「继续录题」竖排 */
.button, .icon-button { white-space: nowrap; }

/* 组卷筛选行：科目 + 错题开关 */
.compose-filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #f0f2f5; }
.compose-filter { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.compose-filter select { min-width: 170px; }
.compose-filter-check { font-weight: 550; cursor: pointer; }
.compose-filter-check input { width: 16px; height: 16px; accent-color: var(--brand-color); cursor: pointer; }
.compose-filter-check .quiet { font-weight: 450; font-size: 12px; }
.compose-filter-check.is-empty { opacity: .55; }

/* 会员中心独立页 */
.membership-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.membership-hero h1 { margin: 6px 0; }
.membership-hero p { margin: 0; color: var(--muted, #6b7280); line-height: 1.8; }
.membership-hero-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.nav-member-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; letter-spacing: .5px; text-decoration: none; }

/* 页面紧凑化：会员中心 hero 与权益清单更密 */
.membership-hero { margin-bottom: 12px; }
.membership-hero p { line-height: 1.6; }
.benefit-list li { padding: 7px 10px; }
.benefit-list { gap: 6px; }
.compose-filters { margin-bottom: 12px; padding-bottom: 12px; }

/* 会员中心卡片列：统一垂直间距（此前卡片直接贴叠） */
.membership-stack { gap: 12px; }

/* 会员中心：双方案卡 + 对比表 */
.plan-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.plan-duo-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--card-radius, 20px); background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); }
.plan-duo-card-vip { border-color: rgba(var(--brand-rgb), .35); background: linear-gradient(180deg, rgba(var(--brand-rgb), .055), var(--surface, #fff)); }
.plan-duo-card.is-current { border-color: var(--brand-color); box-shadow: 0 0 0 1px var(--brand-color) inset; }
.plan-duo-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.plan-duo-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.plan-duo-price { color: var(--brand-text, var(--brand-color)); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-duo-desc { margin: 0; font-size: 13px; color: var(--muted, #6b7280); line-height: 1.65; }
.plan-duo-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--text-2, #3a3a3c); }
.plan-duo-list li { position: relative; padding-left: 14px; line-height: 1.65; }
.plan-duo-list li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 5px; height: 5px; border-radius: 50%; background: rgba(var(--brand-rgb), .55); }
.plan-duo-card .button, .plan-duo-card .pill { align-self: flex-start; margin-top: auto; }
.plan-table-card { padding: 16px 18px; }
.table-card-title { margin: 0; font-size: 16px; font-weight: 650; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.plan-table th, .plan-table td { padding: 9px 12px; border-bottom: 1px solid #f0f2f5; text-align: left; vertical-align: top; }
.plan-table thead th { font-size: 12.5px; color: var(--muted, #6b7280); border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
.plan-table tbody th { font-weight: 600; color: var(--text, #1d1d1f); white-space: nowrap; width: 30%; }
.plan-table td { color: var(--text-2, #374151); font-variant-numeric: tabular-nums; }
.plan-table .is-current-col { background: rgba(var(--brand-rgb), .06); font-weight: 600; }
.plan-shared { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-ai-row { font-size: 12.5px; line-height: 1.7; }
.plan-ai-row.is-off { color: var(--muted, #8e8e93); }
.plan-table-note { margin: 10px 0 0; font-size: 12px; }

/* 会员中心：当前方案状态卡（到期日与剩余天数放在首屏） */
.member-status {
  display: flex; align-items: stretch; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--card-radius, 20px);
  border: 1px solid var(--line, #e5e5ea); background: var(--surface, #fff);
  box-shadow: var(--card-shadow); min-width: 0;
}
.member-status.is-warn { border-color: var(--warn-line, #ffd9a8); background: var(--warn-bg, #fff8ed); }
.member-status-main { min-width: 0; flex: 1 1 320px; }
.member-status-plan { margin: 4px 0 14px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; font-weight: 750; letter-spacing: -.02em; }
.member-status-expiry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.member-status-caption { font-size: 12.5px; font-weight: 600; color: var(--muted, #8e8e93); letter-spacing: .04em; }
.member-status-date { font-size: clamp(17px, 1.9vw, 20px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.member-status-date.is-keyword { color: var(--muted, #6b7280); font-weight: 650; }
/* VIP 与标准版两条到期时间并排显示，窄屏自动换行。 */
.member-status-tiers { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.member-status-tier { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.member-status-tier + .member-status-tier { padding-left: 28px; border-left: 1px solid var(--line, #e5e5ea); }
/* VIP 生效期间标准版被盖住：保留期限但降低视觉权重。 */
.member-status-tier.is-covered .member-status-date { color: var(--muted, #6b7280); font-weight: 650; }
@media (max-width: 640px) {
  .member-status-tier + .member-status-tier { padding-left: 0; border-left: 0; }
}
.member-status-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted, #8e8e93); max-width: 52em; }
.member-status-note.is-hidden { display: none; }
.member-status-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.member-status-metrics { display: flex; gap: 26px; margin: 0; }
.member-status-metrics dt { font-size: 12px; color: var(--muted, #8e8e93); font-weight: 600; }
.member-status-metrics dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.member-status-limit { font-size: 12.5px; font-weight: 500; color: var(--muted, #8e8e93); }
.member-status-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.member-status-action { white-space: nowrap; }
@media (max-width: 640px) {
  .member-status { padding: 18px; gap: 16px; }
  .member-status-side { align-items: stretch; width: 100%; }
  .member-status-metrics { gap: 20px; }
  .member-status-actions { justify-content: stretch; }
  .member-status-action { flex: 1 1 auto; text-align: center; }
}

/* ===== 在线文档中心 /know（iOS 设计系统）=====
   与全站共用 app.css 的令牌：玻璃层次、hairline 分隔、连续大圆角、品牌色。
   这里只做版式，不再自建颜色与阴影尺度；品牌色走 --brand-color / --brand-rgb，
   跟随账号或站点主题，与首页、会员中心保持同一观感。 */
.know-page { --know-ink: var(--text); --know-ink-2: var(--text-2); --know-ink-3: var(--text-3); }

.know-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
  padding: 28px 32px; margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px; color: var(--know-ink);
  background:
    radial-gradient(560px 240px at 88% -30%, rgba(var(--brand-rgb), .16), transparent 64%),
    radial-gradient(420px 220px at 2% 130%, rgba(var(--brand-rgb), .10), transparent 62%),
    var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 18px 44px -28px rgba(29, 29, 31, .22);
}
.know-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.know-hero-text { position: relative; max-width: 54em; min-width: 0; }
.know-hero-head { display: flex; align-items: center; gap: 8px; }
/* 收起 / 展开固定在横幅右上角，而不是跟着文本列跑到中间。 */
.know-hero-close, .know-hero-expand {
  position: absolute; top: 18px; right: 22px; z-index: 2;
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; border: 0; border-radius: 18px;
  background: transparent; color: var(--text-3); cursor: pointer; font: inherit; font-size: 13px;
  --tap-min: 36px; transition: background .16s ease, color .16s ease;
}
.know-hero-close { width: 36px; padding: 8px; }
.know-hero-expand { padding: 6px 12px; }
.know-hero-close:hover, .know-hero-expand:hover { background: rgba(29, 29, 31, .06); color: var(--text); }
.know-hero-close:focus-visible, .know-hero-expand:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 3px; }
.know-hero-body { margin: 0; }
.know-hero-body[hidden] { display: none; }

.know-hero-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 980px;
  background: rgba(var(--brand-rgb), .10); border: 1px solid rgba(var(--brand-rgb), .16);
  color: var(--brand-text); font-size: 12px; font-weight: 650; letter-spacing: .01em;
}
.know-hero-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-color); }
.know-hero h1 {
  margin: 12px 0 10px; font-size: clamp(27px, 3vw, 36px); line-height: 1.2;
  letter-spacing: -.042em; font-weight: 700; color: var(--know-ink);
}
.know-hero p { margin: 0; max-width: 50em; color: var(--know-ink-3); font-size: 14.5px; line-height: 1.85; }
.know-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.know-hero-stats > span {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 6px 13px; border-radius: 980px;
  background: var(--fill); color: var(--know-ink-3);
  font-size: 12.5px; line-height: 1.5; white-space: nowrap;
}
.know-hero-stats strong {
  color: var(--know-ink); font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.know-hero-mark {
  position: relative; flex-shrink: 0; align-self: center;
  font-size: 60px; font-weight: 700; font-style: normal; line-height: 1;
  letter-spacing: -.05em; color: rgba(var(--brand-rgb), .16);
  user-select: none; transform: translateY(2px);
}

/* 分类标题：小标签 + hairline，卡片式分组而不是重色块 */
.know-group-head { display: flex; align-items: center; gap: 12px; margin: 30px 2px 12px; }
.know-group-head h2 {
  display: flex; align-items: center; gap: 9px; margin: 0;
  font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--know-ink);
}
.know-group-dot {
  width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%;
  background: var(--brand-color);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12);
}
.know-group-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), rgba(229, 229, 234, 0)); }
.know-group-count {
  padding: 3px 10px; border-radius: 980px; white-space: nowrap;
  background: var(--fill); color: var(--know-ink-3);
  font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums;
}

/* 文档检索：搜索框与板块快捷键，沿用首页 chip 与 search 的形态 */
.know-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 6px; }
.know-search {
  position: relative; display: flex; align-items: center;
  flex: 1 1 260px; max-width: 380px; min-width: 0;
  height: 44px; padding: 0 4px 0 38px;
  border: 1px solid var(--line); border-radius: 980px; background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.know-search:focus-within { border-color: rgba(var(--brand-rgb), .45); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.know-search-icon {
  position: absolute; left: 12px; top: 50%; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-50%); color: var(--muted);
}
.know-search-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.know-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 13.5px; }
.know-search input:focus { outline: 0; box-shadow: none; }
.know-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.know-chips a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: 980px; background: var(--fill); color: var(--text-2);
  font-size: 12.5px; font-weight: 550; text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.know-chips a:hover { background: var(--fill-strong); color: var(--text); }
.know-search-empty { margin: 14px 2px 0; font-size: 13px; color: var(--muted); }

.know-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 12px; }
.know-doc-card {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 18px 19px 15px; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s ease;
}
.know-doc-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.know-doc-card:hover {
  transform: translateY(-2px); border-color: rgba(var(--brand-rgb), .34);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .03), 0 16px 34px -20px rgba(29, 29, 31, .28);
}
.know-doc-card h3 {
  margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5;
  letter-spacing: -.012em; color: var(--know-ink);
}
.know-doc-card p {
  margin: 0; font-size: 13px; line-height: 1.72; color: var(--know-ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.know-doc-card footer {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.know-card-go { color: var(--brand-text); font-weight: 600; transition: transform .22s var(--ease-out); }
.know-doc-card:hover .know-card-go { transform: translateX(3px); }

.know-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 980px;
  background: rgba(var(--brand-rgb), .10); border: 1px solid rgba(var(--brand-rgb), .14);
  color: var(--brand-text); font-size: 12px; font-weight: 600;
}
.know-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-color); }

/* 阅读页：左目录 + 正文，两块都是玻璃卡；外层页宽与列表页一致 */
.know-detail { max-width: 1280px; }
.know-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
.know-side {
  position: sticky; top: 84px; padding: 14px 10px;
  background: var(--glass-surface); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 22px; backdrop-filter: var(--header-blur); -webkit-backdrop-filter: var(--header-blur);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 14px 36px -26px rgba(29, 29, 31, .3);
  max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain;
}
.know-side-back {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 4px 10px;
  padding: 7px 10px; border-radius: 12px;
  font-size: 12.5px; font-weight: 600; color: var(--brand-text); text-decoration: none;
  transition: background .16s ease;
}
.know-side-back:hover { background: rgba(var(--brand-rgb), .09); }
.know-side-label {
  margin: 14px 10px 6px; font-size: 11px; font-weight: 650;
  letter-spacing: .06em; color: var(--muted);
}
/* 桌面端 details 常开、不显示折叠头；窄屏折叠成一条「全部文档」抽屉 */
.know-side-fold { display: contents; }
.know-side-summary { display: none; }
.know-side-nav { display: flex; flex-direction: column; gap: 1px; }

.know-side-nav a {
  padding: 8px 11px; border-radius: 11px;
  font-size: 13px; line-height: 1.55; color: var(--know-ink-2); text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.know-side-nav a:hover { background: var(--fill); color: var(--know-ink); }
.know-side-nav a.current {
  background: rgba(var(--brand-rgb), .12); color: var(--brand-text); font-weight: 600;
}

.know-main {
  /* .stack 是 grid：默认列宽按 max-content 撑开，长表格会把卡片顶出视口 */
  position: relative; max-width: 950px; min-width: 0; grid-template-columns: minmax(0, 1fr);
  padding: 30px 34px 34px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 18px 44px -30px rgba(29, 29, 31, .26);
}
/* 阅读进度细条：固定在视口顶端，压在粘性页头之上，随滚动推进 */
.know-progress {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: 3px;
  background: transparent; overflow: hidden; pointer-events: none;
}
.know-progress span {
  display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(90deg, var(--brand-color), rgba(var(--brand-rgb), .5));
  transition: transform .12s linear;
}
@media (prefers-reduced-motion: reduce) { .know-progress span { transition: none; } }
.know-article .know-toc-list a.is-active { color: var(--brand-text); font-weight: 600; }

.know-doc-head h1 {
  margin: 12px 0 10px; font-size: clamp(23px, 2.6vw, 29px); line-height: 1.35;
  letter-spacing: -.034em; font-weight: 700; color: var(--know-ink);
}
.know-doc-meta {
  margin: 0 0 14px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.know-doc-lead {
  margin: 0; padding: 13px 17px; border-radius: 16px;
  background: var(--fill); color: var(--know-ink-2);
  font-size: 14px; line-height: 1.8;
}

.know-toc {
  margin: 20px 0 4px; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
}
.know-toc-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .05em; color: var(--muted);
}
.know-toc-title::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--brand-color); }
.know-toc-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; list-style: decimal; }
.know-toc-list li { margin: 5px 0; }
.know-toc-list li::marker { color: var(--ios-gray-2); font-variant-numeric: tabular-nums; }
.know-toc-list li.is-sub { margin-left: 15px; font-size: 12.5px; }
.know-article .know-toc-list a { color: var(--know-ink-2); text-decoration: none; transition: color .16s ease; }
.know-toc-list a.is-active::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: var(--brand-color); vertical-align: middle; }
.know-article .know-toc-list a:hover { color: var(--brand-text); }

/* 正文排版：阅读优先，标题用字重和留白分层，不靠彩色竖条堆装饰 */
.know-article { font-size: 15.5px; line-height: 1.95; color: var(--know-ink-2); }
.know-article h2 {
  margin: 38px 0 12px; padding: 0; font-size: 20px; line-height: 1.45;
  letter-spacing: -.022em; font-weight: 650; color: var(--know-ink);
}
.know-article h2::before {
  content: ""; display: block; width: 26px; height: 2px; margin-bottom: 12px;
  border-radius: 2px; background: var(--brand-color);
}
.know-article h3 {
  margin: 26px 0 9px; font-size: 16.5px; line-height: 1.5;
  letter-spacing: -.012em; font-weight: 600; color: var(--know-ink);
}
.know-article h2 + p, .know-article h3 + p { margin-top: 0; }
.know-article p { margin: 11px 0; }
.know-article ul, .know-article ol { margin: 11px 0; padding-left: 23px; }
.know-article li { margin: 7px 0; }
.know-article li::marker { color: var(--muted); }
.know-article strong { color: var(--know-ink); font-weight: 650; }
.know-article em { color: var(--know-ink-2); }
.know-article a { color: var(--brand-text); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.know-article hr { border: 0; height: 1px; margin: 30px 0; background: var(--line); }
.know-article blockquote {
  margin: 16px 0; padding: 14px 18px;
  border: 0; border-radius: 16px; background: var(--fill); color: var(--know-ink-2);
}
.know-article blockquote p { margin: 4px 0; }
.know-article blockquote strong { color: var(--brand-text); }
.know-article code.md-inline-code {
  padding: 1px 6px; border-radius: 6px; background: var(--fill-strong);
  font-size: .9em; color: var(--know-ink);
}
.know-article pre.md-code {
  padding: 15px 18px; border-radius: 16px; overflow-x: auto;
  background: var(--ios-dark); color: #F2F2F7;
  font-size: 13px; line-height: 1.7;
}
.know-table-wrap {
  overflow-x: auto; margin: 16px 0; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface);
}
.know-article table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.65; }
.know-article th, .know-article td { padding: 11px 14px; text-align: left; white-space: nowrap; }
.know-article td { white-space: normal; color: var(--know-ink-2); border-top: 1px solid var(--line); }
.know-article thead th {
  background: var(--fill); color: var(--know-ink-3);
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line);
}
.know-article tbody tr:last-child td { border-bottom: 0; }
.know-article tbody tr:hover td { background: rgba(var(--brand-rgb), .035); }
/* 文档插图：示意图按块居中、细 hairline 边，图注用 alt 文本。
   框图内文字在窄屏整体缩小会看不清，所以窄屏改成框内横向滑动，保持字号。 */
.know-article .know-figure { margin: 16px 0 10px; padding: 0; }
.know-article .know-figure + p, .know-article .know-figure + h2, .know-article .know-figure + h3 { margin-top: 16px; }
.know-article .know-figure-frame {
  max-width: 760px; margin: 0 auto; overflow-x: auto; overflow-y: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: #FFFFFF;
  overscroll-behavior-x: contain;
}
.know-article .know-figure-frame::-webkit-scrollbar { height: 6px; }
.know-article .know-figure-frame::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(29, 29, 31, .18); }
.know-article .know-figure img {
  display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto;
  border: 0; border-radius: 0; background: transparent;
}
.know-article .know-figure figcaption {
  margin: 9px auto 0; max-width: 760px; text-align: center;
  font-size: 12px; line-height: 1.65; color: var(--muted);
}
.know-article p > img {
  display: block; max-width: 760px; width: 100%; height: auto; margin: 18px auto;
  border: 1px solid var(--line); border-radius: 18px; background: #FFFFFF;
}

.know-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; max-width: 950px; }
.know-pager-item {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  color: inherit; text-decoration: none;
  transition: transform .2s var(--ease-out), border-color .2s ease, box-shadow .2s ease;
}
.know-pager-item:hover {
  transform: translateY(-1px); border-color: rgba(var(--brand-rgb), .32);
  box-shadow: 0 12px 26px -20px rgba(29, 29, 31, .3);
}
.know-pager-item.is-next { text-align: right; align-items: flex-end; }
.know-pager-item span { font-size: 11.5px; color: var(--muted); }
.know-pager-item strong { font-size: 13.5px; font-weight: 600; color: var(--know-ink); line-height: 1.5; }
.know-pager-item.is-empty { visibility: hidden; }

@media (max-width: 900px) {
  .know-hero { padding: 24px 22px; flex-direction: column; gap: 6px; border-radius: 24px; }
  .know-hero-mark { display: none; }
  .know-layout { grid-template-columns: minmax(0, 1fr); }
  .know-side {
    position: static; max-height: none; padding: 8px;
  }
  .know-side-fold { display: block; }
  .know-side-summary {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 12px; border-radius: 14px; cursor: pointer;
    background: var(--fill); list-style: none;
  }
  .know-side-summary::-webkit-details-marker { display: none; }
  .know-side-back-label { font-size: 12px; font-weight: 600; color: var(--brand-text); }
  .know-side-current { font-size: 13px; color: var(--text); }
  .know-side-fold[open] .know-side-summary { margin-bottom: 6px; }
  .know-side-back { display: none; }
  .know-main { padding: 24px 20px 26px; border-radius: 22px; }
  .know-pager { grid-template-columns: 1fr; }
  .know-article th, .know-article td { white-space: nowrap; }
  /* 窄屏把示意图放大到可读宽度，超出部分在框内横向滑动。 */
  .know-article .know-figure img { width: auto; max-width: none; min-width: 640px; }
  .know-article .know-figure figcaption::after { content: "（左右滑动查看全图）"; }
}
/* ===== 刷单词 /vocab（百词斩式）===== */
.vocab-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 32px; margin-bottom: 14px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(600px 260px at 88% -30%, rgba(255, 255, 255, .30), transparent 62%),
    radial-gradient(440px 240px at 6% 130%, rgba(120, 62, 8, .30), transparent 62%),
    linear-gradient(118deg, #FFB05C 0%, #F79A3E 44%, #E97F1F 100%);
  box-shadow: 0 16px 34px -16px rgba(233, 127, 31, .55);
}
.vocab-hero h1 { margin: 10px 0 8px; font-size: 26px; }
.vocab-hero p { margin: 0; color: rgba(255, 255, 255, .92); font-size: 14px; line-height: 1.8; max-width: 52em; }
.vocab-hero-note { margin-top: 10px !important; }
.vocab-hero-note a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.vocab-hero-mark { font-size: 64px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: -.03em; color: rgba(255, 255, 255, .22); user-select: none; flex-shrink: 0; }

.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 14px; }
.vocab-list-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.vocab-list-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(233, 127, 31, .45); border-color: rgba(247, 154, 62, .5); }
.vocab-list-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vocab-list-card h2 { margin: 0; font-size: 16.5px; }
.vocab-vip-pill { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #9A5B00; background: linear-gradient(120deg, #FFE7BF, #FFD28A); white-space: nowrap; }
.vocab-list-desc { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; min-height: 42px; }
.vocab-list-total { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.vocab-list-total strong { font-size: 22px; font-weight: 800; color: var(--text); margin-right: 4px; font-variant-numeric: tabular-nums; }
.vocab-list-bar { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.vocab-list-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFB05C, #F79A3E); transition: width .3s ease; }
.vocab-list-progress { margin: 0; font-size: 12px; color: var(--text-3); }
.vocab-list-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vocab-list-actions .button { grid-column: 1 / -1; }
.vocab-list-card.is-locked .vocab-list-total strong { color: var(--text-3); }
.vocab-list-footer { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; }
.vocab-reset { align-self: center; border: 0; background: none; font-size: 12px; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vocab-reset:hover { color: var(--danger-text, #d70015); }

.vocab-study { max-width: 640px; margin: 0 auto; padding: 20px 22px 26px; }
.vocab-study-head { display: flex; align-items: center; gap: 12px; }
.vocab-back { border: 0; background: none; font-size: 13px; color: var(--brand-text); cursor: pointer; padding: 4px 0; }
.vocab-study-list { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vocab-study-count { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.vocab-progress { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; margin: 12px 0 22px; }
.vocab-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFB05C, #F79A3E); transition: width .25s ease; }

.vocab-card { text-align: center; }
.vocab-word { margin: 6px 0 2px; font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.vocab-phonetic { margin: 0 0 10px; font-size: 15px; color: var(--text-3); font-family: "Segoe UI", system-ui, sans-serif; }
.vocab-prompt-sub { margin: -4px 0 10px; font-size: 14px; line-height: 1.6; color: var(--text-2); background: var(--fill); border-radius: 10px; padding: 8px 12px; max-width: 560px; margin-left: auto; margin-right: auto; }
.vocab-speak { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--brand-text); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.vocab-speak:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(233, 127, 31, .5); }

.vocab-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 12px; }
.vocab-option {
  padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: 14px; line-height: 1.55; color: var(--text); cursor: pointer;
  transition: border-color .14s, background .14s, transform .14s;
  text-align: left;
}
.vocab-option:hover { border-color: rgba(247, 154, 62, .65); background: #FFFBF5; transform: translateY(-1px); }
.vocab-option.is-correct { border-color: #34C759; background: #F0FBF3; color: #1E7F3C; font-weight: 600; }
.vocab-option.is-wrong { border-color: #FF3B30; background: #FFF1F0; color: #B3261E; }
.vocab-option:disabled { cursor: default; }

.vocab-unknown { width: 100%; padding: 11px; border-radius: 12px; border: 0; background: var(--fill); color: var(--text-2); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .14s; }
.vocab-unknown:hover { background: var(--fill-strong); }

.vocab-feedback { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--fill); text-align: left; }
.vocab-result { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.vocab-result.is-ok { color: #1E9E4B; }
.vocab-result.is-bad { color: #D70015; }
.vocab-definition { margin: 0; font-size: 14px; line-height: 1.75; color: var(--text); }
.vocab-example { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid rgba(247, 154, 62, .6); background: #FFF9F1; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.vocab-next { width: 100%; margin-top: 12px; }

.vocab-done { max-width: 560px; margin: 0 auto; padding: 26px 24px; text-align: center; }
.vocab-done h2 { margin: 0 0 16px; font-size: 20px; }
.vocab-done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.vocab-done-stats div { padding: 14px 8px; border-radius: 14px; background: var(--fill); }
.vocab-done-stats strong { display: block; font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.vocab-done-stats span { font-size: 12px; color: var(--text-3); }
.vocab-done-note { margin: 0 0 16px; font-size: 13px; color: var(--text-2); }
.vocab-done-actions { display: flex; gap: 10px; justify-content: center; }

.vocab-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 480px); padding: 12px 20px; border-radius: 14px; background: #1C1C1E; color: #fff; font-size: 13.5px; line-height: 1.6; text-align: center; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }
.vocab-toast.is-vip { background: linear-gradient(118deg, #FFB05C, #E97F1F); font-weight: 600; }

@media (max-width: 640px) {
  .vocab-hero { padding: 22px 20px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .vocab-hero-mark { display: none; }
  .vocab-options { grid-template-columns: 1fr; }
  .vocab-word { font-size: 36px; }
  .vocab-done-stats { gap: 8px; }
}

/* 刷单词补充：分组标题 + 试卷原句 */
.vocab-group-title { display: flex; align-items: center; gap: 10px; margin: 22px 2px 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.vocab-group-title:first-child { margin-top: 0; }
/* 词库筛选：词书较多时按考试一键收敛 */
.vocab-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 2px 0; }
.vocab-filter { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.vocab-filter:hover { border-color: rgba(247, 154, 62, .55); background: #FFFBF5; color: var(--brand-text); }
.vocab-filter[aria-pressed="true"] { border-color: var(--ios-dark); background: var(--ios-dark); color: #fff; }
.vocab-filter-hidden { display: none !important; }
.vocab-paper-ex { margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid rgba(247, 154, 62, .35); }
.vocab-paper-ex-meta { margin: 0 0 4px; font-size: 11px; font-weight: 700; color: #C9701E; }
.vocab-paper-ex-text { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text); }
.vocab-paper-ex-zh { margin: 6px 0 0; padding-top: 6px; border-top: 1px dashed rgba(247, 154, 62, .4); font-size: 12.5px; line-height: 1.75; color: var(--text-2); white-space: pre-line; }

/* ===== 刷单词：三入口 + 错词本/已掌握 ===== */
.vocab-list-wrong { color: #C9701E; font-weight: 600; }
.vocab-btn-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .28); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vocab-secondary { padding: 9px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.vocab-secondary:hover:not(:disabled) { border-color: rgba(247, 154, 62, .55); background: #FFFBF5; color: var(--brand-text); }
.vocab-secondary:disabled { opacity: .45; cursor: not-allowed; }

/* 刷词卡上的模式与记录标签 */
.vocab-meta-row { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 20px; margin-bottom: 4px; }
.vocab-mode-pill { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #9A5B00; background: linear-gradient(120deg, #FFE7BF, #FFD28A); }
.vocab-seen-pill { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--fill); }

/* 反馈区操作 */
.vocab-feedback-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.vocab-feedback-actions .vocab-next { flex: 1 1 0; margin-top: 0; }
/* 左滑提示：仅在触摸设备上显示（桌面用回车/空格或点击按钮）。 */
.vocab-swipe-hint { display: none; margin: 6px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }
@media (hover: none) and (pointer: coarse) {
  .vocab-swipe-hint { display: block; }
}
.vocab-master { flex: 1 1 0; min-height: 42px; padding: 9px 14px; border-radius: var(--button-radius); border: 0; background: #FFF0DC; font-size: 14px; font-weight: 700; color: var(--brand-text); cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.vocab-master:hover { background: #FFE6C7; }
.vocab-master:disabled { opacity: .5; cursor: not-allowed; }

/* 结算面板补充 */
.vocab-done-mastered { margin: -6px 0 14px; font-size: 13px; font-weight: 600; color: var(--brand-text); }

/* 错词本 / 已掌握词表 */
.vocab-wordlist { max-width: 680px; margin: 0 auto; padding: 20px 22px 24px; }
.vocab-wordlist-head { display: flex; align-items: center; gap: 12px; }
.vocab-wordlist-hint { margin: 14px 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--fill); font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.vocab-wordlist-items { display: flex; flex-direction: column; gap: 8px; }
.vocab-word-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: opacity .2s ease, transform .2s ease, border-color .16s ease; }
.vocab-word-row:hover { border-color: rgba(247, 154, 62, .45); transform: translateY(-1px); }
.vocab-word-row.is-fading { opacity: 0; transform: translateX(12px); }
.vocab-word-row-main { flex: 1; min-width: 0; }
.vocab-word-row-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; }
.vocab-word-row-head strong { font-size: 16px; font-weight: 700; color: var(--text); }
.vocab-word-row-phonetic { font-size: 12px; color: var(--text-3); font-family: "Segoe UI", system-ui, sans-serif; }
.vocab-word-row-gloss { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vocab-word-row-stats { margin: 3px 0 0; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vocab-word-row-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.vocab-word-row-speak { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; }
.vocab-word-row-speak:hover { border-color: rgba(247, 154, 62, .55); background: #FFFBF5; }
.vocab-word-row-mark { padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(247, 154, 62, .5); background: #FFFBF5; font-size: 12.5px; font-weight: 700; color: var(--brand-text); cursor: pointer; white-space: nowrap; }
.vocab-word-row-mark:hover:not(:disabled) { background: #FFF4E4; }
.vocab-word-row-mark:disabled { opacity: .5; cursor: not-allowed; }
.vocab-wordlist-more { text-align: center; margin-top: 12px; }
.vocab-wordlist-actions { display: flex; gap: 10px; margin-top: 16px; }
.vocab-wordlist-actions .button { flex: 1; }

@media (max-width: 560px) {
  .vocab-word-row { flex-wrap: wrap; }
  .vocab-word-row-gloss { white-space: normal; }
  .vocab-feedback-actions { flex-direction: column-reverse; align-items: stretch; }
  .vocab-master { flex: 0 0 auto; width: 100%; }
}

/* Compact introductions only: do not resize cards or practice/admin workspaces. */
.learner-page > .page-intro {
  display: block; padding: 14px 18px; margin: 0 0 14px; border: 0;
  border-radius: 16px; background: var(--header-bg); color: var(--text); box-shadow: none;
}
.page-intro .page-intro-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.page-intro .page-intro-head h1 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; letter-spacing: -.02em; }
.page-intro .page-intro-body { margin-top: 8px; }
.page-intro .page-intro-body p { margin: 0; max-width: 52em; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.page-intro .vocab-hero-note { margin-top: 6px !important; }
.page-intro .vocab-hero-note a { color: var(--text); }
.page-intro .know-hero-stats { margin-top: 8px; gap: 8px 16px; color: var(--text-2); }
.page-intro .know-hero-stats strong { font-size: 14px; font-weight: 650; color: var(--text); }
.page-intro .page-intro-close, .page-intro .page-intro-expand {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; border: 0; border-radius: 18px; box-shadow: none;
  background: transparent; color: var(--text-3); cursor: pointer; font: inherit; font-size: 13px;
  --tap-min: 36px;
}
.page-intro .page-intro-close { margin-left: auto; width: 36px; padding: 8px; }
.page-intro .page-intro-expand { margin-left: auto; padding: 6px 10px; }
.page-intro .page-intro-close:hover, .page-intro .page-intro-expand:hover { background: rgba(29, 29, 31, .06); color: var(--text); }
.page-intro .page-intro-close:focus-visible, .page-intro .page-intro-expand:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 3px; }
.membership-page > .membership-summary { align-items: center; gap: 12px; margin: 0 0 14px; }
.membership-summary h1 { margin: 0 0 4px; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; }
.membership-summary p { font-size: 14px; line-height: 1.6; }
.membership-summary .membership-hero-actions { flex-direction: row; flex-wrap: wrap; }
@media (max-width: 560px) {
  .learner-page > .page-intro { padding: 14px; }
}

/* ==========================================================================
   邮箱验证码 / 登录方式切换（登录与注册共用）
   ========================================================================== */
.auth-switch { margin: 0 0 18px; }
/* 验证码行与上方输入框等宽：输入框铺满，获取按钮固定宽。
   验证码直接填在表单里（不再弹窗），所以按普通字段渲染。
   字体跟随站点设置（--font-text），不换成等宽字体：用户会看到「6 位数字」
   这样的提示文字，等宽字体配上大字距会把它撑成一串孤立字符，很难看。
   数字本身仍用 tabular-nums 对齐，输入时的位数感来自字距而非字体。 */
.code-input-row { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.code-input-row .code-input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-text);
  font-size: 16px; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.code-input-row .code-send-btn {
  flex: 0 0 auto; min-width: 112px; padding: 0 14px;
  border-radius: var(--field-radius); font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer; transition: background .16s, border-color .16s;
}
.code-input-row .code-send-btn:hover:not(:disabled) { background: var(--fill); border-color: var(--line-strong); }
.code-input-row .code-send-btn:disabled { opacity: .55; cursor: default; }
/* 验证码说明只在有内容时占位（发送失败、冷却提示等）。 */
.auth-form .form-field small[data-code-hint]:empty { display: none; }
.auth-form .form-field small[data-code-hint] { min-height: 0; }
@media (max-width: 520px) {
  .code-input-row { flex-wrap: wrap; }
  .code-input-row .code-send-btn { width: 100%; min-height: 40px; }
}

/* ==========================================================================
   站点外壳 · 移动端底部标签栏（iOS 风格毛玻璃）
   ========================================================================== */
.tab-bar { display: none; }
@media (max-width: 1000px) {
  /* 悬浮胶囊导航：左右留边、圆角、带阴影浮在内容之上，
     底部叠加 iOS 安全区，避免被 Home 指示条压住。
     质感靠三层叠出来：顶面微渐变（上亮下暗像受光的玻璃）+ 发丝环 + 远近两层投影，
     不再用 1px 白描边——那圈白边会把玻璃面切成"贴纸"。 */
  .tab-bar {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 45;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px); max-width: 520px;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(247, 247, 250, .88));
    backdrop-filter: saturate(190%) blur(28px);
    -webkit-backdrop-filter: saturate(190%) blur(28px);
    box-shadow:
      0 0 0 .5px rgba(0, 0, 0, .07),
      0 1px 1px rgba(0, 0, 0, .03),
      0 10px 26px -6px rgba(0, 0, 0, .14),
      0 26px 50px -20px rgba(0, 0, 0, .16);
    transition: width .26s var(--ease-out), border-radius .26s var(--ease-out);
  }
  /* 顶棱高光：只在玻璃面最上沿亮一道，让圆角边缘有厚度感。 */
  .tab-bar::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 1px;
    border-radius: 24px 24px 0 0; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .92) 18%, rgba(255, 255, 255, .92) 82%, transparent);
  }
  .tab-bar-items {
    display: flex; align-items: stretch; gap: 4px;
    padding: 6px 7px;
  }
  /* 收起态：整条导航缩成一根贴着底边的细条，条内不放任何装饰。
     高度压到展开态的约五分之一，用极淡的品牌色渐变营造一点体积感：
     上缘略亮、下缘略沉，中段最浅——避免纯色的呆板，也不抢内容的注意力。 */
  .tab-bar[data-expanded="false"] {
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    width: 64px;
    border-radius: var(--pill-radius);
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--brand-color) 30%, #fff) 0%,
        color-mix(in srgb, var(--brand-color) 17%, #fff) 46%,
        color-mix(in srgb, var(--brand-color) 26%, #fff) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow:
      inset 0 .5px 0 rgba(255, 255, 255, .85),
      0 1px 5px rgba(var(--brand-rgb), .18),
      0 0 0 .5px rgba(var(--brand-rgb), .12);
  }
  /* 展开态的顶棱高光属于玻璃面板，收起成细条时一并去掉。 */
  .tab-bar[data-expanded="false"]::before { display: none; }
  .tab-bar[data-expanded="false"] .tab-bar-items { display: none; }
  /* 细条本身就是按钮：整条可点，所以内部不再画抓握条。
     14px 是渐变层次与「够细」之间的折中；再薄就看不出明暗过渡了。 */
  .tab-bar-handle {
    display: none; position: relative;
    width: 100%; min-height: 14px; height: 14px; padding: 0; margin: 0;
    border: 0; background: none; cursor: pointer;
    --tap-min: 14px;
  }
  /* 视觉只有一根细条，但点按区域向四周外扩，手指不必精确命中。
     细条 14px 时仍保证 38px 的有效触控高度。 */
  .tab-bar-handle::after { content: ''; position: absolute; inset: -12px; }
  .tab-bar[data-expanded="false"] .tab-bar-handle { display: block; }
  .tab-bar[data-expanded="true"] .tab-bar-handle { display: none; }
  .tab-bar a {
    flex: 1 1 0; min-width: 0; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; min-height: 50px; padding: 6px 2px; border-radius: 17px;
    color: var(--muted); white-space: nowrap; text-decoration: none;
    transition: color .18s, background .18s, box-shadow .18s;
  }
  .tab-bar a .ui-icon {
    width: 22px; height: 22px; stroke-width: 1.75;
    transition: transform .2s var(--ease-out), stroke-width .2s;
  }
  .tab-bar a .tab-label {
    font-size: 10px; font-weight: 560; letter-spacing: .02em; line-height: 1;
    transition: opacity .18s;
  }
  .tab-bar a:active { background: rgba(0, 0, 0, .045); }
  .tab-bar a:active .ui-icon { transform: scale(.9); }
  /* 选中项：内凹的品牌浅底胶囊 + 内发光，让当前页像被"按进去"而不是贴一块色块；
     图标加粗半档、文字加深，弱化两侧未选中项，视线自然落到当前页。 */
  .tab-bar a[aria-current="page"] {
    color: var(--brand-text);
    background: linear-gradient(180deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), .10));
    box-shadow: inset 0 0 0 .5px rgba(var(--brand-rgb), .18);
  }
  .tab-bar a[aria-current="page"] .ui-icon { stroke-width: 2; }
  .tab-bar a[aria-current="page"] .tab-label { font-weight: 650; }
  .tab-bar a:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 2px; }
  /* 内容与页脚给悬浮标签栏（含安全区与浮起高度）留出空间。 */
  .public-main { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
  .public-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  /* 收起态只占一根细白条，内容下方留白同步减小。 */
  .has-compact-tab-bar .public-main { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  .has-compact-tab-bar .public-footer { padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)); }
  /* 练习页常驻 AI 悬浮球：默认上移到标签栏之上，避免两处固定元素叠在一起；
     用户拖过之后以拖动位置为准（JS 写入的自定义属性优先）。 */
  .has-practice .learn-ai-fab { bottom: var(--ai-fab-bottom, calc(96px + env(safe-area-inset-bottom, 0px))); }
  .has-practice .learn-ai-history-btn { bottom: var(--ai-history-bottom, calc(108px + env(safe-area-inset-bottom, 0px))); }
  /* 顶栏收成单行：品牌 + 三横菜单钮。
     菜单钮不要圆框、不要底色，只有三条线本身，在浅色顶栏上更干净。 */
  .shell-menu-toggle {
    width: 40px; height: 40px; min-height: 40px; padding: 0;
    border: 0; border-radius: 0;
    background: none; color: var(--text); box-shadow: none;
  }
  .shell-menu-toggle > .ui-icon { width: 22px; height: 22px; stroke-width: 1.9; }
  .shell-menu-toggle:hover { background: none; color: var(--brand-text); }
  .shell-menu-toggle:active { background: none; opacity: .55; }
  .shell-menu-toggle .shell-menu-toggle-label { display: none; }
  .public-header-inner { min-height: 54px; }
}
/* 桌面导航按压反馈 */
.public-nav > a, .nav-user-group > a { transition: background .18s, color .18s, transform .12s ease; }
.public-nav > a:active, .nav-user-group > a:active { transform: scale(.96); }

/* 高级搜索（/search）：命中试卷卡片与片段高亮 */
.search-paper-title { margin: 6px 0 2px; font-size: 17px; }
.search-paper-title a { color: var(--text); text-decoration: none; }
.search-paper-title a:hover { color: var(--brand-color); }
.search-snippets { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.search-snippets li a {
  display: block; padding: 10px 12px; border-radius: 10px;
  background: var(--fill); color: var(--text); text-decoration: none;
}
.search-snippets li a:hover { background: color-mix(in oklab, var(--fill), var(--brand-color) 8%); }
.search-snippets strong { display: block; font-size: 13px; margin-bottom: 4px; }
.search-snippet-text { font-size: 13.5px; color: var(--muted); line-height: 1.6; word-break: break-all; }
.search-snippet-text mark { background: rgba(255, 214, 102, .45); color: inherit; border-radius: 3px; padding: 0 2px; }

/* 高级搜索（/search）：胶囊搜索行与范围设置，样式对齐首页 .home-tools .search */
.search-page-tools { margin-top: 4px; }
.search-page-tools .search {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 14px;
  background: var(--surface); border-radius: var(--pill-radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, background .18s;
}
.search-page-tools .search:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .2), var(--shadow-xs);
}
.search-page-tools .search input {
  border: 0; background: none; background-color: var(--surface); min-height: 36px; padding: 0;
  font-size: 15px; width: 100%; min-width: 120px; border-radius: inherit;
}
.search-page-tools .search input:focus,
.search-page-tools .search input:focus-visible { outline: none; box-shadow: none; border-color: transparent; }
/* 浏览器自动填充会把输入框刷成淡蓝底、search 控件自带清除叉样式不一：
   用内阴影把 autofill 底色压回胶囊色，并去掉 search 的默认装饰。 */
.home-tools .search input::-webkit-search-cancel-button,
.home-tools .search input::-webkit-search-decoration,
.search-page-tools .search input::-webkit-search-cancel-button,
.search-page-tools .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.home-tools .search input:-webkit-autofill,
.home-tools .search input:-webkit-autofill:hover,
.home-tools .search input:-webkit-autofill:focus,
.search-page-tools .search input:-webkit-autofill,
.search-page-tools .search input:-webkit-autofill:hover,
.search-page-tools .search input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border-radius: inherit;
  transition: background-color 9999s ease-out;
}
.search-page-tools .search button {
  border: 0; border-radius: var(--pill-radius); background: var(--ios-dark); color: #fff;
  min-height: 36px; padding: 0 18px; font-size: 13.5px; font-weight: 600; flex-shrink: 0;
}
.search-page-tools .search button:hover { background: #2C2C2E; }
.search-page-tools .search .search-icon { color: var(--muted); font-size: 14px; }
/* 范围设置：标签 + 透明下拉组成一颗胶囊；标签 nowrap 防止两字竖排换行 */
.search-scope { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-scope-item {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 8px 0 14px;
  border-radius: var(--pill-radius); white-space: nowrap; width: fit-content;
  background: var(--surface); box-shadow: var(--shadow-xs);
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: box-shadow .18s;
}
.search-scope-item:focus-within { box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .2), var(--shadow-xs); }
.search-scope-item > span { white-space: nowrap; flex-shrink: 0; letter-spacing: .02em; }
.search-scope-item select {
  appearance: none; -webkit-appearance: none;
  border: 0; background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23889099' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
  color: var(--text); font-size: 13px; font-weight: 600;
  min-height: 40px; padding: 0 24px 0 2px; border-radius: 10px;
  max-width: 180px; cursor: pointer;
}
.search-scope-item select:focus, .search-scope-item select:focus-visible { outline: none; box-shadow: none; }
/* select-control.js 把原生 <select> 换成自定义触发按钮：胶囊里再套一颗白底圆角
   按钮会变成「胶囊套胶囊」，而且 44px 的触发器比 42px 的胶囊还高，视觉上像错位。
   这里把触发器压平，融进外层胶囊；下拉面板不受影响，仍是自定义那套。 */
.search-scope-item > .quiz-select {
  width: auto; max-width: none; min-width: 0; flex: 0 1 auto;
  display: inline-flex; vertical-align: middle;
}
.search-scope-item > .quiz-select .quiz-select-trigger {
  box-sizing: border-box; width: auto; min-width: 0; min-height: 0;
  margin: 0; padding: 3px 26px 3px 2px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4;
  box-shadow: none;
}
.search-scope-item > .quiz-select .quiz-select-trigger:hover { background: transparent; }
.search-scope-item > .quiz-select .quiz-select-trigger:focus-visible {
  outline: none; box-shadow: none;
}
.search-scope-item > .quiz-select .quiz-select-trigger[aria-expanded=true] { background: transparent; }
.search-scope-item > .quiz-select .quiz-select-summary {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 160px; -webkit-line-clamp: unset;
}
/* 箭头沿用原生的那颗小 V，位置与原 select 的内联背景图标一致。 */
.search-scope-item > .quiz-select .quiz-select-arrow {
  width: 7px; height: 7px; margin: 0 0 3px 6px; opacity: .55;
}
.search-scope-item > .quiz-select .quiz-select-trigger[aria-expanded=true] .quiz-select-arrow {
  transform: rotate(225deg); margin-top: 4px;
}
.search-scope-item > .quiz-select .quiz-select-error { display: none; }
@media (max-width: 560px) {
  .search-scope { gap: 8px; }
  .search-scope-item { min-height: 44px; padding-left: 12px; }
  .search-scope-item > .quiz-select .quiz-select-summary { max-width: 104px; }
}
.search-snippet-field {
  display: inline-block; margin-left: 7px; padding: 0 7px; border-radius: 999px;
  background: rgba(var(--brand-rgb, 0 122 255), .1); color: var(--brand-text, #0a66d0);
  font-size: 11px; font-weight: 650; line-height: 1.8; white-space: nowrap;
}
.notice.danger { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger-text); }

/* 搜索框旁的 VIP 高级搜索入口：浅灰按钮上不够醒目，底色加深一档 */
.vip-entry-strong { background: color-mix(in oklab, var(--fill), var(--text) 12%); }
.vip-entry-strong:hover { background: color-mix(in oklab, var(--fill), var(--text) 20%); }

/* ==========================================================================
   通用列表分页条：后台试卷/随机组卷/用户/题目反馈与学习端练习历史共用
   ========================================================================== */
.list-pager {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 12px 16px;
}
.card .list-pager, .exam-paper-table ~ .list-pager { border-top: 1px solid var(--line); }
.list-pager-info { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.list-pager-links { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.list-pager-state { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* 账号中心「消耗日志」：剩余额度卡 + 逐日消耗表（liquid glass 同款圆角与填充）。 */
.consumption-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.consumption-metric { border-radius: var(--control-radius); background: var(--fill); padding: 14px 16px; }
.consumption-label { font-size: 12px; color: var(--text-3); margin: 0 0 6px; }
.consumption-value { font-size: 26px; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -.01em; }
.consumption-note { font-size: 12px; color: var(--text-3); margin: 6px 0 0; }
.consumption-legend { font-size: 12px; margin-top: 10px; }
/* 逐日进出账：一天一张卡，卡内按台账列出「−消耗 +加量 净变化」；窄屏单列，桌面两列。 */
.consumption-days { display: grid; gap: 8px; grid-template-columns: 1fr; }
.consumption-day { display: grid; gap: 8px; min-width: 0; padding: 10px 12px; border-radius: var(--control-radius); background: var(--fill); }
.consumption-day.is-today { background: rgba(59, 130, 246, .08); }
.consumption-day.is-idle { opacity: .72; }
.consumption-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.consumption-day-date { min-width: 0; font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.consumption-day-summary { min-width: 0; margin: 0; font-size: 12px; color: var(--text-3); text-align: right; overflow-wrap: anywhere; }
.consumption-accounts { display: grid; gap: 6px; margin: 0; }
.consumption-account { display: grid; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: calc(var(--control-radius) - 6px); background: rgba(120, 120, 128, .07); }
.consumption-account.is-idle { display: none; }
.consumption-account dt { font-size: 11px; color: var(--text-3); }
.consumption-account dd { margin: 0; min-width: 0; }
.consumption-account-flow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.consumption-account-used { color: var(--text); }
.consumption-account-added { color: #0a7d4f; }
.consumption-account-net { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: rgba(120, 120, 128, .14); color: var(--text-2); }
.consumption-account-net.is-up { background: rgba(10, 125, 79, .12); color: #0a7d4f; }
.consumption-account-net.is-down { background: rgba(200, 60, 60, .12); color: #b43232; }
.consumption-account-detail { font-size: 11.5px; line-height: 1.45; color: var(--text-3); overflow-wrap: anywhere; }

/* 最近 AI 调用：只展示功能、结果与耗时，绝不暴露模型标识。 */
.consumption-ai { display: grid; gap: 8px; }
.consumption-ai-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--control-radius); background: var(--fill); }
.consumption-ai-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.consumption-ai-scene { font-size: 13px; font-weight: 600; color: var(--text); }
.consumption-ai-meta { display: flex; align-items: center; gap: 8px; flex: none; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

@media (min-width: 720px) {
    .consumption-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 登录 / 注册分段切换：与「登录方式」同款液态玻璃滑块，占满整行。 */
.auth-mode-switch { display: flex; width: 100%; margin: 0 0 18px; }
.auth-mode-switch > a { flex: 1 1 50%; justify-content: center; }
.auth-mode-switch > a[aria-selected="true"] { font-weight: 650; }
/* 表单下方的一行轻提示：只在需要时指路，不再堆一整块。 */
.auth-switch-hint { font-size: 12.5px; color: var(--text-3); text-align: center; margin: 12px 0 0; }
.auth-switch-hint a { color: var(--brand-color); }
