/* ===========================================================
   评论登记台 · 视觉系统
   =========================================================== */
:root {
  --bg: #f4f6f9;
  --bg-dot: #e9edf3;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #667085;
  --muted: #98a2b3;
  --line: #e4e8ef;
  --line-2: #eef1f6;
  --line-3: #d0d5dd;

  --brand: #ff2442;
  --brand-2: #ff6a3d;
  --brand-dark: #e0122f;
  --brand-soft: #fff1f3;
  --brand-ring: rgba(255, 36, 66, .18);

  --ok: #0f9d58;
  --ok-dark: #0b8043;
  --ok-soft: #e9f9f0;
  --warn: #d97706;
  --warn-dark: #b45309;
  --warn-soft: #fff8ea;
  --err: #dc2626;
  --err-dark: #b91c1c;
  --err-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  --sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --sh: 0 4px 12px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --sh-lg: 0 12px 28px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .05);
  --sh-xl: 0 24px 56px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 手机上点按会闪一层灰蓝高亮，很难看；改用各自的 :active 状态做反馈 */
  -webkit-tap-highlight-color: transparent;
}
body {
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 22px 22px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.grow { flex: 1 1 auto; }

/* ==================== 顶栏 ==================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--sh-xs);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(255, 36, 66, .35);
  position: relative; flex: 0 0 auto;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 8px;
  border-radius: 3px; border: 2px solid #fff; opacity: .95;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.brand-sub { font-size: 11.5px; color: var(--muted); display: block; margin-top: -4px; }
/* 手机上顶栏一行塞不下「品牌 + 头像 + 邮箱 + 身份 + 退出」，
   邮箱会被 flex 压成三四个字，所以手机上把邮箱挪到品牌名下方（见 ≤640px 断点） */
.brand-mail {
  display: none; margin-top: -3px;
  font-size: 11px; font-weight: 500; color: var(--muted);
  max-width: 172px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }
.tb-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 12px 5px 6px; border-radius: var(--r-full);
}
.tb-mail { font-size: 13px; color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-avatar-ph {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.tb-user .avatar-thumb-sm { width: 32px; height: 32px; border-radius: 50%; }
.tb-badge {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--ink-3); border: 1px solid var(--line);
}
.tb-badge.admin { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(255, 36, 66, .3); }
.tb-badge.approved { background: var(--ok-soft); color: var(--ok-dark); border-color: #bfe9d3; }
.tb-badge.pending { background: var(--warn-soft); color: var(--warn-dark); border-color: #f5dfb8; }
.tb-badge.rejected { background: var(--err-soft); color: var(--err-dark); border-color: #f8d0d0; }

/* ==================== 布局 ==================== */
.page { max-width: 1200px; margin: 0 auto; padding: 28px 22px 80px; }
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 110px 0; color: var(--muted); }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
.spinner.small { width: 15px; height: 15px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh); padding: 22px;
}
.card.narrow { max-width: 540px; margin: 44px auto; }
.card.center { text-align: center; }
.center { text-align: center; }

/* ==================== 首页：蓝色科技风 ==================== */
body.home-mode { background: #06122b; }
body.home-mode .page { max-width: none; padding: 0; }
body.home-mode .topbar {
  background: rgba(6, 18, 43, .72);
  border-bottom-color: rgba(255, 255, 255, .08);
}
body.home-mode .brand-name { color: #fff; }
body.home-mode .brand-sub { color: rgba(255, 255, 255, .5); }

.home-wrap {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  /* 首页局部改成蓝色系，卡片内的按钮/输入框自动跟随 */
  --brand: #2563eb;
  --brand-2: #38bdf8;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-ring: rgba(37, 99, 235, .18);
  --line: #dbe4f0;
  --line-3: #c7d4e6;
  background:
    radial-gradient(1100px 620px at 12% 8%, rgba(37, 99, 235, .55), transparent 62%),
    radial-gradient(900px 520px at 88% 22%, rgba(14, 165, 233, .38), transparent 58%),
    linear-gradient(160deg, #071633 0%, #0a2049 55%, #06122b 100%);
}
.home-particles { position: absolute; inset: 0; z-index: 0; display: block; }
.home {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px;
  align-items: start; padding: 66px 34px 76px;
  max-width: 1200px; margin: 0 auto;
}
.home .hero {
  color: #fff;
}
/* 网格子项默认 min-width:auto，长邮箱/长链接会把卡片撑出屏幕 */
.home .hero, .home .auth-wrap { min-width: 0; }
.home .auth-wrap { width: 100%; }
.home .hero-title {
  color: #fff; font-size: 46px; background: none;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 6px 44px rgba(56, 189, 248, .45), 0 1px 2px rgba(0, 0, 0, .35);
}
/* 深色背景上的正文必须有足够对比度，别用低透明度白色 */
.home .hero-sub {
  color: #eaf2ff; font-size: 16px; font-weight: 400;
  text-shadow: 0 1px 8px rgba(2, 12, 35, .6);
}
.home .hero-pill {
  background: rgba(255, 255, 255, .18); border-color: rgba(191, 219, 254, .55);
  color: #fff; font-weight: 700; letter-spacing: .5px;
}
.home .feature {
  background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .2);
  box-shadow: 0 2px 12px rgba(2, 12, 35, .22);
}
.home .feature:hover {
  background: rgba(255, 255, 255, .18); border-color: rgba(191, 219, 254, .6);
  box-shadow: 0 12px 28px rgba(2, 12, 35, .4);
}
.home .feature b { color: #fff; font-size: 14.5px; }
.home .feature p { color: #dbe8fb; font-size: 13px; }
.home .feature-dot { background: rgba(96, 165, 250, .35); border-color: rgba(191, 219, 254, .5); }
.home .feature-dot::after { background: #bfe3ff; }

/* 登录卡：深色背景上做干净的白色卡片，上下内边距对称 */
.home .auth-card {
  padding: 24px 26px 26px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 70px rgba(2, 10, 30, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
/* 登录/注册/忘记密码三个标签等宽铺满卡片，比左对齐的小胶囊更整齐 */
.home .auth-card .tabs { width: 100%; margin-bottom: 22px; }
.home .auth-card .tab { flex: 1 1 0; text-align: center; }
.home .tabs { background: rgba(37, 99, 235, .09); }
.home .tab.active { background: #fff; box-shadow: var(--sh-sm); }
/* 白卡里的输入框加一点底色，和卡片分开 */
.home .auth-card .input {
  background: var(--surface-2); border-color: #d8e0ec;
}
.home .auth-card .input:focus { background: #fff; }
.home .auth-card .form-foot { margin-top: 4px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #ffd9df;
  padding: 5px 13px; border-radius: var(--r-full); margin-bottom: 16px;
}
.hero-title {
  font-size: 40px; line-height: 1.2; margin: 0 0 14px;
  letter-spacing: -1px; font-weight: 800;
  background: linear-gradient(120deg, #101828 20%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--ink-2); font-size: 15.5px; margin: 0 0 26px; max-width: 34em; }
.feature-list { display: grid; gap: 12px; }
.feature {
  display: flex; gap: 13px; align-items: flex-start;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line-2);
  padding: 13px 15px; border-radius: var(--r);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); border-color: var(--line-3); }
.feature-dot {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto; margin-top: 2px;
  background: var(--brand-soft); border: 1px solid #ffdde4;
  display: flex; align-items: center; justify-content: center;
}
.feature-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.feature b { display: block; font-size: 14px; font-weight: 700; }
.feature p { margin: 2px 0 0; color: var(--ink-3); font-size: 12.8px; }

/* ==================== 认证卡片 ==================== */
.auth-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: 24px 26px 26px;
}
.auth-card.is-busy { opacity: .9; }

/* 标签页：统一 pill 风格 */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface-3); border-radius: var(--r);
  margin-bottom: 20px; width: fit-content; max-width: 100%; overflow-x: auto;
}
.tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 9px 18px; font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: var(--ink-3); border-radius: var(--r-sm); white-space: nowrap;
  transition: color .15s, background .15s, box-shadow .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field-label { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.field-label em { color: var(--brand); font-style: normal; margin-left: 3px; }
.field-label i.optional {
  font-style: normal; margin-left: 6px; font-size: 11px; font-weight: 500;
  color: var(--ink-3); background: var(--surface-3); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: var(--r-full);
}
.field-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.field-hint.auto-url { color: var(--ok-dark); word-break: break-all; font-weight: 600; }

.input, .textarea {
  width: 100%; border: 1.5px solid var(--line-3); border-radius: var(--r);
  padding: 11px 14px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:hover, .textarea:hover { border-color: #b9c1ce; }
.input:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-ring);
}
.input::placeholder, .textarea::placeholder { color: #a9b2c0; }
.textarea { resize: vertical; }
.inline { display: flex; gap: 8px; align-items: stretch; }
.inline .input { flex: 1; }
.form-error {
  background: var(--err-soft); border: 1px solid #fbd5d5; color: var(--err-dark);
  border-radius: var(--r); padding: 10px 13px; font-size: 13px; font-weight: 500;
}
.form-foot { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }

/* ==================== 按钮系统 ==================== */
.btn {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
  border-radius: var(--r); padding: 11px 20px; border: 1.5px solid transparent;
  transition: transform .1s, background .15s, border-color .15s, box-shadow .15s, color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none !important; white-space: nowrap; line-height: 1.3;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn::before { font-size: 1.05em; line-height: 1; font-weight: 700; }

/* 主操作：品牌渐变实心 */
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 4px 14px rgba(255, 36, 66, .28);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 6px 18px rgba(255, 36, 66, .34);
}
/* 成功：绿实心 */
.btn.success { background: var(--ok); color: #fff; box-shadow: 0 3px 10px rgba(15, 157, 88, .25); }
.btn.success:hover:not(:disabled) { background: var(--ok-dark); box-shadow: 0 5px 14px rgba(15, 157, 88, .3); }
/* 危险：红实心 */
.btn.danger { background: var(--err); color: #fff; box-shadow: 0 3px 10px rgba(220, 38, 38, .24); }
.btn.danger:hover:not(:disabled) { background: var(--err-dark); box-shadow: 0 5px 14px rgba(220, 38, 38, .3); }
/* 次级：白底描边 */
.btn.ghost { background: #fff; border-color: var(--line-3); color: var(--ink-2); box-shadow: var(--sh-xs); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }
/* 危险次级：白底红字 */
.btn.danger-ghost { background: #fff; border-color: #f3c6c6; color: var(--err); }
.btn.danger-ghost:hover:not(:disabled) { background: var(--err-soft); border-color: var(--err); color: var(--err-dark); }
/* 最弱层级：无边框浅底 */
.btn.subtle { background: var(--surface-3); border-color: transparent; color: var(--ink-3); }
.btn.subtle:hover:not(:disabled) { background: var(--line); color: var(--ink-2); }

.btn.block { width: 100%; }
.btn.small { padding: 8px 15px; font-size: 13px; border-radius: var(--r-sm); }
.btn.tiny { padding: 5px 11px; font-size: 12px; border-radius: var(--r-sm); }
.btn.lg { padding: 14px 26px; font-size: 15px; border-radius: var(--r); }
.code-btn { flex: 0 0 auto; }
.code-btn:not(:disabled) { background: var(--brand-soft); border-color: #ffd0d8; color: var(--brand); }
.code-btn:hover:not(:disabled) { background: #ffe4e9; border-color: var(--brand); }

/* 按钮图标 */
/* 只保留覆盖率极高的字符，冷门符号在部分手机字体会显示成方框 */
.icon-check::before { content: "✓"; }
.icon-x::before { content: "✕"; }
.icon-plus::before { content: "＋"; }
.icon-rmb::before { content: "¥"; }
.icon-trash::before { content: "✕"; }
.icon-mail::before { content: "✉"; }

/* ==================== 面板 / 提示条 ==================== */
.panel { display: block; }
.stage { display: grid; gap: 14px; }
.notice {
  border-radius: var(--r); padding: 11px 15px; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.notice.info { background: var(--info-soft); border-color: #cfe0fb; color: #1e40af; }
.notice.warn { background: var(--warn-soft); border-color: #f5dfb8; color: var(--warn-dark); }
.notice.quota { justify-content: flex-start; font-weight: 500; }
.q-item b { font-size: 17px; color: var(--brand); font-weight: 800; }
.q-sep { color: var(--muted); }

/* ==================== 提交表单行 ==================== */
.row-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh); padding: 20px; display: grid; gap: 16px;
  border-left: 4px solid var(--line-3);
}
.row-card.err { border-color: #f3b6b6; border-left-color: var(--err); box-shadow: 0 0 0 4px rgba(220, 38, 38, .07); }
.row-head { display: flex; justify-content: space-between; align-items: center; }
.row-idx {
  font-size: 12px; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #ffdde4;
  padding: 3px 11px; border-radius: var(--r-full); letter-spacing: .3px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.hidden-file { display: none; }

/* 截图上传区 */
.shot-box {
  position: relative; border: 2px dashed var(--line-3); border-radius: var(--r);
  background: var(--surface-2); padding: 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color .15s, background .15s, transform .15s;
}
.shot-box:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.shot-box.has {
  border-style: solid; border-color: var(--line); background: #fff;
  padding: 14px; text-align: left; align-items: stretch;
}
.shot-img { max-height: 230px; max-width: 100%; align-self: center; border-radius: var(--r-sm); border: 1px solid var(--line-2); box-shadow: var(--sh-xs); }
.shot-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.shot-size { font-size: 11.5px; color: var(--muted); margin-right: auto; }
.shot-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.shot-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 300;
  margin-bottom: 8px; box-shadow: 0 4px 12px rgba(255, 36, 66, .25);
}
.shot-main { font-size: 14px; color: var(--ink); font-weight: 700; }
/* 上传区最关键的一条要求：必须圈出自己的评论 —— 大字加粗，做成醒目的红色药丸 */
.shot-hint {
  align-self: center; display: inline-block; margin-top: 10px;
  font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: .3px;
  color: var(--brand-dark);
  background: #fff; border: 1.5px solid #ffc9d3;
  border-radius: var(--r-full); padding: 7px 20px;
  box-shadow: 0 2px 8px rgba(255, 36, 66, .12);
}
.shot-box.has .shot-hint { margin: 12px 0 0; }
.shot-box:hover .shot-hint { border-color: var(--brand); }
.shot-limit { font-size: 11.5px; color: var(--muted); }
.shot-hit { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }

.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 18px; }
/* 表单区限宽：否则 1200px 的舞台会把输入框拉到 1000px 宽，
   底部按钮再怎么调都跟上面的卡片对不齐（看起来"悬空、不协调"） */
.stage.form-narrow { width: 100%; max-width: 780px; margin: 0 auto; }

/* 提交区：做成和上方 row-card 同一套卡片语言，于是
   ① 外边缘与上面的表单卡片对齐；② 按钮左右边缘与上面的输入框对齐。
   两个按钮各占一行，「提交」在最下，拇指最容易够到 */
.actions-stack {
  display: grid; gap: 12px; align-items: stretch;
  width: 100%; margin: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh); padding: 20px;
}
.actions-stack .btn {
  width: 100%; min-height: 54px; font-size: 16px; font-weight: 600;
  letter-spacing: .3px; border-radius: var(--r-lg);
}
/* 次级按钮：白卡上给一层极浅底 + 实描边，两级层级一眼分得清 */
.actions-stack .btn.ghost {
  background: var(--surface-2); border: 1.5px solid var(--line-3); color: var(--ink);
}
.actions-stack .btn.ghost:hover:not(:disabled) {
  background: #fff; border-color: var(--brand); color: var(--brand);
}
/* 主按钮：把红色光晕收一点，别糊成一团 */
.actions-stack .btn.primary { box-shadow: 0 6px 18px rgba(255, 36, 66, .2); }
.actions-stack .hint { text-align: center; line-height: 1.6; margin-top: 2px; }
.hint { font-size: 12.5px; color: var(--muted); }

.empty {
  background: var(--card); border: 2px dashed var(--line); border-radius: var(--r-lg);
  padding: 52px 20px; text-align: center; color: var(--muted);
}
.empty p { margin: 0 0 16px; font-size: 13.5px; }

/* ==================== 记录卡片 ==================== */
.record-list { display: grid; gap: 14px; }
.record {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh); padding: 18px 20px; display: grid; gap: 13px;
  border-left: 4px solid var(--line-3);
  transition: box-shadow .15s;
}
.record:hover { box-shadow: var(--sh-lg); }
.record.approved { border-left-color: var(--ok); }
.record.rejected { border-left-color: var(--err); }
.record.pending { border-left-color: var(--warn); }
.record.admin.overdue {
  border-color: var(--err); border-left-color: var(--err);
  background: linear-gradient(180deg, #fff6f6, #fff);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .08), var(--sh);
}

.record-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.record-time { font-size: 12.5px; color: var(--muted); }
.record-owner {
  font-size: 12px; color: var(--ink-2); background: var(--surface-3);
  padding: 2px 10px; border-radius: var(--r-full); border: 1px solid var(--line);
  max-width: 100%; word-break: break-all;
}
.badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: var(--r-full);
  border: 1px solid var(--line); color: var(--ink-3); background: var(--surface-2);
  letter-spacing: .2px;
}
.badge.pending { background: var(--warn-soft); color: var(--warn-dark); border-color: #f5dfb8; }
.badge.approved { background: var(--ok-soft); color: var(--ok-dark); border-color: #bfe9d3; }
.badge.rejected { background: var(--err-soft); color: var(--err-dark); border-color: #f8d0d0; }
.badge.paid { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
.badge.unpaid { background: var(--warn-soft); color: var(--warn-dark); border-color: #f5dfb8; }
.badge.unpaid-late { background: var(--err); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(220, 38, 38, .3); }

.record-pastdays { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-3); padding: 3px 10px; border-radius: var(--r-full); }
.record-pastdays.late { color: var(--err-dark); background: var(--err-soft); border: 1px solid #f8d0d0; }
.record-flag {
  font-size: 11.5px; font-weight: 800; color: #fff; background: var(--err);
  padding: 3px 11px; border-radius: var(--r-full); box-shadow: 0 2px 8px rgba(220, 38, 38, .3);
}
.record-resubmit {
  font-size: 11.5px; font-weight: 600; color: var(--warn-dark); background: var(--warn-soft);
  border: 1px solid #f5dfb8; padding: 2px 9px; border-radius: var(--r-full);
}
.record-no {
  font-size: 11.5px; color: var(--muted); background: var(--surface-3);
  padding: 2px 8px; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace;
}

.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.record.admin .record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cell { display: grid; gap: 3px; min-width: 0; }
.cell-k { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.cell > span:last-child, .cell > a { word-break: break-all; font-size: 13.2px; color: var(--ink); }
.link { position: relative; font-weight: 600; }
.link-wrap { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.link-wrap .link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-btn { padding: 3px 8px; min-height: 0; font-size: 11.5px; flex: 0 0 auto; }
.mono-sm { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.mono-sm.ok { color: var(--ok-dark); font-weight: 700; }
.mono-sm.paid { color: #1d4ed8; font-weight: 700; }

.record-actions { display: flex; gap: 9px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 13px; align-items: center; }
.record-actions.muted { color: var(--muted); font-size: 12.5px; }
.record-actions.rejected {
  align-items: center; justify-content: space-between; background: var(--err-soft);
  margin: -4px -8px -4px; padding: 12px 14px; border-radius: var(--r); border-top: 0;
}
.reject-reason { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.reject-label {
  font-size: 11px; font-weight: 700; color: var(--err-dark); background: #fff;
  border: 1px solid #f8d0d0; padding: 2px 8px; border-radius: var(--r-full);
}
.resubmit-tip { font-size: 11.5px; color: var(--muted); }

/* ==================== 统计卡 ==================== */
.stat-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px; box-shadow: var(--sh-sm);
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line-3);
}
.stat.warn { background: var(--warn-soft); border-color: #f5dfb8; }
.stat.warn::before { background: var(--warn); }
.stat.danger { background: var(--err-soft); border-color: #f8d0d0; }
.stat.danger::before { background: var(--err); }
.stat.paid::before { background: var(--ok); }
.stat-v { display: block; font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.stat-k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.stat-s { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.stat.paid .stat-v { color: var(--ok-dark); }
.stat.danger .stat-v { color: var(--err-dark); }
.stat.warn .stat-v { color: var(--warn-dark); }
.stat.clickable {
  appearance: none; font-family: inherit; cursor: pointer; text-align: left; width: 100%;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.stat.clickable:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); border-color: var(--brand); }
.stat.clickable:hover .stat-k { color: var(--brand); }
.stat.clickable:active { transform: translateY(0); }

/* ==================== 筛选器 ==================== */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.seg {
  display: inline-flex; background: var(--surface-3); border-radius: var(--r);
  padding: 4px; gap: 3px; flex-wrap: wrap;
}
.seg-item {
  appearance: none; border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 7px 14px; border-radius: var(--r-sm);
  transition: color .15s, background .15s, box-shadow .15s; white-space: nowrap;
}
.seg-item:hover { color: var(--ink); }
.seg-item.active { background: #fff; color: var(--brand); box-shadow: var(--sh-sm); }

/* ==================== 待审核排队 ==================== */
.queue-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh); overflow: hidden;
}
.queue-row.open { border-color: #ffd0d8; box-shadow: 0 0 0 4px rgba(255, 36, 66, .06), var(--sh); }
.queue-head {
  display: flex; align-items: center; gap: 13px; padding: 14px 18px;
  cursor: pointer; transition: background .15s; flex-wrap: wrap;
}
.queue-head:hover { background: var(--brand-soft); }
.queue-no {
  font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 3px 10px; border-radius: var(--r-full); box-shadow: 0 2px 8px rgba(255, 36, 66, .25);
}
.queue-who { display: grid; gap: 1px; flex: 1 1 200px; min-width: 0; }
.queue-who b { font-size: 14px; font-weight: 700; word-break: break-all; }
.queue-sub { font-size: 11.5px; color: var(--muted); }
.queue-count {
  font-size: 13px; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #ffdde4; padding: 3px 12px; border-radius: var(--r-full);
}
.queue-chev { font-size: 12px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.queue-body { display: grid; gap: 13px; padding: 4px 18px 18px; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.queue-body .record { box-shadow: var(--sh-xs); }

/* ==================== 等待审核 ==================== */
.wait-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--warn-soft); color: var(--warn); border: 2px solid #f5dfb8;
}
.wait-icon.rejected { background: var(--err-soft); color: var(--err); border-color: #f8d0d0; }

/* ==================== Toast ==================== */
.toast-wrap {
  position: fixed; z-index: 95; top: 80px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none;
}
.toast {
  background: #101828; color: #fff; padding: 11px 18px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-xl);
  animation: toastIn .24s cubic-bezier(.2, .9, .3, 1.2); max-width: 90vw;
  display: flex; align-items: center; gap: 8px;
}
.toast::before { content: "•"; font-size: 18px; line-height: 1; opacity: .9; }
.toast.success { background: linear-gradient(135deg, var(--ok), var(--ok-dark)); }
.toast.error { background: linear-gradient(135deg, var(--err), var(--err-dark)); }
.toast.out { opacity: 0; transform: translateY(-8px) scale(.97); transition: all .24s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: none; } }

/* ==================== 弹窗 ==================== */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .55); backdrop-filter: blur(3px); }
.modal-body {
  position: relative; background: #fff; border-radius: var(--r-xl); width: min(780px, 100%);
  max-height: 86vh; overflow: auto; box-shadow: var(--sh-xl);
  animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 15px;
}
.modal-pad { padding: 20px; display: grid; gap: 14px; }
.modal-desc { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
/* 确认类小弹窗（删除等），避免 780px 宽卡片里只有两行字显得空 */
.modal-body.narrow { width: min(452px, 100%); }
/* 危险操作弹窗里的记录摘要 */
.del-info {
  display: grid; gap: 9px;
  padding: 13px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
}
.del-info-row { display: flex; gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.5; }
.del-info-k { flex: 0 0 66px; color: var(--muted); }
.del-info-v { flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 600; word-break: break-all; }
.modal-warn {
  margin: 0; padding: 10px 12px; border-radius: var(--r);
  background: var(--err-soft); color: var(--err-dark);
  font-size: 12.5px; font-weight: 700; line-height: 1.6;
}
/* ---------- 同一 IP 注册监测 ---------- */
.ip-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ip-flag {
  border: 0; cursor: pointer; font-family: inherit;
  background: #fff4e5; color: #b45309;
  font-size: 11.5px; font-weight: 800; line-height: 1;
  padding: 5px 9px; border-radius: var(--r-full);
  -webkit-tap-highlight-color: transparent;
}
.ip-flag:hover { background: #ffe8cc; }
.ip-list { display: grid; gap: 8px; }
.ip-list-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 11px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
}
.ip-list-mail { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; word-break: break-all; }
.ip-list-meta { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); }
.modal-img-wrap { padding: 16px; display: flex; justify-content: center; background: var(--surface-2); }
.modal-img { max-width: 100%; max-height: 72vh; border-radius: var(--r); box-shadow: var(--sh); }

/* ==================== 悬停浮层 ==================== */
.pop {
  position: fixed; z-index: 96; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-xl);
  padding: 12px; animation: popIn .18s cubic-bezier(.2, .9, .3, 1.1); pointer-events: auto;
}
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.qr-pop { width: 216px; text-align: center; }
.qr-img { background: #fff; }
.qr-img svg, .qr-img img { width: 100%; height: auto; display: block; }
.pop-title { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pop-url { margin-top: 3px; font-size: 11.5px; color: var(--muted); word-break: break-all; max-height: 52px; overflow: hidden; }

.shot-thumb {
  width: 78px; height: 54px; border: 1.5px solid var(--line-3); border-radius: var(--r-sm);
  background: var(--surface-2); cursor: zoom-in; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.shot-thumb:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(255, 36, 66, .2); transform: scale(1.04); }
.shot-thumb.loading::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .75); }
.shot-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-thumb-ph { font-size: 11.5px; color: var(--muted); }
.shot-thumb-ph.err { color: var(--err); }
.shot-pop { padding: 8px; max-width: 60vw; }
.shot-pop-img { max-width: 46vw; max-height: 62vh; display: block; border-radius: var(--r); box-shadow: var(--sh); }
.shot-pop-tip { padding: 16px 20px; font-size: 12.5px; color: var(--muted); }

/* ==================== 账号设置 ==================== */
.setting-card { display: grid; gap: 14px; }
.setting-head { display: grid; gap: 3px; }
.setting-head h3 { margin: 0; font-size: 15.5px; font-weight: 800; }
.setting-desc { margin: 0; font-size: 12.5px; color: var(--muted); }
.account-mail { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.account-mail b { font-size: 14px; min-width: 0; word-break: break-all; }
.plain-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13px; }
.plain-list li { margin-bottom: 5px; }

/* 头像 */
.avatar-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.avatar-box { flex: 0 0 auto; }
.avatar-thumb { width: 136px; height: 136px; border-radius: var(--r-lg); }
.avatar-thumb-sm { width: 52px; height: 52px; border-radius: var(--r-sm); flex: 0 0 auto; }
.avatar-thumb .shot-thumb-img { object-fit: contain; background: #fff; }
.avatar-empty {
  width: 136px; height: 136px; border: 2px dashed var(--line-3); border-radius: var(--r-lg);
  background: var(--surface-2); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.avatar-empty-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 12px rgba(255, 36, 66, .25);
}
.avatar-side { flex: 1 1 260px; display: grid; gap: 10px; min-width: 0; }
.avatar-info { display: grid; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.avatar-next { color: var(--ok-dark); font-weight: 700; }
.avatar-next.locked { color: var(--warn-dark); }
.avatar-notice { justify-content: flex-start; font-weight: 700; }
.editing-banner { align-items: center; font-weight: 600; }

/* ==================== 邀请码 ==================== */
.invite-form-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.4fr; gap: 14px; }
.form-inline { gap: 12px; }
.invite-list { display: grid; gap: 14px; }
.record.invite { border-left-color: var(--brand); }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px; letter-spacing: 1.5px; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #ffdde4; padding: 3px 12px; border-radius: var(--r-sm);
}

/* ==================== 收益概览 ==================== */
.earn-card {
  background: linear-gradient(135deg, #ffffff, #f9fbfe);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh); padding: 18px; display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.earn-card .earn-tip { grid-column: 1 / -1; }
.earn-card .earn-item {
  display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line-2);
  appearance: none; font-family: inherit; text-align: left; width: 100%;
  cursor: pointer; position: relative;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.earn-card .earn-item:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); border-color: var(--brand); }
.earn-card .earn-item:active { transform: translateY(0); }
.earn-card .earn-item::after {
  content: "›"; position: absolute; right: 14px; bottom: 10px;
  font-size: 17px; color: var(--muted); line-height: 1;
}
.earn-card .earn-item:hover::after { color: var(--brand); }
.earn-item.paid { background: var(--ok-soft); border-color: #bfe9d3; }
.earn-item.wait { background: var(--warn-soft); border-color: #f5dfb8; }
.earn-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.earn-v { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.earn-item.paid .earn-v { color: var(--ok-dark); }
.earn-item.wait .earn-v { color: var(--warn-dark); }
.earn-s { font-size: 11.5px; color: var(--muted); }
.earn-tip { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.earn-warn { color: var(--err-dark); font-weight: 600; }

/* ===========================================================
   移动端：手机是本项目的首要使用场景
   ★ 断点必须从大到小排列（960 → 900 → 640 → 400）。
     同特异度的规则后出现的覆盖先出现的，所以窄屏断点一定要写在更宽断点后面。
     之前顺序是 900 → 400 → 960 → 640，结果 ≤900 里精心写的「记录卡单列」
     被后面的 960 / 640 块覆盖回两列，手机上看记录条目会挤成一团；
     ≤640 的 .page padding 也把安全区覆盖掉了。
   =========================================================== */
/* 触摸设备不要粘滞 hover 效果（手机上点完会一直亮着） */
@media (hover: none) {
  .record:hover, .feature:hover, .shot-box:hover, .stat.clickable:hover,
  .earn-card .earn-item:hover, .btn:hover, .seg-item:hover { transform: none; }
  .record:hover { box-shadow: var(--sh); }
  .queue-head:hover { background: transparent; }
  /* 空的上传区被点过后不要一直保持粉色高亮 */
  .shot-box:not(.has):hover { background: var(--surface-2); border-color: var(--line-3); }
  .shot-box:hover .shot-hint { border-color: #ffc9d3; }
  .shot-thumb:hover { border-color: var(--line-3); box-shadow: none; transform: none; }
  .btn.primary:hover:not(:disabled), .btn.success:hover:not(:disabled), .btn.danger:hover:not(:disabled) {
    box-shadow: 0 3px 10px rgba(16, 24, 40, .2);
  }
}

/* iOS 底部安全区 */
@supports (padding: env(safe-area-inset-bottom)) {
  .page { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  body.home-mode .page { padding-bottom: 0; }
}

/* ---- ≤960px：平板，先把网格降列 ---- */
@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; gap: 26px; }
  .home .hero-title { font-size: 32px; }
  .hero-title { font-size: 32px; }
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-grid, .record.admin .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-form-grid { grid-template-columns: 1fr; }
}

/* ---- ≤900px：手机 / 小平板，主移动样式 ---- */
@media (max-width: 900px) {
  /* 顶栏 */
  .topbar-inner { height: 56px; padding: 0 14px; gap: 10px; }
  .brand-dot { width: 26px; height: 26px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .tb-user { padding: 4px 10px 4px 5px; gap: 6px; }
  /* 这一档邮箱还在顶栏里，放宽到 140px，否则长邮箱只剩「150061163…」 */
  .tb-mail { max-width: 140px; font-size: 12px; }
  .tb-badge { font-size: 11px; padding: 2px 8px; }
  .tb-avatar-ph { width: 28px; height: 28px; font-size: 13px; }
  .tb-user .avatar-thumb-sm { width: 28px; height: 28px; }
  .topbar-right { gap: 8px; }

  /* 页面留白收紧，底部留出 iOS home 条的安全区 */
  .page { padding: 16px 12px calc(40px + env(safe-area-inset-bottom, 0px)); }
  body.home-mode .page { padding: 0; }

  /* 表单：字号 ≥16px 防止 iOS 聚焦时自动放大页面 */
  .input, .textarea { font-size: 16px; padding: 12px 14px; }
  .grid-2 { grid-template-columns: 1fr; gap: 13px; }
  .card { padding: 18px; }
  .card.narrow { margin: 24px auto; }
  .row-card { padding: 15px; gap: 13px; }

  /* 标签页 / 筛选器：整行横向滚动，不挤压 */
  .tabs { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 9px 14px; font-size: 13px; }
  .filter-bar { gap: 8px; margin-bottom: 12px; }
  .seg { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg-item { padding: 8px 12px; font-size: 12px; flex: 0 0 auto; }

  /* 统计卡：两列紧凑。手机上小于 12px 的字基本读不了，别再往下压 */
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px 13px; }
  .stat-v { font-size: 20px; }
  .stat-k { font-size: 12px; }
  .stat-s { font-size: 11.5px; }

  /* 记录卡：每个字段改成「标签 | 值」左右对齐，比标签压在值上面好读得多。
     这里只降列间距，真正的单列交给 ≤640px（641–900 多为平板和横屏手机，两列更合适） */
  .record-grid, .record.admin .record-grid { gap: 9px; }
  .cell {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: baseline; gap: 10px;
  }
  .cell-k { font-size: 12px; }
  .record { padding: 14px 15px; gap: 11px; }
  .record-top { gap: 7px; }
  .record-actions { gap: 8px; }
  .record-actions.rejected { flex-direction: column; align-items: stretch; }
  .record-actions.rejected .btn { width: 100%; }

  /* 按钮：触摸目标按 44px 对齐（Apple HIG 建议的最小可点面积） */
  .btn { padding: 11px 16px; min-height: 44px; font-size: 14px; }
  .btn.small { padding: 10px 14px; min-height: 40px; font-size: 13.5px; }
  /* 记录里的「码」等 tiny 按钮在手机上也是主要操作入口，不能小于 34px */
  .btn.tiny { padding: 8px 12px; min-height: 34px; font-size: 12.5px; }
  .actions { gap: 10px; }
  .actions .btn { flex: 1 1 auto; }

  /* 收益卡 */
  .earn-card { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .earn-card .earn-item { padding: 12px 14px; }
  .earn-v { font-size: 22px; }

  /* 头像行 */
  .avatar-row { flex-direction: column; gap: 14px; }
  .avatar-box { align-self: flex-start; }
  .avatar-side { flex: 1 1 auto; }

  /* 排队 */
  .queue-head { padding: 12px 14px; gap: 10px; }
  .queue-body { padding: 4px 12px 14px; gap: 11px; }
  .queue-who { flex: 1 1 100%; order: 3; }
  .queue-count { order: 2; }

  /* 上传区 / 缩略图：手机上两侧留白收一点，把宽度让给内容 */
  .shot-box { padding: 20px 14px; }
  .shot-actions { gap: 8px; }
  .shot-thumb { width: 68px; height: 48px; }
  .shot-img { max-height: 180px; }
  /* 「圈出自己具体的评论」是全屏最醒目的一行，别缩太小 */
  .shot-hint { font-size: 16px; padding: 7px 16px; }

  /* 弹窗：从底部升起，按钮等宽 */
  .modal { padding: 10px; align-items: flex-end; }
  .modal-body { width: 100%; max-height: 90vh; border-radius: 18px; }
  .modal-pad { padding: 16px; }
  .modal-actions { gap: 8px; }
  .modal-actions .btn { flex: 1 1 0; }
  .modal-img-wrap { padding: 10px; }
  .modal-img { max-height: 62vh; }

  /* 浮层别超出屏幕 */
  .qr-pop { width: min(220px, calc(100vw - 32px)); }
  .shot-pop { max-width: calc(100vw - 32px); }
  .shot-pop-img { max-width: 100%; max-height: 46vh; }

  /* 邀请码 */
  .invite-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .invite-code { font-size: 14px; letter-spacing: 1px; }
  .record.invite .record-actions { flex-direction: column; align-items: stretch; }
  .record.invite .record-actions .btn { width: 100%; }

  /* 浮层提示下移，别压住顶栏；手机上拉满宽度，长错误信息才读得全 */
  .toast-wrap { top: 70px; left: 12px; right: 12px; transform: none; }
  .toast { max-width: 100%; }

  /* 等待审核 / 未通过：图标小一点，别占掉半个屏 */
  .wait-icon { width: 58px; height: 58px; font-size: 26px; }

  /* 首页 */
  .home { padding: 34px 18px 46px; gap: 26px; }
  .home .hero-title { font-size: 27px; }
  .home .hero-sub { font-size: 14.5px; margin-bottom: 20px; }
  .home .feature b { font-size: 14px; }
  .home .feature p { font-size: 12.5px; }
  .home .auth-card { padding: 18px 16px 20px; }
  .home .auth-card .tabs { margin-bottom: 18px; }
}

/* ---- ≤640px：手机（本项目的首要场景）---- */
@media (max-width: 640px) {
  /* 顶栏：一行放不下「品牌 + 头像 + 邮箱 + 身份徽标 + 退出」，
     邮箱会被 flex 压成三四个字。把邮箱移到品牌名下方，右侧只留头像/身份/退出 */
  .brand-mail { display: block; }
  .tb-mail { display: none; }
  .topbar-inner { height: 58px; padding: 0 12px; gap: 8px; }
  .topbar-right { gap: 6px; }
  .tb-user { padding: 4px 8px 4px 4px; }
  .tb-badge { font-size: 10.5px; padding: 2px 7px; }

  /* 这里必须自己带上安全区，否则会把 ≤900px 写好的
     env(safe-area-inset-bottom) 覆盖掉，iPhone 底部内容被 home 条压住 */
  .page { padding: 14px 12px calc(28px + env(safe-area-inset-bottom, 0px)); }
  body.home-mode .page { padding: 0; }

  .row-card { padding: 14px; gap: 12px; }
  .record { padding: 13px 14px; }
  /* 窄屏手机：记录卡终于收成单列，字段才能横向铺开 */
  .record-grid, .record.admin .record-grid { grid-template-columns: 1fr; }
  .cell { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
  .cell > span:last-child, .cell > a { font-size: 13px; }
  .actions-stack { padding: 16px; gap: 10px; }
  .empty { padding: 36px 16px; }

  .hero-title { font-size: 27px; }
  .home { padding: 30px 16px 44px; gap: 22px; }
  .home .hero-title { font-size: 26px; }
  .modal-img { max-height: 54vh; }
}

/* ---- ≤400px：窄屏手机（iPhone SE / 老安卓）---- */
@media (max-width: 400px) {
  .topbar-inner { padding: 0 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 14px; }
  .brand-mail { font-size: 10.5px; max-width: 112px; }
  .tb-badge { font-size: 10px; padding: 2px 6px; }
  .btn { padding: 11px 12px; }
  .cell { grid-template-columns: 66px minmax(0, 1fr); }
  .stat-bar { grid-template-columns: 1fr 1fr; gap: 7px; }
  .stat-v { font-size: 18px; }
  .actions-stack { padding: 14px; }
  .home .hero-title { font-size: 23px; }
  .modal-img { max-height: 48vh; }
}

/* ===========================================================
   手机浏览器的地址栏会伸缩，100vh ≠ 实际可视高度 → 优先用 dvh。
   必须放在文件最后：@supports 不增加特异度，靠「后出现者胜」压过
   ≤900px 里写的 max-height: 90vh（否则 dvh 白写）。
   =========================================================== */
@supports (height: 100dvh) {
  .home-wrap { min-height: calc(100dvh - 64px); }
  .modal-body { max-height: 88dvh; }
}
