@import url("../fonts/misans/MiSansVF.min.css");
/* ==========================================================================
   增城区第一中学 · 校园墙 —— 视觉系统
   白色通透玻璃 / 柔和渐变 / 克制的过渡动画

   性能约定（重要）：
   1. backdrop-filter 只在「悬浮层」（弹窗、Toast、底部 Dock、公告横幅卡片）使用，
      模糊半径 28-44px + 饱和度提升，模拟 iOS 26 Liquid Glass；
      卡片类普通元素一律用「半透明 + 内高光 + 细边框」模拟玻璃质感 —— 视觉接近，
      但滚动时不需要逐帧重采样背景。
   2. 不使用常驻 will-change，不保留无限循环的装饰动画。
   3. 大面积元素（页面背景、列表卡片）不做实时模糊。
   ========================================================================== */

:root {
  --ink: #2a2933;
  --ink-2: #5c5a6b;
  --ink-3: #8e8c9e;
  --line: rgba(120, 110, 145, 0.14);
  --line-strong: rgba(120, 110, 145, 0.24);

  --accent: #a03a3a;
  --accent-deep: #7d2626;
  --accent-soft: rgba(160, 58, 58, 0.1);
  --violet: #8f7cf0;
  --violet-soft: rgba(143, 124, 240, 0.12);
  --mint: #2eb98a;
  --mint-soft: rgba(46, 185, 138, 0.12);
  --amber: #e79b3c;
  --danger: #e2536b;
  --danger-soft: rgba(226, 83, 107, 0.1);

  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-weak: rgba(255, 255, 255, 0.42);

  --shadow-sm: 0 2px 10px rgba(96, 82, 130, 0.06);
  --shadow: 0 12px 30px rgba(96, 82, 130, 0.09);
  --shadow-lg: 0 22px 50px rgba(86, 70, 120, 0.14);

  /* 玻璃质感三件套：避免实时模糊也能得到通透感 */
  --glass-fill: rgba(255, 255, 255, 0.72);
  --glass-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.95);

  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.32s var(--ease);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "MiSans VF", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7f6fb;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  min-height: 100%;
  overflow-x: hidden;
}

/* 单层静态背景层：fixed 定位会被提升为合成层，滚动时不产生重绘。
   旧版这里是两层叠加 + 一层全屏白色叠加，属于纯装饰开销，已合并。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(780px 560px at 0% -12%, #f2c3b4 0%, rgba(242, 195, 180, 0) 60%),
    radial-gradient(740px 580px at 102% -4%, #d2dbff 0%, rgba(210, 219, 255, 0) 58%),
    radial-gradient(720px 580px at 36% 114%, #c2e8d4 0%, rgba(194, 232, 212, 0) 62%),
    radial-gradient(600px 500px at 90% 80%, #efd9c6 0%, rgba(239, 217, 198, 0) 60%),
    linear-gradient(180deg, #fdfdff 0%, #f7f5fb 56%, #f3f7f5 100%);
}

::selection { background: rgba(160, 58, 58, 0.2); }

/* ---------------------------------------------------------------- 通用 */

a { color: inherit; text-decoration: none; }

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

button { cursor: pointer; border: none; background: none; }

.glass {
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.46) 46%, rgba(255, 255, 255, 0.62) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--glass-sheen), var(--shadow);
  border-radius: var(--r-lg);
}

.glass-soft {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--glass-sheen);
  border-radius: var(--r-md);
}

.hint { color: var(--ink-3); font-size: 12.5px; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- 图标 */

.icon {
  width: 20px; height: 20px;
  display: inline-block;
  vertical-align: -4px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t), opacity var(--t);
}
.icon-lg { width: 26px; height: 26px; }
.icon-sm { width: 16px; height: 16px; stroke-width: 1.9; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(96, 82, 130, 0.08);
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), opacity var(--t);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(96, 82, 130, 0.14); background: #fff; }
.btn:active { transform: translateY(0) scale(0.975); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #bb5252 0%, #a03a3a 45%, #8c2f2f 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 30px rgba(140, 44, 44, 0.3);
}
.btn-primary:hover { box-shadow: 0 20px 40px rgba(140, 44, 44, 0.4); background: linear-gradient(135deg, #c25f5f, #a84141 45%, #b04a4a); }

.btn-violet {
  color: #fff;
  background: linear-gradient(135deg, #a997ff, #8f7cf0 60%, #7c66e0);
  box-shadow: 0 14px 30px rgba(130, 110, 230, 0.28);
}

.btn-mint {
  color: #fff;
  background: linear-gradient(135deg, #4fd0a5, #2eb98a);
  box-shadow: 0 14px 30px rgba(46, 185, 138, 0.26);
}

.btn-danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(226, 83, 107, 0.18); box-shadow: none; }
.btn-danger:hover { background: rgba(226, 83, 107, 0.16); box-shadow: 0 8px 20px rgba(226, 83, 107, 0.16); }

.btn-ghost { background: transparent; border-color: var(--line); box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); box-shadow: var(--shadow-sm); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; border-radius: 12px; }

.btn .icon { transition: transform var(--t); }
.btn:hover .icon { transform: translateX(2px); }

/* ---------------------------------------------------------------- 表单 */

.field { margin-bottom: 16px; }

.field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 7px 4px;
  letter-spacing: 0.02em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 10px rgba(96, 82, 130, 0.05);
  border-radius: 16px;
  transition: box-shadow var(--t), border-color var(--t), background var(--t), transform var(--t);
}
.input-wrap:focus-within {
  border-color: rgba(160, 58, 58, 0.4);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(160, 58, 58, 0.12), 0 10px 26px rgba(140, 44, 44, 0.1);
}
.input-wrap > .icon { margin-left: 14px; color: var(--ink-3); transition: color var(--t), transform var(--t); }
.input-wrap:focus-within > .icon { color: var(--accent); transform: scale(1.06); }

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 13px 14px;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  min-width: 0;
}

.input-wrap textarea { resize: vertical; min-height: 96px; line-height: 1.65; padding-top: 14px; }

.input-wrap input::placeholder, .input-wrap textarea::placeholder { color: #b3b0c0; }

.input-suffix {
  padding-right: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background var(--t), color var(--t), transform var(--t);
}
.link-btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.link-btn:active { transform: scale(0.97); }

/* 自定义勾选 */
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-2);
  user-select: none;
  transition: color var(--t);
}
.check:hover { color: var(--ink); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 19px; height: 19px;
  border-radius: 7px;
  border: 1.6px solid rgba(120, 110, 145, 0.32);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  transition: all var(--t);
  flex: none;
}
.check .box .icon { width: 12px; height: 12px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(0.5); transition: all 0.24s var(--ease); }
.check input:checked + .box {
  background: linear-gradient(135deg, #bb5252, #a03a3a);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(140, 44, 44, 0.32);
}
.check input:checked + .box .icon { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(160, 58, 58, 0.18); }

/* 开关 */
.check:has(.switch) { gap: 0; }
.check > .switch { display: inline-block; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: rgba(140, 130, 165, 0.22); transition: background var(--t); flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(70, 60, 100, 0.25); transition: transform var(--t);
}
.check input:checked ~ .switch, .switch.on { background: linear-gradient(135deg, #bb5252, #a03a3a); }
.check input:checked ~ .switch::after, .switch.on::after { transform: translateX(20px); }

/* ---------------------------------------------------------------- 布局：登录 */

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 460px;
  gap: 34px;
  align-items: center;
  padding: 46px clamp(20px, 5vw, 80px) 96px;
  max-width: 1320px;
  margin: 0 auto;
}

.brand-panel {
  padding: 46px 46px 40px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.9s var(--ease) both;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(520px 400px at 106% 4%, rgba(176, 74, 74, 0.06), rgba(176, 74, 74, 0) 70%),
    radial-gradient(440px 360px at 98% 102%, rgba(47, 125, 92, 0.05), rgba(47, 125, 92, 0) 72%);
}
.brand-panel > * { position: relative; z-index: 1; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 46px; height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #c46969, #a03a3a 60%, #b07ce8);
  box-shadow: 0 12px 26px rgba(140, 44, 44, 0.32);
  color: #fff;
  transition: transform var(--t), box-shadow var(--t);
}
.brand-mark:hover { transform: rotate(-6deg) scale(1.06); }
.brand-mark .icon { width: 24px; height: 24px; stroke-width: 1.8; }

.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 0.04em; }
.brand-sub { font-size: 12px; color: var(--ink-3); letter-spacing: 0.18em; text-transform: uppercase; }

.brand-title {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.brand-title em {
  font-style: normal;
  background: linear-gradient(120deg, #b8493f 0%, #8d2b2b 52%, #2f7d5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-desc { color: var(--ink-2); font-size: 15px; max-width: 460px; margin: 0 0 30px; }

.brand-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-chip {
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.stat-chip:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(96, 82, 130, 0.12); }
.stat-chip b { display: block; font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.stat-chip span { font-size: 12px; color: var(--ink-3); }

/* 翻转舞台 */
.flip-stage {
  position: relative;
  perspective: 1600px;
  perspective-origin: 50% 50%;
  min-height: 560px;
  animation: fadeUp 0.9s 0.08s var(--ease) both;
}

.auth-card {
  position: relative;
  padding: 34px 32px 30px;
  border-radius: var(--r-xl);
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.card-login { position: relative; z-index: 2; transform-origin: left center; }
.flip-stage.flipped .card-login {
  transform: rotateY(-178deg);
  transition: transform 0.82s cubic-bezier(0.62, 0.02, 0.34, 1), box-shadow 0.82s var(--ease);
  box-shadow: -30px 30px 80px rgba(86, 70, 120, 0.22);
}

.card-success {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: rotateY(180deg);
  transform-origin: left center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flip-stage.show-success .card-success {
  opacity: 1;
  transform: rotateY(0deg);
  transition: transform 0.86s cubic-bezier(0.5, 0.05, 0.3, 1), opacity 0.3s linear;
}

.auth-card h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.01em; }
.auth-card .lead { color: var(--ink-3); font-size: 13.5px; margin: 0 0 24px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  margin-bottom: 22px;
  position: relative;
}
.tab {
  padding: 9px 6px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all var(--t);
  position: relative;
  z-index: 1;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); background: #fff; box-shadow: 0 6px 16px rgba(96, 82, 130, 0.1); }

.form-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--accent-soft);
  color: #8a3a3a;
  margin-bottom: 16px;
  animation: fadeUp 0.4s var(--ease) both;
}
.form-note.warn { background: rgba(231, 155, 60, 0.12); color: #a06a1c; }
.form-note.ok { background: var(--mint-soft); color: #1c7a5b; }
.form-note.bad { background: var(--danger-soft); color: #a33248; }
.form-note.info { background: rgba(120, 110, 145, 0.08); color: var(--ink-2); }

.alt-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* 登录成功面板 */
.success-body { text-align: center; }
.success-check {
  width: 96px; height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, rgba(120, 235, 195, 0.35), rgba(46, 185, 138, 0.14));
  box-shadow: 0 0 0 12px rgba(46, 185, 138, 0.06), 0 0 0 26px rgba(46, 185, 138, 0.03);
  animation: pulseRing 0.9s var(--ease) both;
}
.success-check svg { width: 46px; height: 46px; stroke: var(--mint); fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.success-check path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: drawCheck 0.8s 0.35s var(--ease) forwards; }

.success-title { font-size: 21px; font-weight: 700; margin: 0 0 8px; }
.success-where { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.8; }
.success-where b { color: var(--ink); font-weight: 600; }

.ip-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 13px;
  text-align: left;
  margin-bottom: 22px;
}
.ip-row { display: flex; justify-content: space-between; gap: 12px; }
.ip-row span { color: var(--ink-3); }
.ip-row b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 页脚 */

.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.52));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 -6px 22px rgba(96, 82, 130, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 40;
}
.site-footer .res-link {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(140, 136, 155, 0.9);
  padding: 2px 6px;
  border-radius: 7px;
  transition: color var(--t), background var(--t), letter-spacing var(--t);
}
.site-footer .res-link:hover { color: var(--accent-deep); background: rgba(255, 255, 255, 0.7); letter-spacing: 0.12em; }

/* ---------------------------------------------------------------- 弹窗 */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(46, 40, 66, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.34s var(--ease-soft);
}
.overlay.open { opacity: 1; pointer-events: auto; }
/* 叠在另一个弹窗之上时（如二次确认）：只压暗不模糊，省性能也更清晰 */
.overlay.stacked {
  background: rgba(40, 36, 58, 0.3);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* iOS 26 Liquid Glass 弹窗面板：
   半透明白玻璃 + 背景实时模糊提饱和 + 顶部高光 sheen + 折射内描边 */
.sheet {
  position: relative;
  width: min(460px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 28px 26px 24px;
  border-radius: 32px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.88), rgba(252, 251, 255, 0.78));
  backdrop-filter: blur(44px) saturate(180%);
  -webkit-backdrop-filter: blur(44px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    0 36px 88px rgba(34, 24, 48, 0.32),
    0 10px 26px rgba(34, 24, 48, 0.14);
  transform: translateY(30px) scale(0.94);
  opacity: 0;
  transition: transform 0.52s var(--ios-spring), opacity 0.3s var(--ease-soft);
}
/* 顶部高光弧线：液态玻璃的标志性 sheen */
.sheet::before {
  content: '';
  position: absolute;
  top: 0; left: 36px; right: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  pointer-events: none;
}
/* 左上角环境光斑：模拟玻璃对环境光源的折射（受 overflow 裁剪，收进面板内） */
.sheet::after {
  content: '';
  position: absolute;
  top: 0; left: -8%;
  width: 66%; height: 44%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.46), transparent 76%);
  pointer-events: none;
  filter: blur(8px);
}
.overlay.open .sheet { transform: none; opacity: 1; }
.sheet.wide { width: min(760px, 100%); }

.sheet h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.sheet .sheet-sub { margin: 0 0 20px; color: var(--ink-3); font-size: 13px; line-height: 1.7; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.sheet-actions .spacer { flex: 1; }

.sheet-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.6);
  transition: all var(--t);
}
.sheet-close:hover { background: #fff; color: var(--ink); transform: rotate(90deg); }

/* 图标头部 */
.sheet-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.sheet-icon.violet { background: var(--violet-soft); color: #6f5ad6; }
.sheet-icon.mint { background: var(--mint-soft); color: #1c7a5b; }
.sheet-icon.danger { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------- 提示条 */

.toast-wrap {
  position: fixed;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 480px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.82), rgba(250, 249, 253, 0.74));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 20px 44px rgba(86, 70, 120, 0.2),
    0 4px 12px rgba(86, 70, 120, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  font-size: 13.5px;
  color: var(--ink);
  animation: toastIn 0.42s var(--ios-spring) both;
  max-width: 100%;
}
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
.toast .icon { color: var(--mint); }
.toast.err .icon { color: var(--danger); }
.toast.info .icon { color: var(--violet); }

/* ---------------------------------------------------------------- 滑块验证 */

.slider-box { user-select: none; }

.slider-frame {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #f4f2f8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), var(--shadow-sm);
  line-height: 0;
}
.slider-frame img.bg { width: 100%; display: block; }

.slider-piece {
  position: absolute;
  top: 0; left: 0;
  width: 16.875%; /* 54/320 */
  filter: drop-shadow(0 6px 12px rgba(40, 30, 60, 0.28));
  pointer-events: none;
  transition: filter 0.2s;
}

.slider-track {
  position: relative;
  height: 46px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 3px rgba(96, 82, 130, 0.07);
  overflow: hidden;
}
.slider-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 46px;
  background: linear-gradient(90deg, rgba(160, 58, 58, 0.16), rgba(160, 58, 58, 0.05));
  transition: width 0.12s linear;
}
.slider-handle {
  position: absolute;
  top: 3px; left: 3px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  color: var(--accent-deep);
  box-shadow: 0 6px 16px rgba(140, 44, 44, 0.26);
  cursor: grab;
  transition: transform 0.12s var(--ease), box-shadow 0.2s;
  touch-action: none;
}
.slider-handle:active { cursor: grabbing; transform: scale(1.06); }
.slider-text {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12.5px; color: var(--ink-3);
  letter-spacing: 0.1em;
  pointer-events: none;
  transition: opacity 0.2s;
}
.slider-box.ok .slider-track { border-color: rgba(46, 185, 138, 0.4); background: rgba(46, 185, 138, 0.08); }
.slider-box.ok .slider-handle { color: var(--mint); box-shadow: 0 6px 18px rgba(46, 185, 138, 0.3); }
.slider-box.fail .slider-handle { animation: shake 0.42s; }

/* 设备扫描 */
.scan-list { display: grid; gap: 8px; margin: 6px 0 4px; }
.scan-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-2);
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: translateY(6px);
  animation: fadeUp 0.4s var(--ease) forwards;
}
.scan-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.scan-item.good .dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(46, 185, 138, 0.12); }
.scan-item.bad .dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(226, 83, 107, 0.12); }

.scan-bar {
  height: 4px; border-radius: 999px; background: rgba(120, 110, 145, 0.14); overflow: hidden; margin: 14px 0 4px;
}
.scan-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #c47a7a, #a03a3a); transition: width 0.32s var(--ease-soft); }

/* ---------------------------------------------------------------- 通用页面（表白墙/设置） */

.page-shell { max-width: 1080px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 110px; }

.topbar {
  position: sticky; top: 14px; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  margin-bottom: 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--glass-sheen), var(--shadow-sm);
  animation: fadeDown 0.5s var(--ease) both;
}
.topbar .brand-name { font-size: 15.5px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  padding: 8px 14px; border-radius: 11px; font-size: 13.5px; color: var(--ink-2);
  transition: all var(--t);
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); }
.topbar nav a.active { background: #fff; color: var(--accent-deep); box-shadow: var(--shadow-sm); font-weight: 600; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #c97e7e, #8f7cf0);
  color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(140, 90, 120, 0.28);
  transition: transform var(--t);
}
.avatar:hover { transform: scale(1.06); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 17px; font-weight: 700; }
.section-title .icon { color: var(--accent); }

.card { padding: 22px; margin-bottom: 18px; animation: fadeUp 0.6s var(--ease) both; }

.post-card {
  padding: 22px 22px 16px;
  margin-bottom: 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--glass-sheen), var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  animation: fadeUp 0.42s var(--ease) both;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--glass-sheen), var(--shadow); background: rgba(255, 255, 255, 0.96); }

.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-head .name { font-size: 14px; font-weight: 600; }
.post-head .meta { font-size: 11.5px; color: var(--ink-3); }
.post-content { font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; margin-bottom: 16px; }
.post-actions { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 11px;
  font-size: 12.5px; color: var(--ink-3);
  transition: all var(--t);
}
.act:hover { background: rgba(160, 58, 58, 0.09); color: var(--accent-deep); transform: translateY(-1px); }
.act.liked { color: var(--accent); font-weight: 600; }
.act.liked .icon { fill: currentColor; stroke: currentColor; animation: pop 0.42s var(--ease); }

.comment-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: none; }
.comment-box.open { display: block; animation: fadeUp 0.35s var(--ease) both; }
.comment { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.comment .cname { color: var(--accent-deep); font-weight: 600; font-size: 12.5px; }
.comment .ctext { color: var(--ink-2); line-height: 1.7; word-break: break-word; }

.compose { display: grid; gap: 12px; }
.compose textarea {
  width: 100%; min-height: 108px; resize: vertical;
  padding: 16px; border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.75);
  outline: none; font-size: 14.5px; line-height: 1.75;
  transition: box-shadow var(--t), border-color var(--t), background var(--t);
}
.compose textarea:focus { background: #fff; border-color: rgba(160, 58, 58, 0.4); box-shadow: 0 0 0 4px rgba(160, 58, 58, 0.12); }

.empty {
  text-align: center;
  padding: 54px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.empty .icon { width: 42px; height: 42px; opacity: 0.35; margin-bottom: 12px; }

/* 设置页 */
.settings-grid { display: grid; gap: 18px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .k { font-size: 14px; font-weight: 600; }
.set-row .v { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.set-row .r { margin-left: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: rgba(120, 110, 145, 0.1); color: var(--ink-2);
  white-space: nowrap;
  transition: all var(--t);
}
.badge.ok { background: var(--mint-soft); color: #1c7a5b; }
.badge.warn { background: rgba(231, 155, 60, 0.14); color: #9c6a1e; }
.badge.bad { background: var(--danger-soft); color: #a33248; }
.badge.violet { background: var(--violet-soft); color: #6f5ad6; }

.key-box {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(140, 125, 175, 0.32);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px; letter-spacing: 0.14em;
  color: var(--ink);
}

/* 掉落的装饰 */
@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, 18px) scale(1.05); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.32); } 100% { transform: scale(1); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 12px rgba(46, 185, 138, 0.06), 0 0 0 26px rgba(46, 185, 138, 0.03); }
  50% { box-shadow: 0 0 0 16px rgba(46, 185, 138, 0.09), 0 0 0 34px rgba(46, 185, 138, 0.04); }
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(220%); } }

.spin { animation: spin 0.9s linear infinite; }

/* 骨架屏 */
.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 25%, rgba(255, 255, 255, 0.85) 37%, rgba(255, 255, 255, 0.5) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 响应式 */
@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 18px 96px;
    align-content: start;
  }
  .brand-panel { padding: 30px 24px; }
  .brand-title { font-size: 27px; }
  .brand-desc { font-size: 13.5px; margin-bottom: 20px; }
  .flip-stage { min-height: 540px; }
  .auth-card { padding: 26px 22px; }
  .topbar nav { display: none; }
  .site-footer { font-size: 10.5px; }
}

@media (max-width: 560px) {
  .brand-stats .stat-chip:nth-child(n + 3) { display: none; }
  .sheet { padding: 24px 20px 20px; }
  .sheet-actions { flex-direction: column-reverse; }
  .sheet-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(150, 140, 175, 0.28); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(150, 140, 175, 0.45); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 数字输入去掉浏览器默认步进按钮 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------------------------------------------------------------- 小屏细化 */
@media (max-width: 600px) {
  .site-footer {
    font-size: 10px;
    gap: 10px;
    padding: 7px 12px;
    white-space: nowrap;
  }
  .site-footer #footNote { display: none; }
  .site-footer .spacer { display: none; }
  .site-footer > span:first-child { overflow: hidden; text-overflow: ellipsis; }
  .brand-panel { padding: 26px 22px 24px; }
  .brand-stats { display: none; }
  .brand-title { font-size: 25px; margin-bottom: 10px; }
  .brand-desc { margin-bottom: 4px; }
  .brand-logo { margin-bottom: 18px; }
  .auth-shell { padding-top: 18px; }
  .flip-stage { min-height: 0; }
  .admin-login-card { padding: 26px 22px 24px; }
}

/* ---------------------------------------------------------------- 品牌标识 */
.brand-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 4px 14px rgba(120, 40, 40, 0.16), inset 0 0 0 1px rgba(140, 44, 44, 0.1);
  flex: none;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.brand-logo:hover .brand-logo-img { transform: scale(1.04); box-shadow: 0 8px 22px rgba(120, 40, 40, 0.2); }

.top-title { min-width: 0; }
.top-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- 首屏玻璃
   登录 / 注册页元素少、页面不滚动，允许使用真实的实时模糊来获得通透质感。
   翻书动画开始的一瞬间会临时关闭模糊（旋转过程逐帧重算背景采样最费性能），
   动画结束后页面已切到结果页，无需恢复。 */
.auth-shell .glass,
.admin-login-card.glass {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.5) 46%, rgba(255, 255, 255, 0.62) 100%);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.flip-stage.flipped .auth-card,
.flip-stage.show-success .auth-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88));
}

/* 系统级降低动效偏好：关闭所有非必要动画，减少渲染压力 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flip-stage.flipped .card-login,
  .flip-stage.show-success .card-success { transition-duration: 0.3s !important; }
}

/* 低端设备 / 省电模式下的兜底：关闭全部实时模糊 */
@media (max-width: 480px) {
  .auth-shell .glass,
  .admin-login-card.glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(158deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
  }
}

/* 顶栏品牌与导航之间的分隔 */
.topbar .brand-logo { padding-right: 16px; border-right: 1px solid var(--line); margin-right: 4px; }
.topbar nav a { white-space: nowrap; }

/* 头像使用校色系，避免与品牌视觉冲突 */
.avatar { background: linear-gradient(135deg, #c98a7f, #8d2b2b); box-shadow: 0 6px 14px rgba(140, 44, 44, 0.24); }

@media (max-width: 620px) {
  .topbar { top: 8px; padding: 10px 12px; gap: 10px; }
  .topbar .brand-logo { padding-right: 0; border-right: none; }
  .topbar .brand-sub { display: none; }
  .topbar nav a { padding: 7px 10px; font-size: 12.5px; }
}

/* ---------------------------------------------------------------- 移动端首屏
   目标：一屏内看到完整登录表单，不需要先滚动。 */
@media (max-width: 640px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 14px 74px;
    align-items: start;
  }
  .brand-panel {
    padding: 20px 18px 18px;
    border-radius: var(--r-lg);
  }
  .brand-logo { margin-bottom: 14px; gap: 11px; }
  .brand-logo-img { width: 40px; height: 40px; }
  .brand-name { font-size: 17px; }
  .brand-title { font-size: 22px; line-height: 1.35; margin-bottom: 0; }
  .brand-desc, .brand-stats { display: none; }
  .auth-card { padding: 24px 20px 22px; border-radius: var(--r-lg); }
  .auth-card h2 { font-size: 21px; }
  .auth-card .lead { margin-bottom: 18px; font-size: 13px; }
  .field { margin-bottom: 14px; }
  .tabs { margin-bottom: 18px; }
  .flip-stage { min-height: 0; }
  .alt-links { margin-top: 14px; }
}

/* 小屏（如 iPhone SE）：进一步压缩，保证「登录」按钮与注册入口不被页脚遮住 */
@media (max-width: 640px) and (max-height: 730px) {
  .auth-shell { padding: 12px 12px 62px; gap: 12px; }
  .brand-panel { padding: 14px 16px 13px; }
  .brand-logo { margin-bottom: 9px; gap: 10px; }
  .brand-logo-img { width: 34px; height: 34px; }
  .brand-name { font-size: 15.5px; }
  .brand-sub { font-size: 10px; }
  .brand-title { font-size: 19px; line-height: 1.3; }
  .auth-card { padding: 20px 18px 18px; }
  .auth-card h2 { font-size: 19px; }
  .auth-card .lead { display: none; }
  .tabs { margin-bottom: 14px; }
  .field { margin-bottom: 11px; }
  .field > label { margin-bottom: 5px; }
  .input-wrap input { padding: 11px 12px; font-size: 14px; }
  .btn { padding: 11px 20px; }
  .alt-links { margin-top: 12px; font-size: 12px; }
}

/* ================================================================
   移动优先版式（App 列）
   ----------------------------------------------------------------
   电脑上不再把卡片拉满整屏，而是收成一条手机宽度的内容列，
   底部挂一条悬浮导航 —— 手机和电脑看到的是同一套版式。
   ================================================================ */
:root { --app-w: 620px; --tabbar-h: 66px; }

/* 内容列：手机全宽，桌面居中窄列 */
.page-shell {
  max-width: var(--app-w);
  margin: 0 auto;
  padding: 14px 12px calc(96px + var(--tabbar-h) + env(safe-area-inset-bottom));
}

/* 顶栏：同样收进窄列，做成浮起的胶囊 */
.topbar {
  width: min(var(--app-w), calc(100% - 20px));
  margin: 0 auto 14px;
  padding: 9px 12px;
  gap: 10px;
  border-radius: 20px;
}
.topbar .brand-logo { padding-right: 12px; margin-right: 2px; }
.topbar .brand-name { font-size: 14.5px; }
.topbar .btn-sm { padding: 7px 11px; }
.avatar { width: 32px; height: 32px; font-size: 12.5px; }

/* 卡片密度：更接近 App 的信息密度 */
.card { padding: 18px; margin-bottom: 12px; border-radius: 20px; }
.post-card { padding: 16px 16px 10px; margin-bottom: 12px; border-radius: 20px; }
.section-title { font-size: 16px; margin-bottom: 12px; }

/* ---------------------------------------------------------------- 底部导航 */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(var(--app-w), calc(100% - 20px));
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 6px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(72, 46, 62, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  animation: tabIn 0.5s var(--ease) both;
}
@keyframes tabIn { from { opacity: 0; transform: translateX(-50%) translateY(14px); } }

.tab-item {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 17px;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.24s var(--ease), background 0.24s var(--ease), transform 0.24s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tab-item .icon { width: 20px; height: 20px; transition: transform 0.28s var(--ease); }
.tab-item:hover { color: var(--ink-2); background: rgba(255, 255, 255, 0.6); }
.tab-item:active { transform: scale(0.96); }
.tab-item.active {
  color: var(--accent-deep);
  background: #fff;
  box-shadow: 0 4px 12px rgba(120, 44, 44, 0.1), inset 0 0 0 1px rgba(160, 58, 58, 0.08);
  font-weight: 600;
}
.tab-item.active .icon { transform: translateY(-1px); }

/* 帖子流末尾的页脚：随内容滚动，不再固定遮挡 */
.page-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px 2px;
  font-size: 10.5px;
  color: var(--ink-3);
  opacity: 0.85;
}

/* ---------------------------------------------------------------- 触控友好 */
.btn { min-height: 42px; }
.btn-sm { min-height: 34px; }
.btn-xs { min-height: 34px; }
.input-wrap input,
.input-wrap textarea { font-size: 15px; }

/* ---------------------------------------------------------------- 桌面：保持手机观感 */
@media (min-width: 641px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 540px;
    margin: 0 auto;
    gap: 16px;
    align-content: center;
    padding: 34px 18px 74px;
  }
  .brand-panel { padding: 26px 26px 24px; border-radius: 24px; }
  .brand-title { font-size: 24px; margin-bottom: 8px; }
  .brand-desc { font-size: 13px; margin-bottom: 6px; }
  .brand-stats { display: none; }
  .flip-stage { min-height: 500px; }
  .auth-card { padding: 26px 24px; }
  .page-shell { padding: 20px 18px calc(96px + var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* 手机：字号 16px 起，避免 iOS 聚焦时自动放大 */
@media (max-width: 640px) {
  .input-wrap input,
  .input-wrap textarea,
  .compose textarea { font-size: 16px; }
  .page-shell { padding: 10px 10px calc(88px + var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .card { padding: 16px; border-radius: 18px; }
  .post-card { padding: 15px 15px 9px; border-radius: 18px; }
  .tabbar { bottom: calc(8px + env(safe-area-inset-bottom)); width: calc(100% - 16px); }
  .page-foot { font-size: 10px; }
}

/* 横屏 / 矮屏：tabbar 收窄，减少遮挡 */
@media (max-height: 520px) {
  .tabbar { bottom: 6px; padding: 4px; }
  .tab-item { min-height: 44px; }
  .tab-item .icon { width: 18px; height: 18px; }
}

/* 底部导航图标容器 */
.tab-item .tab-ico { display: inline-flex; align-items: center; justify-content: center; height: 20px; }

/* 顶栏导航与底部 tabbar 重复，统一收进底部 */
.topbar nav { display: none; }

/* 登录页脚：内容居中，不再左右拉扯 */
.site-footer { justify-content: center; gap: 18px; }

/* 底部导航下方的渐隐遮罩：内容滚到导航后面时自然淡出，不留生硬的切边 */
body.has-tabbar::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(92px + env(safe-area-inset-bottom));
  pointer-events: none;
  z-index: 44;
  background: linear-gradient(180deg,
    rgba(247, 245, 251, 0) 0%,
    rgba(247, 245, 251, 0.72) 52%,
    rgba(247, 245, 251, 0.94) 100%);
}

/* 顶栏 / 底部导航与内容列左右对齐 */
.topbar { width: min(calc(var(--app-w) - 36px), calc(100% - 20px)); }
.tabbar { width: min(calc(var(--app-w) - 36px), calc(100% - 16px)); }

/* 登录页脚与内容列对齐（桌面） */
@media (min-width: 641px) {
  .site-footer {
    padding-left: max(18px, calc((100% - 540px) / 2 + 18px));
    padding-right: max(18px, calc((100% - 540px) / 2 + 18px));
  }
}

/* 遮罩末端压得更实，避免最底部露出卡片边缘 */
body.has-tabbar::after { background: linear-gradient(180deg,
    rgba(247, 245, 251, 0) 0%,
    rgba(247, 245, 251, 0.66) 46%,
    rgba(247, 245, 251, 0.97) 84%,
    #f7f5fb 100%); }

/* 页面尾部留白收一收：多出来的空间交给渐隐遮罩，页脚落在导航之上 */
.page-shell { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.page-foot {
  margin: 2px auto calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
  padding-left: 12px; padding-right: 12px;
}

/* margin 会与 body 折叠，改用 padding 让页脚稳定落在导航之上 */
.page-foot {
  margin-bottom: 0;
  padding-bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom));
}

/* 登录页：桌面把品牌数据放回来，页面高度收进一屏 */
@media (min-width: 641px) {
  .brand-stats { display: none; }
  .auth-shell { padding: 22px 18px 58px; }
  .flip-stage { min-height: 0; }
}

/* ================================================================
   iOS 26 视觉层（Liquid Glass）
   ----------------------------------------------------------------
   玻璃材质全部保留，只把「字体 / 控件 / 弹窗」换成 iOS 26 的形态：
   SF 字体栈、分组列表式输入框、分段控件、开关、底部解锁的 sheet。
   ================================================================ */
:root {
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
              "MiSans VF", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* iOS 弹簧曲线：用于弹窗入场，模拟 UIKit spring 动画 */
  --ios-spring: cubic-bezier(0.34, 1.38, 0.44, 1);
  --ios-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --ios-label: #1c1c1e;
  --ios-label-2: rgba(60, 60, 67, 0.62);
  --ios-label-3: rgba(60, 60, 67, 0.34);
  --ios-fill: rgba(120, 120, 128, 0.12);
  --ios-fill-2: rgba(120, 120, 128, 0.2);
  --ios-sep: rgba(60, 60, 67, 0.12);
  --ios-tint: #b0483f;
  --ios-r-card: 26px;
  --ios-r-ctrl: 14px;
  --ios-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* 字体：优先 SF，字距按苹果的负值收紧，行高放松 */
body {
  font-family: var(--ios-font);
  letter-spacing: -0.011em;
  color: var(--ios-label);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, .brand-title, .section-title, .sheet h3 {
  letter-spacing: -0.022em;
  font-weight: 700;
  color: var(--ios-label);
}
.auth-card h2 { font-size: 22px; line-height: 1.3; }
.auth-card .lead { font-size: 13.5px; line-height: 1.45; color: var(--ios-label-2); }
.hint { color: var(--ios-label-2); font-size: 13px; }
.muted { color: var(--ios-label-2); }

/* ---------------------------------------------------------------- 控件：输入 */
.input-wrap {
  background: var(--ios-fill);
  border: 1px solid transparent;
  border-radius: var(--ios-r-ctrl);
  box-shadow: none;
}
.input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(160, 58, 58, 0.5);
  box-shadow: 0 0 0 4px rgba(160, 58, 58, 0.12);
}
.input-wrap > .icon { color: var(--ios-label-2); margin-left: 13px; }
.input-wrap:focus-within > .icon { color: var(--accent); transform: none; }
.input-wrap input,
.input-wrap select,
.input-wrap textarea,
.compose textarea {
  font-size: 15px;
  letter-spacing: 0;
  color: var(--ios-label);
  font-family: inherit;
}
.input-wrap input::placeholder,
.compose textarea::placeholder { color: var(--ios-label-3); }
.field > label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ios-label-2);
  letter-spacing: 0.01em;
  margin: 0 0 6px 4px;
}

/* 密码「显示」：iOS 的 tint 文字按钮 */
.link-btn, .input-suffix .link-btn { color: var(--accent); font-weight: 500; }

/* ---------------------------------------------------------------- 控件：按钮 */
.btn {
  font-family: inherit;
  font-weight: 590;
  font-size: 15px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: transform 0.22s var(--ios-ease), background 0.22s var(--ios-ease), box-shadow 0.22s var(--ios-ease);
}
.btn:hover { transform: none; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(140, 44, 44, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { background: #a94040; box-shadow: 0 12px 28px rgba(140, 44, 44, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-ghost {
  background: var(--ios-fill);
  border: 1px solid transparent;
  color: var(--accent);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--ios-fill-2); box-shadow: none; }
.btn-danger { background: rgba(226, 83, 107, 0.12); color: #c0392b; border-color: transparent; }
.btn-sm { font-size: 13px; border-radius: 999px; }
.btn-xs { font-size: 12px; border-radius: 999px; }

/* ---------------------------------------------------------------- 控件：分段控制 */
.tabs {
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  background: var(--ios-fill);
  border: none;
  border-radius: 12px;
}
.tab {
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ios-label);
  transition: background 0.2s var(--ios-ease), box-shadow 0.2s var(--ios-ease);
}
.tab:hover { color: var(--ios-label); background: transparent; }
.tab.active {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------- 控件：开关 */
.check { gap: 9px; font-size: 14px; color: var(--ios-label); }
.check .box {
  width: 46px; height: 28px;
  border-radius: 14px;
  border: none;
  background: var(--ios-fill-2);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  display: block;
  position: relative;
  overflow: hidden;
}
.check .box .icon { display: none; }
.check .box::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.26s var(--ios-ease);
}
.check input:checked + .box { background: var(--accent); box-shadow: none; }
.check input:checked + .box::after { transform: translateX(18px); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(160, 58, 58, 0.16); }

/* ---------------------------------------------------------------- 卡片圆角贴近 iOS 26 */
.card, .post-card, .auth-card, .brand-panel, .admin-card {
  border-radius: var(--ios-r-card);
}

/* ---------------------------------------------------------------- 弹窗：iOS 26 Alert / Sheet */
.overlay {
  padding: 16px;
  background: rgba(16, 14, 22, 0.28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sheet {
  width: min(336px, 100%);
  max-height: 86vh;
  padding: 22px 18px 16px;
  border-radius: 30px;
  background: rgba(250, 250, 252, 0.74);
  backdrop-filter: blur(34px) saturate(190%);
  -webkit-backdrop-filter: blur(34px) saturate(190%);
  border: none;
  box-shadow:
    0 30px 70px rgba(20, 16, 32, 0.24),
    0 2px 8px rgba(20, 16, 32, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  transform: translateY(20px) scale(0.94);
  transition: transform 0.42s var(--ios-ease), opacity 0.28s var(--ios-ease);
  overscroll-behavior: contain;
}
.overlay.open .sheet { transform: none; }
/* 叠加的第二层：关掉实时模糊，改为更实的底，避免两层玻璃糊成一片 */
.overlay.stacked .sheet {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(250, 250, 252, 0.97);
}
.sheet.wide { width: min(720px, 100%); }

.sheet h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}
.sheet .sheet-sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  color: var(--ios-label-2);
}
.sheet-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin: 2px auto 12px;
  display: grid; place-items: center;
}
.sheet-icon .icon { width: 26px; height: 26px; }

/* 按钮组：竖排胶囊，主操作在上（column-reverse 让最后一个 action 置顶） */
.sheet-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  margin-top: 18px;
}
.sheet-actions .btn {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
  font-weight: 590;
  border-radius: 25px;
  padding: 12px 18px;
}
.sheet-actions .btn-ghost {
  background: rgba(120, 120, 128, 0.12);
  color: var(--ios-label);
}
.sheet-actions .btn-ghost:hover { background: rgba(120, 120, 128, 0.18); }
.sheet-actions .spacer { display: none; }

/* 关闭按钮：iOS 26 的圆形玻璃 */
.sheet-close {
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(120, 120, 128, 0.14);
  color: var(--ios-label-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.sheet-close:hover { background: rgba(120, 120, 128, 0.22); color: var(--ios-label); transform: none; }

/* 弹窗内表单：iOS 分组列表观感 */
.sheet .input-wrap { background: rgba(120, 120, 128, 0.1); }
.sheet .form-note { border-radius: 14px; font-size: 13px; }

/* key-box 等宽显示用 SF Mono */
.key-box { font-family: var(--ios-mono); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- 提示条 */
.toast {
  border-radius: 999px;
  background: rgba(250, 250, 252, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 30px rgba(20, 16, 32, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 14px;
  color: var(--ios-label);
}

/* ---------------------------------------------------------------- 底部 tab：iOS 26 悬浮栏 */
.tabbar {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow:
    0 16px 40px rgba(20, 16, 32, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.tab-item { border-radius: 20px; font-size: 10.5px; font-weight: 500; }
.tab-item.active {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(20, 16, 32, 0.08), inset 0 1px 0 #fff;
  font-weight: 600;
}

/* 顶栏也换成更薄的玻璃 */
.topbar {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: none;
  box-shadow: 0 8px 26px rgba(20, 16, 32, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* 滚动条：贴近 iOS 的细指示条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(60, 60, 67, 0.22); border: none; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(60, 60, 67, 0.34); }

/* ---------------------------------------------------------------- 手机：底部升起的 sheet */
@media (max-width: 640px) {
  .overlay {
    display: grid;
    place-items: end stretch;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .sheet {
    width: 100%;
    max-height: 88vh;
    padding: 26px 18px calc(14px + env(safe-area-inset-bottom));
    border-radius: 30px;
    transform: translateY(100%);
  }
  .overlay.open .sheet { transform: none; }
  .sheet.wide { width: 100%; }
  /* 顶部拖拽指示条 */
  .sheet::before {
    content: "";
    position: absolute;
    top: 8px; left: 50%;
    width: 38px; height: 5px;
    border-radius: 3px;
    background: rgba(60, 60, 67, 0.22);
    transform: translateX(-50%);
  }
  .sheet h3 { margin-top: 6px; }
  .sheet-actions .btn { min-height: 52px; }
}

/* ---------------------------------------------------------------- iOS 26 细节修正 */
/* 弹窗玻璃更亮，避免背后压暗后透出灰调 */
.sheet { width: min(360px, 100%); background: rgba(252, 252, 254, 0.86); }
.overlay.stacked .sheet { background: rgba(252, 252, 254, 0.98); }

/* 破坏性操作：iOS 用红字 + 极浅底，而不是整块粉红 */
.sheet-actions .btn-danger {
  background: rgba(255, 59, 48, 0.08);
  color: #d70015;
  border-color: transparent;
  box-shadow: none;
}
.sheet-actions .btn-danger:hover { background: rgba(255, 59, 48, 0.14); }

/* 关闭键缩小、内收 */
.sheet-close { top: 14px; right: 14px; width: 28px; height: 28px; }
.sheet-close .icon { width: 15px; height: 15px; }

/* 手机上输入框保持 16px，避免 iOS 聚焦自动放大 */
@media (max-width: 640px) {
  .input-wrap input,
  .input-wrap select,
  .input-wrap textarea,
  .compose textarea {
    font-size: 16px;
  }
}

/* iOS：去掉点击时的灰色高亮块 */
html { -webkit-tap-highlight-color: transparent; }

/* 密钥弹窗：时间在左、复制在右，细字 + 小胶囊 */
.key-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 14px; }
.key-actions .hint { font-size: 11.5px; color: var(--ios-label-3); }
.key-actions .btn-xs { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.04); }

/* 含表单的弹窗给宽一点，避免输入框被挤 */
.sheet:has(.sheet-body .field),
.sheet:has(.sheet-body .form-grid) { width: min(404px, 100%); }
@media (max-width: 640px) {
  .sheet:has(.sheet-body .field),
  .sheet:has(.sheet-body .form-grid) { width: 100%; }
}
/* 破坏性操作加粗，和「取消」拉开层级 */
.sheet-actions .btn-danger { font-weight: 600; }

/* 提示条下移，避免压在顶栏上 */
.toast-wrap { top: 74px; }
@media (max-width: 640px) { .toast-wrap { top: 70px; } }
.toast { background: rgba(250, 250, 252, 0.9); }

/* ================================================================
   表白墙 · 朋友圈式动态流
   ----------------------------------------------------------------
   左边头像、右边昵称与正文，时间在左下，点赞 / 评论收在时间右侧，
   评论展开后落在浅灰圆角块里 —— 与微信朋友圈的信息层级一致。
   ================================================================ */
.post-card { padding: 16px 16px 13px; border-radius: 20px; }
.post-card:hover { transform: none; }
.post-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0;
}
.post-avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 15.5px; font-weight: 600; }
.post-main { min-width: 0; }
.post-main .name { font-size: 15px; font-weight: 600; color: var(--accent-deep); line-height: 1.25; letter-spacing: 0; }
.post-main .name .uid { margin-left: 6px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.post-content { margin: 6px 0 0; font-size: 15px; line-height: 1.64; color: var(--ink); }

.post-foot { display: flex; align-items: center; gap: 2px; margin-top: 9px; }
.post-foot .meta { font-size: 11.5px; color: var(--ink-3); margin-right: 4px; }
.post-foot .act { padding: 5px 8px; border-radius: 9px; font-size: 12px; gap: 4px; color: var(--ink-3); }
.post-foot .act .icon { width: 15px; height: 15px; }
.post-foot .act:hover { transform: none; background: rgba(120, 120, 128, 0.1); color: var(--accent-deep); }
.post-foot .act.liked { color: var(--accent); font-weight: 600; }

/* 旧的独立操作条不再使用 */
.post-actions { display: none; }

/* 评论区：浅灰块，像朋友圈的互动区 */
.comment-box {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(120, 120, 128, 0.085);
  border: none;
}
.comment-box.open { animation: fadeUp 0.3s var(--ease) both; }
.comment { padding: 5px 0; gap: 8px; font-size: 13.5px; }
.comment .cname { font-size: 12.5px; }
.comment .ctext { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.comment-form input::placeholder { color: var(--ink-3); }
.comment-form .btn { flex: 0 0 auto; min-height: 38px; }

@media (max-width: 640px) {
  .post-card { padding: 14px 14px 11px; border-radius: 18px; }
  .post-head { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .post-avatar { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
  .post-content { font-size: 15.5px; }
}

/* 未认证：发帖区仍在原位，只是锁住 */
#composeCard.locked { opacity: 0.8; }
#composeCard.locked .compose textarea {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-3);
  cursor: pointer;
}
#composeCard.locked .btn-primary { opacity: 0.55; pointer-events: none; }
#composeCard.locked .check { opacity: 0.6; }

/* 评论发送：朋友圈里是轻量文字按钮，不用实心块 */
.comment-form .btn-primary {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  padding: 0 8px;
  box-shadow: none;
  border: none;
}
.comment-form .btn-primary:hover { background: rgba(160, 58, 58, 0.08); box-shadow: none; }

/* 手机上的提示条落在底部导航上方，不压内容也不压顶栏 */
@media (max-width: 640px) {
  .toast-wrap {
    top: auto;
    bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom));
  }
  .toast { font-size: 13.5px; padding: 11px 18px; }
}

/* ================================================================
   多页面底部导航 + 消息 / 资源页
   ================================================================ */
.tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab-item { position: relative; font-size: 10px; gap: 2px; }
.tab-item .tab-ico { height: 19px; }
.tab-item .tab-ico .icon { width: 19px; height: 19px; }

.tab-dot {
  position: absolute;
  top: 3px;
  right: 50%;
  transform: translateX(22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e0483c;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(200, 54, 44, 0.35);
}

/* 列表页标题行 */
.list-head { display: flex; align-items: center; gap: 10px; margin: 4px 2px 12px; }
.list-head .section-title { margin: 0; font-size: 18px; }
.list-head .badge { flex: 0 0 auto; }

/* ---------------------------------------------------------------- 消息 */
.msg-item {
  display: flex;
  gap: 12px;
  padding: 14px 15px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--glass-sheen), var(--shadow-sm);
  animation: fadeUp 0.4s var(--ease) both;
}
.msg-item.unread { border-color: rgba(160, 58, 58, 0.22); }
.msg-ico {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(120, 120, 128, 0.1);
  color: var(--ink-2);
}
.msg-item.ok .msg-ico { background: var(--mint-soft); color: #1c7a5b; }
.msg-item.danger .msg-ico { background: rgba(226, 83, 107, 0.12); color: #b8354b; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: center; gap: 8px; }
.msg-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.msg-item.unread .msg-title::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: #e0483c;
  vertical-align: 2px;
}
.msg-time { font-size: 11.5px; color: var(--ink-3); flex: 0 0 auto; }
.msg-text { margin-top: 4px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); word-break: break-word; }

@media (max-width: 640px) {
  .tab-item { font-size: 9.5px; }
  .tab-item .tab-ico .icon { width: 18px; height: 18px; }
  .tab-dot { transform: translateX(20px); top: 2px; }
  .msg-item { padding: 13px; border-radius: 16px; }
}

/* ================================================================
   液态玻璃底栏（Liquid Glass Dock）
   ----------------------------------------------------------------
   借鉴 KernelSU / Tracepoint 的玻璃底栏：一整块悬浮胶囊，背景实时
   模糊穿透，选中项在栏内浮起一颗带高光的玻璃泡，图标用渐变描边
   而不是单色线条 —— 有厚度，也有颜色。
   ================================================================ */
.tabbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, rgba(252, 250, 253, 0.56), rgba(230, 225, 236, 0.44));
  backdrop-filter: blur(32px) saturate(190%) brightness(1.1);
  -webkit-backdrop-filter: blur(32px) saturate(190%) brightness(1.1);
  box-shadow:
    0 20px 46px rgba(46, 24, 36, 0.2),
    0 2px 6px rgba(46, 24, 36, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.72);
  overflow: visible;
}
/* 整条栏顶部的一道弧光，玻璃才有了「厚度」 */
.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% -20%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 62%);
  opacity: 0.85;
}

.tab-item {
  position: relative;
  isolation: isolate;
  gap: 3px;
  min-height: 54px;
  padding: 5px 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  color: #77748a;
  background: transparent;
  z-index: 1;
}
.tab-item .tab-ico { height: 22px; }
.tab-item .tab-icon {
  width: 22px; height: 22px;
  stroke-width: 1.75;
  transition: transform 0.34s var(--ios-ease), stroke 0.28s ease;
}
.tab-item .tab-label { line-height: 1; letter-spacing: 0; }

/* 选中项：浮起的玻璃泡 */
.tab-item.active { background: transparent; box-shadow: none; color: var(--accent-deep); font-weight: 600; }
.tab-item.active::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  z-index: -1;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(130% 130% at 50% -14%, #ffffff 0%, #ffffff 42%, rgba(255, 255, 255, 0.94) 74%, rgba(255, 255, 255, 0.86) 100%);
  box-shadow:
    0 9px 20px rgba(92, 44, 44, 0.22),
    0 1px 2px rgba(92, 44, 44, 0.1),
    0 0 0 0.5px rgba(150, 130, 150, 0.08),
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 0 -5px 12px rgba(255, 255, 255, 0.9),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.95);
  animation: bubbleIn 0.42s var(--ios-ease) both;
}
/* 泡顶的一道细高光 */
.tab-item.active::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%;
  top: 3px; height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  z-index: -1;
  pointer-events: none;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
.tab-item.active .tab-icon { transform: translateY(-1px) scale(1.04); }
.tab-item:hover { background: rgba(255, 255, 255, 0.42); color: var(--ink-2); }
.tab-item.active:hover { background: transparent; color: var(--accent-deep); }
.tab-item:active { transform: scale(0.965); }

.tab-dot {
  top: 4px;
  right: 50%;
  transform: translateX(17px);
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  font-size: 9.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(200, 54, 44, 0.4);
}

/* ---------------------------------------------------------------- 渐变图标 */
.tint { stroke-width: 1.85; }
.tint-brand { stroke: url(#g-brand); }
.tint-mint { stroke: url(#g-mint); }
.tint-violet { stroke: url(#g-violet); }
.tint-amber { stroke: url(#g-amber); }
.tint-blue { stroke: url(#g-blue); }

/* 彩色贴片图标：squircle + 渐变底 + 白色线稿，用来替代单色灰图标 */
.tile-ico {
  width: 42px; height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(160deg, #cf7c72, #8d2b2b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1),
    0 6px 14px rgba(141, 43, 43, 0.24);
}
.tile-ico .icon { width: 21px; height: 21px; stroke-width: 1.9; }
.tile-ico.mint { background: linear-gradient(160deg, #64cfa6, #1f8562); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(31,133,98,.24); }
.tile-ico.violet { background: linear-gradient(160deg, #a795f5, #6f5ad6); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(111,90,214,.24); }
.tile-ico.amber { background: linear-gradient(160deg, #f2b968, #d1842c); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(209,132,44,.24); }
.tile-ico.blue { background: linear-gradient(160deg, #66b0f5, #2f6fd0); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(47,111,208,.24); }
.tile-ico.sm { width: 34px; height: 34px; border-radius: 11px; }
.tile-ico.sm .icon { width: 17px; height: 17px; }

/* ================================================================
   iOS 系统弹窗
   ================================================================ */

/* -------------------------------------------------- Alert（居中）
   iOS 26：更圆润的大圆角、半透明玻璃、顶部 sheen 高光、弹簧入场 */
.alert-layer { display: grid; place-items: center; padding: 24px; }
.alert-card {
  position: relative;
  width: min(272px, 100%);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(252, 252, 254, 0.9), rgba(246, 245, 250, 0.84));
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  box-shadow:
    0 30px 70px rgba(20, 16, 32, 0.3),
    0 8px 20px rgba(20, 16, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  transform: scale(1.16);
  opacity: 0;
  transition: transform 0.46s var(--ios-spring), opacity 0.2s var(--ease-soft);
}
.alert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  pointer-events: none;
}
.overlay.open .alert-card { transform: none; opacity: 1; }
.overlay.stacked .alert-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(250, 250, 252, 0.98); }
.alert-body { padding: 21px 18px 16px; text-align: center; }
.alert-body h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ios-label);
}
.alert-body p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ios-label-2);
  letter-spacing: -0.01em;
}
.alert-actions { display: flex; border-top: 0.5px solid var(--ios-sep); }
.alert-btn {
  flex: 1 1 0;
  min-height: 44px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ios-label);
  cursor: pointer;
  transition: background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.alert-btn + .alert-btn { border-left: 0.5px solid var(--ios-sep); }
.alert-btn:active { background: rgba(120, 120, 128, 0.12); }
.alert-btn.is-primary { font-weight: 600; }
.alert-btn.is-danger { color: #ff3b30; font-weight: 400; }

/* -------------------------------------------------- Action Sheet（底部成组） */
.action-layer {
  display: grid;
  place-items: end center;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 18, 28, 0.12);
}
.action-sheet {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(28px) scale(0.985);
  opacity: 0;
  transition: transform 0.46s var(--ios-spring), opacity 0.26s var(--ease-soft);
}
.overlay.open .action-sheet { transform: none; opacity: 1; }
.as-group {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(172deg, rgba(253, 253, 255, 0.86), rgba(248, 247, 252, 0.8));
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  box-shadow:
    0 22px 56px rgba(20, 16, 32, 0.24),
    0 6px 16px rgba(20, 16, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}
.as-group::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  pointer-events: none;
}
.overlay.stacked .as-group { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(250, 250, 252, 0.98); }
.as-title {
  padding: 14px 16px 12px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ios-label-2);
  border-bottom: 0.5px solid var(--ios-sep);
}
.as-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: none;
  border-top: 0.5px solid var(--ios-sep);
  background: transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ios-tint);
  cursor: pointer;
  transition: background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.as-item:first-child { border-top: none; }
.as-title + .as-item { border-top: none; }
.as-item:active { background: rgba(120, 120, 128, 0.14); }
.as-item.is-danger { color: #ff3b30; }
.as-item.is-primary { font-weight: 600; }
.as-item .as-check { display: inline-flex; color: var(--ios-tint); }
.as-item .as-check .icon { width: 15px; height: 15px; stroke-width: 2.6; }

.as-cancel {
  position: relative;
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(172deg, rgba(254, 254, 255, 0.9), rgba(250, 249, 253, 0.84));
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  box-shadow:
    0 14px 38px rgba(20, 16, 32, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ios-tint);
  cursor: pointer;
  transition: background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.as-cancel::before {
  content: '';
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  pointer-events: none;
}
.as-cancel:active { background: rgba(120, 120, 128, 0.16); }

@media (min-width: 641px) {
  .action-layer { place-items: center; }
  .action-sheet { transform: scale(0.94); }
}

/* ================================================================
   表白墙 · 纸条卡片
   ----------------------------------------------------------------
   和「发帖」的朋友圈流拉开距离：表白墙更像是贴在墙上的便签，
   正文大字、行距松、署名与时间在顶部，操作收在底部一行。
   ================================================================ */
.wall-card {
  position: relative;
  padding: 15px 17px 9px;
  margin-bottom: 12px;
  border-radius: 22px;
  background: linear-gradient(168deg, #fffefd 0%, #fdf6f4 100%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(122, 62, 62, 0.07), inset 0 1px 0 #fff;
  animation: fadeUp 0.45s var(--ease) both;
  overflow: hidden;
}
/* 纸面底部一层极淡的暖色，避免大面积纯白 */
.wall-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(200deg, rgba(255, 255, 255, 0) 55%, rgba(196, 120, 108, 0.045) 100%);
}
.wall-top { display: flex; align-items: center; gap: 9px; }
.wall-avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.wall-who { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.wall-name { font-size: 13.5px; font-weight: 600; color: var(--accent-deep); letter-spacing: -0.01em; }
.wall-who .uid { font-size: 11px; color: var(--ink-3); }
.wall-time { font-size: 11.5px; color: var(--ink-3); flex: none; }
.wall-text {
  margin: 11px 0 6px;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.012em;
  color: #35313a;
  word-break: break-word;
}
.wall-foot { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.wall-foot .act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.wall-foot .act .icon { width: 15px; height: 15px; }
.wall-foot .act:active { background: rgba(160, 58, 58, 0.08); }
.wall-foot .act.liked { color: var(--accent); font-weight: 600; }
.wall-foot .act.liked .icon { stroke: url(#g-brand); stroke-width: 2; }

/* ================================================================
   发帖页 · 朋友圈式动态流
   ================================================================ */

/* -------------------------------------------------- 发布区 */
.moment-compose {
  padding: 13px 14px 11px;
  margin-bottom: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 10px 28px rgba(70, 40, 56, 0.08), inset 0 1px 0 #fff, inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
}
.mc-row { display: flex; align-items: flex-start; gap: 10px; }
.mc-avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; font-weight: 600; flex: none; }
#content {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 220px;
  padding: 9px 2px;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ios-label);
  overflow-y: auto;
}
#content::placeholder { color: var(--ios-label-3); }

.mc-imgs { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 2px 48px; align-items: start; }
.mc-imgs.has { display: grid; }
.mc-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(120, 120, 128, 0.1); }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-thumb.loading { display: grid; place-items: center; }
.mc-thumb .spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(120, 120, 128, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mc-thumb-x {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 18, 24, 0.55);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mc-thumb-x .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.mc-add {
  aspect-ratio: 1;
  border: 1px dashed rgba(120, 120, 128, 0.34);
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.05);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.mc-add:hover { background: rgba(120, 120, 128, 0.1); }
.mc-add .icon { width: 20px; height: 20px; stroke-width: 1.8; }

.mc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 0.5px solid var(--ios-sep); }
.mc-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px 6px 8px;
  border: none;
  border-radius: 999px;
  background: var(--ios-fill);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ios-tint);
  cursor: pointer;
  transition: background 0.2s ease;
}
.mc-tool::before {
  content: "";
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: var(--msk) center/contain no-repeat;
  mask: var(--msk) center/contain no-repeat;
}
.mc-tool { --msk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.4' y='4.4' width='17.2' height='15.2' rx='3.2'/%3E%3Ccircle cx='8.8' cy='9.6' r='1.6'/%3E%3Cpath d='m4.4 17 4.8-4.6 3.4 3 3-3.4 4.4 5'/%3E%3C/svg%3E"); }
.mc-tool:hover { background: var(--ios-fill-2); }
.mc-foot .hint { font-size: 11.5px; }
.mc-foot .btn-sm { min-height: 34px; padding: 7px 18px; }
.mc-foot .btn-primary:disabled { opacity: 0.45; pointer-events: none; box-shadow: none; }
.moment-compose.locked { opacity: 0.72; }

/* -------------------------------------------------- 动态卡片 */
.moment-feed { display: block; }
.moment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 15px 15px 10px;
  margin-bottom: 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 9px 24px rgba(70, 40, 56, 0.07), inset 0 1px 0 #fff, inset 0 0 0 0.5px rgba(255, 255, 255, 0.65);
  animation: fadeUp 0.42s var(--ease) both;
}
.moment-avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 14.5px; font-weight: 600; }
.moment-main { min-width: 0; }
.moment-name { font-size: 14.5px; font-weight: 600; color: var(--accent-deep); letter-spacing: -0.01em; line-height: 1.3; }
.moment-name .uid { margin-left: 5px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.moment-text { margin: 5px 0 0; font-size: 15px; line-height: 1.64; color: #2f2d36; letter-spacing: 0.004em; word-break: break-word; }

.moment-imgs { display: grid; gap: 4px; margin-top: 9px; align-items: start; }
.moment-imgs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  background: rgba(120, 120, 128, 0.08);
  cursor: zoom-in;
  transition: transform 0.25s var(--ease);
}
.moment-imgs img:active { transform: scale(0.985); }
.moment-imgs.n-1 { grid-template-columns: minmax(0, 62%); }
.moment-imgs.n-1 img { aspect-ratio: 4 / 3; border-radius: 10px; }
.moment-imgs.n-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.moment-imgs.n-2 img { aspect-ratio: 1; }
.moment-imgs.n-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.moment-imgs:not(.n-1):not(.n-2):not(.n-4) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.moment-foot { display: flex; align-items: center; gap: 1px; margin-top: 7px; }
.moment-foot .meta { font-size: 11.5px; color: var(--ink-3); margin-right: 4px; }
.mact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.mact .icon { width: 15px; height: 15px; }
.mact:hover { background: rgba(120, 120, 128, 0.09); }
.mact.liked { color: var(--accent); font-weight: 600; }
.mact.liked .icon { stroke: url(#g-brand); stroke-width: 2; }

/* -------------------------------------------------- 大图查看 */
.img-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 10, 16, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.24s ease;
  cursor: zoom-out;
}
.img-viewer.open { opacity: 1; }
.img-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.26s var(--ios-ease);
}
.img-viewer.open img { transform: none; }

@media (max-width: 640px) {
  .wall-card { padding: 14px 15px 8px; border-radius: 18px; }
  .wall-text { font-size: 15.5px; line-height: 1.78; }
  .moment { padding: 13px 13px 9px; border-radius: 18px; grid-template-columns: 38px minmax(0, 1fr); }
  .moment-avatar { width: 38px; height: 38px; border-radius: 10px; }
  .moment-imgs.n-1 { grid-template-columns: minmax(0, 68%); }
}

/* ================================================================
   「我的」页：iOS 式分组 + 退出登录
   ================================================================ */
.set-group {
  margin-bottom: 12px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 9px 24px rgba(70, 40, 56, 0.07), inset 0 1px 0 #fff, inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
}
.group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 16px 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ios-label-2);
}
.group-head .icon { width: 14px; height: 14px; }
.grow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-top: 0.5px solid var(--ios-sep);
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--ios-label);
  cursor: pointer;
  transition: background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.group-head + .grow-row { border-top: none; }
button.grow-row:active { background: rgba(120, 120, 128, 0.1); }
.grow-row .gr-body { flex: 1; min-width: 0; }
.grow-row .gr-title { font-size: 14.5px; letter-spacing: -0.01em; }
.grow-row .gr-sub { margin-top: 3px; font-size: 11.5px; color: var(--ios-label-2); line-height: 1.4; }
.grow-row .gr-val { font-size: 13.5px; color: var(--ios-label-2); flex: none; }
.grow-row .chev { color: var(--ios-label-3); display: inline-flex; flex: none; }
.grow-row .chev .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.grow-row.danger .gr-title { color: #d70015; }

.logout-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-bottom: 14px;
  border: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 9px 24px rgba(70, 40, 56, 0.06), inset 0 1px 0 #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #d70015;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.logout-row .icon { width: 17px; height: 17px; }
.logout-row:active { background: rgba(255, 59, 48, 0.08); transform: scale(0.99); }

/* 分组行的文字与链接复位 */
.grow-row .gr-title,
.grow-row .gr-sub { display: block; }
a.grow-row { text-decoration: none; color: var(--ios-label); }
.logout-row span { display: inline-flex; }

/* ================================================================
   设置页新增：统计条 / iOS 开关 / 三段分段 / FAQ
   ================================================================ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.stat-cell {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
  border-radius: 14px;
  background: rgba(120, 120, 128, 0.08);
}
.stat-cell b { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent-deep); }
.stat-cell span { font-size: 11px; color: var(--ink-3); }

.ios-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.22);
  cursor: pointer;
  transition: background 0.24s ease;
  -webkit-tap-highlight-color: transparent;
}
.ios-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.26s var(--ios-ease);
}
.ios-switch.on { background: #34c759; }
.ios-switch.on::after { transform: translateX(18px); }

.tabs.seg3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
  min-width: 168px;
}
.tabs.seg3 .tab { padding: 7px 4px; font-size: 12.5px; }

.faq-list { display: grid; gap: 10px; text-align: left; }
.faq-item { padding: 12px 14px; border-radius: 14px; background: rgba(120, 120, 128, 0.08); }
.faq-item .q { font-size: 13.5px; font-weight: 600; color: var(--ios-label); margin-bottom: 4px; }
.faq-item .a { font-size: 12.5px; line-height: 1.65; color: var(--ios-label-2); }

@media (max-width: 640px) {
  .tabs.seg3 { min-width: 0; }
}

/* ================================================================
   深色模式（html[data-theme="dark"]）
   ----------------------------------------------------------------
   跟随系统或手动切换：变量整体反转 + 对最常见表面做定向覆盖，
   保留品牌砖红与玻璃高光，只把「纸面」换成「夜幕」。
   ================================================================ */
html[data-theme="dark"] {
  --ink: #eceaf2;
  --ink-2: #b8b5c6;
  --ink-3: #8a879b;
  --line: rgba(235, 230, 255, 0.12);
  --line-strong: rgba(235, 230, 255, 0.22);
  --accent: #d96a63;
  --accent-deep: #e88a80;
  --accent-soft: rgba(217, 106, 99, 0.16);
  --glass: rgba(38, 36, 48, 0.6);
  --glass-strong: rgba(44, 42, 56, 0.82);
  --glass-weak: rgba(38, 36, 48, 0.42);
  --glass-fill: rgba(52, 50, 66, 0.72);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.44);
  color-scheme: dark;

  /* iOS 视觉层变量同步反转，否则分组标题/输入占位/分段控件会糊成一片 */
  --ios-label: #eceaf2;
  --ios-label-2: rgba(235, 232, 245, 0.64);
  --ios-label-3: rgba(235, 232, 245, 0.34);
  --ios-fill: rgba(120, 120, 128, 0.28);
  --ios-fill-2: rgba(120, 120, 128, 0.42);
  --ios-sep: rgba(235, 232, 245, 0.14);
  --ios-tint: #ff9f97;
}
html[data-theme="dark"] body {
  background: #16141d;
  color: var(--ink);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(780px 560px at 0% -12%, rgba(150, 66, 58, 0.4) 0%, rgba(150, 66, 58, 0) 60%),
    radial-gradient(640px 500px at 100% 0%, rgba(94, 78, 160, 0.28) 0%, rgba(94, 78, 160, 0) 62%),
    radial-gradient(720px 620px at 50% 110%, rgba(36, 100, 82, 0.22) 0%, rgba(36, 100, 82, 0) 60%);
}
html[data-theme="dark"] .glass,
html[data-theme="dark"] .card.glass {
  background: linear-gradient(158deg, rgba(52, 50, 66, 0.78) 0%, rgba(44, 42, 56, 0.55) 46%, rgba(50, 48, 64, 0.7) 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow);
}
html[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(48, 46, 60, 0.95), rgba(42, 40, 54, 0.88));
  border-color: rgba(255, 255, 255, 0.09);
}
html[data-theme="dark"] .input-wrap {
  background: rgba(60, 58, 76, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .input-wrap input:focus,
html[data-theme="dark"] .input-wrap textarea:focus { background: rgba(66, 64, 84, 0.85); }
html[data-theme="dark"] .set-group,
html[data-theme="dark"] .grow-row,
html[data-theme="dark"] a.grow-row {
  background: rgba(48, 46, 60, 0.85);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .logout-row {
  background: rgba(48, 46, 60, 0.85);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .btn-primary {
  background: linear-gradient(180deg, #c85a54, #9d3a38);
}
html[data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .stat-cell { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .stat-cell b { color: var(--accent-deep); }
html[data-theme="dark"] .key-box {
  background: rgba(60, 58, 76, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .wall-card {
  background: linear-gradient(168deg, #322f3e 0%, #2c2836 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .wall-card::before {
  background: linear-gradient(200deg, rgba(255, 255, 255, 0) 55%, rgba(217, 106, 99, 0.07) 100%);
}
html[data-theme="dark"] .wall-text { color: #e8e5ef; }
html[data-theme="dark"] .moment,
html[data-theme="dark"] .moment-compose {
  background: rgba(48, 46, 60, 0.88);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .moment-text { color: #e4e1ec; }
html[data-theme="dark"] .comment-box { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .comment-form input { background: rgba(60, 58, 76, 0.7); color: var(--ink); }
html[data-theme="dark"] .mc-imgs .mc-add { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05); }
html[data-theme="dark"] .tabbar {
  background: linear-gradient(180deg, rgba(48, 46, 62, 0.62), rgba(38, 36, 50, 0.5));
  backdrop-filter: blur(32px) saturate(180%) brightness(0.9);
  -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(0.9);
}
html[data-theme="dark"] .tab-item { color: #a09db3; }
html[data-theme="dark"] .tab-item.active { color: var(--accent-deep); }
html[data-theme="dark"] .tab-item.active::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(130% 130% at 50% -14%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.12) 42%, rgba(255, 255, 255, 0.07) 74%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .alert-card {
  background: linear-gradient(170deg, rgba(52, 50, 66, 0.88), rgba(44, 42, 56, 0.84));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .alert-card::before,
html[data-theme="dark"] .as-group::before,
html[data-theme="dark"] .as-cancel::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
}
html[data-theme="dark"] .as-group,
html[data-theme="dark"] .as-cancel {
  background: linear-gradient(172deg, rgba(52, 50, 66, 0.88), rgba(44, 42, 56, 0.84));
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.46),
    0 6px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .alert-btn:active,
html[data-theme="dark"] .as-item:active { background: rgba(255, 255, 255, 0.09); }
html[data-theme="dark"] .msg-item {
  background: rgba(48, 46, 60, 0.88);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .sheet {
  background: linear-gradient(168deg, rgba(50, 48, 64, 0.9), rgba(42, 40, 54, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 36px 88px rgba(0, 0, 0, 0.5),
    0 10px 26px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .sheet::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
}
html[data-theme="dark"] .sheet::after {
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.08), transparent 76%);
}
html[data-theme="dark"] .toast {
  background: linear-gradient(170deg, rgba(52, 50, 66, 0.88), rgba(44, 42, 56, 0.82));
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .overlay.stacked .sheet { background: rgba(48, 46, 60, 0.99); }
html[data-theme="dark"] .form-note { background: rgba(255, 255, 255, 0.07); color: var(--ink-2); }
html[data-theme="dark"] .tabs { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] .tab { color: var(--ink-2); }
html[data-theme="dark"] .tab.active {
  background: linear-gradient(180deg, #ffffff, #e8e6f0);
  color: #241f30;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .check .box { background: rgba(255, 255, 255, 0.14); }
html[data-theme="dark"] .badge { filter: none; }
html[data-theme="dark"] .hint { color: var(--ink-3); }
html[data-theme="dark"] .compose textarea {
  color: var(--ink);
  background: rgba(60, 58, 76, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .compose textarea::placeholder,
html[data-theme="dark"] .input-wrap input::placeholder,
html[data-theme="dark"] .input-wrap textarea::placeholder { color: rgba(235, 232, 245, 0.34); }
html[data-theme="dark"] .compose textarea:focus { background: rgba(66, 64, 84, 0.85); border-color: rgba(217, 106, 99, 0.4); }
html[data-theme="dark"] #content { color: var(--ink); }
html[data-theme="dark"] #content::placeholder { color: var(--ios-label-3); }
html[data-theme="dark"] .content-cell, html[data-theme="dark"] .tbl-empty { color: var(--ink-2); }
html[data-theme="dark"] .site-footer { color: var(--ink-3); }

/* ==========================================================================
   站点公告：横幅轮播卡片 + 弹窗公告列表
   ========================================================================== */
.ann-banner { margin: 16px 0 4px; }
.ann-banner.hidden { display: none; }

.ann-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 20px;
}
.ann-track::-webkit-scrollbar { display: none; }

.ann-card {
  position: relative;
  flex: 0 0 100%;
  min-height: 118px;
  scroll-snap-align: start;
  border-radius: 20px;
  padding: 18px 20px 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px -12px rgba(60, 24, 20, 0.45);
}
.ann-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 88% -10%, rgba(255, 255, 255, 0.28), transparent 55%);
  pointer-events: none;
}
.ann-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ann-tag .icon { width: 12px; height: 12px; }
.ann-title {
  margin: 10px 0 5px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.ann-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 86%;
}
.ann-ghost-ico {
  position: absolute;
  right: -8px;
  bottom: -14px;
  opacity: 0.16;
  pointer-events: none;
}
.ann-ghost-ico .icon { width: 92px; height: 92px; }

.ann-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.ann-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--ios-fill-2, rgba(120, 110, 110, 0.35));
  transition: all 0.3s ease;
  cursor: pointer;
}
.ann-dot.active {
  width: 18px;
  background: var(--accent, #a03a3a);
}

/* 弹窗公告列表 */
.ann-pop-list { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.ann-pop-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--ios-fill, rgba(255, 255, 255, 0.72));
  border: 1px solid var(--ios-sep, rgba(120, 100, 100, 0.14));
}
.ann-pop-head { display: flex; align-items: baseline; gap: 8px; }
.ann-pop-title { font-weight: 800; font-size: 14.5px; color: var(--ink); flex: 1; }
.ann-pop-date { font-size: 11.5px; color: var(--ink-3); }
.ann-pop-text { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* 后台公告管理 */
.ann-kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.ann-kind-badge.banner { background: rgba(79, 148, 232, 0.14); color: #2f6fd0; }
.ann-kind-badge.popup { background: rgba(242, 185, 104, 0.2); color: #b06f14; }
.ann-color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }

html[data-theme="dark"] .ann-pop-item {
  background: rgba(66, 64, 84, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .ann-dot { background: rgba(255, 255, 255, 0.22); }

/* 公告管理：配色选择器 */
.ann-color-row { display: flex; gap: 10px; }
.ann-color-pick {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid transparent; cursor: pointer;
  box-shadow: 0 3px 8px -3px rgba(0,0,0,.3);
  transition: transform .15s ease, border-color .15s ease;
}
.ann-color-pick:hover { transform: scale(1.08); }
.ann-color-pick.active { border-color: var(--ink); transform: scale(1.1); }
.tabs.seg2 { display: flex; gap: 4px; background: var(--ios-fill-2, rgba(120,110,110,.12)); border-radius: 12px; padding: 4px; }
.tabs.seg2 .tab { flex: 1; border: none; background: transparent; border-radius: 9px; padding: 8px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.tabs.seg2 .tab.active { background: var(--card, #fff); font-weight: 700; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* 深色模式 + 叠层弹窗：stacked 的浅色实底不能压过暗色玻璃 */
html[data-theme="dark"] .overlay.stacked .alert-card,
html[data-theme="dark"] .overlay.stacked .as-group,
html[data-theme="dark"] .overlay.stacked .as-cancel {
  background: rgba(46, 44, 58, 0.99);
}

/* ==========================================================================
   iOS 26 信息型 Alert：居中窄卡片、可滚动正文、顶部玻璃图标、横排文字按钮
   ========================================================================== */
.alert-card.wide { width: min(322px, 100%); }
.alert-ico {
  width: 46px; height: 46px;
  margin: 20px auto 0;
  display: grid; place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(160deg, #f2b968, #d1842c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 6px 14px rgba(209, 132, 44, 0.28);
}
.alert-ico .icon { width: 22px; height: 22px; stroke-width: 1.9; }
.alert-ico.tone-blue { background: linear-gradient(160deg, #66b0f5, #2f6fd0); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(47,111,208,.28); }
.alert-ico.tone-danger { background: linear-gradient(160deg, #f0867c, #b03a30); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(176,58,48,.28); }
.alert-ico.tone-mint { background: linear-gradient(160deg, #64cfa6, #1f8562); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(31,133,98,.28); }
.alert-ico.tone-violet { background: linear-gradient(160deg, #a795f5, #6f5ad6); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 14px rgba(111,90,214,.28); }

.alert-scroll {
  max-height: 44vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px 6px;
}
.alert-scroll:empty { display: none; }
/* 弹窗里的条目改为扁平分组样式（贴 iOS 分组列表） */
.alert-scroll .ann-pop-item {
  background: var(--ios-fill);
  border: none;
  border-radius: 14px;
  padding: 11px 13px;
}
.alert-scroll .ann-pop-item + .ann-pop-item { margin-top: 8px; }
.alert-scroll .faq-item { background: var(--ios-fill); border: none; border-radius: 14px; }
.alert-scroll .faq-item + .faq-item { margin-top: 8px; }
.alert-scroll .faq-item .q { text-align: left; }
.alert-scroll .faq-item .a { text-align: left; }
.alert-scroll .form-note { border-radius: 14px; }

/* ==========================================================================
   真 iOS 弹窗修正层（对照系统 Alert 截图校准）
   规则：重点文字加黑（700/600），非重点一律常规字重（400）；
   卡片近乎纯白磨砂；内容条目不用色块，用 iOS 发丝线分隔。
   ========================================================================== */
.alert-card {
  background: linear-gradient(172deg, rgba(255, 255, 255, 0.97), rgba(250, 250, 252, 0.94));
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  box-shadow:
    0 30px 70px rgba(20, 16, 32, 0.3),
    0 8px 20px rgba(20, 16, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
/* 标题 = 重点 → 加黑 */
.alert-body h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
/* 副文/正文 = 非重点 → 常规字重 */
.alert-body p { font-size: 13.5px; font-weight: 400; }
/* 按钮：非重点常规字重，主操作（确认类）加黑 */
.alert-btn { font-weight: 400; }
.alert-btn.is-primary { font-weight: 600; }

/* 弹窗内容条目：去掉灰色色块，改成 iOS 原生的发丝线分隔列表 */
.alert-scroll { padding: 0 16px 4px; }
.alert-scroll .ann-pop-item,
.alert-scroll .faq-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 2px;
}
.alert-scroll .ann-pop-item + .ann-pop-item,
.alert-scroll .faq-item + .faq-item {
  margin-top: 0;
  border-top: 0.5px solid var(--ios-sep);
}
/* 条目标题 = 重点 → 加黑；正文/日期 = 非重点 → 常规 */
.alert-scroll .ann-pop-head { margin-bottom: 2px; }
.alert-scroll .ann-pop-title { font-weight: 700; font-size: 14px; color: var(--ios-label); }
.alert-scroll .ann-pop-date { font-weight: 400; font-size: 12px; color: var(--ios-label-3); }
.alert-scroll .ann-pop-text { font-weight: 400; font-size: 13px; line-height: 1.6; color: var(--ios-label-2); }
.alert-scroll .faq-item .q { font-weight: 700; font-size: 13.5px; }
.alert-scroll .faq-item .a { font-weight: 400; font-size: 12.5px; }
.alert-scroll .form-note { font-weight: 400; }

/* sheet（表单弹窗）同样校准字重层级 */
.sheet h3 { font-weight: 700; }
.sheet .sheet-sub { font-weight: 400; }

/* 深色模式：近实暗磨砂 + 暗色发丝线 */
html[data-theme="dark"] .alert-card {
  background: linear-gradient(172deg, rgba(54, 52, 68, 0.98), rgba(46, 44, 58, 0.96));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .alert-scroll .ann-pop-item + .ann-pop-item,
html[data-theme="dark"] .alert-scroll .faq-item + .faq-item {
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* 按钮文字用系统 tint 色（对照系统 Alert：允许/不允许均为蓝色） */
.alert-btn { color: var(--ios-tint); }
.alert-btn.is-danger { color: #ff3b30; }

/* 深色下弹窗内条目同样保持透明（发丝线分隔） */
html[data-theme="dark"] .alert-scroll .ann-pop-item,
html[data-theme="dark"] .alert-scroll .faq-item {
  background: transparent;
  border-radius: 0;
}

/* ==========================================================================
   过渡动画优化：跨页面平滑切换 + 底栏入场
   ========================================================================== */
/* 跨文档 View Transitions：页面间淡出上移 → 淡入下落（Chrome 126+ 生效，
   其他浏览器自动降级为普通跳转，无副作用） */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.2s ease both; }
::view-transition-new(root) { animation: vtIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(12px); } }

/* 底部 Dock 入场：从下方轻浮上来（注意保持居中的 translateX(-50%)） */
.tabbar { animation: tabbarIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both; }
@keyframes tabbarIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%); }
}
