/* =========================================================
   护理刷题系统 MVP ｜ common.css ｜ 依据 03_UI设计规范 v1.0
   原生 CSS，零依赖。设计令牌与组件类名逐字采用 03 文档。
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  /* 颜色 */
  --c-primary: #16a06a;        /* 品牌绿：主按钮、选中态、进度条 */
  --c-primary-dark: #0a4d34;   /* 深绿：顶部栏底色、标题强调 */
  --c-primary-bg: #e8f6ef;     /* 浅绿底：选中选项背景、标签底 */
  --c-success: #16a06a;        /* 对=品牌绿，共用一个值 */
  --c-danger: #e02020;         /* 错=红 */
  --c-danger-bg: #fdecec;      /* 错误浅底：错误选项背景、错误提示条 */
  --c-warn: #d98700;           /* 警告（掌握度"一般"） */
  --c-text: #26302b;           /* 主文字 */
  --c-text-2: #6b7671;         /* 次要文字、辅助说明 */
  --c-text-disabled: #b3bbb6;
  --c-border: #e2e8e4;
  --c-bg: #f5f7f6;             /* 页面背景 */
  --c-card: #ffffff;           /* 卡片背景 */
  --c-mask: rgba(0,0,0,.45);

  /* 字号（正文一律 ≥16px） */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 24px;
  --fs-xxl: 32px;

  /* 间距（4 基准） */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;

  /* 圆角 */
  --r-sm: 4px;
  --r-md: 10px;
  --r-full: 999px;

  /* 阴影 */
  --shadow-card: 0 2px 10px rgba(10,77,52,.07), 0 1px 2px rgba(10,77,52,.04);
  --shadow-pop: 0 6px 20px rgba(10,77,52,.16);

  /* 尺寸 */
  --h-topbar: 48px;
  --h-tabbar: 56px;
  --h-option: 48px;
  --h-btn: 44px;
  --w-page: 560px;   /* H5 内容最大宽度：PC 打开时保持手机形态居中 */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 全局 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: var(--fs-base); color: var(--c-text); }
a { color: inherit; text-decoration: none; }
button, a, .chip, .list-item { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
[hidden] { display: none !important; }

.page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* ---------- 顶部栏 ---------- */
.topbar {
  height: var(--h-topbar); flex: none;
  background: linear-gradient(165deg, #0d5f40, var(--c-primary-dark) 70%);
  color: #fff;
  display: flex; align-items: center; padding: 0 var(--sp-3);
  position: relative; z-index: 5;
}
.topbar__back {
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}
.topbar__title {
  flex: 1; text-align: center; font-size: var(--fs-lg); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar__side { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* ---------- 内容区 ---------- */
.content {
  flex: 1; padding: var(--sp-4);
  padding-bottom: calc(var(--h-tabbar) + env(safe-area-inset-bottom, 0px) + var(--sp-2));
  overflow-y: auto;
  width: 100%; max-width: var(--w-page); margin: 0 auto;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--h-tabbar) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--c-card); border-top: 1px solid var(--c-border);
  display: flex; justify-content: center;
}
.tabbar__item {
  flex: 1 1 0; max-width: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--c-text-2); font-size: var(--fs-xs);
  -webkit-tap-highlight-color: transparent; transition: color .15s;
}
.tabbar__icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 28px; border-radius: var(--r-full);
  transition: background .2s;
}
.tabbar__item svg { width: 24px; height: 24px; }
.tabbar__item.is-active { color: var(--c-primary); font-weight: 600; }
.tabbar__item.is-active .tabbar__icon { background: var(--c-primary-bg); }
.tabbar__item.is-active svg { transform: translateY(-1px); }

/* ---------- 按钮 ---------- */
.btn-primary, .btn-secondary, .btn-danger {
  min-height: var(--h-btn); padding: 0 var(--sp-5);
  border-radius: var(--r-full); font-size: var(--fs-base); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  transition: opacity .15s, transform .12s, box-shadow .15s; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(22,160,106,.28); }
.btn-primary:active:not(:disabled), .btn-secondary:active:not(:disabled),
.btn-danger:active:not(:disabled) { transform: scale(.97); }
.btn-secondary:active:not(:disabled) { background: var(--c-primary-bg); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(22,160,106,.36); }
.btn-secondary { background: var(--c-card); color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled {
  background: var(--c-text-disabled); border-color: var(--c-text-disabled); color: #fff; cursor: not-allowed;
}
.btn-secondary:disabled { background: var(--c-card); color: var(--c-text-disabled); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 32px; padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-md); font-weight: 600; }
.btn-sm.btn-primary { min-height: 36px; }

/* loading 转圈（按钮内嵌） */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block; flex: none;
}
.spinner--dark { border-color: rgba(22,160,106,.3); border-top-color: var(--c-primary); }
.btn.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 输入框 ---------- */
.input {
  height: var(--h-btn); width: 100%; padding: 0 var(--sp-3);
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-card); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(22,160,106,.2); }
.input.is-error { border-color: var(--c-danger); }
textarea.input { height: auto; min-height: 88px; padding: var(--sp-2) var(--sp-3); resize: vertical; line-height: 1.5; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--c-text-2) 50%), linear-gradient(135deg, var(--c-text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input-wrap { position: relative; }
.pwd-toggle {
  position: absolute; right: var(--sp-1); top: 50%; transform: translateY(-50%);
  min-width: 44px; min-height: 44px; color: var(--c-primary); font-size: var(--fs-sm);
}
.field-error { color: var(--c-danger); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.form-error-bar {
  background: var(--c-danger-bg); color: var(--c-danger);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); margin-bottom: var(--sp-3); text-align: center;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-card); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); padding: var(--sp-4);
}

/* ---------- 选项条 ---------- */
.option-item {
  min-height: var(--h-option); width: 100%;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-md);
  font-size: var(--fs-base); text-align: left; line-height: 1.5;
  transition: background .15s, border-color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.option-item:not(:disabled):active { transform: scale(.985); background: var(--c-primary-bg); border-color: var(--c-primary); }
.option-item + .option-item { margin-top: var(--sp-2); }
.option__key {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 1px solid var(--c-border); color: var(--c-text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600;
}
.option__text { flex: 1; word-break: break-all; }
.option__flag { flex: none; font-size: var(--fs-sm); font-weight: 700; display: none; }
/* 选中（提交前）：浅绿底 + 绿边框 + ✓ */
.option-item.is-selected { background: var(--c-primary-bg); border-color: var(--c-primary); }
.option-item.is-selected .option__key { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.option-item.is-selected .option__flag--check { display: inline; color: var(--c-primary); font-size: 18px; font-weight: 700; }
/* 提交后-正确项：浅绿底 + 绿边框 + "正确答案"角标 */
.option-item.is-right { background: var(--c-primary-bg); border-color: var(--c-primary); }
.option-item.is-right .option__flag--right { display: inline; color: var(--c-primary); }
/* 提交后-错选项：浅红底 + 红边框 + ✗ */
.option-item.is-wrong { background: var(--c-danger-bg); border-color: var(--c-danger); }
.option-item.is-wrong .option__flag--wrong { display: inline; color: var(--c-danger); }
.option-item:disabled { cursor: default; }
/* 判断题：对/错 两个等宽大按钮 */
.option-item--judge { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.option-item--judge .option-item { margin-top: 0; justify-content: center; font-size: 18px; font-weight: 600; min-height: 56px; }

/* ---------- 判分反馈条 ---------- */
.judge-bar {
  min-height: 48px; border-radius: var(--r-md);
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-base); font-weight: 700;
  animation: slide-in .25s ease-out;
}
.judge-bar--right { background: var(--c-primary-bg); color: var(--c-success); }
.judge-bar--wrong { background: var(--c-danger-bg); color: var(--c-danger); }
.judge-bar__icon { font-size: 20px; flex: none; }
.judge-bar__answer { font-size: var(--fs-sm); font-weight: 400; margin-left: auto; }
.judge-bar__sub { font-size: var(--fs-sm); font-weight: 400; margin-left: var(--sp-2); }
@keyframes slide-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 进度条 ---------- */
.progress { height: 8px; background: var(--c-border); border-radius: var(--r-full); overflow: hidden; }
.progress__fill { height: 100%; background: var(--c-primary); border-radius: var(--r-full); transition: width .3s; }
.progress--mini { height: 5px; margin-top: var(--sp-1); }

/* ---------- 倒计时条 ---------- */
.countdown { position: relative; height: 32px; background: var(--c-primary-bg); border-radius: var(--r-md); overflow: hidden; }
.countdown__fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(22,160,106,.35); transition: width 1s linear; }
.countdown__time {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-base); font-weight: 700; color: var(--c-primary-dark);
  font-variant-numeric: tabular-nums;
}
.countdown--warn .countdown__fill { background: rgba(217,135,0,.35); }
.countdown--warn .countdown__time { color: var(--c-warn); }
.countdown--danger .countdown__fill { background: rgba(224,32,32,.3); }
.countdown--danger .countdown__time { color: var(--c-danger); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; top: calc(var(--h-topbar) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  pointer-events: none; width: max-content; max-width: 90vw;
}
.toast {
  background: rgba(0,0,0,.78); color: #fff; padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md); font-size: var(--fs-sm);
  animation: slide-in .2s ease-out; max-width: 100%; word-break: break-all;
}
.toast--top { top: 12px; }

/* ---------- 空态 ---------- */
.empty {
  padding: 64px var(--sp-4); text-align: center; color: var(--c-text-2);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
}
.empty__icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--c-primary-bg); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; line-height: 1; font-weight: 700;
}
.empty__text { font-size: var(--fs-base); }
.empty .btn-primary, .empty .btn-secondary { margin-top: var(--sp-2); min-width: 140px; }

/* ---------- 列表项 ---------- */
.list-item {
  background: var(--c-card); border-bottom: 1px solid var(--c-border);
  padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3);
  cursor: pointer; min-height: 44px;
}
.list-item:hover { background: var(--c-primary-bg); }
.list-item__main { flex: 1; min-width: 0; }
.list-item__title { font-size: var(--fs-base); }
.list-item__stem { font-size: var(--fs-base); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-item__stem--1 { -webkit-line-clamp: 1; }
.list-item__meta { font-size: var(--fs-sm); color: var(--c-text-2); margin-top: var(--sp-1); }
.list-item__arrow { flex: none; color: var(--c-text-disabled); font-size: 18px; }
.list-card { background: var(--c-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); overflow: hidden; }

/* ---------- 胶囊/标签 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  height: 24px; padding: 0 var(--sp-2); border-radius: var(--r-full);
  font-size: var(--fs-xs); background: var(--c-primary-bg); color: var(--c-primary-dark); white-space: nowrap;
}
.pill--warn { background: #fdf3e3; color: var(--c-warn); }
.tag-type {
  display: inline-flex; align-items: center; height: 22px; padding: 0 var(--sp-2);
  border-radius: var(--r-sm); font-size: var(--fs-xs);
  background: var(--c-primary-bg); color: var(--c-primary-dark); white-space: nowrap;
}
.tag-type--multi { background: #eaf1fd; color: #2b5cb8; }
.tag-type--judge { background: #fdf3e3; color: var(--c-warn); }
.tag-type--blank { background: #f3eafb; color: #7a3fa8; }

/* ---------- 筛选胶囊 ---------- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-1) 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 var(--sp-4);
  border-radius: var(--r-full); border: 1px solid var(--c-border);
  background: var(--c-card); font-size: var(--fs-base); color: var(--c-text-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }

/* ---------- 骨架屏 ---------- */
.skeleton {
  background: #e9edeb; border-radius: var(--r-md);
  animation: skeleton-flash 1.2s ease-in-out infinite;
}
@keyframes skeleton-flash { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- 首页：hero 问候统计带 + 宫格 ---------- */
.home-hero {
  background: linear-gradient(150deg, #0a4d34, #0d5f40 70%, #16a06a 145%);
  border-radius: var(--r-md); padding: var(--sp-4);
  color: #fff; box-shadow: var(--shadow-pop);
  position: relative; overflow: hidden;
  animation: fade-up .35s ease-out backwards;
}
.home-hero::after { content: ""; position: absolute; right: -34px; top: -34px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.07); }
.home-hero__greet { position: relative; z-index: 1; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.home-hero__sub { position: relative; z-index: 1; font-size: 13px; opacity: .85; margin-top: 2px; }
.home-hero__who {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 5px 14px; border-radius: 999px; width: fit-content;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  font-size: 14px; color: rgba(255,255,255,.92); letter-spacing: .5px;
}
.home-hero__who svg { width: 15px; height: 15px; opacity: .85; }
.summary-grid--hero { position: relative; z-index: 1; }
.summary-grid--hero .summary-grid { margin-top: var(--sp-3); gap: var(--sp-2); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.summary-grid--hero .summary-card {
  background: rgba(255,255,255,.13); box-shadow: none;
  padding: 10px 12px; animation-delay: .08s;
}
.summary-grid--hero .summary-card:nth-child(2) { animation-delay: .14s; }
.summary-grid--hero .summary-card:nth-child(3) { animation-delay: .2s; }
.summary-grid--hero .summary-card:nth-child(4) { animation-delay: .26s; }
.summary-grid--hero .summary-card__num { color: #fff; font-size: 22px; }
.summary-grid--hero .summary-card__label { color: rgba(255,255,255,.78); }
.summary-grid--hero .summary-card__chip { background: rgba(255,255,255,.16); color: #fff; }
.summary-grid--hero .summary-card--link:hover { background: rgba(255,255,255,.22); box-shadow: none; }
.summary-card { background: var(--c-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4); transition: transform .12s, box-shadow .15s; }
.summary-card__row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.summary-card__num { font-size: var(--fs-xl); font-weight: 700; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; line-height: 1.15; }
.summary-card__label { font-size: var(--fs-xs); color: var(--c-text-2); margin-top: 3px; }
.summary-card__chip { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.summary-card__chip svg { width: 17px; height: 17px; }
.summary-card__chip--answered { background: #e8f6ef; color: #16a06a; }
.summary-card__chip--accuracy { background: #e0f4f1; color: #0b7a63; }
.summary-card__chip--streak  { background: #fdf3e3; color: #d98700; }
.summary-card__chip--wrong   { background: #fdecec; color: #e02020; }
.summary-card--link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.summary-card--link:active { transform: scale(.96); }
.summary-card--link:hover { box-shadow: var(--shadow-pop); }
/* 入场动效：问候区 → 统计卡 → 宫格逐项错峰浮现 */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.home-hello { animation: fade-up .35s ease-out backwards; }
.summary-grid .summary-card { animation: fade-up .4s ease-out backwards; }
.summary-grid .summary-card:nth-child(2) { animation-delay: .06s; }
.summary-grid .summary-card:nth-child(3) { animation-delay: .12s; }
.summary-grid .summary-card:nth-child(4) { animation-delay: .18s; }
.grid-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); }
.grid-nav__item {
  background: var(--c-card); border-radius: var(--r-md); box-shadow: var(--shadow-card);
  min-height: 112px; padding: var(--sp-3) var(--sp-2) var(--sp-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-text);
  transition: transform .12s, background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  animation: fade-up .4s ease-out backwards;
}
.grid-nav__item:nth-child(1) { animation-delay: .15s; }
.grid-nav__item:nth-child(2) { animation-delay: .2s; }
.grid-nav__item:nth-child(3) { animation-delay: .25s; }
.grid-nav__item:nth-child(4) { animation-delay: .3s; }
.grid-nav__item:nth-child(5) { animation-delay: .35s; }
.grid-nav__item:nth-child(6) { animation-delay: .4s; }
.grid-nav__item:active { background: var(--c-primary-bg); transform: scale(.95); }
.grid-nav__item:hover { box-shadow: var(--shadow-pop); }
/* 语义色图标底座：一眼区分功能分区（与题型标签色系一致） */
.grid-nav__icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.grid-nav__icon svg { width: 25px; height: 25px; }
.grid-nav__icon--seq   { background: #e8f6ef; color: #16a06a; }
.grid-nav__icon--rand  { background: #eaf1fd; color: #2b5cb8; }
.grid-nav__icon--wrong { background: #fdecec; color: #e02020; }
.grid-nav__icon--cat   { background: #f3eafb; color: #7a3fa8; }
.grid-nav__icon--fav   { background: #fdf3e3; color: #d98700; }
.grid-nav__icon--exam  { background: #e0f4f1; color: #0b7a63; }
.grid-nav__label { margin-top: 2px; }
.grid-nav__desc { font-size: var(--fs-xs); font-weight: 400; color: var(--c-text-2); }

/* ---------- 底部抽屉 ---------- */
.sheet-picker__mask, .modal__mask {
  position: fixed; inset: 0; background: var(--c-mask); z-index: 1000;
  animation: fade-in .15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-picker__panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
  background: var(--c-card); border-radius: 12px 12px 0 0; box-shadow: var(--shadow-pop);
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  animation: sheet-up .2s ease-out;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-picker__title { text-align: center; font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--sp-2); }
.sheet-picker__option {
  min-height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-base); border-bottom: 1px solid var(--c-border); width: 100%;
}
.sheet-picker__option.is-selected { color: var(--c-primary); font-weight: 700; }
.sheet-picker__cancel { min-height: 48px; width: 100%; color: var(--c-text-2); font-size: var(--fs-base); margin-top: var(--sp-2); }

/* ---------- 弹窗确认 ---------- */
.modal__card {
  position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(90%, 360px); background: var(--c-card); border-radius: 12px;
  box-shadow: var(--shadow-pop); padding: var(--sp-5);
  animation: pop-in .18s ease-out; max-height: 86vh; display: flex; flex-direction: column;
}
@keyframes pop-in { from { transform: translate(-50%,-48%); opacity: 0; } to { transform: translate(-50%,-50%); opacity: 1; } }
.modal__title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--sp-3); text-align: center; }
.modal__body { font-size: var(--fs-base); color: var(--c-text); line-height: 1.6; overflow-y: auto; }
.modal__body--center { text-align: center; }
.modal__footer { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.modal__footer .btn-primary, .modal__footer .btn-secondary, .modal__footer .btn-danger { flex: 1; }
.modal__close-x { position: absolute; right: var(--sp-2); top: var(--sp-2); min-width: 44px; min-height: 44px; font-size: 18px; color: var(--c-text-2); }

/* ---------- 答题页 ---------- */
.practice-top {
  height: var(--h-topbar); flex: none;
  background: linear-gradient(165deg, #0d5f40, var(--c-primary-dark) 70%);
  color: #fff;
  display: flex; align-items: center; padding: 0 var(--sp-2); gap: var(--sp-1);
}
.practice-top__exit { min-width: 44px; min-height: 44px; color: #fff; font-size: var(--fs-sm); }
.practice-top__who {
  font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; margin-left: 2px;
}
.practice-top__center { flex: 1; text-align: center; font-size: var(--fs-base); font-weight: 600; font-variant-numeric: tabular-nums; }
.practice-top__right { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); color: #fff; }
.practice-top__right:disabled { opacity: .5; cursor: default; }
.practice-progress { height: 2px; background: rgba(255,255,255,.25); flex: none; }
.practice-progress__fill { height: 100%; background: var(--c-primary); transition: width .3s; }
.practice-main { flex: 1; overflow-y: auto; padding: var(--sp-4); }
/* 题目卡：题干+选项+判分反馈收进白卡，视觉聚焦 */
.question-card {
  background: var(--c-card); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); padding: var(--sp-4);
}
.question-card .judge-area { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px dashed var(--c-border); }
.practice-question-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.practice-stem { font-size: var(--fs-base); line-height: 1.6; margin-bottom: var(--sp-4); word-break: break-all; }
.practice-options { display: flex; flex-direction: column; gap: var(--sp-2); }
.practice-footer {
  flex: none; padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: var(--c-card); border-top: 1px solid var(--c-border);
  display: flex; gap: var(--sp-3);
}
.practice-footer .btn-primary, .practice-footer .btn-secondary, .practice-footer .btn-danger { flex: 1; }
.judge-area { margin-top: var(--sp-4); }
.explanation-card {
  margin-top: var(--sp-3); background: var(--c-card); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4);
}
.explanation-card__tag { display: inline-block; font-size: var(--fs-xs); color: var(--c-primary-dark); background: var(--c-primary-bg); border-radius: var(--r-sm); padding: 2px var(--sp-2); margin-bottom: var(--sp-1); }
.explanation-card__text { font-size: var(--fs-sm); color: var(--c-text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.alert-bar {
  background: var(--c-danger-bg); color: var(--c-danger); font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-4); display: flex; align-items: center; gap: var(--sp-2); flex: none;
}
.alert-bar__retry { color: var(--c-danger); font-weight: 700; text-decoration: underline; min-height: 44px; }
.blank-inputs { display: flex; flex-direction: column; gap: var(--sp-2); }
.answer-sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2); }
.answer-sheet-grid__item {
  min-height: 44px; border: 1px solid var(--c-border); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-base); background: var(--c-card);
}
.answer-sheet-grid__item.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.answer-sheet-grid__item.is-answered { background: var(--c-primary-bg); border-color: var(--c-primary); color: var(--c-primary-dark); }
.answer-sheet-grid__item.is-blank { border-color: var(--c-danger); color: var(--c-danger); }
.answer-sheet-legend { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--c-text-2); }
.answer-sheet-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--c-danger); margin-right: 4px; vertical-align: -1px; }
.answer-sheet-legend b { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--c-primary); background: var(--c-primary-bg); margin-right: 4px; vertical-align: -1px; }

/* ---------- 结果页 ---------- */
.result-hero {
  background: linear-gradient(160deg, var(--c-primary-dark), var(--c-primary));
  border-radius: 12px; color: #fff; padding: var(--sp-6) var(--sp-4); text-align: center;
  box-shadow: var(--shadow-pop);
}
/* 成绩环形图：conic 扫描，无 conic 支持时退化为整圈轨道 */
.result-ring {
  width: 128px; height: 128px; margin: 0 auto var(--sp-3); border-radius: 50%;
  background-color: rgba(255,255,255,.25);
  background: conic-gradient(#fff calc(var(--p, 0) * 1%), rgba(255,255,255,.25) 0);
  display: flex; align-items: center; justify-content: center;
  animation: ring-in .7s cubic-bezier(.34,1.4,.64,1) backwards;
}
@keyframes ring-in { from { transform: scale(.75); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-ring__inner {
  width: 102px; height: 102px; border-radius: 50%; background: rgba(9,45,31,.32);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.result-ring__inner .result-hero__accuracy { font-size: 28px; }
.result-ring__sub { font-size: 11px; opacity: .85; margin-top: 1px; }
.result-hero__accuracy { font-size: var(--fs-xxl); font-weight: 700; line-height: 1.2; }
.result-hero__meta { font-size: var(--fs-sm); opacity: .92; margin-top: var(--sp-2); }
.result-hero__sub { font-size: var(--fs-lg); font-weight: 700; margin-top: var(--sp-1); }
.result-hero__cheer { display: inline-block; margin-top: var(--sp-3); padding: var(--sp-1) var(--sp-3); border-radius: var(--r-full); background: rgba(255,255,255,.16); font-size: var(--fs-sm); font-weight: 600; animation: pop-cheer .4s cubic-bezier(.34,1.56,.64,1) .15s backwards; }
@keyframes pop-cheer { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.score-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.score-table th, .score-table td { padding: var(--sp-2) var(--sp-3); text-align: left; border-bottom: 1px solid var(--c-border); }
.score-table th { color: var(--c-text-2); font-weight: 400; }
.result-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.result-actions > button { flex: 1; }
.wrong-item-expand { margin-top: var(--sp-2); background: var(--c-bg); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); color: var(--c-text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-all; }

/* ---------- 错题本 / 统计 ---------- */
.hint-bar { background: var(--c-primary-bg); color: var(--c-primary-dark); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.wrong-card { background: var(--c-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.wrong-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.mastery-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); }
.mastery-row:last-child { border-bottom: none; }
.mastery-row__name { width: 84px; flex: none; font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mastery-row__meta { font-size: var(--fs-xs); color: var(--c-text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mastery-row__bar { flex: 1; min-width: 0; }
.mastery-row__label { width: 96px; flex: none; text-align: right; font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; }
.mastery-row__label b { font-size: var(--fs-sm); }
.mastery-row--mastered .progress__fill { background: var(--c-primary); }
.mastery-row--normal .progress__fill { background: var(--c-warn); }
.mastery-row--weak .progress__fill { background: var(--c-danger); }

/* ---------- 登录页：全屏沉浸背景 + 居中悬浮白卡 ---------- */
.login-page {
  background: linear-gradient(168deg, #083d29 0%, #0a4d34 30%, #0d5f40 62%, #13815a 100%);
  min-height: 100vh; min-height: 100dvh;
}
.login-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.login-bg::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
}
.login-bg::after {
  content: ""; position: absolute; left: -70px; bottom: -60px; width: 230px; height: 230px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
}
.login-ecg {
  position: absolute; left: 0; right: 0; bottom: 16%; width: 100%; height: 56px;
  opacity: .2; animation: ecg-breathe 5s ease-in-out infinite;
}
@keyframes ecg-breathe { 0%, 100% { opacity: .12; } 50% { opacity: .3; } }
.login-center {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 20px 30px;
}
.login-brand { text-align: center; color: #fff; margin-bottom: 24px; animation: fade-up .45s ease-out backwards; }
.login-brand__logo {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 10px 28px rgba(0,0,0,.22);
  display: flex; align-items: center; justify-content: center;
}
.login-brand__logo svg { width: 34px; height: 34px; }
.login-brand__name { font-size: 28px; font-weight: 700; letter-spacing: 6px; text-indent: 6px; }
.login-brand__tag { font-size: 13px; opacity: .8; letter-spacing: 3px; text-indent: 3px; margin-top: 7px; }
.login-card2 {
  width: 100%; max-width: 400px; background: var(--c-card); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(3, 28, 18, .38);
  padding: 26px 24px 24px;
  animation: fade-up .5s ease-out .12s backwards;
}
.login-card2__tip {
  font-size: 12.5px; color: var(--c-text-2); text-align: center; line-height: 1.8;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--c-border);
}
.login-foot { margin-top: 22px; color: rgba(255,255,255,.62); font-size: 12px; letter-spacing: 1.5px; animation: fade-up .5s ease-out .2s backwards; }
/* 图标输入框（登录/改密通用） */
.input-ico { position: relative; }
.input-ico .input { padding-left: 44px; }
.input-ico__ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--c-text-2); pointer-events: none;
  transition: color .15s;
}
.input-ico:focus-within .input-ico__ico { color: var(--c-primary); }
.input-ico .pwd-toggle { border-radius: 0 var(--r-md) var(--r-md) 0; }
/* 注册链接 / 注册成功态 */
.login-alt { margin-top: 14px; text-align: center; font-size: 13px; color: var(--c-text-2); }
.login-alt a { color: var(--c-primary); font-weight: 600; }
.reg-ok { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 0; }
.reg-ok__title { font-size: 20px; font-weight: 700; color: var(--c-primary-dark); }
.reg-ok__text { font-size: 14px; color: var(--c-text-2); line-height: 1.8; margin-bottom: 6px; }

/* 首页 hero 日期 */
.home-hero__row { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-hero__date { font-size: 12px; opacity: .75; white-space: nowrap; }
/* 分类页筛选吸顶 */
.chips--sticky {
  position: sticky; top: 0; z-index: 10;
  margin: -16px -16px 12px; padding: 14px 16px 8px;
  background: linear-gradient(var(--c-bg) 80%, rgba(245,247,246,0));
}

/* ---------- 提示条（P04 提交失败等） ---------- */
.state-error-card {
  text-align: center; padding: 48px var(--sp-4); color: var(--c-text-2);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
}

/* ---------- 答题页辅助 ---------- */
#practice-app > * { max-width: var(--w-page); margin-left: auto; margin-right: auto; width: 100%; }
.fav-btn { min-height: 44px; margin-left: auto; padding: 0 16px; border-radius: var(--r-full); }
.fav-btn.is-on { color: var(--c-warn); border-color: var(--c-warn); background: #fdf9ef; }
/* PC 键盘快捷键提示（触屏设备隐藏） */
.kbd-hint { display: none; }
@media (hover: hover) and (pointer: fine) {
  .kbd-hint {
    display: block; text-align: center; font-size: var(--fs-xs); color: var(--c-text-2);
    padding: 2px 0 8px; user-select: none;
  }
  .kbd-hint kbd {
    display: inline-block; padding: 0 5px; border: 1px solid var(--c-border);
    border-bottom-width: 2px; border-radius: 4px; background: var(--c-card);
    font-family: inherit; font-size: 11px; line-height: 16px; margin: 0 1px;
  }
}

/* ---------- 文本链接按钮（管理端） ---------- */
.link-btn { color: var(--c-primary); font-size: var(--fs-sm); min-height: 36px; padding: 0 var(--sp-2); }
.link-btn:hover { text-decoration: underline; }

/* ---------- 动效偏好：减弱 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   管理端（PC，正文/表格 14px）
   ========================================================= */
.admin-page { background: var(--c-bg); min-height: 100vh; font-size: var(--fs-sm); }
.admin-header {
  height: 56px;
  background: linear-gradient(165deg, #0d5f40, var(--c-primary-dark) 70%);
  color: #fff;
  display: flex; align-items: center; padding: 0 var(--sp-6); gap: var(--sp-4);
}
.admin-header__name { font-size: var(--fs-lg); font-weight: 700; }
.admin-header__user { margin-left: auto; font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--sp-3); }
.admin-header__logout { color: #fff; font-size: var(--fs-sm); min-height: 44px; padding: 0 var(--sp-2); opacity: .9; }
.admin-tabs {
  background: var(--c-card); border-bottom: 1px solid var(--c-border);
  display: flex; padding: 0 var(--sp-6); gap: var(--sp-6);
}
.admin-tab {
  height: 48px; padding: 0 var(--sp-2); font-size: var(--fs-base); color: var(--c-text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.admin-tab.is-active { color: var(--c-primary); font-weight: 700; border-bottom-color: var(--c-primary); }
.admin-content { max-width: 1200px; margin: 0 auto; padding: var(--sp-5) var(--sp-4) var(--sp-6); }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
.filter-bar .input { width: auto; min-width: 130px; height: 36px; font-size: var(--fs-sm); }
.filter-bar .input--keyword { min-width: 200px; }
.filter-bar .btn-primary { min-height: 36px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.filter-bar__spacer { flex: 1; }

.table { width: 100%; border-collapse: collapse; background: var(--c-card); font-size: var(--fs-sm); box-shadow: var(--shadow-card); border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { padding: 0 var(--sp-3); height: 44px; text-align: left; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.table th { background: var(--c-bg); color: var(--c-text-2); font-weight: 600; }
.table tbody tr:nth-child(even) { background: #fafbfa; }
.table tbody tr:hover { background: var(--c-primary-bg); }
.table td--stem { max-width: 320px; white-space: normal; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.table__ops { text-align: right; }
.table__ops button { color: var(--c-primary); font-size: var(--fs-sm); min-height: 44px; padding: 0 var(--sp-1); }
.table__ops button.btn-op-danger { color: var(--c-danger); }
.table__ops button.btn-op-muted { color: var(--c-text-2); }
.table-wrap { overflow-x: auto; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-text-disabled); }
.status-dot--active::before { background: var(--c-primary); }

.pagination { display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-1); margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--c-text-2); }
.pagination button { min-width: 32px; height: 32px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-card); font-size: var(--fs-sm); }
.pagination button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pagination button:disabled { color: var(--c-text-disabled); cursor: not-allowed; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.stat-card { background: var(--c-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-4); transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.stat-card__num { font-size: var(--fs-xl); font-weight: 700; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; }
.stat-card__label { font-size: var(--fs-sm); color: var(--c-text-2); margin-top: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-grid .form-grid__full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: var(--sp-1); }
.form-field > label { font-size: var(--fs-sm); color: var(--c-text-2); }
.fail-list { max-height: 200px; overflow-y: auto; margin-top: var(--sp-2); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--sp-2); }
.fail-list__item { color: var(--c-danger); font-size: var(--fs-sm); line-height: 1.8; }
.import-preview { font-size: var(--fs-sm); margin-top: var(--sp-2); }
.admin-modal { width: min(92%, 640px); }
.admin-modal--narrow { width: min(90%, 420px); }
.text-muted { color: var(--c-text-2); }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-primary); }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }

/* ---------- 管理端无权限整页 ---------- */
.no-permission {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); color: var(--c-text-2); font-size: var(--fs-base); background: var(--c-bg);
}

/* ---------- 护理部审核台：左侧菜单布局（v1.9） ---------- */
.audit-page { min-height: 100vh; display: flex; background: var(--c-bg); }
.audit-side {
  width: 212px; flex: none; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(178deg, #0c5a3c, #0a4d34 72%);
  color: #fff; display: flex; flex-direction: column; padding: 22px 0 14px;
}
.audit-side__brand { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 2px 16px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.audit-side__logo { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; }
.audit-side__logo svg { width: 26px; height: 26px; }
.audit-side__name { font-size: 19px; font-weight: 700; letter-spacing: 3px; }
.audit-side__tag { font-size: 11px; opacity: .68; letter-spacing: 2.5px; }
.audit-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.audit-nav__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border-radius: 10px; border: none; background: none;
  color: rgba(255,255,255,.78); font-size: 14.5px; text-align: left; cursor: pointer;
  transition: background .15s, color .15s; font-family: inherit;
}
.audit-nav__item svg { width: 18px; height: 18px; flex: none; }
.audit-nav__item:hover { background: rgba(255,255,255,.08); color: #fff; }
.audit-nav__item.is-active { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #2fd08e; }
.audit-nav__badge { margin-left: auto; background: #e5484d; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.audit-side__foot { padding: 10px 10px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 2px; }
.audit-side__foot a, .audit-side__foot button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px;
  border-radius: 10px; border: none; background: none; cursor: pointer;
  color: rgba(255,255,255,.65); font-size: 13px; text-align: left; text-decoration: none; font-family: inherit;
}
.audit-side__foot a:hover, .audit-side__foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.audit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.audit-topbar {
  height: 52px; flex: none; background: var(--c-card); border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; padding: 0 20px; gap: 10px;
  position: sticky; top: 0; z-index: 5;
}
.audit-topbar__title { font-size: 16.5px; font-weight: 700; color: var(--c-primary-dark); }
.audit-topbar__spacer { flex: 1; }
.audit-topbar__user { font-size: 13px; color: var(--c-text-2); }
.audit-body { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: var(--sp-4) var(--sp-5) 48px; }
@media (max-width: 860px) {
  .audit-page { flex-direction: column; }
  .audit-side { width: 100%; height: auto; position: static; padding: 12px 0 0; }
  .audit-side__brand { flex-direction: row; padding: 0 16px 10px; border-bottom: none; gap: 10px; }
  .audit-side__logo { width: 38px; height: 38px; }
  .audit-side__logo svg { width: 20px; height: 20px; }
  .audit-side__name { font-size: 17px; }
  .audit-side__tag { display: none; }
  .audit-nav { flex-direction: row; overflow-x: auto; padding: 0 12px 10px; gap: 6px; }
  .audit-nav__item { flex: none; width: auto; padding: 8px 15px; border-radius: 999px; background: rgba(255,255,255,.10); font-size: 13.5px; }
  .audit-nav__item.is-active { box-shadow: none; }
  .audit-nav__item svg { display: none; }
  .audit-side__foot { flex-direction: row; border-top: none; padding: 0 12px 10px; gap: 8px; }
  .audit-side__foot a, .audit-side__foot button { flex: 1; justify-content: center; text-align: center; padding: 7px 10px; background: rgba(255,255,255,.10); border-radius: 999px; }
  .audit-body { padding: var(--sp-3) var(--sp-3) 40px; }
}
.card__title { font-size: 16px; font-weight: 700; color: var(--c-primary-dark); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: 10px; }
.tag--pend { background: #fdf3e3; color: var(--c-warn); }
.stat-card--warn .stat-card__num { color: var(--c-warn); }
.text-ok { color: var(--c-primary); font-weight: 600; }
.pending-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px dashed var(--c-border);
}
.pending-item:last-child { border-bottom: none; }
.pending-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pending-item__main b { font-size: var(--fs-base); color: var(--c-text); }
.pending-item__main .muted { font-size: var(--fs-xs); }
.audit-pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: var(--sp-3); flex-wrap: wrap; }
.audit-pager button {
  min-width: 34px; height: 32px; padding: 0 8px; border-radius: var(--r-md);
  background: var(--c-card); border: 1px solid var(--c-border); color: var(--c-text-2);
  font-size: var(--fs-sm); font-weight: 600;
}
.audit-pager button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.audit-pager button:disabled { opacity: .4; }

/* ---------- 我的页：科室排行 / 成就徽章 / 设置菜单（v1.9） ---------- */
.rank-line { font-size: 14.5px; padding: 2px 0 10px; border-bottom: 1px dashed var(--c-border); margin-bottom: 4px; }
.rank-mine { color: var(--c-primary-dark); font-size: 17px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--c-border); font-size: 14.5px; }
.rank-row:last-child { border-bottom: none; }
.rank-row--self { background: var(--c-primary-bg, #e9f5ef); border-radius: 8px; }
.rank-row__no {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px; background: #eef3f0; color: var(--c-text-2);
}
.rank-row__no--1 { background: #f2b53c; color: #fff; }
.rank-row__no--2 { background: #b9c2c9; color: #fff; }
.rank-row__no--3 { background: #d9925f; color: #fff; }
.rank-row__name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.rank-row__num { font-weight: 700; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; }
.rank-row__acc { width: 52px; text-align: right; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.badge-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--c-primary); color: #fff; box-shadow: 0 1px 3px rgba(22,160,106,.35);
}
.badge-chip--off { background: #eef2f0; color: var(--c-text-2); font-weight: 400; box-shadow: none; }
.mine-menu__row {
  display: flex; align-items: center; gap: 10px; padding: 13px 4px;
  border-bottom: 1px solid var(--c-border); color: var(--c-text);
  font-size: 15px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mine-menu__row:last-child { border-bottom: none; }
.mine-menu__row:hover { color: var(--c-primary-dark); }
.mine-menu__row .arr { margin-left: auto; color: var(--c-text-2); }

/* =========================================================
   PC 增强布局（≥900px）
   手机端（<900px）零改动：pc-side 隐藏、content 仍 560px。
   ========================================================= */
.pc-side { display: none; }

@media (min-width: 900px) {
  .content { max-width: 960px; }
  .kbd-hint { display: none; }   /* 底部快捷键条与侧栏重复，PC 隐藏 */
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .grid-nav { grid-template-columns: repeat(6, 1fr); }
  .grid-nav__item { min-height: 116px; }
  .state-error-card, .empty { padding-left: 48px; padding-right: 48px; }

  /* ---- 答题页：解除手机壳，全屏横贯 ---- */
  #practice-app > * { max-width: none; }
  .practice-top { padding: 0 44px; }
  .practice-footer {
    justify-content: center; gap: 14px;
    padding: 12px 44px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .practice-footer .btn-primary, .practice-footer .btn-secondary, .practice-footer .btn-danger {
    flex: 0 0 auto; min-width: 176px;
  }

  /* ---- 答题页双栏：左题目主区 + 右常驻侧栏 ---- */
  .practice-main {
    display: flex; gap: 40px; align-items: flex-start;
    justify-content: center;
    padding: 26px 44px 44px;
  }
  .practice-main .pc-main {
    flex: 1 1 auto; min-width: 0; max-width: 900px;
  }
  .practice-main .pc-side {
    display: flex; position: sticky; top: 16px;
    flex: 0 0 264px; width: 264px;
    flex-direction: column; gap: 14px;
  }
  .pc-side__card {
    background: var(--c-card); border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
  }
  .pc-side__label {
    font-size: 12px; font-weight: 700; letter-spacing: 2px;
    color: var(--c-text-2); margin-bottom: 10px;
  }
  .pc-progress-num { font-size: 17px; font-weight: 600; color: var(--c-primary-dark); margin-bottom: 10px; }
  .pc-progress-num b { font-size: 24px; color: var(--c-primary-dark); }
  .pc-progress { margin-top: 0; }
  .pc-clock {
    font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--c-primary-dark); letter-spacing: 1px; line-height: 1.1;
  }
  .pc-clock--warn { color: #b4600a; }
  .pc-clock--danger { color: #c0392b; }
  .pc-side .answer-sheet-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .pc-side .answer-sheet-grid__item { min-height: 38px; height: 38px; font-size: 14px; }
  .pc-side__tip { font-size: 12px; color: var(--c-text-2); margin-top: 10px; line-height: 1.6; }
  .pc-side__keys .pc-keys { font-size: 13px; color: var(--c-text-2); line-height: 2; }
  .pc-submit { margin-top: 2px; }
  .pc-side kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--c-border);
    border-bottom-width: 2px; border-radius: 4px; background: var(--c-bg); font-size: 12px; }

  /* 题干与选项：阅读优先 */
  .practice-main .practice-stem { font-size: 17px; line-height: 1.9; }
  .practice-main .option-item { min-height: 54px; padding: 10px 14px; }
  .practice-main .question-card { padding: 22px 24px; }

  /* ---- 悬停反馈（仅悬停设备） ---- */
  .btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,160,106,.32); }
  .btn-secondary:not(:disabled):hover, .btn-danger:not(:disabled):hover { transform: translateY(-1px); }
  .grid-nav__item:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
  .summary-card--link:hover { transform: translateY(-2px); }
  .option-item:not(:disabled):hover { border-color: var(--c-primary); background: #f6fbf8; }
  .wrong-card { transition: transform .15s, box-shadow .15s; }
  .wrong-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
  .list-item { transition: background .15s; }
  .list-item:hover { background: #f6fbf8; }
  .tabbar__item:hover { color: var(--c-primary); }
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  /* 悬停设备：题干阅读行宽约束由 .practice-stem 自身承担，主区随屏延展 */
}
