/* 聚测 (JuCe) — Web 前端样式 (SPEC §7 设计语言)
   主色 brand #0F9D8C / CTA 橙 #F97316 / 背景 #F5F7FA
   响应式：手机 1 列 / 平板 2 列 / 桌面 3 列；桌面顶部导航 + 移动底部 Tab。 */

:root {
  --brand: #0F9D8C;
  --brand-2: #2563EB;
  --cta: #F97316;
  --cta-dark: #EA580C;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --success: #16A34A;
  --border: #E5E7EB;
  --danger: #DC2626;
  --warn: #D97706;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);

  --maxw: 1120px;
  --nav-h: 60px;
  --tab-h: 58px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* ============================ 顶部导航 (桌面/平板) ============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  color: var(--brand);
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand-logo .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-radius: 9px; font-size: 17px;
}
.brand-logo .sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--text); background: #EEF2F4; }
.nav-links a.active { color: var(--brand); background: rgba(15,157,140,.10); }
.nav-spacer { flex: 1; }
.nav-user {
  display: flex; align-items: center; gap: 10px;
}
.nav-user .uname { font-weight: 600; font-size: 14px; }
.nav-user .uorg { color: var(--muted); font-size: 12px; }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  transition: transform .08s, box-shadow .15s, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-cta {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249,115,22,.32);
}
.btn-cta:hover { background: var(--cta-dark); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: #0c8576; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #EEF2F4; color: var(--text); }
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-danger { background: #fff; color: var(--danger); border-color: #FECACA; }
.btn-danger:hover { background: #FEF2F2; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============================ 通用卡片/区块 ============================ */
.page { padding: 18px 0 28px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 12px;
}
.section-title h2 { font-size: 19px; margin: 0; font-weight: 800; }
.section-title .hint { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================ Hero ============================ */
.hero {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  background:
    radial-gradient(1100px 360px at 88% -40%, rgba(249,115,22,.22), transparent 60%),
    radial-gradient(900px 420px at -10% 120%, rgba(37,99,235,.20), transparent 55%),
    linear-gradient(135deg, #0F9D8C 0%, #0c8576 60%, #0a6f63 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .5px;
}
.hero .slogan {
  font-size: 17px;
  font-weight: 700;
  opacity: .96;
  margin-bottom: 4px;
}
.hero .lead {
  opacity: .9;
  font-size: 14.5px;
  max-width: 600px;
}
.hero-values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-values .v {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  backdrop-filter: blur(2px);
}
.hero-values .v .ico { font-size: 16px; }

/* ============================ 分类 chips ============================ */
.chips {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chips::-webkit-scrollbar { height: 6px; }
.chips::-webkit-scrollbar-thumb { background: #d6dbe0; border-radius: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all .15s;
}
.chip:hover { border-color: var(--brand); }
.chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(15,157,140,.3);
}
.chip .ico { font-size: 15px; }

/* ============================ 团购卡片网格 ============================ */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 6px;
}
@media (min-width: 641px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.gb-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s, box-shadow .18s, border-color .18s;
  cursor: pointer;
}
.gb-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d4dade;
}
.gb-cover {
  height: 96px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: linear-gradient(135deg, #E6F6F3 0%, #EAF1FB 100%);
  border-bottom: 1px solid var(--border);
}
.gb-cover .emoji {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
}
.gb-cover .cat-badge {
  font-size: 12px; font-weight: 700; color: var(--brand);
  background: #fff; border: 1px solid #cdeae5;
  padding: 4px 9px; border-radius: 999px;
}
.gb-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.gb-title { font-size: 16px; font-weight: 800; margin: 0 0 4px; line-height: 1.35; }
.gb-spec {
  color: var(--muted); font-size: 12.5px; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 32px;
}
.gb-price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.gb-price {
  font-size: 24px; font-weight: 900; color: var(--cta);
  letter-spacing: -.5px;
}
.gb-price .cur { font-size: 15px; font-weight: 800; margin-right: 1px; }
.gb-price .unit { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.gb-market { color: var(--muted); text-decoration: line-through; font-size: 13.5px; }
.gb-save {
  font-size: 12px; font-weight: 800; color: #fff;
  background: var(--cta); padding: 2px 8px; border-radius: 6px;
}
.gb-startprice-note { font-size: 11.5px; color: var(--warn); margin-top: 3px; font-weight: 600; }

.progress {
  margin: 12px 0 8px;
  height: 9px;
  background: #EEF1F4;
  border-radius: 999px;
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--cta));
  transition: width .5s ease;
  min-width: 4px;
}
.gb-progress-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.gb-progress-meta b { color: var(--text); }

.gb-nudge {
  font-size: 12.5px;
  color: var(--brand);
  background: rgba(15,157,140,.08);
  border: 1px dashed rgba(15,157,140,.4);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  font-weight: 600;
}
.gb-nudge.maxed {
  color: var(--success);
  background: rgba(22,163,74,.08);
  border-color: rgba(22,163,74,.4);
}
.gb-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.gb-foot .deadline { display: flex; align-items: center; gap: 4px; }
.gb-foot .seats b { color: var(--cta); }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.badge-open { background: rgba(15,157,140,.12); color: var(--brand); }
.badge-locked { background: rgba(217,119,6,.14); color: var(--warn); }
.badge-fulfilled { background: rgba(22,163,74,.13); color: var(--success); }
.badge-failed { background: rgba(220,38,38,.10); color: var(--danger); }
.badge-closed { background: #EEF1F4; color: var(--muted); }
.badge-pending { background: rgba(217,119,6,.14); color: var(--warn); }
.badge-confirmed { background: rgba(37,99,235,.12); color: var(--brand-2); }
.badge-paid { background: rgba(22,163,74,.13); color: var(--success); }
.badge-cancelled { background: #EEF1F4; color: var(--muted); }
.badge-refunded { background: rgba(220,38,38,.10); color: var(--danger); }
.badge-matched { background: rgba(37,99,235,.12); color: var(--brand-2); }

/* ============================ 详情页 ============================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 16px;
}
@media (min-width: 921px) {
  .detail-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
}
.detail-hero {
  display: flex; gap: 16px; align-items: center;
  padding: 20px;
}
.detail-hero .emoji {
  font-size: 56px; line-height: 1;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #E6F6F3, #EAF1FB);
  border-radius: var(--radius); flex: 0 0 auto;
}
.detail-hero h1 { font-size: 22px; margin: 0 0 6px; font-weight: 900; line-height: 1.3; }
.detail-hero .meta { color: var(--muted); font-size: 13px; }

.panel { padding: 18px 20px; }
.panel h3 {
  font-size: 15px; margin: 0 0 12px; font-weight: 800;
  display: flex; align-items: center; gap: 7px;
}
.panel + .panel { margin-top: 16px; }
.kv { display: flex; gap: 10px; font-size: 13.5px; margin-bottom: 7px; }
.kv .k { color: var(--muted); flex: 0 0 78px; }
.kv .v { color: var(--text); font-weight: 600; }
.desc-text { font-size: 14px; color: #374151; line-height: 1.7; white-space: pre-wrap; }

/* 阶梯价梯子 */
.ladder { display: flex; flex-direction: column; gap: 8px; }
.tier {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  position: relative;
  transition: all .15s;
}
.tier .tier-qty { font-weight: 700; font-size: 14px; flex: 1; }
.tier .tier-qty .sub { color: var(--muted); font-weight: 500; font-size: 12px; display: block; }
.tier .tier-price { font-weight: 800; font-size: 17px; color: var(--text); }
.tier .tier-price .cur { font-size: 12px; }
.tier.reached {
  border-color: var(--brand);
  background: rgba(15,157,140,.07);
}
.tier.current {
  border-color: var(--cta);
  background: rgba(249,115,22,.08);
  box-shadow: 0 2px 10px rgba(249,115,22,.16);
}
.tier.current .tier-price { color: var(--cta); }
.tier .tier-tag {
  position: absolute; top: -9px; right: 12px;
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: var(--cta); padding: 2px 8px; border-radius: 999px;
}
.tier.reached:not(.current) .tier-tag {
  background: var(--brand);
}
.tier .check { color: var(--success); font-weight: 800; }
.tier .lock-ico { color: var(--muted); }

.price-summary {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.price-summary .big {
  font-size: 34px; font-weight: 900; color: var(--cta); letter-spacing: -1px;
}
.price-summary .big .cur { font-size: 19px; }
.price-summary .mkt { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.price-summary .save-pill {
  background: var(--cta); color: #fff; font-weight: 800;
  font-size: 12.5px; padding: 3px 10px; border-radius: 7px;
}

/* 最近参团 */
.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.recent-item:last-child { border-bottom: none; }
.recent-item .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.recent-item .rname { font-weight: 600; flex: 1; }
.recent-item .rqty { color: var(--brand); font-weight: 700; }
.recent-item .rtime { color: var(--muted); font-size: 11.5px; }

/* 参团表单 (sticky aside on desktop) */
.join-card { padding: 18px 20px; }
@media (min-width: 921px) {
  .aside-sticky { position: sticky; top: calc(var(--nav-h) + 16px); }
}

/* 表单元素 */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 13px; font-weight: 700;
  margin-bottom: 6px; color: #374151;
}
.field label .req { color: var(--danger); }
.field .hint { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,157,140,.14);
}
.textarea { resize: vertical; min-height: 76px; }
.qty-stepper { display: flex; align-items: stretch; gap: 0; max-width: 160px; }
.qty-stepper button {
  width: 42px; border: 1px solid var(--border); background: #F8FAFB;
  font-size: 20px; font-weight: 700; color: var(--text);
}
.qty-stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-stepper input {
  flex: 1; text-align: center; border: 1px solid var(--border);
  border-left: none; border-right: none; min-width: 0;
  font-weight: 800; font-size: 16px;
}
.join-estimate {
  background: #F8FAFB; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 14px;
  font-size: 13px;
}
.join-estimate .row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.join-estimate .row:last-child { margin-bottom: 0; }
.join-estimate .total { font-weight: 800; font-size: 16px; color: var(--cta); }
.join-estimate .total .cur { font-size: 12px; }

/* 移动端底部吸顶 CTA (详情页) */
.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(16,24,40,.08);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center; gap: 14px;
}
/* .mobile-cta-bar.show 仅在 ≤920px 媒体查询内显示 (见底部) */
.mobile-cta-bar .mc-price { flex: 1; }
.mobile-cta-bar .mc-price .p { font-size: 21px; font-weight: 900; color: var(--cta); }
.mobile-cta-bar .mc-price .p .cur { font-size: 13px; }
.mobile-cta-bar .mc-price .s { font-size: 11.5px; color: var(--muted); }
.mobile-cta-bar .btn { padding: 12px 26px; }

/* ============================ 我的订单 ============================ */
.order-card { padding: 16px 18px; margin-bottom: 14px; }
.order-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.order-head .emoji { font-size: 30px; }
.order-head .ot { flex: 1; }
.order-head .ot h4 { margin: 0 0 2px; font-size: 15.5px; font-weight: 800; }
.order-head .ot .sub { color: var(--muted); font-size: 12.5px; }
.order-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px;
  font-size: 13px; margin-bottom: 12px;
}
@media (min-width: 561px) { .order-meta { grid-template-columns: repeat(4, 1fr); } }
.order-meta .m .lbl { color: var(--muted); font-size: 11.5px; }
.order-meta .m .val { font-weight: 700; }
.order-meta .m .val.amt { color: var(--cta); }
.order-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ============================ 登录 / 注册 ============================ */
.auth-wrap {
  max-width: 420px; margin: 30px auto;
}
.auth-card { padding: 26px 26px 24px; }
.auth-tabs {
  display: flex; gap: 4px; background: #EEF1F4; padding: 4px;
  border-radius: var(--radius-sm); margin-bottom: 20px;
}
.auth-tabs button {
  flex: 1; padding: 9px; border: none; background: transparent;
  border-radius: 8px; font-weight: 700; font-size: 14.5px; color: var(--muted);
  transition: all .15s;
}
.auth-tabs button.active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.auth-demo {
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
  background: #F8FAFB; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.auth-demo b { color: var(--text); }
.auth-demo .chiprow { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.auth-demo .chiprow button {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--brand);
}

/* ============================ 管理后台 ============================ */
.stats-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 6px;
}
@media (min-width: 641px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1025px) { .stats-grid { grid-template-columns: repeat(6, 1fr); } }
.stat {
  padding: 15px 16px;
  border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.stat .label { font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.stat .num { font-size: 24px; font-weight: 900; letter-spacing: -.5px; }
.stat .num .cur { font-size: 14px; font-weight: 800; }
.stat.accent { background: linear-gradient(135deg, #0F9D8C, #0c8576); border: none; color: #fff; }
.stat.accent .label { color: rgba(255,255,255,.85); }
.stat.profit { background: linear-gradient(135deg, #F97316, #EA580C); border: none; color: #fff; }
.stat.profit .label { color: rgba(255,255,255,.9); }

.admin-tabs {
  display: flex; gap: 6px; margin: 20px 0 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.admin-tabs button {
  padding: 10px 16px; border: none; background: transparent;
  font-weight: 700; font-size: 14.5px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.tbl th, table.tbl td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl th { background: #F8FAFB; color: var(--muted); font-weight: 700; font-size: 12.5px; position: sticky; top: 0; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: #FAFBFC; }
table.tbl td .pos { color: var(--success); font-weight: 700; }
table.tbl td .cost { color: var(--danger); font-weight: 600; }
table.tbl .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.admin-secret-note {
  font-size: 12px; color: var(--warn); background: rgba(217,119,6,.08);
  border: 1px solid rgba(217,119,6,.25); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px; font-weight: 600;
}

/* ============================ 加载 / 空态 / toast ============================ */
.loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px 20px; color: var(--muted);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #E5E7EB; border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 6px; }
@media (min-width: 641px) { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
.skel-card { height: 250px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); overflow: hidden; position: relative; }
.skel-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.04), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 56px 20px; color: var(--muted); text-align: center;
}
.empty .em-ico { font-size: 46px; opacity: .85; }
.empty .em-title { font-size: 16px; font-weight: 700; color: var(--text); }
.empty .em-sub { font-size: 13.5px; max-width: 340px; }

.toast-host {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px);
  transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
@media (min-width: 769px) { .toast-host { bottom: 24px; } }
.toast {
  background: #1F2937; color: #fff; padding: 11px 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn .25s ease;
}
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.toast.info { background: #1F2937; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ============================ 移动底部 Tab ============================ */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: flex; height: var(--tab-h); }
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600;
}
.tabbar a .ti { font-size: 21px; line-height: 1; }
.tabbar a.active { color: var(--brand); }

/* ============================ 杂项 / 工具类 ============================ */
.text-muted { color: var(--muted); }
.text-cta { color: var(--cta); }
.text-success { color: var(--success); }
.fw-800 { font-weight: 800; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  margin: 6px 0 2px;
}
.back-link:hover { color: var(--brand); }
.inline-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* 响应式：导航/Tab 切换 */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .tabbar { display: block; }
  body.has-tabbar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 25px; }
  .hero { padding: 24px 20px; }
  .topbar-inner { gap: 10px; }
  .brand-logo .sub { display: none; }
  .toast-host { bottom: calc(var(--tab-h) + 18px); }
}
@media (max-width: 920px) {
  /* 详情页移动端吸顶 CTA 仅小屏显示 */
  .mobile-cta-bar.show { display: flex; }
  body.detail-mobile { padding-bottom: calc(var(--tab-h) + 76px + env(safe-area-inset-bottom)); }
}
