/* =====================================================================
   EcoDerm 统一样式
   设计原则：移动优先、8px 栅格、触控目标 ≥44px、细节统一
   ===================================================================== */

:root {
  /* 品牌色 */
  --brand-900: #0f2f52;
  --brand-800: #123a63;
  --brand-700: #1d4f8c;
  --brand-600: #1a73e8;
  --brand-500: #3b8bf5;
  --brand-050: #eef4fd;

  /* 功能色 */
  --danger: #e53935;
  --warn-bg: #fff8e8;
  --warn-border: #f5a623;
  --warn-text: #8a5a00;
  --success: #17a673;

  /* 中性色 */
  --text: #1f2933;
  --text-2: #52606d;
  --text-3: #7b8794;
  --line: #e4e9f0;
  --line-2: #eef1f6;
  --bg: #f4f6fa;
  --card: #ffffff;

  /* 尺寸 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(15, 47, 82, .08), 0 1px 2px rgba(15, 47, 82, .04);
  --shadow-lg: 0 8px 28px rgba(15, 47, 82, .16);
  --gap: 8px;

  /* 字号 */
  --fs-title: 20px;
  --fs-h2: 17px;
  --fs-body: 15px;
  --fs-label: 15px;
  --fs-small: 13px;
  --fs-tiny: 12px;

  /* 布局 */
  --page-max: 760px;
  --page-max-2b: 1080px;
  --bar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

a { color: var(--brand-600); }

.hidden { display: none !important; }

/* ---------------------------------------------------------------------
   顶部品牌栏
   --------------------------------------------------------------------- */
.topbar {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700));
  color: #fff;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top));
}

.topbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;            /* 空间不足时「病例计数 + 退出」自动换到第二行，不挤压品牌字号 */
  gap: 8px 10px;
  min-height: 30px;
}

.topbar.is-wide .topbar__inner { max-width: var(--page-max-2b); }

.brand {
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
  white-space: nowrap;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, .92);
  flex: none;
  white-space: nowrap;
}

/* 模式标签：与品牌同行，过长时省略号收缩 */
.mode-label {
  color: rgba(255, 255, 255, .9);
  font-size: var(--fs-small);
  max-width: 14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

@media (max-width: 519px) {
  .brand { font-size: 18px; }
  .mode-label { font-size: 12px; max-width: 18em; }
}

@media (max-width: 379px) {
  .topbar__divider { display: none; }
}

.topbar__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .35);
}

.case-counter { white-space: nowrap; font-variant-numeric: tabular-nums; }

.btn-exit {
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: var(--fs-small);
  cursor: pointer;
  min-height: 34px;
}

.btn-exit:active { background: rgba(255, 255, 255, .26); }

/* ---------------------------------------------------------------------
   页面容器
   --------------------------------------------------------------------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 16px 16px calc(var(--bar-h) + 24px);
}

.page--compact { padding-bottom: 32px; }
.page--wide { max-width: var(--page-max-2b); }

/* 2B 桌面双栏（内容容器由 JS 直接生成 .layout-2b，不再依赖父级类名） */
@media (min-width: 1024px) {
  .layout-2b {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .layout-2b__col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
}

.layout-2b__col > *:last-child { margin-bottom: 0; }

/* 单栏堆叠容器（内层不再重复使用 .page 类，避免 padding 叠加导致溢出） */
.stack { display: flex; flex-direction: column; }

/* ---------------------------------------------------------------------
   卡片与区块
   --------------------------------------------------------------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.card--flush { padding: 0; overflow: hidden; }
.card:last-child { margin-bottom: 0; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--brand-900);
  margin: 0 0 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand-600);
  flex: none;
}

.section-title--plain::before { display: none; }

.hint { color: var(--text-3); font-size: var(--fs-small); }
.hint--center { text-align: center; }

/* ---------------------------------------------------------------------
   表单
   --------------------------------------------------------------------- */
.form-row {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-row:last-of-type { margin-bottom: 8px; }

.form-label {
  font-weight: 700;
  color: var(--brand-900);
  font-size: var(--fs-label);
  display: flex;
  align-items: center;
  gap: 2px;
}

.req { color: var(--danger); font-weight: 700; }

.field { position: relative; }

.text-input,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.text-input::placeholder { color: #a9b4c0; }

.text-input:focus,
.select:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .16);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%237b8794' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.select:invalid,
.select.is-placeholder { color: #a9b4c0; }

.field-error .text-input,
.field-error .select { border-color: var(--danger); }

.form-note {
  font-size: var(--fs-tiny);
  color: var(--text-3);
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, opacity .15s;
  text-decoration: none;
}

.btn:active { filter: brightness(.94); }
.btn--block { width: 100%; }
.btn--ghost {
  background: #fff;
  color: var(--brand-700);
  border: 1px solid var(--line);
}
.btn--ghost:active { background: var(--line-2); }
.btn[disabled], .btn.is-disabled {
  background: #dfe4ec;
  color: #9aa5b1;
  cursor: not-allowed;
  border-color: #dfe4ec;
}

/* ---------------------------------------------------------------------
   信息填写页
   --------------------------------------------------------------------- */
.form-card { padding: 20px 16px; }

.form-foot { margin-top: 20px; }

.field-row-hint { grid-column: 1 / -1; }

/* ---------------------------------------------------------------------
   知情告知书（必须勾选后才能提交）
   --------------------------------------------------------------------- */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  cursor: pointer;
  margin-bottom: 4px;
}

.consent__box {
  width: 20px;
  height: 20px;
  border: 2px solid #c3cbd6;
  border-radius: 5px;
  flex: none;
  margin-top: 1px;
  position: relative;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.consent.is-checked .consent__box { border-color: var(--brand-600); background: var(--brand-600); }

.consent.is-checked .consent__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent__text { flex: 1; min-width: 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.6; }

.consent.is-error { border-color: var(--danger); background: #fff5f5; }

/* 提交被拦截时的一次轻量抖动：不弹窗、不提示文字 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.is-shake { animation: shake .32s ease-in-out; }

/* ---------------------------------------------------------------------
   答题页：图像
   --------------------------------------------------------------------- */
.image-card { padding: 0; overflow: hidden; }

.image-wrap {
  position: relative;
  background: #0c1a2b;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-wrap img {
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  background: #0c1a2b;
}

.image-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 47, 82, .72);
  border: 1.5px solid rgba(255, 255, 255, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.image-zoom svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; }

.image-caption {
  text-align: center;
  color: var(--text-3);
  font-size: var(--fs-small);
  padding: 8px 0 2px;
}

/* ---------------------------------------------------------------------
   病史
   --------------------------------------------------------------------- */
.history { display: grid; gap: 0; }

.history__row {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}

.history__row:last-child { border-bottom: none; padding-bottom: 2px; }

.history__label { color: var(--text-2); font-size: var(--fs-small); }

.history__value { color: var(--text); white-space: pre-wrap; word-break: break-word; }

@media (max-width: 359px) {
  .history__row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------------------------------------------
   2B：模型辅助诊断
   --------------------------------------------------------------------- */
.model-card {
  border: 1px solid #dbe6f6;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 46%);
}

.model-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 12px;
}

.ai-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-600), #6f42c1);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-tiny);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.model-head__title { font-size: var(--fs-h2); font-weight: 700; color: var(--brand-900); }

.model-sub {
  font-size: var(--fs-small);
  color: var(--text-2);
  font-weight: 600;
  margin: 0 0 6px;
}

.model-list { list-style: none; margin: 0; padding: 0; }

.model-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}

.model-item:last-child { border-bottom: none; }

.model-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: var(--fs-tiny);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.model-name { flex: 1; min-width: 0; word-break: break-word; }

.model-percent {
  font-weight: 700;
  color: var(--brand-800);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.model-foot {
  margin-top: 10px;
  font-size: var(--fs-tiny);
  color: var(--text-3);
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   2B：EcoDerm 建议
   --------------------------------------------------------------------- */
.suggest-card {
  background: var(--warn-bg);
  border: 1px solid #f6e3bd;
  border-left: 4px solid var(--warn-border);
  color: var(--warn-text);
}

.suggest-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: var(--fs-h2);
  color: #b26a00;
  margin-bottom: 6px;
}

.suggest-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--warn-border);
  color: #fff;
  font-size: var(--fs-tiny);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.suggest-body { line-height: 1.7; }

/* ---------------------------------------------------------------------
   作答区
   --------------------------------------------------------------------- */
.question { padding-top: 4px; }
.question + .question { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }

.q-title {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--brand-900);
  margin: 0 0 12px;
  line-height: 1.5;
}

.q-title .req { margin-left: 2px; }

.q-index { margin-right: 2px; }

/* Q1 自定义下拉（可搜索） */
.picker-btn {
  width: 100%;
  min-height: 48px;
  padding: 11px 40px 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: left;
  position: relative;
  cursor: pointer;
}

.picker-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
}

.picker-btn.is-placeholder { color: #a9b4c0; }
.picker-btn.is-error { border-color: var(--danger); }

/* 选项 */
.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.option:last-child { margin-bottom: 0; }
.option:active { background: var(--brand-050); }
.option.is-checked { border-color: var(--brand-600); background: var(--brand-050); }
.option.is-error { border-color: var(--danger); }

.option__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c3cbd6;
  flex: none;
  margin-top: 2px;
  position: relative;
}

.option.is-checked .option__dot { border-color: var(--brand-600); }

.option.is-checked .option__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand-600);
}

.option__text { flex: 1; min-width: 0; }

/* Q3 数字胶囊 */
.scale { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.scale-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, background .15s, color .15s;
}

.scale-item.is-checked {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
  font-weight: 700;
}

.scale-item.is-error { border-color: var(--danger); }
.scale-hint { color: var(--text-3); font-size: var(--fs-tiny); margin-left: 2px; }

/* ---------------------------------------------------------------------
   底部操作栏（固定在视口底部，页面预留等高内边距避免遮挡）
   --------------------------------------------------------------------- */
.page { padding: 16px 16px 16px; }

.page--with-bar { padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); }

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  min-height: var(--bar-h);
}

.actionbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.actionbar__inner .btn { flex: 1; }
.actionbar__inner .btn--ghost { flex: 0 0 auto; min-width: 116px; }

/* ---------------------------------------------------------------------
   对话框
   --------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 40, .55);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in .16s ease-out;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 340px;
  padding: 22px 20px 16px;
  text-align: center;
}

.dialog__title { font-size: var(--fs-h2); font-weight: 700; color: var(--brand-900); margin: 0 0 8px; }
.dialog__text { color: var(--text-2); margin: 0 0 18px; white-space: pre-line; }
.dialog__actions { display: flex; gap: 10px; }
.dialog__actions .btn { flex: 1; }

/* 可搜索选择器（底部弹出） */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 25, 40, .5);
  animation: fade-in .16s ease-out;
}

@media (min-width: 768px) {
  .sheet { align-items: center; }
}

.sheet__panel {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 78vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  animation: sheet-up .2s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
  .sheet__panel { border-radius: 16px; max-height: 70vh; }
}

@keyframes sheet-up { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }

.sheet__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet__title { font-weight: 700; color: var(--brand-900); font-size: var(--fs-h2); }

.sheet__close {
  margin-left: auto;
  border: none;
  background: var(--line-2);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.sheet__search { padding: 10px 16px; }

.sheet__search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}

.sheet__search input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(26,115,232,.14); }

.sheet__list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 8px 12px; margin: 0; list-style: none; }

.sheet__item {
  padding: 13px 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet__item:last-child { border-bottom: none; }
.sheet__item:active { background: var(--brand-050); }
.sheet__item.is-active { background: var(--brand-050); color: var(--brand-700); font-weight: 700; }
.sheet__empty { padding: 24px; text-align: center; color: var(--text-3); }

/* ---------------------------------------------------------------------
   图片灯箱
   --------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 12, 20, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in .16s ease-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform .12s ease-out;
}

.lightbox__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.lightbox__hint {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .7);
  font-size: var(--fs-tiny);
}

/* ---------------------------------------------------------------------
   提示条
   --------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(18px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(31, 41, 51, .94);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  box-shadow: var(--shadow-lg);
  max-width: 88vw;
  text-align: center;
  animation: fade-in .15s ease-out;
}

.toast--error { background: rgba(190, 40, 36, .95); }

/* ---------------------------------------------------------------------
   加载 / 空态
   --------------------------------------------------------------------- */
.loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-3);
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   退机页
   --------------------------------------------------------------------- */
.exit-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(180deg, #f7fafd, #eef4fd);
}

.exit-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-600), #17a673);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 10px 24px rgba(26, 115, 232, .28);
}

.exit-icon svg { width: 42px; height: 42px; stroke: #fff; fill: none; stroke-width: 3; }

.exit-title { font-size: 24px; font-weight: 700; color: var(--brand-900); margin: 0 0 8px; }
.exit-sub { color: var(--text-2); margin: 0 0 26px; }

.countdown {
  font-size: var(--fs-small);
  color: var(--text-3);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
}

/* ---------------------------------------------------------------------
   管理页
   --------------------------------------------------------------------- */
.admin-grid { display: grid; gap: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.stat__num { font-size: 22px; font-weight: 700; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-small); color: var(--text-2); }

.code-block {
  background: #0f1c2e;
  color: #cfe3ff;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: var(--fs-tiny);
  overflow-x: auto;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------------
   桌面端微调
   --------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root { --page-max: 820px; }
  .page { padding: 24px 24px calc(var(--bar-h) + 32px); }
  .image-wrap img { max-height: 340px; }
  .form-row { grid-template-columns: 7.5em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
