:root {
  --primary: #818cf8;
  --primary-end: #6366f1;
  --bg-page: #07051a;
  --bg-nav: #2a1f6e;
  --bg-content: #12102e;
  --bg: #12102e;
  --bg-card: #1e1a4a;
  --bg-card-hover: #28225c;
  --bg-elevated: #1a1640;
  --text: #f0f0f0;
  --muted: #c4b5fd;
  --text-muted: #8b83b8;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --purple: #a855f7;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --card: #1e1a4a;
  --border: rgba(167, 139, 250, 0.28);
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-cool: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  --glow-a: rgba(129, 140, 248, 0.42);
  --glow-b: rgba(236, 72, 153, 0.16);
  --glow-c: rgba(99, 102, 241, 0.14);
  --price: #ff3b4a;
  --tab-active: #e0e7ff;
  --app-frame: #07051a;
  --glow-purple: 0 4px 16px rgba(99, 102, 241, 0.45);
  --radius: 12px;
  --radius-chip: 999px;
  --tab-h: 56px;
  --header-h: 48px;
}

:root[data-skin="night"] {
  --primary: #818cf8;
  --primary-end: #6366f1;
  --bg-page: #07051a;
  --bg-nav: #2a1f6e;
  --bg-content: #12102e;
  --bg: #12102e;
  --bg-card: #1e1a4a;
  --bg-card-hover: #28225c;
  --bg-elevated: #1a1640;
  --text: #f0f0f0;
  --muted: #c4b5fd;
  --text-muted: #8b83b8;
  --card: #1e1a4a;
  --border: rgba(167, 139, 250, 0.28);
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
  --glow-a: rgba(129, 140, 248, 0.42);
  --glow-b: rgba(236, 72, 153, 0.16);
  --glow-c: rgba(99, 102, 241, 0.14);
  --price: #ff3b4a;
  --tab-active: #e0e7ff;
  --app-frame: #07051a;
  --glow-purple: 0 4px 16px rgba(99, 102, 241, 0.45);
}
:root[data-skin="gold"] {
  --primary: #eab308;
  --primary-end: #f59e0b;
  --bg-page: #1a0a00;
  --bg-nav: #5a3208;
  --bg-content: #2c1608;
  --bg: #2c1608;
  --bg-card: #4a2810;
  --bg-card-hover: #5c3214;
  --bg-elevated: #3a1c0a;
  --text: #fff7e6;
  --muted: #e4c48a;
  --text-muted: #b08950;
  --card: #4a2810;
  --border: rgba(234, 179, 8, 0.32);
  --gradient-primary: linear-gradient(135deg, #eab308 0%, #f59e0b 50%, #b45309 100%);
  --glow-a: rgba(234, 179, 8, 0.40);
  --glow-b: rgba(245, 158, 11, 0.22);
  --glow-c: rgba(180, 83, 9, 0.18);
  --price: #ff3b4a;
  --tab-active: #fde68a;
  --app-frame: #1a0a00;
  --glow-purple: 0 4px 16px rgba(212, 160, 23, 0.45);
}
:root[data-skin="cyan"] {
  --primary: #22d3ee;
  --primary-end: #06b6d4;
  --bg-page: #00181e;
  --bg-nav: #0b5a68;
  --bg-content: #0a3038;
  --bg: #0a3038;
  --bg-card: #12505a;
  --bg-card-hover: #166068;
  --bg-elevated: #0e4048;
  --text: #e8fbff;
  --muted: #7dd3e0;
  --text-muted: #4d9aaa;
  --card: #12505a;
  --border: rgba(34, 211, 238, 0.32);
  --gradient-primary: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #0891b2 100%);
  --glow-a: rgba(34, 211, 238, 0.38);
  --glow-b: rgba(14, 165, 233, 0.20);
  --glow-c: rgba(16, 185, 129, 0.16);
  --price: #ff3b4a;
  --tab-active: #a5f3fc;
  --app-frame: #00181e;
  --glow-purple: 0 4px 16px rgba(34, 211, 238, 0.42);
}
:root[data-skin="flame"] {
  --primary: #fb7185;
  --primary-end: #f43f5e;
  --bg-page: #1a0208;
  --bg-nav: #6b1224;
  --bg-content: #2e0a14;
  --bg: #2e0a14;
  --bg-card: #4a1424;
  --bg-card-hover: #5c182c;
  --bg-elevated: #3a101c;
  --text: #fff1f2;
  --muted: #fda4af;
  --text-muted: #c07080;
  --card: #4a1424;
  --border: rgba(251, 113, 133, 0.32);
  --gradient-primary: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  --glow-a: rgba(244, 63, 94, 0.42);
  --glow-b: rgba(249, 115, 22, 0.22);
  --glow-c: rgba(225, 29, 72, 0.18);
  --price: #ffd60a;
  --tab-active: #fecdd3;
  --app-frame: #1a0208;
  --glow-purple: 0 4px 16px rgba(244, 63, 94, 0.45);
}
:root[data-skin="light"] {
  color-scheme: light;
  --primary: #4f46e5;
  --primary-end: #2563eb;
  --bg-page: #c5cad8;
  --bg-nav: #ffffff;
  --bg-content: #e4e8f0;
  --bg: #e4e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #f4f6fb;
  --text: #1f2937;
  --muted: #4b5563;
  --text-muted: #6b7280;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #2563eb 50%, #1d4ed8 100%);
  --glow-a: rgba(79, 70, 229, 0.12);
  --glow-b: rgba(37, 99, 235, 0.08);
  --glow-c: rgba(14, 165, 233, 0.08);
  --price: #e11d48;
  --tab-active: #4338ca;
  --app-frame: #c5cad8;
  --glow-purple: 0 4px 16px rgba(79, 70, 229, 0.18);
}
:root[data-skin="light"] .dark-chip {
  background: rgba(15, 23, 42, 0.05);
}
:root[data-skin="light"] .dark-chip-section {
  color: #312e81;
}
:root[data-skin="forest"] {
  --primary: #4ade80;
  --primary-end: #22c55e;
  --bg-page: #03140a;
  --bg-nav: #14532d;
  --bg-content: #0c2a18;
  --bg: #0c2a18;
  --bg-card: #164430;
  --bg-card-hover: #1c5c3c;
  --bg-elevated: #123624;
  --text: #ecfdf5;
  --muted: #86efac;
  --text-muted: #4d9a6e;
  --card: #164430;
  --border: rgba(74, 222, 128, 0.30);
  --gradient-primary: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #15803d 100%);
  --glow-a: rgba(74, 222, 128, 0.38);
  --glow-b: rgba(34, 197, 94, 0.18);
  --glow-c: rgba(16, 185, 129, 0.14);
  --price: #ff3b4a;
  --tab-active: #bbf7d0;
  --app-frame: #03140a;
  --glow-purple: 0 4px 16px rgba(34, 197, 94, 0.42);
}
:root[data-skin="ink"] {
  --primary: #e5e7eb;
  --primary-end: #9ca3af;
  --bg-page: #000000;
  --bg-nav: #262626;
  --bg-content: #141414;
  --bg: #141414;
  --bg-card: #2a2a2a;
  --bg-card-hover: #3a3a3a;
  --bg-elevated: #1f1f1f;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --text-muted: #737373;
  --card: #2a2a2a;
  --border: rgba(255, 255, 255, 0.14);
  --gradient-primary: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 50%, #737373 100%);
  --glow-a: rgba(255, 255, 255, 0.10);
  --glow-b: rgba(163, 163, 163, 0.08);
  --glow-c: rgba(82, 82, 82, 0.10);
  --price: #ff3b4a;
  --tab-active: #ffffff;
  --app-frame: #000000;
  --glow-purple: 0 4px 16px rgba(0, 0, 0, 0.45);
}
:root[data-skin="sakura"] {
  --primary: #f9a8d4;
  --primary-end: #ec4899;
  --bg-page: #1a0612;
  --bg-nav: #9d174d;
  --bg-content: #3b0a24;
  --bg: #3b0a24;
  --bg-card: #5c1638;
  --bg-card-hover: #701a45;
  --bg-elevated: #4a102e;
  --text: #fdf2f8;
  --muted: #f9a8d4;
  --text-muted: #db7093;
  --card: #5c1638;
  --border: rgba(244, 114, 182, 0.32);
  --gradient-primary: linear-gradient(135deg, #f9a8d4 0%, #ec4899 50%, #db2777 100%);
  --glow-a: rgba(244, 114, 182, 0.40);
  --glow-b: rgba(236, 72, 153, 0.22);
  --glow-c: rgba(219, 39, 119, 0.16);
  --price: #ffd60a;
  --tab-active: #fbcfe8;
  --app-frame: #1a0612;
  --glow-purple: 0 4px 16px rgba(236, 72, 153, 0.42);
}
:root[data-skin="ocean"] {
  --primary: #60a5fa;
  --primary-end: #2563eb;
  --bg-page: #020617;
  --bg-nav: #1e3a8a;
  --bg-content: #0c1e4a;
  --bg: #0c1e4a;
  --bg-card: #1e3a6e;
  --bg-card-hover: #254a86;
  --bg-elevated: #16305c;
  --text: #eff6ff;
  --muted: #93c5fd;
  --text-muted: #5b8fd4;
  --card: #1e3a6e;
  --border: rgba(96, 165, 250, 0.30);
  --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
  --glow-a: rgba(96, 165, 250, 0.38);
  --glow-b: rgba(37, 99, 235, 0.18);
  --glow-c: rgba(14, 165, 233, 0.14);
  --price: #ff3b4a;
  --tab-active: #bfdbfe;
  --app-frame: #020617;
  --glow-purple: 0 4px 16px rgba(37, 99, 235, 0.42);
}
:root[data-skin="cream"] {
  color-scheme: light;
  --primary: #b45309;
  --primary-end: #d97706;
  --bg-page: #e7d5b8;
  --bg-nav: #fffaf3;
  --bg-content: #f4ead8;
  --bg: #f4ead8;
  --bg-card: #fffdf8;
  --bg-card-hover: #fff7ed;
  --bg-elevated: #faf6f1;
  --text: #3f2e1e;
  --muted: #7c5c38;
  --text-muted: #9a7b55;
  --card: #fffdf8;
  --border: rgba(120, 80, 40, 0.16);
  --gradient-primary: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
  --glow-a: rgba(217, 119, 6, 0.14);
  --glow-b: rgba(180, 83, 9, 0.08);
  --glow-c: rgba(245, 158, 11, 0.08);
  --price: #e11d48;
  --tab-active: #92400e;
  --app-frame: #e7d5b8;
  --glow-purple: 0 4px 16px rgba(180, 83, 9, 0.16);
}
:root[data-skin="cream"] .dark-chip {
  background: rgba(63, 46, 30, 0.06);
}
:root[data-skin="cream"] .dark-chip-section {
  color: #92400e;
}

/* Desktop/mobile chrome: bind surfaces to the skin, not only inherited tokens */
:root[data-skin="night"] { background: #07051a; }
:root[data-skin="night"] body { background-color: #07051a; }
:root[data-skin="night"] .tab-bar { background: #2a1f6e !important; }
:root[data-skin="night"] .app-stage,
:root[data-skin="night"] .page-main { background: #12102e !important; }
:root[data-skin="gold"] { background: #1a0a00; }
:root[data-skin="gold"] body { background-color: #1a0a00; }
:root[data-skin="gold"] .tab-bar { background: #5a3208 !important; }
:root[data-skin="gold"] .app-stage,
:root[data-skin="gold"] .page-main { background: #2c1608 !important; }
:root[data-skin="gold"] .product-card,
:root[data-skin="gold"] .action-btns,
:root[data-skin="gold"] .zone-content,
:root[data-skin="gold"] .order-card,
:root[data-skin="gold"] .dark-card { background: #4a2810 !important; }
:root[data-skin="cyan"] { background: #00181e; }
:root[data-skin="cyan"] body { background-color: #00181e; }
:root[data-skin="cyan"] .tab-bar { background: #0b5a68 !important; }
:root[data-skin="cyan"] .app-stage,
:root[data-skin="cyan"] .page-main { background: #0a3038 !important; }
:root[data-skin="cyan"] .product-card,
:root[data-skin="cyan"] .action-btns,
:root[data-skin="cyan"] .zone-content,
:root[data-skin="cyan"] .order-card,
:root[data-skin="cyan"] .dark-card { background: #12505a !important; }
:root[data-skin="flame"] { background: #1a0208; }
:root[data-skin="flame"] body { background-color: #1a0208; }
:root[data-skin="flame"] .tab-bar { background: #6b1224 !important; }
:root[data-skin="flame"] .app-stage,
:root[data-skin="flame"] .page-main { background: #2e0a14 !important; }
:root[data-skin="flame"] .product-card,
:root[data-skin="flame"] .action-btns,
:root[data-skin="flame"] .zone-content,
:root[data-skin="flame"] .order-card,
:root[data-skin="flame"] .dark-card { background: #4a1424 !important; }
:root[data-skin="light"] { background: #c5cad8; }
:root[data-skin="light"] body { background-color: #c5cad8; }
:root[data-skin="light"] .tab-bar { background: #ffffff !important; }
:root[data-skin="light"] .app-stage,
:root[data-skin="light"] .page-main { background: #e4e8f0 !important; }
:root[data-skin="light"] .product-card,
:root[data-skin="light"] .action-btns,
:root[data-skin="light"] .zone-content,
:root[data-skin="light"] .order-card,
:root[data-skin="light"] .dark-card { background: #ffffff !important; }
:root[data-skin="forest"] { background: #03140a; }
:root[data-skin="forest"] body { background-color: #03140a; }
:root[data-skin="forest"] .tab-bar { background: #14532d !important; }
:root[data-skin="forest"] .app-stage,
:root[data-skin="forest"] .page-main { background: #0c2a18 !important; }
:root[data-skin="forest"] .product-card,
:root[data-skin="forest"] .action-btns,
:root[data-skin="forest"] .zone-content,
:root[data-skin="forest"] .order-card,
:root[data-skin="forest"] .dark-card { background: #164430 !important; }
:root[data-skin="ink"] { background: #000000; }
:root[data-skin="ink"] body { background-color: #000000; }
:root[data-skin="ink"] .tab-bar { background: #262626 !important; }
:root[data-skin="ink"] .app-stage,
:root[data-skin="ink"] .page-main { background: #141414 !important; }
:root[data-skin="ink"] .product-card,
:root[data-skin="ink"] .action-btns,
:root[data-skin="ink"] .zone-content,
:root[data-skin="ink"] .order-card,
:root[data-skin="ink"] .dark-card { background: #2a2a2a !important; }
:root[data-skin="sakura"] { background: #1a0612; }
:root[data-skin="sakura"] body { background-color: #1a0612; }
:root[data-skin="sakura"] .tab-bar { background: #9d174d !important; }
:root[data-skin="sakura"] .app-stage,
:root[data-skin="sakura"] .page-main { background: #3b0a24 !important; }
:root[data-skin="sakura"] .product-card,
:root[data-skin="sakura"] .action-btns,
:root[data-skin="sakura"] .zone-content,
:root[data-skin="sakura"] .order-card,
:root[data-skin="sakura"] .dark-card { background: #5c1638 !important; }
:root[data-skin="ocean"] { background: #020617; }
:root[data-skin="ocean"] body { background-color: #020617; }
:root[data-skin="ocean"] .tab-bar { background: #1e3a8a !important; }
:root[data-skin="ocean"] .app-stage,
:root[data-skin="ocean"] .page-main { background: #0c1e4a !important; }
:root[data-skin="ocean"] .product-card,
:root[data-skin="ocean"] .action-btns,
:root[data-skin="ocean"] .zone-content,
:root[data-skin="ocean"] .order-card,
:root[data-skin="ocean"] .dark-card { background: #1e3a6e !important; }
:root[data-skin="cream"] { background: #e7d5b8; }
:root[data-skin="cream"] body { background-color: #e7d5b8; }
:root[data-skin="cream"] .tab-bar { background: #fffaf3 !important; }
:root[data-skin="cream"] .app-stage,
:root[data-skin="cream"] .page-main { background: #f4ead8 !important; }
:root[data-skin="cream"] .product-card,
:root[data-skin="cream"] .action-btns,
:root[data-skin="cream"] .zone-content,
:root[data-skin="cream"] .order-card,
:root[data-skin="cream"] .dark-card { background: #fffdf8 !important; }
@media (min-width: 860px) {
  :root[data-skin="night"] #app { background: #07051a !important; }
  :root[data-skin="gold"] #app { background: #1a0a00 !important; }
  :root[data-skin="cyan"] #app { background: #00181e !important; }
  :root[data-skin="flame"] #app { background: #1a0208 !important; }
  :root[data-skin="light"] #app { background: #c5cad8 !important; }
  :root[data-skin="forest"] #app { background: #03140a !important; }
  :root[data-skin="ink"] #app { background: #000000 !important; }
  :root[data-skin="sakura"] #app { background: #1a0612 !important; }
  :root[data-skin="ocean"] #app { background: #020617 !important; }
  :root[data-skin="cream"] #app { background: #e7d5b8 !important; }
}

.skin-page { padding: 12px; }
.skin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skin-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.skin-pick.is-on { border-color: var(--primary); }
.skin-pick-preview {
  height: 84px;
  border-radius: 8px;
  padding: 0;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
}
.skin-pick-nav {
  width: 30%;
  flex-shrink: 0;
}
.skin-pick-stage {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 8px;
}
.skin-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.2);
  font-size: 13px;
  font-weight: 800;
}
.skin-pick-name { font-weight: 700; font-size: 14px; }
.skin-pick-desc { font-size: 12px; color: var(--muted); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg-page); }
html { background: var(--bg-page); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -8%, var(--glow-a), transparent),
    radial-gradient(ellipse 50% 40% at 100% 20%, var(--glow-b), transparent),
    radial-gradient(ellipse 45% 35% at 0% 60%, var(--glow-c), transparent);
  color: var(--text);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto;
}
#app {
  min-height: 100%;
  background: var(--bg-content);
}

.hidden { display: none !important; }

.dark-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-chip);
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.dark-chip-section {
  font-size: 13px;
  font-weight: 600;
  color: var(--tab-active);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(59, 130, 246, 0.25));
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}
.dark-chip-sales {
  color: #fcd34d;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(251, 191, 36, 0.15));
  border-color: rgba(251, 191, 36, 0.45);
  font-weight: 600;
}
.dark-chip-platform {
  color: #67e8f9;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.18));
  border-color: rgba(34, 211, 238, 0.4);
  font-size: 11px;
  padding: 3px 10px;
}
.dark-chip-price {
  color: #fde68a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.15));
  border-color: rgba(251, 191, 36, 0.4);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px;
}
.dark-chip-green {
  color: #86efac;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(20, 184, 166, 0.18));
  border-color: rgba(74, 222, 128, 0.4);
}
.dark-chip-purple {
  color: #d8b4fe;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(99, 102, 241, 0.2));
  border-color: rgba(192, 132, 252, 0.4);
}
.dark-chip-orange {
  color: #fdba74;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(245, 158, 11, 0.18));
  border-color: rgba(251, 146, 60, 0.45);
}
.dark-chip-muted {
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(107, 114, 128, 0.15);
  border-color: rgba(107, 114, 128, 0.25);
}

.dark-card {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--header-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  z-index: 100;
}
.page-header .back {
  width: 36px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text);
}
.page-header h1 {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin: 0 36px 0 0;
  color: var(--text);
}

.page-main {
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + 16px);
  background: var(--bg-content);
}
.page-main.with-header { padding-top: var(--header-h); }
.page-main.no-tab { padding-bottom: 16px; }

.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--tab-h);
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  gap: 2px;
}
.tab-item.active {
  color: var(--tab-active);
  position: relative;
}
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--gradient-primary);
  box-shadow: var(--glow-purple);
}
.tab-icon { font-size: 22px; line-height: 1; }

.state-tip { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.state-tip.error { color: var(--danger); }
.btn-retry {
  display: block;
  margin: 16px auto;
  padding: 10px 32px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-chip);
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--glow-purple);
}

.announcement {
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--warning);
}
.banner-swiper { overflow: hidden; background: var(--bg-card); }
.banner-swiper img { width: 100%; height: 160px; object-fit: cover; display: block; }

.action-btns {
  display: flex;
  margin: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
}
.action-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.action-icon-wrap.tone-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.45), rgba(99, 102, 241, 0.35));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.action-icon-wrap.tone-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(20, 184, 166, 0.35));
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}
.action-icon-wrap.tone-orange {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(239, 68, 68, 0.3));
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}
.action-icon { font-size: 22px; line-height: 1; }

.zone-section { margin: 0 12px 12px; }
.zone-tabs { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; flex-wrap: nowrap; }
.zone-tab {
  flex: 1 0 auto;
  min-width: 22%;
  max-width: 46%;
  text-align: center;
  padding: 11px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.82;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.zone-tab.active {
  opacity: 1;
  font-weight: 700;
  transform: scale(1.02);
}
.zone-tab.zone-theme-cyan {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 45%, #3b82f6 100%);
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}
.zone-tab.zone-theme-cyan.active { box-shadow: 0 6px 20px rgba(34, 211, 238, 0.55); }
.zone-tab.zone-theme-orange {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 42%, #ef4444 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.zone-tab.zone-theme-orange.active { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5); }
.zone-tab.zone-theme-purple {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 48%, #ec4899 100%);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}
.zone-tab.zone-theme-purple.active { box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.zone-tab.zone-theme-green {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 45%, #14b8a6 100%);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.zone-tab.zone-theme-green.active { box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5); }
.zone-tab.zone-theme-pink {
  background: linear-gradient(135deg, #f472b6 0%, #fb7185 48%, #f43f5e 100%);
  box-shadow: 0 4px 14px rgba(244, 114, 182, 0.35);
}
.zone-tab.zone-theme-pink.active { box-shadow: 0 6px 20px rgba(244, 114, 182, 0.5); }
.zone-tab.zone-theme-indigo {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 48%, #a855f7 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.zone-tab.zone-theme-indigo.active { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5); }
.zone-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.category-block { margin-bottom: 16px; }
.category-block:last-child { margin-bottom: 0; }
.category-head { margin-bottom: 10px; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-card {
  width: auto;
  margin-bottom: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #f59e0b);
  opacity: 0.85;
  z-index: 1;
}
.product-card > img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; background: rgba(0,0,0,.25); }
.product-info { padding: 8px; }
.product-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
}
.product-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.product-meta .mi-price {
  margin-left: auto;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px 5px;
}
.product-meta .mi-price-num { font-size: 18px; font-weight: 800; }
.product-meta .mi-price-icon { width: 14px; height: 14px; }
.product-meta .mi-price-unit { font-size: 11px; }
.product-meta .dark-chip-sales { font-size: 10px; padding: 3px 8px; flex-shrink: 1; }

.order-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--bg-elevated);
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.order-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
.order-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--glow-purple);
}
.order-tab-count { font-size: 11px; color: var(--text-muted); }
.order-tab.active .order-tab-count { color: rgba(255, 255, 255, 0.85); }

.order-card {
  background: var(--bg-card);
  margin: 12px;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.order-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 10px; gap: 8px; }
.order-body { display: flex; gap: 10px; }
.order-body img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: rgba(0,0,0,.25); }
.order-title { font-size: 14px; font-weight: 600; color: var(--text); }
.order-detail { font-size: 12px; color: var(--muted); margin: 4px 0; }
.order-price { color: #fcd34d; font-weight: 700; font-size: 16px; text-shadow: 0 0 12px rgba(251, 191, 36, 0.25); }
.order-footer { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border); }

.status-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.status-badge.is-success { color: #86efac; background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(20, 184, 166, 0.15)); border: 1px solid rgba(74, 222, 128, 0.35); }
.status-badge.is-progress { color: #93c5fd; background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(99, 102, 241, 0.18)); border: 1px solid rgba(96, 165, 250, 0.35); }
.status-badge.is-pending { color: #fcd34d; background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(251, 191, 36, 0.12)); border: 1px solid rgba(251, 191, 36, 0.35); }
.status-badge.is-cancel { color: #d1d5db; background: rgba(107, 114, 128, 0.2); border: 1px solid rgba(107, 114, 128, 0.3); }

.service-hero {
  margin: 12px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--glow-purple);
}
.service-hero h2 { margin: 0 0 8px; font-size: 18px; }
.service-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.service-card {
  margin: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.service-card .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.wechat-row { display: flex; align-items: center; gap: 10px; color: var(--text); }
.admin-qrcode { max-width: 220px; display: block; margin: 12px auto; border-radius: 8px; }
.order-cs-card { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.order-cs-name { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.order-intro-block { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.order-intro-html { font-size: 13px; line-height: 1.7; color: var(--text); word-break: break-word; }
.order-intro-html p { margin: 0 0 8px; }
.order-intro-html img { max-width: 100%; height: auto; border-radius: 8px; }
.copy-btn {
  padding: 6px 12px;
  background: transparent;
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-chip);
  font-size: 12px;
  cursor: pointer;
}

.profile-page { padding: 12px; padding-bottom: 24px; }

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(59, 130, 246, 0.35));
  border: 1px solid rgba(129, 140, 248, 0.4);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--glow-purple);
}
.user-info { flex: 1; min-width: 0; }
.user-card img { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-elevated); border: 2px solid rgba(255,255,255,0.35); flex-shrink: 0; }
.user-card .nickname { font-size: 16px; font-weight: 600; display: block; color: #fff; }
.user-card .uid { font-size: 12px; color: rgba(255,255,255,0.75); display: block; margin-top: 4px; }
.edit-link {
  flex-shrink: 0;
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-chip);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.balance-left { display: flex; flex-direction: column; }
.balance-label { font-size: 13px; color: var(--muted); display: block; }
.balance-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: var(--text);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--glow-purple);
}
.balance-value { font-size: 24px; font-weight: 700; color: #fcd34d; text-shadow: 0 0 16px rgba(251, 191, 36, 0.3); }
.recharge-btn {
  padding: 8px 16px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-chip);
  text-decoration: none;
  font-size: 13px;
  box-shadow: var(--glow-purple);
}
.quick-grid {
  display: flex;
  padding: 4px 0;
}
.quick-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  border: none;
  background: none;
  border-right: 1px solid var(--border);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.quick-item:last-child { border-right: none; }
.quick-text { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.quick-icon { display: block; font-size: 24px; margin-bottom: 4px; }

.card-block {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.promo-row { display: flex; }
.promo-item {
  flex: 1;
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--border);
}
.promo-item:last-child { border-right: none; }
.promo-title { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.promo-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }

.func-grid { width: 100%; }
.func-row { display: flex; width: 100%; }
.func-cell {
  flex: 0 0 25%;
  width: 25%;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.func-row .func-cell:last-child { border-right: none; }
.func-row:last-child .func-cell { border-bottom: none; }
.func-icon { font-size: 22px; line-height: 1; margin-bottom: 6px; display: block; }
.func-text { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; display: block; }

.rank-list { padding: 8px 0; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.rank-item:last-child { border-bottom: none; }
.rank-no { width: 24px; font-weight: 700; color: var(--primary); text-align: center; flex-shrink: 0; }
.rank-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elevated); object-fit: cover; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14px; font-weight: 600; color: var(--text); }
.rank-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.article-body { padding: 16px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.article-body p { margin: 8px 0; }

.coupon-list { padding: 8px 0; }
.coupon-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.coupon-item:last-child { border-bottom: none; }
.coupon-value { font-size: 15px; font-weight: 600; color: #fcd34d; }
.coupon-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-cancel, .btn-save {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-chip);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-cancel { background: var(--bg-elevated); color: var(--muted); border: 1px solid var(--border); }
.btn-save { background: var(--gradient-primary); color: #fff; box-shadow: var(--glow-purple); }

button, .func-cell, .quick-item, .edit-link {
  -webkit-tap-highlight-color: transparent;
}

.product-banner { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; background: var(--bg-card); }
.product-side { display: contents; }
.product-header {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin: -16px 12px 0;
  position: relative;
  z-index: 2;
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--glow-purple);
}
.product-header .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.product-header .product-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.45;
  color: var(--text);
}
.price-row { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.price-group { display: flex; align-items: center; gap: 8px; }

.mi-price {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 8px;
  background: none;
  line-height: 1;
}
.mi-price-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--price);
  text-shadow: none;
}
.mi-price-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
.mi-price-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.card {
  background: var(--bg-card);
  margin: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.section-head { margin-bottom: 12px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.card p { color: var(--muted); line-height: 1.6; margin: 6px 0; font-size: 13px; }

.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  z-index: 50;
}
.bottom-bar .buy-btn {
  flex: 1;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-chip);
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glow-purple);
}
.bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  border: none;
  background: none;
  cursor: pointer;
  min-width: 48px;
  color: var(--muted);
}
.bottom-spacer { height: 70px; }

.form-card {
  margin: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form-item { margin-bottom: 14px; }
.form-head { margin-bottom: 8px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.form-input, .form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  font-size: 15px;
  line-height: 44px;
  background: var(--bg-elevated);
  color: var(--text);
  box-sizing: border-box;
}
.form-textarea {
  min-height: 88px;
  height: auto;
  padding: 12px;
  line-height: 1.6;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.platform-btns, .region-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-btn, .region-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.platform-btn.active, .region-btn.active {
  border-color: var(--border);
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--glow-purple);
}
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  overflow: hidden;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-elevated);
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}
.qty-num, .qty-input {
  min-width: 48px;
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  -moz-appearance: textfield;
  box-sizing: border-box;
}
.qty-input:focus {
  outline: none;
  background: var(--bg-elevated);
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.auth-page {
  padding: 40px 20px 48px;
  max-width: 420px;
  margin: 0 auto;
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand h2 { font-size: 24px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.auth-brand p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-page .form-input { margin-bottom: 12px; }
.auth-submit { width: 100%; margin: 8px 0 0; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth-switch a, .auth-text-btn { color: #a5b4fc; text-decoration: none; }
.auth-text-btn {
  border: none;
  background: none;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}
.auth-modal { max-width: 400px; max-height: 86vh; }
.auth-modal .auth-page { padding: 8px 0 4px; }
.auth-modal .auth-brand { margin-bottom: 16px; }
.auth-modal .auth-brand h2 { font-size: 20px; }
.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-chip);
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: var(--tab-active);
  font-size: 15px;
  cursor: pointer;
}
.logout-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 20px 12px 12px;
  padding: 12px;
  border-radius: var(--radius-chip);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 15px;
  cursor: pointer;
}
.submit-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 12px;
  padding: 14px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-chip);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glow-purple);
}
.submit-btn:disabled { opacity: 0.6; }
.price-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.total-price { color: #fcd34d; font-size: 20px; font-weight: 700; text-shadow: 0 0 12px rgba(251, 191, 36, 0.25); }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 340px;
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
  color: var(--text);
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.popup-body { font-size: 14px; line-height: 1.7; max-height: 50vh; overflow: auto; color: var(--muted); }

.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }

.coupon-row { cursor: pointer; }
.coupon-picker-val { color: var(--warning); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.coupon-muted { color: var(--text-muted); font-weight: normal; }
.coupon-arrow { color: var(--text-muted); }
.coupon-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.coupon-opt.active {
  border-color: rgba(129, 140, 248, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.12));
}
.complaint-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.od-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 12px;
  padding-bottom: 8px;
  box-sizing: border-box;
}
.od-page.has-bar { padding-bottom: 8px; }
.od-page .dark-card,
.od-page .product-header,
.od-page .od-hint {
  margin: 0;
  width: 100%;
}
.od-cover {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.18);
}
.od-cover img,
.od-cover-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.od-cover-ph {
  background:
    radial-gradient(ellipse 80% 70% at 50% 20%, rgba(99, 102, 241, 0.35), transparent),
    var(--bg-card);
}
.od-cover .status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  backdrop-filter: blur(8px);
}
.od-sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.od-sheet .title-row {
  align-items: center;
  gap: 12px;
}
.od-sheet .title-row .dark-chip { flex-shrink: 0; }
.od-no-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}
.od-no-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.od-sheet .product-title { margin-bottom: 0; }
.od-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.od-sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
}
.od-sheet .price-row {
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.od-mi .mi-price-num { font-size: 22px; }
.od-time {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
}
.od-paid,
.od-unpaid {
  display: inline-flex;
  align-items: center;
  height: 22px;
  font-size: 11px;
  font-weight: 600;
  padding: 0 8px;
  border-radius: 999px;
  line-height: 1;
}
.od-paid {
  color: #86efac;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.od-unpaid {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.od-team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.od-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
}
.od-person-meta { min-width: 0; flex: 1; }
.od-person-k {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.2;
}
.od-person-v {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.35;
}
.od-person-s {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.od-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(129, 140, 248, 0.35);
}
.od-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(59, 130, 246, 0.3));
  color: var(--tab-active);
  font-size: 14px;
  font-weight: 700;
}
.od-lower,
.od-lower-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.od-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.od-info .section-head { margin-bottom: 4px; }
.od-info .section-head + .od-row {
  border-top: none;
  padding-top: 6px;
}
.od-label {
  color: var(--muted);
  flex-shrink: 0;
  width: 88px;
  line-height: 28px;
}
.od-value {
  color: var(--text);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
  word-break: break-all;
  line-height: 28px;
}
.od-value-text { min-width: 0; }
.od-value .copy-btn { flex-shrink: 0; }
.od-cs-tip {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.od-cs-body {
  display: flex;
  align-items: center;
  gap: 14px;
}
.od-qr {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}
.od-cs-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.od-muted { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.od-hint {
  margin: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  color: #fcd34d;
  line-height: 1.6;
  font-size: 13px;
}
.od-stars { color: #fbbf24; font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.od-review-text { font-size: 13px; line-height: 1.6; color: var(--text); }
.od-bar {
  bottom: var(--tab-h);
}
.od-btn-tip {
  background: var(--gradient-warm) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.28) !important;
}
.order-done-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.order-done-actions .submit-btn {
  flex: 1;
  width: auto;
  margin: 0;
}
.star-row {
  display: flex;
  gap: 6px;
  margin: 4px 0 12px;
}
.star-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: #4b5563;
  cursor: pointer;
}
.star-btn.on { color: #fbbf24; }
.my-review-block {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-head-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: nowrap;
}
.adult-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  margin-top: 0;
  cursor: pointer;
  user-select: none;
}
.adult-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  flex-shrink: 0;
}

.tab-brand { display: none; }
.app-stage {
  min-width: 0;
  background: var(--bg-content);
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    border-color: rgba(129, 140, 248, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .order-card:hover {
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  }
  .tab-item:hover { color: var(--text); }
  .func-cell:hover, .quick-item:hover { background: rgba(99, 102, 241, 0.1); }
  .zone-tab:hover { opacity: 1; }
  .buy-btn:hover, .submit-btn:hover, .btn-save:hover, .recharge-btn:hover {
    filter: brightness(1.08);
  }
}

@media (min-width: 860px) {
  html, body {
    height: auto;
    min-height: 100%;
  }
  body {
    max-width: none;
    font-size: 15px;
  }
  #app {
    display: flex;
    align-items: stretch;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-page);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.35);
  }
  .tab-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 14px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .tab-brand strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
  }
  .tab-brand span {
    font-size: 12px;
    color: var(--muted);
  }
  .tab-bar {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    width: 220px;
    max-width: none;
    height: 100vh;
    margin: 0;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: flex-start;
    gap: 6px;
    padding: 24px 12px 16px;
    border-top: none;
    border-right: 1px solid var(--border);
    background: var(--bg-nav);
  }
  .tab-bar .tab-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
  .tab-bar .tab-item,
  .tab-bar .tab-item span {
    color: var(--text);
  }
  .tab-bar .tab-item:hover,
  .tab-bar .tab-item:hover span { color: var(--text); }
  .tab-bar .tab-item.active {
    background: var(--bg-card-hover);
    color: var(--text);
  }
  .tab-item.active::before {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
  }
  .tab-icon { font-size: 20px; }
  .app-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: var(--bg-content);
  }
  .page-header {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    max-width: none;
    width: 100%;
  }
  .page-main {
    flex: 1;
    padding-bottom: 32px;
  }
  .page-main.with-header { padding-top: 0; }
  .page-main.no-tab { padding-bottom: 32px; }
  .page-main.no-tab:not(:has(.product-page)) {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
  .announcement { padding: 10px 20px; }
  .banner-swiper { margin: 0 16px; border-radius: var(--radius); overflow: hidden; }
  .banner-swiper img { height: 220px; }
  .action-btns { margin: 16px; padding: 16px; }
  .action-btn { font-size: 13px; }
  .action-icon-wrap { width: 52px; height: 52px; }
  .zone-section { margin: 0 16px 20px; }
  .zone-tabs { gap: 10px; flex-wrap: wrap; }
  .zone-tab {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: none;
    padding: 12px 22px;
    font-size: 14px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .order-tabs { padding: 12px 16px; }
  .order-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 16px 8px;
  }
  .order-list .order-card { margin: 0; }
  .profile-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  .profile-page > .user-card,
  .profile-page > .func-grid,
  .profile-page > .product-grid,
  .profile-page > .empty,
  .profile-page > .card-block.coupon-list {
    grid-column: 1 / -1;
  }
  .service-hero, .service-card { max-width: 760px; margin-left: auto; margin-right: auto; }
  .product-page {
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
    gap: 16px 20px;
    padding: 20px 20px 0;
    align-items: stretch;
  }
  .product-banner {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    margin: 0;
  }
  .product-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    align-self: stretch;
  }
  .product-header {
    margin: 0;
    flex: 0 0 auto;
  }
  .product-header:only-child {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .product-header:only-child .price-row { margin-top: auto; }
  .product-side .product-attr,
  .product-side .product-intro {
    margin: 0;
  }
  .product-side .product-attr {
    flex: 0 0 auto;
  }
  .product-side .product-intro,
  .product-side .product-attr:last-child {
    flex: 1;
    min-height: 0;
    overflow: auto;
  }
  .product-page > .bottom-spacer,
  .product-page > .bottom-bar {
    grid-column: 1 / -1;
  }
  .bottom-bar {
    position: sticky;
    left: auto;
    right: auto;
    max-width: none;
    width: 100%;
    margin: 16px 0 0;
    border-radius: 12px 12px 0 0;
  }
  .od-bar { bottom: auto; }
  .od-page {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    justify-items: stretch;
    width: 100%;
    margin: 0;
    padding: 20px 24px 28px;
    box-sizing: border-box;
  }
  .od-cover {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    align-self: stretch;
    margin: 0;
  }
  .od-sheet {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: auto;
    min-height: 100%;
    align-self: stretch;
    box-sizing: border-box;
  }
  .od-team,
  .od-lower,
  .od-page > .bottom-spacer,
  .od-page > .od-bar {
    grid-column: 1 / -1;
    width: 100%;
  }
  .od-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
  }
  .od-lower > .od-info,
  .od-lower-side {
    height: 100%;
  }
  .od-lower-side .dark-card:last-child {
    flex: 1;
  }
  .od-team { gap: 16px; }
  .od-person { padding: 16px; }
  .od-avatar { width: 44px; height: 44px; }
  .modal-content { max-width: 480px; }
}

.loadout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 4px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}
.loadout-subhead {
  padding: 2px 16px 8px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.loadout-subhead .name { color: var(--primary); }
.loadout-subhead .count { color: var(--primary); margin: 0 2px; }
.loadout-guns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.loadout-gun {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.loadout-gun.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--glow-purple);
}
.loadout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px 16px;
}
.loadout-card {
  margin: 0;
  min-width: 0;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.loadout-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.loadout-card .title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loadout-card .value {
  flex-shrink: 0;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1205;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}
.loadout-card .code {
  margin-top: 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}
.loadout-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}
.loadout-actions .copy {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
.loadout-actions .fav {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.loadout-actions .fav.on { color: #fbbf24; border-color: rgba(251, 191, 36, 0.45); }

@media (min-width: 860px) {
  .loadout-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 16px 24px; }
}
