/* ============================================================
   NightLive · 手机网页版聊天 App 设计系统
   暗黑直播风 / 安全区适配 / 零依赖
   ============================================================ */

:root {
  /* 底色 */
  --bg: #07070c;
  --bg-2: #0d0d16;
  --bg-3: #14141f;
  --card: rgba(255, 255, 255, 0.045);
  --card-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);

  /* 主题色 */
  --hot: #ff2d6f;
  --hot-2: #ff5a3c;
  --violet: #7b2dff;
  --cyan: #22d3ee;
  --gold: #ffc93c;
  --ok: #2ee6a8;

  --grad-hot: linear-gradient(135deg, #ff2d6f 0%, #ff5a3c 100%);
  --grad-vip: linear-gradient(135deg, #ffc93c 0%, #ff8a00 100%);
  --grad-violet: linear-gradient(135deg, #7b2dff 0%, #ff2d6f 100%);
  --grad-glass: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));

  /* 文字 */
  --t1: #ffffff;
  --t2: rgba(255, 255, 255, 0.72);
  --t3: rgba(255, 255, 255, 0.42);
  --t4: rgba(255, 255, 255, 0.24);

  /* 尺寸 */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --tabbar-h: 58px;
  --header-h: 52px;

  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);

  --shadow-hot: 0 8px 28px -6px rgba(255, 45, 111, 0.55);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.9);

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

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  background-image:
    radial-gradient(1000px 520px at 12% -8%, rgba(255, 45, 111, 0.16), transparent 62%),
    radial-gradient(880px 480px at 92% 4%, rgba(123, 45, 255, 0.15), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
input, textarea, select { font-family: inherit; font-size: 16px; }

::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- 布局骨架 ---------- */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  padding: calc(var(--header-h) + var(--sat) + 10px) 14px
           calc(var(--tabbar-h) + var(--sab) + 18px);
}

.page--notab {
  padding-bottom: calc(var(--sab) + 22px);
}

/* ---------- 顶栏 ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  max-width: 560px;
  margin: 0 auto;
  height: calc(var(--header-h) + var(--sat));
  padding: var(--sat) 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(7,7,12,.96) 55%, rgba(7,7,12,.62) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header__title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.header__sub { font-size: 11px; color: var(--t3); margin-top: 1px; }
.header__spacer { flex: 1; }
.header__btn {
  width: 36px; height: 36px;
  border: 0; border-radius: 12px;
  background: var(--card);
  color: var(--t1);
  display: grid; place-items: center;
  font-size: 17px;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.header__btn:active { transform: scale(.92); background: var(--card-hi); }

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.4px;
  background: var(--grad-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo span { -webkit-text-fill-color: initial; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  max-width: 560px;
  margin: 0 auto;
  height: calc(var(--tabbar-h) + var(--sab));
  padding-bottom: var(--sab);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(9, 9, 15, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--t4);
  position: relative;
  transition: color .18s;
}
.tabbar a .ti { font-size: 19px; line-height: 1; filter: grayscale(1) opacity(.55); transition: filter .18s; }
.tabbar a.on { color: var(--hot); }
.tabbar a.on .ti { filter: none; }
.tabbar a.on::after {
  content: "";
  position: absolute; top: 5px;
  width: 22px; height: 3px; border-radius: 3px;
  background: var(--grad-hot);
  box-shadow: var(--shadow-hot);
}
.tabbar__badge {
  position: absolute;
  top: 6px;
  right: 50%;
  margin-right: -22px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px rgba(9,9,15,.9);
}

/* ---------- 卡片 / 通用块 ---------- */
.card {
  background: var(--grad-glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 10px; }

.section { margin-top: 18px; }
.section__head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 2px 10px;
}
.section__title { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.section__more { margin-left: auto; font-size: 12px; color: var(--t3); }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--grad-hot);
  box-shadow: var(--shadow-hot);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .14s, filter .14s, opacity .14s;
  width: 100%;
}
.btn:active { transform: scale(.975); filter: brightness(1.06); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--ghost {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--t1);
}
.btn--vip { background: var(--grad-vip); box-shadow: 0 8px 28px -8px rgba(255,201,60,.6); color: #2a1a00; }
.btn--violet { background: var(--grad-violet); }
.btn--sm { padding: 9px 15px; font-size: 13px; width: auto; }
.btn--block { width: 100%; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field__label { font-size: 12px; color: var(--t3); margin: 0 2px 6px; }
.input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--t1);
  outline: none;
  transition: border-color .18s, background .18s;
}
.input::placeholder { color: var(--t4); }
.input:focus { border-color: rgba(255,45,111,.7); background: rgba(255,45,111,.07); }

/* ---------- 头像 ---------- */
.av {
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  flex: none;
  position: relative;
}
.av-wrap { position: relative; flex: none; }
.av-wrap .dot {
  position: absolute; right: 0; bottom: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2.5px var(--bg);
}
.av-wrap .dot--off { background: var(--t4); }
.av-wrap .live-tag {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: -4px;
  padding: 1px 7px;
  border-radius: 8px;
  background: var(--grad-hot);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .6px;
  white-space: nowrap;
  box-shadow: 0 3px 10px -2px rgba(255,45,111,.8);
}

/* 渐变占位头像（无需图片资源） */
.pav {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  border-radius: inherit;
}

/* ---------- 主播网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }

.host {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-3);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .16s;
}
.host:active { transform: scale(.975); }
.host__media { position: absolute; inset: 0; }
.host__media .pav { border-radius: 0; font-size: 44px; }
.host__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.82) 100%);
}
.host__top {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; align-items: center; gap: 6px;
}
.badge-live {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 45, 111, .92);
  font-size: 10px; font-weight: 800; letter-spacing: .4px;
  box-shadow: 0 3px 12px -2px rgba(255,45,111,.9);
}
.badge-live i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.7)} }
.badge-new {
  padding: 3px 7px; border-radius: 999px;
  background: var(--grad-vip);
  color: #2a1a00;
  font-size: 9.5px; font-weight: 900;
}
.badge-num {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  /* 注意：这里刻意不用 backdrop-filter。卡片有 20+ 张，每张一个背景模糊图层
     在中低端安卓上滚动会明显掉帧，用半透明纯色观感几乎一致。 */
  background: rgba(0, 0, 0, 0.55);
  font-size: 10px; font-weight: 700; color: #fff;
}
.host__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px;
}
.host__name {
  font-size: 13.5px; font-weight: 800;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.host__meta {
  font-size: 10.5px; color: var(--t2);
  margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden;
}
.flag { font-size: 11px; }

/* ---------- 横向 chip 过滤 ---------- */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}
.chip {
  flex: none;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--t2);
  white-space: nowrap;
  cursor: pointer;
  transition: all .16s;
}
.chip.on {
  background: var(--grad-hot);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-hot);
}

/* ---------- Instant match 大卡 ---------- */
.match-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 18px;
  overflow: hidden;
  background: var(--grad-violet);
  box-shadow: 0 16px 44px -16px rgba(123,45,255,.85);
}
.match-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(260px 160px at 88% 12%, rgba(255,255,255,.28), transparent 70%);
  pointer-events: none;
}
.match-card h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.5px;
}
.match-card p { margin: 0 0 14px; font-size: 12.5px; color: rgba(255,255,255,.86); }
.match-card .btn {
  background: #fff;
  color: #b8004f;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.7);
  position: relative; z-index: 2;
}
.match-card__stack {
  position: absolute; right: 14px; top: 14px;
  display: flex;
}
.match-card__stack .av {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,.85);
  margin-left: -14px;
  font-size: 14px;
}

/* ---------- 列表行 ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.row + .row { margin-top: 8px; }
.row:active { background: var(--card-hi); transform: scale(.99); }
.row__main { flex: 1; min-width: 0; }
.row__title {
  font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.row__sub {
  font-size: 12px; color: var(--t3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.row__tail { text-align: right; flex: none; }
.row__time { font-size: 11px; color: var(--t4); }
.row__unread {
  margin-top: 5px;
  min-width: 19px; height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--grad-hot);
  font-size: 11px; font-weight: 800;
  display: inline-grid; place-items: center;
  box-shadow: var(--shadow-hot);
}

/* ---------- 徽章 / 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--card-hi);
  border: 1px solid var(--line);
  color: var(--t2);
}
.tag--vip { background: var(--grad-vip); color: #2a1a00; border: 0; }
.tag--hot { background: var(--grad-hot); color: #fff; border: 0; }
.tag--ok { background: rgba(46,230,168,.15); color: var(--ok); border-color: rgba(46,230,168,.3); }
.tag--bad { background: rgba(255,45,85,.16); color: #ff8fa6; border-color: rgba(255,45,85,.4); }

.coin {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 800; font-size: 13px;
  color: var(--gold);
}
.coin::before { content: "💰"; font-size: 13px; }

/* ---------- 聊天页 ---------- */
.chat-page {
  position: fixed;
  inset: 0;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(700px 340px at 50% -6%, rgba(255,45,111,.12), transparent 65%);
  z-index: 10;
}
.chat-head {
  padding-top: var(--sat);
  height: calc(var(--header-h) + var(--sat));
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px; padding-right: 10px;
  background: rgba(9,9,15,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.chat-head__info { flex: 1; min-width: 0; }
.chat-head__name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.chat-head__st { font-size: 11px; color: var(--t3); }

.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.msg { display: flex; gap: 8px; max-width: 84%; }
.msg--me { align-self: flex-end; flex-direction: row-reverse; }
.msg__body { min-width: 0; }
.msg__bubble {
  padding: 10px 13px;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255,255,255,.075);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg--me .msg__bubble {
  border-radius: 16px 16px 4px 16px;
  background: var(--grad-hot);
  border-color: transparent;
  box-shadow: 0 6px 20px -10px rgba(255,45,111,.9);
}
.msg__time { font-size: 10px; color: var(--t4); margin: 4px 4px 0; }
.msg--me .msg__time { text-align: right; }
.msg__img {
  max-width: 190px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.msg-sys {
  align-self: center;
  font-size: 11px;
  color: var(--t3);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
  text-align: center;
  max-width: 88%;
}
.msg-gift {
  align-self: center;
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--r);
  background: linear-gradient(135deg, rgba(255,201,60,.2), rgba(255,45,111,.2));
  border: 1px solid rgba(255,201,60,.35);
  font-size: 12.5px;
  animation: giftPop .5s cubic-bezier(.2,1.4,.4,1);
}
.msg-gift b { color: var(--gold); }
.msg-gift .g-ico { font-size: 30px; display: block; margin-bottom: 4px; }
@keyframes giftPop { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--t3);
  animation: tp 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s }
.typing i:nth-child(3) { animation-delay: .36s }
@keyframes tp { 0%,60%,100%{opacity:.25;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }

/* 输入栏 */
.composer {
  flex: none;
  padding: 8px 10px calc(8px + var(--sab));
  background: rgba(9,9,15,.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.composer__tools {
  display: flex; gap: 8px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ctool {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--t2);
  cursor: pointer;
  transition: all .15s;
}
.ctool:active { background: var(--card-hi); transform: scale(.94); }
.composer__bar {
  display: flex; align-items: flex-end; gap: 8px;
}
.composer__input {
  flex: 1;
  min-height: 42px; max-height: 110px;
  resize: none;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 11px 15px;
  color: var(--t1);
  outline: none;
  line-height: 1.35;
}
.composer__input:focus { border-color: rgba(255,45,111,.6); }
.cbtn {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--t1);
  font-size: 17px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .14s, background .14s;
}
.cbtn:active { transform: scale(.9); background: var(--card-hi); }
.cbtn--send { background: var(--grad-hot); border: 0; box-shadow: var(--shadow-hot); }
.cbtn--gift { background: var(--grad-vip); border: 0; color: #2a1a00; }

/* 底部悬浮计费条（用于带 tabbar 的页面） */
.billing {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--sab));
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--gold);
  background: linear-gradient(90deg, rgba(255,201,60,.14), rgba(255,45,111,.14));
  border-top: 1px solid rgba(255,201,60,.25);
  display: flex; align-items: center; gap: 6px;
  z-index: 40;
}

/* 私聊页没有 tabbar，计费条改为文档流内元素，否则会盖住输入工具条 */
.billing--inline {
  position: static;
  bottom: auto; left: auto; right: auto;
  max-width: none;
  margin: 0;
  flex: none;
  z-index: auto;
}

/* ---------- 通话页 ---------- */
.call {
  position: fixed; inset: 0;
  max-width: 560px; margin: 0 auto;
  background: #000;
  z-index: 90;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.call__video {
  position: absolute; inset: 0;
  background: #08080d;
}
.call__video .pav {
  border-radius: 0;
  font-size: 62px;
  width: 100%; height: 100%;
  filter: brightness(.86) saturate(1.05);
}
.call__grain {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 38%, rgba(255,255,255,.14), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
  pointer-events: none;
  animation: grain 2.4s steps(3) infinite;
}
@keyframes grain { 0%,100%{opacity:.5} 50%{opacity:.85} }
.call__self {
  position: absolute;
  top: calc(var(--sat) + 12px); right: 12px;
  width: 96px; aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.28);
  background: #111;
  box-shadow: 0 12px 30px -12px #000;
  z-index: 3;
}
.call__self .pav { border-radius: 0; font-size: 26px; }
.call__top {
  position: relative; z-index: 4;
  padding: calc(var(--sat) + 12px) 14px 0;
  display: flex; align-items: center; gap: 8px;
}
.call__avatar { width: 42px; height: 42px; font-size: 16px; border: 2px solid rgba(255,255,255,.6); }
.call__nm { font-size: 15px; font-weight: 800; text-shadow: 0 2px 10px #000; }
.call__timer {
  font-size: 12px; color: var(--t2);
  display: flex; align-items: center; gap: 6px;
  text-shadow: 0 2px 10px #000;
}
.call__cost {
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,201,60,.4);
  font-size: 12px; font-weight: 800; color: var(--gold);
  z-index: 4;
}
.call__bottom {
  margin-top: auto;
  position: relative; z-index: 4;
  padding: 0 16px calc(20px + var(--sab));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.call__ctrl {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 20px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .14s, background .14s;
}
.call__ctrl:active { transform: scale(.9); }
.call__ctrl.on { background: #fff; color: #111; }
.call__ctrl--hang {
  width: 64px; height: 64px;
  background: #ff2d55;
  border: 0;
  font-size: 24px;
  box-shadow: 0 12px 34px -10px rgba(255,45,85,.95);
}
.call__ctrl--gift { background: var(--grad-vip); color: #2a1a00; border: 0; }
.call__stack { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.call__row { display: flex; gap: 12px; align-items: center; }

.danmu {
  position: absolute;
  top: 30%; left: 0; right: 0;
  height: 60%;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
.danmu span {
  position: absolute;
  white-space: nowrap;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px);
  animation: float-up linear forwards;
}
@keyframes float-up {
  from { transform: translateY(0); opacity: 0 }
  12% { opacity: 1 }
  to { transform: translateY(-190px); opacity: 0 }
}

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade .2s;
}
@keyframes fade { from{opacity:0} to{opacity:1} }
.sheet {
  width: 100%;
  max-width: 560px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 16px 16px calc(18px + var(--sab));
  max-height: 86dvh;
  overflow-y: auto;
  animation: slide-up .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes slide-up { from { transform: translateY(100%) } to { transform: translateY(0) } }
.sheet__grab {
  width: 38px; height: 4px; border-radius: 4px;
  background: var(--t4); margin: 0 auto 14px;
}
.sheet__title { font-size: 16px; font-weight: 800; margin: 0 0 4px; text-align: center; }
.sheet__sub { font-size: 12px; color: var(--t3); text-align: center; margin: 0 0 14px; }

.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.gift-item {
  padding: 11px 4px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.gift-item:active { transform: scale(.94); }
.gift-item.on {
  border-color: var(--gold);
  background: rgba(255,201,60,.14);
  box-shadow: 0 0 0 1px rgba(255,201,60,.5);
}
.gift-item .g { font-size: 25px; line-height: 1.25; }
.gift-item .n { font-size: 10.5px; color: var(--t2); margin-top: 1px; }
.gift-item .p { font-size: 10.5px; color: var(--gold); font-weight: 800; }

.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button {
  aspect-ratio: 1; border: 0; border-radius: 9px;
  background: transparent; font-size: 21px; cursor: pointer;
}
.emoji-grid button:active { background: var(--card-hi); }

/* Toast */
.toast {
  position: fixed;
  left: 50%; top: 22%;
  transform: translateX(-50%);
  z-index: 400;
  padding: 11px 20px;
  border-radius: 14px;
  background: rgba(20,20,32,.96);
  border: 1px solid var(--line);
  font-size: 13.5px;
  max-width: 82vw;
  text-align: center;
  animation: fade .18s;
  box-shadow: 0 16px 40px -12px #000;
}

/* 空态 / 骨架 */
.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--t3);
  font-size: 13px;
}
.empty .e-ico { font-size: 42px; display: block; margin-bottom: 10px; opacity: .5; }
.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05));
  background-size: 220% 100%;
  animation: sk 1.35s infinite;
}
@keyframes sk { from { background-position: 180% 0 } to { background-position: -40% 0 } }

/* 滚动横排 */
.hscroll {
  display: flex; gap: 9px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.hscroll .story {
  flex: none; width: 68px; text-align: center; cursor: pointer;
}
.hscroll .story .av { width: 62px; height: 62px; margin: 0 auto; font-size: 20px; }
.hscroll .story .nm {
  font-size: 10.5px; color: var(--t2); margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hscroll .story .ring {
  padding: 2.5px; border-radius: 50%;
  background: var(--grad-hot);
  display: inline-block;
}

/* 统计条 */
.stats { display: flex; gap: 8px; }
.stat {
  flex: 1;
  text-align: center;
  padding: 11px 6px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 17px; font-weight: 900; }
.stat span { font-size: 10.5px; color: var(--t3); }

/* ---------- 落地页（引流页） ---------- */
.lp {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: 96px;
  position: relative;
}
.lp__hero {
  position: relative;
  padding: calc(var(--sat) + 20px) 18px 26px;
  overflow: hidden;
}
.lp__hero::before {
  content: "";
  position: absolute; inset: -30% -30% auto -30%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(255,45,111,.42), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}
.lp__brand {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--t2);
}
.lp__h1 {
  position: relative;
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(40px, 13vw, 60px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(120deg, #fff 12%, #ff8fb4 46%, #ff2d6f 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp__lead { position: relative; color: var(--t2); font-size: 13.5px; margin: 0 0 16px; max-width: 92%; }
.lp__pills { position: relative; display: flex; flex-wrap: wrap; gap: 7px; }
.lp__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.lp__feat { padding: 4px 14px 0; }
.lp__rail {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 4px 14px 12px;
  scrollbar-width: none;
}
.lp__rail .host { flex: none; width: 132px; aspect-ratio: 3/4; }

.lp__cards { padding: 0 14px; display: grid; gap: 10px; }
.lp__card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-3);
  border: 1px solid var(--line);
  cursor: pointer;
}
.lp__card .pav { border-radius: 0; font-size: 46px; position: absolute; inset: 0; }
.lp__card__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.8));
}
.lp__card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 13px; }
.lp__card__body b { font-size: 15px; }
.lp__card__body p { margin: 3px 0 0; font-size: 11.5px; color: var(--t2); }

.lp__bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 14px calc(12px + var(--sab));
  background: linear-gradient(180deg, rgba(7,7,12,.2), rgba(7,7,12,.97) 42%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 80;
}
.lp__bar .tut {
  text-align: center;
  font-size: 12px;
  color: var(--t3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none; border: 0;
}
.tap-hint {
  position: fixed;
  left: 50%; bottom: calc(96px + var(--sab));
  transform: translateX(-50%);
  z-index: 79;
  font-size: 11.5px;
  color: var(--t3);
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  animation: breathe 2.2s infinite;
  pointer-events: none;
}
@keyframes breathe { 0%,100%{opacity:.5} 50%{opacity:1} }

/* 安装引导步骤 */
.steps { counter-reset: s; }
.step {
  display: flex; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.step:last-child { border-bottom: 0; }
.step__n {
  flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-hot);
  font-size: 12px; font-weight: 900;
  display: grid; place-items: center;
  box-shadow: var(--shadow-hot);
}
.step__t { font-size: 13.5px; font-weight: 700; }
.step__d { font-size: 12px; color: var(--t3); margin-top: 2px; }

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.ac { align-items: center; }
.jb { justify-content: space-between; }
.g6 { gap: 6px } .g8 { gap: 8px } .g10 { gap: 10px } .g12 { gap: 12px }
.mt6{margin-top:6px}.mt10{margin-top:10px}.mt14{margin-top:14px}.mt18{margin-top:18px}
.mb0{margin-bottom:0}.mb8{margin-bottom:8px}
.tc { text-align: center }
.t2 { color: var(--t2) } .t3 { color: var(--t3) } .gold { color: var(--gold) }
.f11{font-size:11px}.f12{font-size:12px}.f13{font-size:13px}.f15{font-size:15px}.f18{font-size:18px}
.b7{font-weight:700}.b9{font-weight:900}
.hide { display: none !important }
.grow { flex: 1; min-width: 0 }

/* 桌面端外框（宽屏预览成手机形状） */
@media (min-width: 720px) {
  body::before {
    content: "";
    position: fixed; inset: 0;
    background: #030306;
    z-index: -1;
  }
  .app, .chat-page, .call, .lp, .header, .tabbar, .lp__bar, .billing {
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px #000;
  }
}
