*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --primary: #5b6cff;
  --primary-dark: #4453e8;
  --ink: #101828;
  --text: #344054;
  --muted: #8a94a6;
  --line: #eef1f7;
  --bg: #f5f7fb;
  --card: #ffffff;
  --orange: #ff6b35;
  --green: #10b981;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #e9edf5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }

.app-frame {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(16, 24, 40, 0.08);
}
.app-main { flex: 1 1 auto; min-width: 0; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6d7cff, #4f46e5);
  color: #fff;
  font-weight: 700;
  flex: none;
  box-shadow: 0 6px 16px rgba(91, 108, 255, 0.35);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  flex: none;
}

.icon-btn {
  width: 34px; height: 34px;
  border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--text);
}
.icon-btn:active { background: #f1f4fa; }

.text-btn {
  border: none; background: transparent; color: var(--primary);
  font-size: 13px; font-weight: 600; padding: 6px 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 14px;
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary {
  background: linear-gradient(135deg, #6d7cff, #4f46e5);
  color: #fff;
  box-shadow: 0 10px 20px rgba(91, 108, 255, 0.32);
}
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-block { width: 100%; }

.input {
  width: 100%;
  height: 46px;
  border: 1px solid #e6e9f2;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.12);
}
.input::placeholder { color: #b3bccb; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }

.field { display: block; margin-bottom: 15px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.field-label em { color: #ef4444; font-style: normal; margin-left: 3px; }
.field-optional { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-left: 6px; }
.field-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-error {
  background: #fff1f0;
  border: 1px solid #ffd6d3;
  color: #d92d20;
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, #5b6cff, #7c3aed 55%, #4f46e5);
  color: #fff;
  z-index: 100;
}
.splash-logo {
  width: 66px; height: 66px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.splash-name { font-size: 17px; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 8px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(91, 108, 255, 0.2);
  border-top-color: var(--primary);
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
.spinner.light { border-color: rgba(255, 255, 255, 0.32); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 46px 0; color: var(--muted); font-size: 13px;
}

/* ---------- auth ---------- */
.auth-page {
  width: 100%; max-width: 560px; min-height: 100vh;
  margin: 0 auto; background: var(--bg);
  box-shadow: 0 0 60px rgba(16, 24, 40, 0.1);
  padding-bottom: 32px;
}
.auth-hero {
  position: relative;
  padding: 22px 24px 58px;
  border-radius: 0 0 34px 34px;
  background: linear-gradient(150deg, #5b6cff 0%, #6d5bfa 45%, #8b5cf6 100%);
  color: #fff;
  overflow: hidden;
}
.auth-hero-sm { padding-bottom: 48px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.auth-brand .logo { background: rgba(255, 255, 255, 0.2); box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.25); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 28px; padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11.5px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.auth-hero h1 { margin-top: 14px; font-size: 34px; line-height: 1.24; letter-spacing: -0.02em; font-weight: 700; }
.auth-hero-sm h1 { font-size: 28px; margin-top: 26px; }
.auth-hero p { margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.82); }
.auth-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.orb-a { width: 180px; height: 180px; right: -50px; top: -40px; }
.orb-b { width: 90px; height: 90px; right: 40px; bottom: -20px; background: rgba(255, 255, 255, 0.08); }
.orb-c { width: 42px; height: 42px; right: 128px; top: 96px; background: rgba(255, 224, 138, 0.3); }
.auth-card {
  position: relative;
  margin: -34px 18px 0;
  background: #fff;
  border-radius: 24px;
  padding: 24px 20px 20px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}
.auth-card-register { margin-top: -26px; }
.auth-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.auth-sub { margin: 5px 0 20px; font-size: 12.5px; color: var(--muted); }
.auth-switch { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 600; margin-left: 4px; }
.auth-note { margin-top: 14px; text-align: center; font-size: 10.5px; color: #b3bccb; line-height: 1.5; }

/* ---------- home header / hero ---------- */
.home { padding-bottom: 20px; }
.home-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px 12px;
}
.home-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.home-brand-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.store-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11.5px; color: var(--text); flex: none; max-width: 46%;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}
.store-chip select {
  appearance: none; border: none; background: transparent; outline: none;
  font-size: 12px; font-weight: 600; max-width: 130px; text-overflow: ellipsis;
}
.store-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); flex: none; }

.hero {
  position: relative;
  margin: 2px 16px 0;
  padding: 22px 20px;
  border-radius: 26px;
  background: linear-gradient(135deg, #5b6cff 0%, #6d5bfa 48%, #8b5cf6 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(91, 108, 255, 0.3);
}
.hero-content { position: relative; z-index: 2; max-width: 76%; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10.5px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.hero-tag .spark { color: #ffe08a; }
.hero h1 { margin-top: 12px; font-size: 31px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.hero h1 span { color: #ffe08a; }
.hero p { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.82); }
.hero-stats { display: flex; gap: 18px; margin-top: 18px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-size: 17px; font-weight: 700; }
.hero-stats span { font-size: 10px; color: rgba(255, 255, 255, 0.72); }
.hero-art { position: absolute; right: -14px; bottom: -18px; width: 160px; height: 170px; z-index: 1; }
.hero-circle { position: absolute; border-radius: 50%; }
.hero-circle.c1 { width: 150px; height: 150px; right: 0; bottom: 6px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); }
.hero-circle.c2 { width: 96px; height: 96px; right: 24px; bottom: 30px; background: rgba(255, 255, 255, 0.06); }
.hero-emoji {
  position: absolute; right: 44px; bottom: 46px;
  font-size: 52px;
  filter: drop-shadow(0 10px 16px rgba(30, 27, 75, 0.35));
  transform: rotate(-8deg);
  animation: float 3.6s ease-in-out infinite;
}
.hero-float {
  position: absolute;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #4f46e5;
  font-size: 9.5px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(30, 27, 75, 0.18);
}
.hero-float.f1 { right: 20px; top: 34px; transform: rotate(6deg); }
.hero-float.f2 { right: 88px; bottom: 22px; color: #ea580c; transform: rotate(-6deg); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-7px) rotate(-6deg); } }

.notice {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 16px 0;
  padding: 9px 12px;
  background: #fff8eb;
  border: 1px solid #ffe9c2;
  border-radius: 12px;
  font-size: 11.5px; color: #a16207;
}
.notice-icon { font-size: 13px; flex: none; }
.notice-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section { margin-top: 22px; padding: 0 16px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.section-head p { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.section-count { font-size: 11.5px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text);
  font-size: 12.5px; font-weight: 500;
}
.chip.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.18);
}

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card {
  border: none; padding: 0; text-align: left;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.product-card:active { transform: scale(0.982); box-shadow: 0 3px 10px rgba(16, 24, 40, 0.06); }
.product-cover { position: relative; height: 84px; display: flex; align-items: center; padding: 12px; overflow: hidden; }
.product-cover.has-image { padding: 0; }
.product-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 21px;
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.14);
}
.product-icon.lg { width: 54px; height: 54px; border-radius: 17px; font-size: 26px; flex: none; }
.order-product-photo { width: 54px; height: 54px; border-radius: 17px; object-fit: cover; flex: none; background: #f1f5f9; }
.product-tag {
  position: absolute; top: 9px; right: 9px;
  padding: 3px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #ea580c; font-size: 9.5px; font-weight: 700;
}
.product-body { padding: 2px 12px 12px; }
.product-game { font-size: 10px; color: var(--muted); letter-spacing: 0.01em; }
.product-name {
  margin-top: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.4;
  min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.price { color: var(--orange); font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.price .yuan { font-size: 11.5px; margin-right: 1px; }
.price .unit { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.add-btn {
  width: 25px; height: 25px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6d7cff, #4f46e5);
  color: #fff; font-size: 17px; font-weight: 400;
  box-shadow: 0 5px 10px rgba(91, 108, 255, 0.35);
}

.players-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.players-strip::-webkit-scrollbar { display: none; }
.player-card {
  min-width: 86px; padding: 13px 8px 11px;
  border: 1px solid var(--line); background: #fff; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: none;
}
.player-name { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.player-rank { font-size: 10px; color: var(--primary); }
.player-orders { font-size: 9.5px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feature {
  background: #fff; border-radius: 14px; padding: 13px 6px;
  text-align: center; border: 1px solid #f1f4fa;
}
.feature span { font-size: 19px; }
.feature b { display: block; font-size: 11.5px; margin-top: 5px; }
.feature p { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.home-foot { text-align: center; color: #b3bccb; font-size: 10.5px; padding: 26px 0 10px; }

/* ---------- sheet ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.46);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.18s ease;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 90vh;
  background: #fff; border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column;
  animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 50px rgba(16, 24, 40, 0.2);
}
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: #e4e9f2; margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 8px; flex: none; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-body { padding: 6px 20px 20px; overflow-y: auto; }
.sheet-footer { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.sheet-text { font-size: 14px; line-height: 1.65; color: var(--text); }
.sheet-sub { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.order-product { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; }
.order-product-name { font-size: 16px; font-weight: 700; }
.order-product-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.order-product-price { font-size: 21px; font-weight: 700; color: var(--orange); margin-top: 7px; line-height: 1; }
.order-product-price span { font-size: 11px; color: var(--muted); font-weight: 400; }
.order-desc {
  background: #f8fafc; border: 1px solid #eef2f8; border-radius: 12px;
  padding: 10px 12px; font-size: 12px; color: #667085; line-height: 1.6; margin-bottom: 16px;
}
.player-select { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.player-select::-webkit-scrollbar { display: none; }
.player-pill {
  flex: none; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 12px;
}
.player-pill.active { background: rgba(91, 108, 255, 0.1); border-color: #b9c0ff; color: var(--primary-dark); font-weight: 600; }
.order-row { display: flex; gap: 12px; align-items: flex-start; }
.order-row > .field:last-child { flex: 1.1; }
.order-row .field { flex: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #e6e9f2; border-radius: 12px; height: 42px; overflow: hidden; background: #f8fafc; }
.stepper button { width: 38px; height: 100%; border: none; background: transparent; font-size: 18px; color: var(--text); }
.stepper button:disabled { color: #cbd5e1; }
.stepper span { min-width: 34px; text-align: center; font-weight: 600; font-size: 14px; }
.login-hint { font-size: 11.5px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 10px; margin-top: 4px; }
.order-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.order-bar-label { font-size: 10.5px; color: var(--muted); }
.order-bar-price { font-size: 25px; font-weight: 700; color: var(--orange); line-height: 1.15; letter-spacing: -0.02em; }
.order-bar-price span { font-size: 14px; margin-right: 1px; }
.order-bar .btn { min-width: 150px; }

/* ---------- tabbar ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #eef1f7;
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #98a2b3; font-size: 10px; font-weight: 500;
  padding: 3px 0;
}
.tabbar-item svg { transition: transform 0.18s ease; }
.tabbar-item.active { color: var(--primary); }
.tabbar-item.active svg { transform: translateY(-1px); }
.tabbar-item.active::before {
  content: ""; position: absolute; margin-top: -6px; width: 18px; height: 3px;
  border-radius: 2px; background: var(--primary); opacity: 0.9;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 4px;
  height: 56px; padding: 0 10px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.topbar-right { min-width: 40px; display: flex; justify-content: flex-end; }
.topbar-spacer { display: inline-block; width: 34px; }

/* ---------- orders ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500;
}
.tab.active { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06); font-weight: 600; }
.orders-list { padding: 6px 16px 24px; }
.order-card {
  display: block; background: #fff; border-radius: 18px;
  padding: 14px; margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
  transition: transform 0.15s ease;
}
.order-card:active { transform: scale(0.988); }
.order-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed #f0f3f9; }
.order-no { font-size: 11px; color: var(--muted); }
.order-card-main { display: flex; gap: 11px; align-items: flex-start; padding-top: 11px; }
.order-thumb { width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.order-thumb-photo { object-fit: cover; background: #f1f5f9; }
.order-info { flex: 1; min-width: 0; }
.order-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.order-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.order-amount b { font-size: 15px; color: var(--ink); }
.order-amount span { font-size: 10px; color: var(--muted); }
.order-card-foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px dashed #f0f3f9; margin-top: 11px; padding-top: 9px; font-size: 11px; color: var(--muted); }
.link-text { color: var(--primary); }
.list-end { text-align: center; font-size: 10.5px; color: #b3bccb; padding: 14px 0; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; flex: none; }
.st-pending { background: #fff4e6; color: #d97706; }
.st-accepted { background: #eaf1ff; color: #2563eb; }
.st-serving { background: #f1ecff; color: #7c3aed; }
.st-completed { background: #e9fbf3; color: #059669; }
.st-cancelled { background: #f1f4f9; color: #94a3b8; }

/* ---------- detail ---------- */
.sub-page { padding-bottom: 28px; }
.success-banner {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 2px 16px 12px; padding: 12px 14px;
  background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 14px;
}
.success-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: #10b981; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex: none;
}
.success-banner b { font-size: 13px; color: #047857; }
.success-banner p { font-size: 11px; color: #059669; margin-top: 2px; }
.detail-hero {
  margin: 2px 16px 0; padding: 17px 18px 19px;
  border-radius: 22px; color: #fff;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.16);
  position: relative; overflow: hidden;
}
.detail-hero.st-pending { background: linear-gradient(135deg, #ffb457, #ff7a35); }
.detail-hero.st-accepted { background: linear-gradient(135deg, #6d9dff, #3567e8); }
.detail-hero.st-serving { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.detail-hero.st-completed { background: linear-gradient(135deg, #34d399, #059669); }
.detail-hero.st-cancelled { background: linear-gradient(135deg, #a8b3c4, #64748b); }
.detail-hero-top { display: flex; align-items: center; justify-content: space-between; }
.detail-status { font-size: 11px; font-weight: 600; opacity: 0.9; }
.detail-hero .pill { background: rgba(255, 255, 255, 0.2); color: #fff; }
.detail-hero-title { font-size: 21px; font-weight: 700; margin-top: 14px; line-height: 1.3; }
.detail-hero-sub { font-size: 11.5px; opacity: 0.82; margin-top: 5px; }
.detail-hero-amount { font-size: 30px; font-weight: 700; margin-top: 14px; letter-spacing: -0.02em; }
.card { background: #fff; border-radius: 18px; box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05); }
.detail-card { margin: 14px 16px 0; padding: 16px; }
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.info-row { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid #f5f7fb; font-size: 12.5px; }
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--muted); flex: none; }
.info-row b { font-weight: 500; text-align: right; word-break: break-all; }
.info-note { color: #667085; font-weight: 400; }
.timeline { position: relative; padding: 8px 0 0 4px; }
.timeline-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: #edf1f7; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; flex: none; margin-top: 2px; position: relative; z-index: 1; box-shadow: 0 0 0 3px #fff; }
.dot-pending { background: #f59e0b; }
.dot-accepted { background: #3b82f6; }
.dot-serving { background: #8b5cf6; }
.dot-completed { background: #10b981; }
.dot-cancelled { background: #94a3b8; }
.timeline-body { flex: 1; }
.timeline-title { font-size: 12.5px; font-weight: 600; }
.timeline-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.timeline-note { font-size: 11.5px; color: #667085; margin-top: 4px; background: #f8fafc; border-radius: 8px; padding: 6px 8px; }
.detail-actions { padding: 18px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.detail-link { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; }

/* ---------- profile ---------- */
.profile-card {
  position: relative; overflow: hidden;
  margin: 2px 16px 0; padding: 20px 18px 16px;
  border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.3);
}
.profile-orb { position: absolute; width: 190px; height: 190px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, 0.09); }
.profile-main { position: relative; display: flex; align-items: center; gap: 13px; }
.profile-names { flex: 1; min-width: 0; }
.profile-names h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.profile-handle { font-size: 11.5px; color: rgba(255, 255, 255, 0.68); margin-top: 3px; }
.profile-edit {
  flex: none; height: 30px; padding: 0 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff; font-size: 11.5px;
  backdrop-filter: blur(4px);
}
.profile-tags { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.profile-tag {
  font-size: 10.5px; padding: 5px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}
.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 12px 16px 0; padding: 15px 0;
  background: #fff; border-radius: 18px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}
.profile-stats div { text-align: center; border-right: 1px solid #f1f4fa; }
.profile-stats div:last-child { border-right: none; }
.profile-stats b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.profile-stats span { font-size: 10.5px; color: var(--muted); margin-top: 2px; display: block; }
.menu-card { margin: 14px 16px 0; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05); }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; background: #fff; border: none;
  border-bottom: 1px solid #f5f7fb; text-align: left;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #fafbfe; }
.menu-icon { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.ic-blue { background: #eaf1ff; }
.ic-violet { background: #f1ecff; }
.ic-green { background: #e9fbf3; }
.ic-orange { background: #fff4e6; }
.menu-label { flex: 1; font-size: 13.5px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.menu-label em { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 400; }
.menu-arrow { color: #cbd5e1; font-size: 20px; line-height: 1; }
.logout-btn { margin: 16px 16px 0; width: calc(100% - 32px); color: #ef4444; border-color: #fee2e2; }
.profile-foot { text-align: center; font-size: 10px; color: #b3bccb; line-height: 1.7; padding: 22px 0 8px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(16, 24, 40, 0.88); color: #fff;
  font-size: 12px; padding: 9px 15px; border-radius: 999px; z-index: 90;
  animation: fadeIn 0.2s ease;
}

/* ---------- empty ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 54px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 10px; filter: grayscale(0.15); }
.empty-title { font-size: 14.5px; font-weight: 600; }
.empty-desc { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; max-width: 260px; }

/* ---------- desktop ---------- */
@media (min-width: 640px) {
  body { padding: 22px 0; background: radial-gradient(circle at 50% 0, #e6ebf7, #dfe5f1 55%, #d9e0ee); }
  .app-frame, .auth-page {
    min-height: calc(100vh - 44px);
    border-radius: 28px;
    overflow: hidden;
  }
  .auth-page { margin: 0 auto; }
  .tabbar { border-radius: 0 0 28px 28px; }
  .home, .orders-page, .sub-page, .profile-page { min-height: 100%; }
}

/* ---------- 选人 / 余额支付 / 钱包 ---------- */
.price-markup { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-option {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 10px 11px; border-radius: 12px; border: 1.5px solid #e8edf6;
  background: #fafbff; color: var(--text);
}
.pay-option b { font-size: 12.5px; }
.pay-option span { font-size: 10.5px; color: var(--muted); }
.pay-option.active { border-color: #7c86ff; background: #eef0ff; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1); }
.pay-option:disabled { opacity: 0.5; }
.profile-balance {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
}
.profile-balance span { display: block; font-size: 10.5px; opacity: 0.82; }
.profile-balance b { font-size: 18px; letter-spacing: -0.01em; }
.profile-balance button { background: rgba(255, 255, 255, 0.2); border: 0; border-radius: 999px; color: #fff; font-size: 11px; padding: 6px 12px; }
.wallet-hero {
  display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px;
  padding: 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.wallet-hero span { font-size: 11px; opacity: 0.85; }
.wallet-hero b { font-size: 28px; letter-spacing: -0.02em; }
.wallet-hero em { font-style: normal; font-size: 10px; opacity: 0.75; margin-top: 4px; }
.wallet-list { display: flex; flex-direction: column; }
.wallet-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f2f5fa; }
.wallet-item:last-child { border-bottom: none; }
.wallet-item b { display: block; font-size: 12.5px; }
.wallet-item span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.wallet-amount-wrap { text-align: right; flex: none; }
.wallet-amount-wrap strong { font-size: 13px; }
.wallet-amount-wrap strong.pos { color: #0f9f6e; }
.wallet-amount-wrap strong.neg { color: #ef4444; }
.wallet-amount-wrap em { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; }
.wallet-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0; }

.profile-balance-actions { display: flex; gap: 6px; flex: none; }
.recharge-flash {
  padding: 9px 12px; border-radius: 11px; margin-bottom: 10px;
  background: #eafaf0; border: 1px solid #c9f0da; color: #0f8f5f; font-size: 12px;
}
.recharge-stores { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 5px; }
.recharge-store {
  flex: none; padding: 8px 13px; border-radius: 999px; font-size: 12px;
  border: 1.5px solid #e8edf6; background: #fafbff; color: var(--text);
}
.recharge-store.active { border-color: #7c86ff; background: #eef0ff; color: #4453e8; font-weight: 600; }
.recharge-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recharge-method {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 10px 11px; border-radius: 12px; border: 1.5px solid #e8edf6;
  background: #fafbff; color: var(--text);
}
.recharge-method b { font-size: 12.5px; line-height: 1.35; }
.recharge-method span { font-size: 10.5px; color: var(--muted); }
.recharge-method.active { border-color: #7c86ff; background: #eef0ff; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1); }
.recharge-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 16px 14px; margin: 2px 0 14px; border-radius: 16px;
  border: 1px dashed #cfd7ec; background: #fff;
}
.recharge-qr { width: 190px; height: 190px; object-fit: contain; }
.recharge-qr-wrap b { font-size: 12px; text-align: center; line-height: 1.5; }
.recharge-qr-wrap span { font-size: 10.5px; color: var(--muted); text-align: center; }
.recharge-offline {
  padding: 12px; margin: 2px 0 14px; border-radius: 13px;
  background: #fff8ed; border: 1px solid #ffe2b8; color: #8a5a12;
  font-size: 12px; line-height: 1.65;
}
.recharge-offline b { display: block; margin-top: 5px; }
.recharge-note {
  padding: 9px 12px; margin-bottom: 12px; border-radius: 11px;
  background: #f5f7ff; color: #5b6478; font-size: 11.5px; line-height: 1.6;
}
.recharge-proof { display: flex; align-items: center; gap: 12px; }
.recharge-proof img {
  width: 66px; height: 66px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
}
.recharge-proof-actions { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.recharge-proof-actions span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recharge-proof-actions button { align-self: flex-start; border: 0; background: transparent; color: var(--primary); font-size: 11.5px; padding: 0; }
.recharge-upload { display: flex; align-items: center; justify-content: center; min-height: 46px; }
.recharge-history { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.recharge-history-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.recharge-history-head b { font-size: 13px; }
.recharge-history-head span { font-size: 10px; color: var(--muted); }
.recharge-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f4f6fb; }
.recharge-item:last-child { border-bottom: none; }
.recharge-item-main { min-width: 0; }
.recharge-item-main b { display: block; font-size: 12px; }
.recharge-item-main span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); line-height: 1.5; }
.recharge-item-main em { display: block; margin-top: 3px; font-style: normal; font-size: 10px; color: #d4574a; line-height: 1.5; }
.recharge-item-side { flex: none; text-align: right; }
.recharge-item-side strong { display: block; font-size: 13px; }
.recharge-item-side span { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 999px; font-size: 10px; }
.rc-pending { color: #b7791f; background: #fff7e6; }
.rc-confirmed { color: #0f8f5f; background: #eafaf0; }
.rc-rejected { color: #c2412f; background: #fff1ef; }

@media (max-width: 359px) {
  .hero h1 { font-size: 27px; }
  .hero-art { opacity: 0.75; right: -28px; }
  .hero-content { max-width: 82%; }
  .product-grid { gap: 9px; }
  .product-name { font-size: 12.5px; }
  .form-row { grid-template-columns: 1fr; }
}
/* ---------- 登录设备与安全 ---------- */
.security-tip {
  padding: 10px 12px; border-radius: 12px; background: #f3f5ff; color: #5b6478;
  font-size: 12px; line-height: 1.65; margin-bottom: 12px;
}
.device-list { display: flex; flex-direction: column; gap: 9px; }
.device-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 13px; border: 1px solid #edf0f7; background: #fbfcff;
}
.device-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.device-main b { font-size: 12.5px; color: #1f2937; }
.device-main span { font-size: 11px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-main em { font-style: normal; font-size: 10.5px; color: #9aa3b2; }
.device-now {
  flex: none; font-size: 10.5px; color: #16a34a; background: #eafaf0;
  border-radius: 999px; padding: 3px 8px;
}
/* ---------- 首页轮播 ---------- */
.home-carousel {
  position: relative; margin: 2px 16px 0; border-radius: 26px; overflow: hidden;
  aspect-ratio: 16 / 7; background: #eef2ff;
  box-shadow: 0 18px 36px rgba(91, 108, 255, 0.18);
}
.home-carousel-track { display: flex; height: 100%; transition: transform 0.45s ease; }
.home-carousel-slide { flex: 0 0 100%; height: 100%; }
.home-carousel-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.home-carousel-dots button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6); box-shadow: 0 1px 4px rgba(16, 24, 40, 0.25);
  transition: width 0.2s ease, background 0.2s ease;
}
.home-carousel-dots button.active { width: 16px; background: #fff; }
