[hidden] { display: none !important; }

/* VRC 足浴 — 视觉令牌
 *
 * 形状语言继承上一版（斜切角骨架），气质改到「深夜的私人会所」：
 * 深酒红丝绒底、玫瑰色灯光、暖白正文。底特律那套的骨架留住了，仪器味拆掉了。
 *
 * 留下来的（用户认可的）：
 *   1. 斜切角（chamfer）。45° 一刀切掉角，形状就不"圆滑"了 —— 圆角是生成器的签名。
 *      不用 clip-path：它会把描边一起切掉，斜边上就没线；而且滚动容器里描边不跟内容走。
 *      改用 8 层背景渐变：外 4 层描边色、内 4 层填充色，错开 1.4px → 斜边留一道 1px 线。
 *   2. 发丝线（1px）。层级靠线的明暗，不靠大阴影。
 *   3. 面板四角的 L 形角标（取景框语言）。只给几个大面板，加满会吵。
 *   4. 菱形标记，不用圆点。
 *
 * 拆掉的（"过于科技化"的来源）：
 *   - 网格背景、CRT 扫描线、12 秒扫掠光带
 *   - 两侧刻度轨、顶栏的 "link · ok" 读数标签
 *   - 弹层开场的扫描线动画
 *
 * 可读性（上一版真正的问题）：
 *   - 正文 15 → 16px，次级文字从 #92AEBF 提亮到 #C6A9BE
 *   - 中文一律取消宽字距（.18em/.2em 是给拉丁小字用的，中文配宽字距是灾难）
 *   - 行高 1.6 → 1.66
 *
 * 硬约束（别破）：
 *   - [hidden] 必须在最前：否则 .tabbar / .modal-mask 的 display:flex 会盖掉 hidden，
 *     隐藏的全屏遮罩会吃掉所有点击（页面看着正常但完全点不动）
 *   - 数字、编码、计数一律等宽 + tabular-nums
 */

:root {
  /* 表面：暖黑紫，一层层提亮表示层级（不是冷石墨） */
  --bg:          #0C0710;
  --surface-1:   #150E1A;
  --surface-2:   #1D1323;
  --surface-3:   #291A2F;
  --border:      #3A2542;
  --border-soft: #26182C;

  /* 文字：暖白。次级文字刻意提亮 —— 深底上灰蓝小字是读不清的头号原因 */
  --text-1: #F4ECF1;
  --text-2: #C6A9BE;
  --text-3: #94789A;

  /* 强调色：玫瑰。全站仅此一个彩色 */
  --accent:      #E88BA8;
  --accent-hi:   #F7B4C8;
  --accent-dim:  #A8597A;
  --on-accent:   #2E0C1A;

  /* 强调色的浅底 = 把 accent 按低透明度叠在暗底上之后得到的不透明色。
   * 为什么要手算：见上面那条 ⚠️（--fill 不能半透明）。 */
  --tint-1: #2C1C2A;   /* ≈ accent 11% over surface-1 —— 选中态、悬停态 */
  --tint-alert: #1E121C;/* ≈ accent 8% over bg —— 顶部提醒条 */
  --tint-danger: #2A1416;/* ≈ danger 11% over bg */

  /* 状态：薄荷=在线、暖金=待处理、红=异常。饱和度都压过，免得跳出来抢视线 */
  --online:  #6FD3A6;
  --busy:    #E3B36A;
  --offline: #94789A;
  --danger:  #E0665F;

  /* 排版：字阶拉开。全站只有两三档字号是 AI 味的来源之一 */
  --fs-display: 30px;
  --fs-title:   22px;
  --fs-head:    17px;
  --fs-body:    16px;
  --fs-sm:      14.5px;
  --fs-cap:     13.5px;
  --fs-micro:   12px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;

  --dur: .14s;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  background: var(--bg);
  color-scheme: dark;   /* 深色滚动条：不然 Windows 上会拖一条亮灰出来毁掉整套配色 */
}

body {
  margin: 0;
  padding: 0 0 84px;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 两团很弱的暖光：左上偏冷白、右下偏玫瑰。丝绒是"光打出来的"，不是平涂的 */
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%,  rgba(232, 139, 168, .085), transparent 64%),
    radial-gradient(760px 460px at 92% 108%, rgba(120, 60, 110, .11),   transparent 66%);
  background-attachment: fixed;
}
body.no-tabs { padding-bottom: 28px; }

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 数字、计数、编码统一感：等宽 + 表格数字（正文不用等宽，那是上一版读不清的原因之一） */
.num, .bigcode, .badge, .tab .dot, .section-title .n, .stat .num, .msg-time, .pill {
  font-variant-numeric: tabular-nums;
}
.num, .bigcode, .badge, .tab .dot, .stat .num {
  font-family: var(--font-mono);
}

:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* 内联图标：硬边描边（方头方尾）。圆头圆角 = 消费级 App 的图标语言 */
.ico {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }

/* ==================================================================
   倒角底板（斜切角 + 1px 描边）
   ------------------------------------------------------------------
   8 层背景：前 4 层是填充色（切角比描边大 1.4px），后 4 层是描边色。
   两者错开，斜边上就留下一道 1px 的线 —— clip-path 做不到这一点，
   而且 clip-path 在滚动容器里会把描边留在原地，这里不会。

   用法：只改四个变量，不要碰 background-image。
     --cut   斜切大小    --line  描边色    --fill  填充色
     --ctl/--ctr/--cbr/--cbl  单边覆写（聊天气泡的"尖角"用它）

   ⚠️ --fill 必须写**不透明色**。
      这 4 层描边其实是「铺满整个面、只在斜边留一道 1.4px 的缝」，
      填充再盖上去 —— 所以 --fill 一旦半透明，内层描边色就会整片透出来。
      （踩过一次：.opt.on 写成 rgba(...)，整行变成实心强调色，字都糊了。）
      要半透明效果就自己先算好叠加后的不透明色，见下面的 --tint 系列。

   ⚠️ --cut 是"角到切线的垂距"，边上切口长度 = cut × 1.414。
      矮控件（按钮/气泡/toast）必须用 4–5px，否则切掉三分之一高度。
   ================================================================== */
:where(
  .card, .pfx, .poke, .stat, .modal, .list-item, .btn, .input, .textarea, .select,
  .opt, .chip, .seg, .empty, .notice, .alert, .drop, .toast, .bubble,
  .stack, .panel, .gate .panel, .bigcode, .note, .review,
  .veil-box, .net-bar
) {
  --cut: 9px;
  --ctl: var(--cut); --ctr: var(--cut); --cbr: var(--cut); --cbl: var(--cut);
  --line: var(--border);
  --fill: var(--surface-1);
  position: relative;
  z-index: 0;
  background-color: transparent;
  background-image:
    linear-gradient(135deg, transparent 0 calc(var(--ctl) + 1.4px), var(--fill) 0),
    linear-gradient(225deg, transparent 0 calc(var(--ctr) + 1.4px), var(--fill) 0),
    linear-gradient(315deg, transparent 0 calc(var(--cbr) + 1.4px), var(--fill) 0),
    linear-gradient(45deg,  transparent 0 calc(var(--cbl) + 1.4px), var(--fill) 0),
    linear-gradient(135deg, transparent 0 var(--ctl), var(--line) 0),
    linear-gradient(225deg, transparent 0 var(--ctr), var(--line) 0),
    linear-gradient(315deg, transparent 0 var(--cbr), var(--line) 0),
    linear-gradient(45deg,  transparent 0 var(--cbl), var(--line) 0);
  background-position:
    left top, right top, right bottom, left bottom,
    left top, right top, right bottom, left bottom;
  background-size: 50.5% 50.5%;
  background-repeat: no-repeat;
}

/* 小元件不需要描边，直接切角（它们是实心的，靠色差立起来） */
:where(.pill, .tag, .badge, .avatar, .avatar-btn, .tab .dot, .bell .dot, .rate-tag, .grad, .tint) {
  --cut: 5px;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
}

/* 角标：面板四角的 L 形短线。整套界面里最"底特律"的一笔。
 * 只给三个大面板用 —— 上一版给七八个元件都挂上，一屏全是取景框，吵。 */
:where(.card, .modal, .gate .panel, .drop)::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 1;
  pointer-events: none;
  opacity: .3;
  background-image:
    linear-gradient(var(--accent) 0 0), linear-gradient(var(--accent) 0 0),
    linear-gradient(var(--accent) 0 0), linear-gradient(var(--accent) 0 0),
    linear-gradient(var(--accent) 0 0), linear-gradient(var(--accent) 0 0),
    linear-gradient(var(--accent) 0 0), linear-gradient(var(--accent) 0 0);
  background-position:
    left top, left top, right top, right top,
    left bottom, left bottom, right bottom, right bottom;
  background-size:
    9px 1px, 1px 9px, 9px 1px, 1px 9px,
    9px 1px, 1px 9px, 9px 1px, 1px 9px;
  background-repeat: no-repeat;
}
/* 列表里的行不加角标：一屏十几个取景框会糊成一片 */
.stack > *::after { content: none; }

/* ===================== 顶栏 ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 54px;
  padding: 0 18px;
  background: rgba(12, 7, 16, .92);
  backdrop-filter: saturate(130%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
/* 发丝线左端接一小段亮线：起点标记，比全线高亮安静 */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 84px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(232, 139, 168, .6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .01em;
}
.brand .mark { display: flex; color: var(--accent); animation: soft-pulse 5s ease-in-out infinite; }
.brand .sub { font-weight: 400; color: var(--text-3); font-size: var(--fs-micro); }
@keyframes soft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

.tb-right { display: flex; align-items: center; gap: 10px; }

.avatar-btn {
  --cut: 5px;
  padding: 0;
  width: 32px; height: 32px;
  border: 0;
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background var(--dur) var(--ease);
}
.avatar-btn:hover { background: var(--surface-3); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 顶栏铃铛：未读时亮起来 */
.bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.bell:hover { color: var(--text-2); }
.bell.on { color: var(--accent); }
.bell .dot {
  --cut: 3px;
  position: absolute;
  top: -3px; right: -4px;
  min-width: 15px; height: 15px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  font-style: normal;
}

/* ===================== 被点提醒条 =====================
 * 填充刻意很淡：它是全宽的一条，实心亮色会喧宾夺主。
 * 左边一小段竖条用来“起个头”，其余靠文字。 */
.alert {
  --cut: 6px;
  --line: rgba(232, 139, 168, .3);
  --fill: var(--tint-alert);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 10px 13px;
  cursor: pointer;
}
.alert:active { --fill: #241621; }
.alert .k { display: flex; color: var(--accent); }
.alert .t { flex: 1; font-size: var(--fs-sm); color: var(--text-1); }
.alert .t b { font-family: var(--font-mono); }
.alert .go { font-size: var(--fs-cap); color: var(--accent); white-space: nowrap; }

/* ===================== 布局 ===================== */
.wrap { max-width: 720px; margin: 0 auto; padding: 22px 20px 8px; }

/* 区块头：菱形标记 + 小号标签 + 一条发丝横线 */
.section { margin: 26px 0 10px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-cap);
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .06em;
}
/* 菱形标记和标题都是 flex item，所以标题必须靠左 ——
 * 写成 justify-content:space-between 的话，中间那个会被推到正中间（实测过）。 */
.section-title .n { margin-left: auto; font-weight: 400; color: var(--text-3); font-size: var(--fs-micro); }
.section-title::before {
  content: "";
  width: 6px; height: 6px;
  flex: 0 0 auto;
  margin-right: 9px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.hero { padding: 6px 0 2px 14px; position: relative; }

/* 「我的」页头部改成了 .pfx 头图（封面 + 压边头像），见下面那一节。 */
/* 标题左侧一道竖条：页码标记，比放大字号更像排版过的东西 */
.hero::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.hero h1 {
  margin: 0 0 6px;
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hero p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  max-width: 46ch;
}

/* 提示文字：左侧一道竖线，跟 .meta 一个语言 */
.hint {
  color: var(--text-3);
  font-size: var(--fs-cap);
  line-height: 1.72;
  padding-left: 9px;
  border-left: 1px solid var(--border-soft);
}
.hint b { color: var(--text-2); font-weight: 600; }

/* ===================== 行式列表 ===================== */
.stack {
  --cut: 9px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
}
.stack > * {
  background: transparent;
  background-image: none;
  border: 0;
}
.stack > * + * { border-top: 1px solid var(--border-soft); }

/* ===================== 容器 ===================== */
.card {
  --cut: 9px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  --ring: var(--surface-1);   /* 头图头像环的底色 = 卡片底色 */
  padding: 14px 16px;
  margin-bottom: 10px;
}
.card.mutual { --line: rgba(232, 139, 168, .32); --fill: var(--surface-2); --ring: var(--surface-2); }
.card.absent { --line: var(--border-soft); --fill: var(--bg); }

.card-row { display: flex; gap: 12px; align-items: flex-start; }

/* ===================== 个人封面 / 主题色 =====================
 * 封面：cover 字段 → background-image。预设渐变走查表，上传图过白名单（见 app.js）。
 * 用 clip-path 切角，**不走那套 8 层渐变配方** —— 那套靠 background-image 画描边，
 * 跟封面本身（也是 background-image）抢同一个属性，没法共存。
 * 也不贴卡片边：卡片是斜切角的，贴边的直角矩形会把斜角戳出来；
 * 留在内边距里反而像「卡里嵌了一张照片」。 */
.cover {
  --cut: 9px;
  height: 70px;
  margin-bottom: 12px;
  background-color: var(--surface-3);   /* 图还没加载出来时的兜底色 */
  background-size: cover;
  background-position: center;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
}
.cover.tall { height: 118px; }

/* ===================== 个人页头图：封面 + 压边头像 =====================
 * 构图借哔哩哔哩 / 推特：封面横幅横贯顶部，头像压在下缘线上（一部分露在封面外），
 * 名字跟在头像右侧。头像外面套一圈「所在面板底色」的描边环（.pfx-av 的内边距）——
 * 压在封面上也有轮廓。原来「头像和背景搭配不理想」的根因就是两样贴在一起糊成一片。
 * 没设封面的人不留空白：走 .soft 主题色柔光带，头像永远有背景可搭。 */
.pfx {
  --cut: 12px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  padding: 9px 9px 12px;
  margin-bottom: 10px;
}
.pfx-cover {
  --cut: 9px;
  height: 148px;
  background-color: var(--surface-3);
  background-size: cover;
  background-position: center;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
}
/* 没自定义封面：本人主题色柔光带（左上一团亮色 + 对角暗色）。
 * 它是普通 background-image（不走斜切角配方），渐变里允许透亮。 */
.pfx-cover.soft {
  background-color: #1A101F;
  background-image:
    radial-gradient(150% 210% at 16% -34%, var(--who-hi, #E88BA8) 0%, rgba(0, 0, 0, 0) 56%),
    linear-gradient(112deg, var(--who-dim, #3A1E2A) 0%, rgba(0, 0, 0, 0) 96%);
}
.pfx-head {
  position: relative;
  z-index: 1;                 /* 压在同在卡片里的封面之上 */
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: -34px;          /* 头像压过封面下缘 —— 构图就靠这一下 */
  padding: 0 6px;
}
/* 头像环：颜色 = 所在面板底色（--ring 由 .card 给，缺省 surface-1）。
 * 外轮廓跟头像一样是斜切角，看着像头像自己镶了一圈边。 */
.pfx-av {
  flex: 0 0 auto;
  padding: 3px;
  background: var(--ring, var(--surface-1));
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
/* ---------- 裁剪 ----------
 * 画布本身就是裁剪框（比例 = 目标比例），图片在里头拖 / 缩放。
 * touch-action: none 是关键：不写它，手机上拖图片会被页面滚动抢走手势。 */
.crop-stage { display: flex; justify-content: center; padding: 4px 0; }
#crop-cv {
  display: block;
  max-width: 100%;
  border-radius: 4px;
  background: #150E1A;
  touch-action: none;
  cursor: grab;
}
#crop-cv:active { cursor: grabbing; }
.range { width: 100%; max-width: 300px; accent-color: var(--accent); }

/* 点头像进主页：包一层无样式的 button，只让它能点，不改变外观 */
.pfx-av-btn,
.av-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.av-btn { flex: 0 0 auto; }
.pfx-id { min-width: 0; padding-bottom: 7px; }
.pfx-name { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.01em; }
.pfx-sub {
  margin-top: 3px;
  font-size: var(--fs-cap);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 卡片上的小号版（墙上 / 好友 / 大厅）：封面矮、头像不缩、名字行跟着下缘走 */
.pfx-mini .pfx-cover { --cut: 7px; height: 64px; }
.pfx-mini .pfx-head { margin-top: -21px; padding: 0 2px; gap: 10px; }
.pfx-mini .pfx-av {
  padding: 2px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.pfx-mini .pfx-id { padding-bottom: 3px; }

/* 形象编辑器里的预览：同一个组件，矮一号 —— 所见即所得 */
.look-prev .pfx { margin-bottom: 0; padding: 8px 8px 10px; }
.look-prev .pfx-cover { height: 92px; }
.look-prev .pfx-head { margin-top: -24px; }
.look-prev .pfx-av { clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }

/* ===================== 形象编辑器 =====================
 * 实时预览 + 三组选择器（封面渐变 / 表情 / 主题色）。
 * 预览的 --who-* 跟着草稿走，改主题色当场就能看到效果。 */
.look-prev {
  --cut: 11px;
  --line: var(--border-soft);
  --fill: var(--surface-2);
  padding: 12px;
  margin-bottom: 16px;
}

/* 没封面时的占位。刻意**不切角、用虚线方框** —— 跟周围一片切角形成对比，
 * 一眼看得出「这块还能填」。 */
.cover.empty {
  clip-path: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  color: var(--text-3);
  font-size: var(--fs-micro);
}

/* 封面预设：一个「无」+ 8 个渐变块 */
.grad-row { display: flex; flex-wrap: wrap; gap: 8px; }
.grad {
  --cut: 6px;
  width: 44px; height: 32px;
  padding: 0; border: 0;
  background: var(--surface-3);
  cursor: pointer;
  opacity: .76;
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.grad:hover { opacity: 1; }
.grad.on { opacity: 1; transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--text-1); }
.grad.plain { display: flex; align-items: center; justify-content: center; }
.grad-t { font-size: var(--fs-micro); color: var(--text-3); }

/* 主题色块 */
.tint-row { display: flex; flex-wrap: wrap; gap: 9px; }
.tint {
  --cut: 5px;
  width: 30px; height: 30px;
  padding: 0; border: 0;
  background: var(--c, var(--surface-3));
  cursor: pointer;
  opacity: .8;
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.tint:hover { opacity: 1; }
.tint.on { opacity: 1; transform: scale(1.1); box-shadow: inset 0 0 0 2px var(--text-1); }

/* 名字前面一颗小菱形，取这个人的主题色 —— 一眼分得出「这是谁」。
 * --who-hi 由卡片根元素上的行内变量给（值只可能来自 TINTS 表）。 */
.card .tname::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 6px;
  vertical-align: 1px;
  background: var(--who-hi, var(--accent));
  transform: rotate(45deg);
}

.avatar {
  --cut: 6px;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  /* 主题色：表情头像压在这个人的色底上，整张头像再镶一圈同色细边。
   * 两个变量都由 avatarHTML() 从 TINTS 表里取好挂在行内，缺省就退回原来的样子。 */
  background: var(--who-dim, var(--surface-3));
  box-shadow: inset 0 0 0 2px var(--who-hi, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 32px; height: 32px; font-size: 15px; --cut: 4px; }
.avatar.lg { width: 64px; height: 64px; font-size: 28px; --cut: 10px; }
.avatar.xl { width: 92px; height: 92px; font-size: 40px; --cut: 12px; }

.card-main { flex: 1; min-width: 0; }

.name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tname { font-size: var(--fs-body); font-weight: 600; letter-spacing: -.005em; }
.tname-lg { font-size: var(--fs-head); font-weight: 600; }

/* 状态：菱形标记，不用圆点 —— 圆点是消费级 App 的语言 */
.pill {
  --cut: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-micro);
  line-height: 1.5;
  padding: 2px 8px 2px 7px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 5px; height: 5px;
  flex: 0 0 auto;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.pill.online  { color: var(--online); }
.pill.busy    { color: var(--busy); }
.pill.offline { color: var(--offline); }
.pill.mutual  { color: var(--accent); }
.pill.accent  { color: var(--accent); }
.pill.flat    { color: var(--text-3); }
/* 头牌（管理员给的称呼）：金色 —— 名字旁边一个星 + 金底，卡片外框也转金，一眼能认出来 */
.pill.gold {
  color: #E8C46A;
  border-color: rgba(232, 196, 106, .55);
  background: rgba(232, 196, 106, .16);
  font-weight: 600;
}
/* ⚠️ 别叫 .card.star —— `.star` 已经被评分星星按钮占了（带 38px 固定尺寸），
 * 撞上去卡片会被压成 38px 宽。用 .top。 */
.card.top { --line: rgba(232, 196, 106, .6); }
.card.top .tname { color: #E8C46A; }

/* 「我的」页最底下那两行小字（意见箱 / 免责声明）：故意压得暗一点，不抢眼 */
.foot-links { margin-top: 18px; text-align: center; }
.foot-links button {
  border: 0;
  background: none;
  padding: 4px 6px;
  font-size: 12px;
  color: var(--text-3);
  opacity: .55;
  cursor: pointer;
}
.foot-links button:hover { opacity: .95; }
.foot-links span { color: var(--text-3); opacity: .35; font-size: 12px; }

/* 免责声明正文 */
.terms p { margin: 0 0 10px; font-size: 13px; line-height: 1.75; color: var(--text-2); }

/* 意见箱条目 */
.fb-item { padding: 12px 0; border-top: 1px solid var(--border-soft); }
.fb-item:first-child { border-top: 0; }
.fb-reply {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}
.pill.online::before { animation: soft-blink 3s steps(1, end) infinite; }
@keyframes soft-blink { 0%, 74% { opacity: 1; } 78%, 100% { opacity: .38; } }

.bio { color: var(--text-2); font-size: var(--fs-sm); margin-top: 3px; word-break: break-word; }
.meta {
  color: var(--text-3);
  font-size: var(--fs-cap);
  margin-top: 5px;
  padding-left: 8px;
  border-left: 1px solid var(--border-soft);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  --cut: 4px;
  font-size: var(--fs-cap);
  color: var(--text-2);
  background: var(--surface-2);
  padding: 3px 9px;
}

/* 价签：唯一一处让颜色说话的数字 */
.rate-tag {
  --cut: 4px;
  font-size: var(--fs-cap);
  font-weight: 600;
  color: var(--accent-hi);
  background: var(--tint-1);
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

/* ===================== 按钮 ===================== */
.btn {
  --cut: 5px;
  --line: var(--border);
  --fill: var(--surface-2);
  border: 0;
  padding: 8px 15px;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* 悬停：一道从左扫入的暖光（z-index:-1 → 压在文字下面，不糊字） */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(232, 139, 168, .18), transparent 78%);
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
  transition: opacity var(--dur) var(--ease);
}
.btn:hover::after { opacity: 1; }
.btn:hover { --line: var(--accent-dim); --fill: var(--surface-3); }
.btn:active { --line: var(--accent); }

.btn-primary { --line: var(--accent); --fill: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary::after { background: linear-gradient(90deg, rgba(255, 255, 255, .24), transparent 78%); }
.btn-primary:hover { --line: var(--accent-hi); --fill: var(--accent-hi); }
.btn-primary:active { --line: var(--accent-dim); --fill: var(--accent-dim); }

.btn-ghost { --line: var(--border); --fill: var(--bg); color: var(--text-2); }
.btn-ghost:hover { --line: var(--accent-dim); color: var(--text-1); }

.btn-danger { --line: rgba(224, 102, 95, .4); --fill: var(--bg); color: var(--danger); }
.btn-danger:hover { --line: var(--danger); --fill: var(--tint-danger); color: var(--danger); }

.btn-sm { --cut: 4px; padding: 5px 11px; font-size: var(--fs-cap); }
.btn-block { width: 100%; display: block; }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn:disabled::after { opacity: 0; }

/* 选图按钮：原生 file input（透明）铺满按钮面 —— 手指点到的是 input 本体。
 * iOS Safari 对「JS 触发 click」「label 转发」都有翻车记录，这条是唯一稳的写法。
 * input 不能 display:none / 移出视口（iOS 会校验元素在可视区域内），所以 opacity:0 盖上去。 */
.pick { position: relative; display: flex; }
.pick > .btn { flex: 1; display: flex; align-items: center; justify-content: center; }
.pick .pick-in {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;             /* 必须在按钮之上，否则点不到 */
  cursor: pointer;
}
/* 要和旁边的真按钮平分一行时（.row-btn 里） */
.row-btn .pick { flex: 1; }

/* ===================== 分段控件 ===================== */
.seg {
  --cut: 6px;
  --line: var(--border-soft);
  --fill: var(--bg);
  display: flex;
  gap: 3px;
  padding: 4px;
  margin: 16px 0 6px;
}
.seg button {
  --cut: 5px;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-3);
  padding: 7px 8px;
  cursor: pointer;
  font-size: var(--fs-cap);
  font-variant-numeric: tabular-nums;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg button:hover { color: var(--text-2); background: var(--surface-1); }
.seg button.on { background: var(--surface-3); color: var(--text-1); font-weight: 600; }
.seg button.on::before {
  content: "";
  display: block;
  width: 14px; height: 2px;
  margin: 0 auto 4px;
  background: var(--accent);
}

/* ===================== 空状态 =====================
 * 左对齐、写人话。居中 + 虚线大框 + 大 emoji 是空状态三件套通病 */
.empty {
  --cut: 0px;
  --cbr: 10px;
  --ctr: 10px;
  --line: var(--border-soft);
  --fill: var(--bg);
  padding: 18px 16px;
  text-align: left;
  color: var(--text-3);
  margin-bottom: 10px;
}
.empty .big { font-size: var(--fs-body); color: var(--text-1); margin-bottom: 4px; font-weight: 600; }
.empty .small { font-size: var(--fs-cap); line-height: 1.72; }

/* ===================== 表单 ===================== */
.field { margin-bottom: 16px; }
.label {
  display: block;
  font-size: var(--fs-micro);
  color: var(--text-2);
  letter-spacing: .04em;
  margin-bottom: 7px;
}
.input, .textarea, .select {
  --cut: 5px;
  --line: var(--border);
  --fill: var(--surface-1);
  width: 100%;
  padding: 11px 12px;
  outline: none;
  font-size: var(--fs-body);
  border: 0;
}
.input:hover, .textarea:hover, .select:hover { --line: #4A3054; }
.input:focus, .textarea:focus, .select:focus { --line: var(--accent); --fill: var(--surface-2); }
.textarea { resize: vertical; min-height: 78px; line-height: 1.65; }
.select {
  cursor: pointer;
  appearance: none;
  padding-right: 34px;
  background-image:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23C6A9BE' stroke-width='1.4'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"),
    linear-gradient(135deg, transparent 0 calc(var(--ctl) + 1.4px), var(--fill) 0),
    linear-gradient(225deg, transparent 0 calc(var(--ctr) + 1.4px), var(--fill) 0),
    linear-gradient(315deg, transparent 0 calc(var(--cbr) + 1.4px), var(--fill) 0),
    linear-gradient(45deg,  transparent 0 calc(var(--cbl) + 1.4px), var(--fill) 0),
    linear-gradient(135deg, transparent 0 var(--ctl), var(--line) 0),
    linear-gradient(225deg, transparent 0 var(--ctr), var(--line) 0),
    linear-gradient(315deg, transparent 0 var(--cbr), var(--line) 0),
    linear-gradient(45deg,  transparent 0 var(--cbl), var(--line) 0);
  background-position:
    right 12px center,
    left top, right top, right bottom, left bottom,
    left top, right top, right bottom, left bottom;
  background-size:
    16px 16px,
    50.5% 50.5%, 50.5% 50.5%, 50.5% 50.5%, 50.5% 50.5%,
    50.5% 50.5%, 50.5% 50.5%, 50.5% 50.5%, 50.5% 50.5%;
  background-repeat: no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ===================== 选择项（点名理由 / 时长） ===================== */
.opt {
  --cut: 8px;
  --line: var(--border);
  --fill: var(--surface-1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.opt:hover { --line: var(--accent-dim); --fill: var(--surface-2); }
.opt.on { --line: var(--accent); --fill: var(--tint-1); }
.opt .o-name { font-size: var(--fs-body); font-weight: 600; }
.opt .o-desc { font-size: var(--fs-cap); color: var(--text-2); margin-top: 2px; }
.opt .o-price { margin-left: auto; color: var(--accent); font-size: var(--fs-cap); font-weight: 600; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
/* 大厅的分段控制下面的筛选条：两行 chips（排序 / 项目） */
.filters { margin: 14px 0 2px; }
.chip {
  --cut: 5px;
  --line: var(--border);
  --fill: var(--surface-1);
  border: 0;
  padding: 6px 12px;
  font-size: var(--fs-cap);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  cursor: pointer;
}
.chip:hover { --line: var(--accent-dim); color: var(--text-1); }
.chip.on { --line: var(--accent); --fill: var(--tint-1); color: var(--text-1); }

/* ===================== 点名片券 =====================
 * 左侧一条竖状态条（避开斜切角，所以从 --cut 起） */
.poke {
  --cut: 9px;
  --st: var(--border);
  --line: var(--border-soft);
  --fill: var(--surface-1);
  padding: 13px 14px 13px 18px;
  margin-bottom: 10px;
}
.poke::before {
  content: "";
  position: absolute;
  left: 0; top: var(--cut); bottom: var(--cut);
  width: 3px;
  background: var(--st);
}
.poke.st-pending::before  { background: var(--busy); }
.poke.st-accepted::before { background: var(--online); }
.poke.st-declined::before { background: var(--danger); }
.poke.st-done::before     { background: var(--accent-dim); }
.poke.st-cancelled::before { background: var(--offline); }

.poke-head { display: flex; align-items: center; gap: 10px; }
.poke-body { margin-top: 10px; padding-left: 42px; }
.poke-quote {
  background: var(--surface-2);
  border-left: 2px solid var(--accent-dim);
  padding: 8px 12px;
  font-size: var(--fs-sm);
  color: var(--text-1);
  word-break: break-word;
}
.poke-acts { display: flex; gap: 8px; margin-top: 11px; padding-left: 42px; flex-wrap: wrap; }
.poke-time { font-size: var(--fs-cap); color: var(--text-3); }

/* ===================== 统计 ===================== */
.stats { display: flex; gap: 8px; margin: 10px 0; }
.stat {
  --cut: 8px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  flex: 1;
  padding: 15px 14px;
}
.stat .num {
  display: block;
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--accent);
}
.stat .lb {
  font-size: var(--fs-micro);
  color: var(--text-3);
  margin-top: 4px;
}

/* ===================== 名单行 ===================== */
.list-item {
  --cut: 8px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.list-item .li-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== 提示块 ===================== */
.notice {
  --cut: 0px;
  --cbr: 9px;
  --ctr: 9px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  padding: 12px 14px;
  font-size: var(--fs-cap);
  color: var(--text-2);
  line-height: 1.78;
  border-left: 2px solid var(--accent-dim);
}
.notice b { color: var(--text-1); font-weight: 600; }
/* 上传界面的红线：左条转红，正文里的关键词也转红 */
.notice.r18 { border-left-color: var(--danger); }
.notice.r18 b { color: var(--danger); }

/* ===================== 底栏 ===================== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 2px;
  background: rgba(12, 7, 16, .96);
  backdrop-filter: saturate(130%) blur(10px);
  border-top: 1px solid var(--border-soft);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
}
.tabbar::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 84px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(232, 139, 168, .6);
}
.tab {
  position: relative;
  flex: 1;
  max-width: 140px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  padding: 6px 4px 7px;
  cursor: pointer;
  font-size: var(--fs-micro);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color var(--dur) var(--ease);
}
.tab .ico { width: 21px; height: 21px; opacity: .9; }
.tab:hover { color: var(--text-2); }
.tab.on { color: var(--text-1); }
.tab.on .ico { color: var(--accent); }
/* 选中态：顶部一小段亮线，不是圆点 */
.tab.on::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(232, 139, 168, .65);
}
.tab .dot {
  --cut: 3px;
  position: absolute;
  top: 2px; left: 50%;
  margin-left: 4px;
  min-width: 15px; height: 15px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  font-style: normal;
}

/* ===================== 弹层 ===================== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 3, 9, .76);
  backdrop-filter: blur(3px);
  padding: 0;
}

.modal {
  --cut: 14px;
  --ctl: 14px; --ctr: 14px; --cbr: 0px; --cbl: 0px;
  --line: var(--border);
  --fill: var(--surface-1);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px -28px rgba(0, 0, 0, .92);
}
@media (min-width: 620px) {
  .modal-mask { align-items: center; padding: 20px; }
  .modal { --ctl: 14px; --ctr: 14px; --cbr: 14px; --cbl: 14px; box-shadow: 0 28px 80px -34px rgba(0, 0, 0, .95); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { margin: 0; font-size: var(--fs-title); font-weight: 600; letter-spacing: -.01em; }
.modal-foot { display: flex; gap: 8px; margin-top: 18px; }
.modal-foot .btn { flex: 1; }

/* ===================== Toast ===================== */
.toast {
  --cut: 5px;
  --line: var(--accent-dim);
  --fill: var(--surface-3);
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 90;
  max-width: 84vw;
  color: var(--text-1);
  padding: 10px 16px;
  font-size: var(--fs-cap);
  text-align: center;
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .85);
}

/* ===================== 登录页 ===================== */
.gate { max-width: 420px; margin: 0 auto; padding: 40px 20px 24px; }
.gate .logo { display: flex; color: var(--accent); margin-bottom: 16px; }
.gate h1 {
  margin: 0 0 6px;
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.gate .slogan {
  color: var(--text-2);
  font-size: var(--fs-sm);
  margin: 0 0 22px;
  max-width: 34ch;
}
.gate .panel {
  --cut: 12px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  padding: 18px;
  margin-bottom: 16px;
}

/* ===================== 聊天 ===================== */
.mail {
  font-size: var(--fs-micro);
  color: var(--text-3);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat { display: flex; flex-direction: column; min-height: calc(100vh - 220px); }
.chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.chat-head .who { flex: 1; min-width: 0; }
.chat-body { flex: 1; padding: 4px 0 12px; }
.msg { display: flex; margin-bottom: 12px; align-items: flex-end; gap: 7px; }
.msg.mine { justify-content: flex-end; }
.bubble {
  --cut: 5px;
  max-width: 76%;
  padding: 10px 13px;
  font-size: var(--fs-body);
  line-height: 1.62;
  word-break: break-word;
  white-space: pre-wrap;
}
/* 谁发的，就把靠近自己那一侧的角切成方角 —— 代替"气泡尖角" */
.msg.them .bubble { --cbl: 1px; --line: var(--border-soft); --fill: var(--surface-2); }
.msg.mine .bubble { --cbr: 1px; --line: var(--accent-dim); --fill: var(--accent); color: var(--on-accent); }
.msg-time { font-size: var(--fs-micro); color: var(--text-3); margin-bottom: 2px; }

.chat-input {
  position: sticky; bottom: 0;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
}
.chat-input .textarea { min-height: 44px; max-height: 120px; }

.conv { display: flex; align-items: center; gap: 12px; }
.conv .cv-main { flex: 1; min-width: 0; }
.conv .cv-last { color: var(--text-3); font-size: var(--fs-cap); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gate .panel .seg { margin-top: 0; }
.row-btn { display: flex; gap: 8px; margin-top: 12px; }
.row-btn .btn { flex: 1; }

.req { display: flex; align-items: center; gap: 11px; }
.req .rq-main { flex: 1; min-width: 0; }

.badge {
  --cut: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-micro); font-weight: 700; line-height: 18px; text-align: center;
}

.loading {
  padding: 40px 0;
  color: var(--text-3);
  font-size: var(--fs-cap);
}
/* 光标方块：比转圈更像终端，也便宜得多 */
.loading::after {
  content: "▮";
  color: var(--accent);
  margin-left: 6px;
  animation: soft-blink 1.1s steps(1, end) infinite;
}

/* 好友码：斜切框 + 宽字距等宽 —— 像真的编号牌（拉丁字符配宽字距没问题） */
.bigcode {
  --cut: 6px;
  --line: var(--accent-dim);
  --fill: var(--tint-1);
  display: inline-block;
  padding: 9px 16px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.2;
  color: var(--accent);
}
/* 注册序号：跟在好友码后面的一行小字 */
.serial {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-cap);
  color: var(--text-3);
}

.danger-text { color: var(--danger); }

/* ===================== 头像（上传 / 拖拽 / 直链） ===================== */
.av-row { display: flex; align-items: center; gap: 14px; }
.av-btns { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }

.drop {
  --cut: 9px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px 14px; margin-top: 4px;
}
.drop.on { --line: var(--accent); --fill: var(--tint-1); }
.drop-t { font-size: var(--fs-cap); color: var(--text-3); text-align: center; line-height: 1.72; }
.drop-t b { color: var(--text-2); font-weight: 600; }

/* ===================== 评价：星级 ===================== */
.stars { display: flex; gap: 6px; }
.star {
  --cut: 4px;
  width: 38px; height: 38px;
  border: 0;
  padding: 0;
  background: var(--surface-2);
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.star:hover { background: var(--surface-3); color: var(--text-2); }
.star.on { background: var(--accent); color: var(--on-accent); }

/* 收到的一条评价。同样有左侧竖条，跟「点名片券」一个语言 */
.review {
  --cut: 7px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  padding: 11px 13px 11px 16px;
  margin-bottom: 7px;
}
.review::before {
  content: "";
  position: absolute;
  left: 0; top: var(--cut); bottom: var(--cut);
  width: 3px;
  background: var(--accent-dim);
}
.review .rc { font-size: var(--fs-cap); color: var(--text-2); margin-top: 4px; line-height: 1.65; }

/* 一条通知。未读的左侧有一条竖线 —— 只靠底色差别看不出来（暗色下两个表面的
 * 亮度差很小），一条竖线比什么都显眼。 */
.note {
  --cut: 8px;
  --line: var(--border-soft);
  --fill: var(--surface-1);
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.note.unread { --line: rgba(232, 139, 168, .3); --fill: var(--surface-2); }
.note.unread::before {
  content: "";
  position: absolute;
  left: 0; top: var(--cut); bottom: var(--cut);
  width: 3px;
  background: var(--accent);
}
.note .nt-body { flex: 1; min-width: 0; }
.note .nt-t { font-size: var(--fs-sm); font-weight: 600; }
.note .nt-d { font-size: var(--fs-cap); color: var(--text-2); margin-top: 2px; word-break: break-word; }
.note .nt-k {
  font-size: var(--fs-micro);
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 2px;
}
.note .nt-time {
  font-size: var(--fs-micro);
  color: var(--text-3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
/* 单条已读按钮。做成小方块 —— 菱形留给「状态」，方形留给「动作」。 */
.nt-read {
  flex: 0 0 auto;
  align-self: center;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nt-read:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ===================== 响应式 =====================
 * 三档：手机 ≤619 / 折叠屏展开态·小平板 620–899 / 桌面≥900（沿用 ≥720 那组）。
 * 手机档的三条硬指标：① 上传面板要能滚、保存条吸底（不然长表单一路划到底找「保存」）
 * ② 触控目标够大 ③ 不被刘海和手势条压住（safe-area）。 */
@media (max-width: 619px) {
  .topbar {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .wrap { padding: 16px 14px 8px; }

  /* 弹层 = 底部抽屉：内部滚动 + 操作条吸底。
   * dvh 那行是修「手机上 100vh 被浏览器工具栏吃掉」的，老浏览器不认就吃上一行。 */
  .modal { max-height: 92vh; max-height: 92dvh; padding: 18px 16px 0; }
  .modal-foot {
    position: sticky;
    bottom: 0;
    margin: 18px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface-1);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 -16px 26px -20px rgba(0, 0, 0, .9);
  }

  /* 手指按得准，比排得紧重要 */
  .btn { padding: 10px 15px; }
  .btn-sm { padding: 8px 12px; }
  .chip { padding: 8px 13px; }
  .tint { width: 36px; height: 36px; --cut: 6px; }
  .grad { width: 50px; height: 36px; }
  .nt-read { width: 34px; height: 34px; }

  /* 头图缩一号（头像环仍比头像大一圈） */
  .pfx { --cut: 11px; padding: 8px 8px 12px; }
  .pfx-cover { height: 112px; }
  .pfx-head { margin-top: -27px; padding: 0 4px; }
  .pfx-id { padding-bottom: 5px; }
  .pfx-name { font-size: var(--fs-head); }
  .pfx .avatar.xl { width: 78px; height: 78px; font-size: 33px; --cut: 10px; }
}

/* 折叠屏展开态 / 小平板：单列内容别铺满整个屏，居中收一点更像一张卡 */
@media (min-width: 620px) and (max-width: 899px) {
  .wrap { max-width: 640px; padding: 24px 24px 10px; }
}

@media (min-width: 720px) {
  .wrap { padding: 28px 28px 12px; }
  .hero { padding: 10px 0 2px 16px; }
  .hero h1 { font-size: 33px; }
  .stats { gap: 10px; }
}

/* ===================== 加载遮罩 =====================
 * 只在真的慢的时候出现（app.js 里 450ms 才把它亮出来）。动画只做一件事：
 * 一个菱形在向外呼吸 —— 没用「转圈」，那是所有加载符号里最廉价的一个。
 * 卡住（20 秒）时一切动画停下 + 转红 —— 停下来本身就是信号：它不是忙，是死了。 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 4, 11, .78);
  animation: veil-in .22s var(--ease) both;
}
/* 暗化层单独一层，不放 backdrop-filter 在容器上：
 * 实测（像素采样）在容器上用 backdrop-filter 会把整棵子树跟父背景二次混合，
 * 里面的强调色被压掉一半 —— 菱形看起来是暗紫的，不是玫瑰色。 */
.veil::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  pointer-events: none;
}
@keyframes veil-in { from { opacity: 0 } to { opacity: 1 } }

.veil-box {
  --cut: 13px;
  --line: var(--border);
  --fill: var(--surface-1);
  position: relative;
  z-index: 1;                 /* 压在上面那层 ::before 之上 */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  min-width: 238px;
  padding: 30px 34px 24px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .95);
}

.veil-mark { position: relative; width: 46px; height: 46px; }
.veil-mark i,
.veil-mark b { position: absolute; left: 50%; top: 50%; display: block; }
/* ⚠️ transform 必须同时写在基础样式里：只写在 keyframes 里的话，
 * 动画一旦被停掉（截图、减少动效、低性能降级）元素就变回没旋转的方块。
 * 菱形是这个界面的基本形状，不能依赖动画来成立。 */
.veil-mark i {
  width: 17px; height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border: 1px solid var(--accent);
  transform: rotate(45deg) scale(.5);
  animation: vm-ring 2.2s cubic-bezier(.22, .68, .3, 1) infinite;
}
.veil-mark i:nth-child(2) { animation-delay: .73s; }
.veil-mark b {
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  background: var(--accent);
  transform: rotate(45deg) scale(.82);   /* 跟 vm-core 的起始帧对齐，动画接手时不跳 */
  animation: vm-core 1.7s ease-in-out infinite;
}
@keyframes vm-ring {
  0%   { transform: rotate(45deg) scale(.5);   opacity: .9; }
  100% { transform: rotate(45deg) scale(2.05); opacity: 0; }
}
@keyframes vm-core {
  0%, 100% { transform: rotate(45deg) scale(.82); }
  50%      { transform: rotate(45deg) scale(1.06); }
}

.veil-track {
  position: relative;
  width: 152px;
  height: 2px;
  overflow: hidden;
  background: var(--border-soft);
}
.veil-track i {
  position: absolute;
  top: 0; bottom: 0;
  left: 28%;                 /* 基础值：动画停掉时也得看得到这根扫描条 */
  width: 44%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: vm-scan 1.5s ease-in-out infinite;
}
@keyframes vm-scan {
  0%   { left: -46%; }
  100% { left: 102%; }
}

.veil-text { font-size: var(--fs-cap); color: var(--text-1); letter-spacing: .02em; }
.veil-note {
  font-size: var(--fs-micro);
  color: var(--text-3);
  text-align: center;
  max-width: 252px;
  line-height: 1.6;
}
.veil-note:empty { display: none; }
.veil-acts { display: flex; gap: 8px; margin-top: 2px; }

/* 卡住态 */
.veil.stuck .veil-mark i { animation: none; opacity: .18; }
.veil.stuck .veil-mark b { animation: none; background: var(--danger); }
.veil.stuck .veil-track i {
  animation: none;
  left: 28%;
  background: linear-gradient(90deg, transparent, var(--danger), transparent);
}
.veil.stuck .veil-text { color: var(--danger); }

/* ===================== 断线条（轮询连续失败） ===================== */
.net-bar {
  --cut: 6px;
  --line: rgba(224, 102, 95, .45);
  --fill: var(--tint-danger);
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
  z-index: 82;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: var(--fs-micro);
  color: var(--text-1);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .9);
}
.net-bar .nb-dot {
  width: 6px; height: 6px;
  background: var(--danger);
  transform: rotate(45deg);
  animation: nb-blink 1.2s steps(2, end) infinite;
}
@keyframes nb-blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
