/* =========================================================
   Lemon电竞 视觉系统（简洁版）
   双主题：light / dark
   原则：单一主色、克制阴影、统一圆角、留白优先
   ========================================================= */

:root {
  --lemon: #ffc93c;
  --lemon-deep: #f59f00;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;

  --ease: cubic-bezier(.25, .5, .3, 1);
  --nav-h: 58px;
  --tabbar-h: 60px;
}

/* 浅色 */
:root,
[data-theme="light"] {
  --bg-solid: #fbfaf8;
  --bg-grad: linear-gradient(180deg, #fffdf8 0%, #fbfaf8 42%, #f7f8fa 100%);

  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f5f4f1;
  --surface-hover: #faf9f7;

  --text: #1a1a1e;
  --text-dim: #5c5c66;
  --text-mute: #96969f;

  --border: rgba(26, 26, 30, .08);
  --border-strong: rgba(26, 26, 30, .14);

  --accent: #e8890c;
  --accent-grad: linear-gradient(135deg, #ffd43b, #f59f00);
  --accent-soft: rgba(245, 159, 0, .10);
  --accent-grad-soft: rgba(245, 159, 0, .10);

  --shadow-sm: 0 1px 2px rgba(26, 26, 30, .04);
  --shadow: 0 2px 8px rgba(26, 26, 30, .06);
  --shadow-lg: 0 8px 28px rgba(26, 26, 30, .10);

  --glass: rgba(251, 250, 248, .82);
  --glass-blur: blur(16px);
  --online: #37b24d;
  --skeleton: linear-gradient(90deg, #f2f1ee 25%, #e9e8e4 37%, #f2f1ee 63%);
}

/* 深色 */
[data-theme="dark"] {
  --bg-solid: #0b0b0e;
  --bg-grad: linear-gradient(180deg, #101014 0%, #0b0b0e 45%, #0a0a0d 100%);

  --surface: #15151a;
  --surface-solid: #15151a;
  --surface-2: #1c1c22;
  --surface-hover: #1f1f26;

  --text: #f2f2f4;
  --text-dim: #a5a5b0;
  --text-mute: #6e6e7a;

  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);

  --accent: #ffc93c;
  --accent-grad: linear-gradient(135deg, #ffd43b, #f59f00);
  --accent-soft: rgba(255, 201, 60, .10);
  --accent-grad-soft: rgba(255, 201, 60, .10);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, .45);

  --glass: rgba(11, 11, 14, .82);
  --glass-blur: blur(16px);
  --online: #51cf66;
  --skeleton: linear-gradient(90deg, #16161b 25%, #1e1e25 37%, #16161b 63%);
}

/* ---------------- 基础 ---------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg-solid);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
body.no-tabbar { padding-bottom: 0; }

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

h1, h2, h3 { font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

::selection { background: rgba(245, 159, 0, .22); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ---------------- 布局 ---------------- */

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 16px; padding-bottom: 36px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-mute { color: var(--text-mute); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13.5px; }
.text-lg { font-size: 17px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.num { font-variant-numeric: tabular-nums; }
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 15px; height: 15px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.logo-text small {
  font-size: 9px; color: var(--text-mute); letter-spacing: .12em;
  font-weight: 600; text-transform: uppercase;
}

.nav-desktop { display: none; align-items: center; gap: 2px; }
.nav-desktop a {
  padding: 7px 13px; border-radius: 8px;
  font-size: 14px; color: var(--text-dim);
  transition: color .18s, background .18s;
}
.nav-desktop a:hover { color: var(--text); background: var(--surface-2); }
.nav-desktop a.active { color: var(--text); font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--text-dim);
  position: relative;
  transition: color .18s, border-color .18s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 16px; height: 16px; position: absolute; transition: transform .35s var(--ease), opacity .2s; }
[data-theme="light"] .ico-moon { transform: rotate(90deg) scale(.4); opacity: 0; }
[data-theme="light"] .ico-sun { transform: scale(1); opacity: 1; }
[data-theme="dark"] .ico-sun { transform: rotate(-90deg) scale(.4); opacity: 0; }
[data-theme="dark"] .ico-moon { transform: scale(1); opacity: 1; }

/* ---------------- 底部导航 ---------------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text-mute);
  font-size: 10.5px;
  transition: color .18s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active svg { stroke-width: 2.2; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px; font-weight: 500;
  transition: background .18s, border-color .18s, opacity .18s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent-grad);
  border: none;
  color: #2b1a00;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.04); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 30px 0 14px;
}
.section-title { font-size: 16.5px; font-weight: 600; letter-spacing: -.02em; }
.section-more {
  font-size: 13px; color: var(--text-mute);
  display: flex; align-items: center; gap: 2px;
  transition: color .18s;
}
.section-more:hover { color: var(--accent); }
.section-more svg { width: 14px; height: 14px; }

/* ---------------- Hero ---------------- */

.hero { padding: 36px 0 22px; }
.hero h1 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -.03em;
  margin-bottom: 8px;
  font-weight: 700;
}
.hero-sub {
  color: var(--text-mute);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.search-bar {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 14px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .18s;
}
.search-bar:focus-within { border-color: rgba(245, 159, 0, .45); }
.search-bar svg { width: 17px; height: 17px; color: var(--text-mute); flex-shrink: 0; }
.search-bar input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-size: 14px; color: var(--text);
}
.search-bar input::placeholder { color: var(--text-mute); }

/* ---------------- 游戏筛选 ---------------- */

.chip-scroll {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-scroll::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  height: 34px; padding: 0 14px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  display: inline-flex; align-items: center;
  transition: all .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg-solid);
  font-weight: 500;
}
[data-theme="dark"] .chip.active { background: var(--accent); border-color: var(--accent); color: #1a1200; }

/* ---------------- 项目卡片 ---------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  padding: 16px 16px 16px 20px;
  min-height: 92px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--pc1, #ffffff) 42%, var(--surface)) 0%,
    color-mix(in srgb, var(--pc2, #ffffff) 24%, var(--surface)) 100%);
  border: 1px solid var(--border);
  border-color: color-mix(in srgb, var(--pc2, transparent) 30%, var(--border));
  transition: border-color .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
[data-theme="dark"] .project-card {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--pc1, #15151a) 38%, var(--surface)) 0%,
    color-mix(in srgb, var(--pc2, #15151a) 20%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--pc2, transparent) 34%, var(--border));
}
.project-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.project-card .p-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.project-card h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.project-card p {
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card .p-tag {
  align-self: flex-start;
  font-size: 10.5px;
  color: var(--text-mute);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 5px;
  margin-bottom: 8px;
}

/* ---------------- 陪玩卡片（简洁） ---------------- */

.attendant-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.a-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 18px 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.a-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.a-card .a-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a-card .a-game {
  font-size: 11.5px;
  color: var(--text-mute);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a-card .a-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.a-card .a-price i { font-size: 11px; font-style: normal; font-weight: 600; }
.a-card .a-price em { font-size: 10.5px; font-style: normal; color: var(--text-mute); font-weight: 400; }

/* 头像 */
.avatar {
  position: relative;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #fff;
  background: var(--avatar-bg, linear-gradient(135deg, #adb5bd, #868e96));
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 52px; height: 52px; font-size: 18px; }
.avatar-lg { width: 68px; height: 68px; font-size: 24px; }
.avatar-xl { width: 78px; height: 78px; font-size: 27px; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }

.status-dot {
  position: absolute;
  right: 1px; bottom: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: var(--text-mute);
  opacity: .35;
}
.status-dot.on { background: var(--online); opacity: 1; }

/* ---------------- 语音 ---------------- */

.voice-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.voice-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: #2b1a00;
  transition: transform .18s;
}
.voice-play:hover { transform: scale(1.05); }
.voice-play:active { transform: scale(.95); }
.voice-play svg { width: 15px; height: 15px; }
.voice-play .ico-pause { display: none; }
.voice-bar.playing .voice-play .ico-play { display: none; }
.voice-bar.playing .voice-play .ico-pause { display: block; }

.voice-wave {
  flex: 1;
  display: flex; align-items: center; gap: 2px;
  height: 26px;
}
.voice-wave i {
  flex: 1;
  border-radius: 2px;
  background: var(--text-mute);
  opacity: .28;
  height: 20%;
  min-width: 2px;
  transition: opacity .18s;
}
.voice-bar.playing .voice-wave i {
  background: var(--accent);
  opacity: .55;
  animation: wave 1.1s ease-in-out infinite;
}
.voice-wave i:nth-child(3n) { animation-delay: -.2s; }
.voice-wave i:nth-child(3n+1) { animation-delay: -.5s; }
.voice-wave i:nth-child(4n) { animation-delay: -.8s; }
@keyframes wave {
  0%, 100% { height: 20%; }
  50% { height: 88%; }
}
.voice-time {
  font-size: 12px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.voice-empty {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  color: var(--text-mute);
  font-size: 13px;
}
.voice-empty svg { width: 16px; height: 16px; opacity: .6; }

/* ---------------- 媒体 ---------------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item .m-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .2);
}
.media-item .m-play svg { width: 26px; height: 26px; }

/* ---------------- 详情页 ---------------- */

.detail-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 24px 0 20px;
}
.detail-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.detail-bio { font-size: 13px; color: var(--text-mute); line-height: 1.55; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 19px; padding: 0 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-mute);
  border: 1px solid var(--border);
}
.pill.online { color: var(--online); border-color: rgba(55, 178, 77, .3); background: rgba(55, 178, 77, .08); }

.detail-stats {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 20px;
}
.detail-stat { flex: 1; text-align: center; }
.detail-stat b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.detail-stat span { font-size: 11px; color: var(--text-mute); }

.detail-section { margin-bottom: 24px; }
.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.game-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.game-row:last-child { border-bottom: none; }
.game-row.on { background: var(--accent-soft); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.game-name { font-size: 14px; font-weight: 500; }
.game-rank { font-size: 11.5px; color: var(--text-mute); margin-top: 1px; }
.game-price {
  font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.game-check {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  margin-left: 8px;
  flex-shrink: 0;
}
.game-row.on .game-check { background: var(--accent); border-color: var(--accent); }

/* 富文本 */
.rich {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.85;
  word-break: break-word;
}
.rich h2 { font-size: 17px; color: var(--text); margin: 24px 0 10px; }
.rich h2:first-child { margin-top: 0; }
.rich h3 { font-size: 14.5px; color: var(--text); margin: 20px 0 8px; font-weight: 600; }
.rich p { margin: 0 0 12px; }
.rich ul, .rich ol { margin: 0 0 13px; padding-left: 20px; }
.rich li { margin-bottom: 6px; }
.rich li::marker { color: var(--text-mute); }
.rich strong { color: var(--text); font-weight: 600; }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rich img { border-radius: 10px; margin: 12px 0; }
.rich blockquote {
  margin: 14px 0;
  padding: 11px 14px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-mute);
  font-size: 13.5px;
}
.rich hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---------------- 下单条 ---------------- */

.order-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  z-index: 65;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
}
.order-price { flex-shrink: 0; }
.order-price b {
  font-size: 20px; font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.order-price b small { font-size: 11px; font-weight: 400; color: var(--text-mute); margin-left: 1px; }
.order-bar .btn { flex: 1; }

/* ---------------- 骨架 ---------------- */

.skeleton {
  background: var(--skeleton);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.sk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

/* ---------------- 空状态 ---------------- */

.empty { text-align: center; padding: 48px 20px; color: var(--text-mute); }
.empty-ico {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--surface-2);
  display: grid; place-items: center;
}
.empty-ico svg { width: 22px; height: 22px; opacity: .5; }
.empty-title { font-size: 14px; color: var(--text-dim); margin-bottom: 4px; }
.empty-desc { font-size: 12.5px; }

/* ---------------- Toast ---------------- */

#toast-host {
  position: fixed;
  top: 68px; left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex; align-items: center; gap: 7px;
  animation: toastIn .24s var(--ease);
}
.toast.ok { border-color: rgba(55, 178, 77, .3); }
.toast.err { border-color: rgba(224, 49, 49, .35); }
.toast.out { animation: toastOut .2s var(--ease) forwards; }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast.ok svg { color: var(--online); }
.toast.err svg { color: #e03131; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut { to { opacity: 0; transform: translateY(-5px); } }

/* ---------------- 弹层 ---------------- */

.sheet-mask {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(10, 10, 14, .5);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .26s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.sheet-sub { font-size: 13px; color: var(--text-mute); margin-bottom: 20px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }

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

.field { margin-bottom: 15px; }
.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .18s;
  -webkit-appearance: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(245, 159, 0, .5); }
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2396969f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; min-width: 0; }
.hint { font-size: 11.5px; color: var(--text-mute); margin-top: 5px; line-height: 1.5; }
.hint.err { color: #e03131; }

.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-2);
  border-radius: 10px;
}
.seg button {
  flex: 1; height: 32px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-mute);
  transition: background .18s, color .18s;
}
.seg button.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ---------------- 登录 ---------------- */

.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 20px;
}
.auth-card {
  width: 100%; max-width: 380px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.auth-title { font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 5px; }
.auth-sub { font-size: 13px; color: var(--text-mute); margin-bottom: 22px; }

/* ---------------- 我的 ---------------- */

.me-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.me-stats {
  display: flex;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.me-stat {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.me-stat:last-child { border-right: none; }
.me-stat b {
  display: block;
  font-size: 17px; font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.me-stat span { font-size: 11px; color: var(--text-mute); }

.me-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.me-row {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: background .15s;
  width: 100%;
  text-align: left;
}
.me-row:last-child { border-bottom: none; }
.me-row:hover { background: var(--surface-hover); }
.me-row .ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid; place-items: center;
  color: var(--text-dim);
  flex-shrink: 0;
}
.me-row .ico svg { width: 15px; height: 15px; }
.me-row .arrow { width: 15px; height: 15px; color: var(--text-mute); flex-shrink: 0; }

.order-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: center;
}
.order-item:last-child { border-bottom: none; }
.order-status {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 500;
}
.st-pending { background: rgba(245, 159, 0, .12); color: #d9480f; }
.st-accepted { background: rgba(34, 139, 230, .12); color: #1971c2; }
.st-ongoing { background: rgba(112, 72, 232, .12); color: #6741d9; }
.st-completed { background: rgba(55, 178, 77, .12); color: #2f9e44; }
.st-cancelled { background: var(--surface-2); color: var(--text-mute); }
[data-theme="dark"] .st-pending { color: #ffa94d; }
[data-theme="dark"] .st-accepted { color: #74c0fc; }
[data-theme="dark"] .st-ongoing { color: #b197fc; }
[data-theme="dark"] .st-completed { color: #69db7c; }

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

.site-foot {
  padding: 28px 0 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  line-height: 1.8;
}

/* ---------------- 查看器 ---------------- */

.viewer {
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s;
}
.viewer img, .viewer video {
  max-width: 100%; max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
}
.viewer-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: grid; place-items: center;
  color: #fff;
}
.viewer-close svg { width: 18px; height: 18px; }

.back-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.back-btn svg { width: 17px; height: 17px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  background: var(--surface-2);
  color: var(--text-dim);
}
.badge-ok { background: rgba(55, 178, 77, .12); color: #2f9e44; }
.badge-mute { background: var(--surface-2); color: var(--text-mute); }
.badge-warn { background: rgba(245, 159, 0, .12); color: #d9480f; }
.badge-info { background: rgba(34, 139, 230, .12); color: #1971c2; }
.badge-danger { background: rgba(224, 49, 49, .12); color: #e03131; }

.loading { padding: 36px; text-align: center; color: var(--text-mute); font-size: 13px; }

/* ---------------- 响应式 ---------------- */

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(4, 1fr); }
  .attendant-grid { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 32px; }
  .sheet { border-radius: 18px; margin: auto; max-height: 84vh; }
  .sheet-mask { align-items: center; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .wrap { padding: 0 24px; }
  .nav-desktop { display: flex; }
  .hero { padding: 52px 0 28px; }
  .hero h1 { font-size: 38px; }
  .hero-sub { font-size: 14.5px; }
  .attendant-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .project-grid { gap: 12px; }
  .section-head { margin: 40px 0 16px; }
  .section-title { font-size: 17px; }
  .order-bar {
    position: static;
    max-width: 1080px;
    margin: 24px auto 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    background: var(--surface);
  }
}

@media (min-width: 1024px) {
  .detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
  .detail-side { position: sticky; top: 78px; }
  .detail-side .order-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 0;
    padding: 18px;
  }
  .detail-side .order-price { text-align: center; }
  .detail-side .order-bar .btn { width: 100%; }
  .me-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
}

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