:root {
  --bg: #070a10;
  --bg-soft: #0b1018;
  --surface: #0f1522;
  --surface-2: #141c2c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eff8;
  --muted: #8d9ab0;
  --mint: #2ee6c5;
  --cyan: #38bdf8;
  --amber: #ffc247;
  --danger: #ff6b6b;
  --ok: #34d399;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Inter", "SF Pro Text", -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: radial-gradient(1200px 600px at 15% -10%, rgba(46, 230, 197, 0.12), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(56, 189, 248, 0.1), transparent 55%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(46, 230, 197, 0.3);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 34px;
  backdrop-filter: blur(18px);
  background: rgba(7, 10, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 15px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #04121a;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(46, 230, 197, 0.25);
}

nav.links {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  color: var(--muted);
}

nav.links a:hover {
  color: var(--text);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--muted);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(46, 230, 197, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 230, 197, 0);
  }
}

.btn {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 13px;
  transition: 0.2s;
  font-weight: 600;
}

.btn:hover {
  border-color: rgba(46, 230, 197, 0.5);
  background: rgba(46, 230, 197, 0.08);
}

.btn.primary {
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #04121a;
  border: none;
  box-shadow: 0 10px 30px rgba(46, 230, 197, 0.22);
}

.btn.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 9px;
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.35);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 34px 46px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: min(420px, 100%);
  aspect-ratio: 1;
  animation: float 8s ease-in-out infinite;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.92;
  filter: drop-shadow(0 30px 70px rgba(46, 230, 197, 0.22));
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 76%);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(10, 15, 24, 0.82);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.chip-1 {
  top: 14%;
  left: -12%;
}

.chip-2 {
  bottom: 12%;
  right: -8%;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -1.5px;
  font-weight: 750;
}

.grad {
  background: linear-gradient(120deg, var(--mint) 5%, var(--cyan) 55%, color-mix(in srgb, var(--cyan) 55%, #ffffff) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0 0 38px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
}

.hero-stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.hero-stat b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-stat span {
  font-size: 12px;
  color: var(--muted);
}

.catalog {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 34px 90px;
}

.catalog-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.catalog-head h2 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.4px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  transition: 0.2s;
}

.chip.active {
  color: #04121a;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  border-color: transparent;
  font-weight: 700;
}

.search {
  margin-left: auto;
  position: relative;
}

.search input {
  width: 220px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: 0.2s;
}

.search input:focus {
  border-color: rgba(46, 230, 197, 0.55);
  background: rgba(46, 230, 197, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.25s;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 230, 197, 0.32);
  box-shadow: var(--shadow);
}

.thumb {
  position: relative;
  height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(120% 120% at 20% 0%, hsl(var(--hue) 80% 55% / 0.35), transparent 60%),
    linear-gradient(135deg, hsl(var(--hue) 40% 14%), #0a0f18 70%);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 10, 16, 0.85));
}

.thumb .initial {
  position: relative;
  z-index: 2;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.thumb .badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(7, 10, 16, 0.6);
  border: 1px solid var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.thumb .badge.live {
  color: var(--mint);
  border-color: rgba(46, 230, 197, 0.4);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.cat {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.card h3 {
  font-size: 15.5px;
  line-height: 1.4;
  margin: 0;
  font-weight: 650;
  min-height: 43px;
}

.desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.price b {
  font-size: 22px;
  letter-spacing: -0.5px;
}

.price small {
  color: var(--mint);
  font-size: 11.5px;
  margin-left: 4px;
  font-weight: 700;
}

.price em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.stock-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.stock-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.stock-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  transition: width 0.5s;
}

.stock-line.low {
  color: var(--amber);
}

.stock-line.out {
  color: var(--danger);
}

.add-btn {
  border: 1px solid rgba(46, 230, 197, 0.4);
  background: rgba(46, 230, 197, 0.1);
  color: var(--mint);
  border-radius: 11px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 650;
  transition: 0.2s;
}

.add-btn:hover {
  background: rgba(46, 230, 197, 0.2);
}

.add-btn:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.flash {
  position: absolute;
  inset: 0;
  background: rgba(46, 230, 197, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.flash.on {
  opacity: 1;
}

/* 购物车 */
.cart-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #04121a;
  font-weight: 750;
  font-size: 13.5px;
  box-shadow: 0 18px 40px rgba(46, 230, 197, 0.28);
}

.cart-fab .count {
  background: rgba(4, 18, 26, 0.85);
  color: var(--mint);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
}

/* 订单页 */
.order-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 90px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  padding: 30px;
  box-shadow: var(--shadow);
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}

.order-head h1 {
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.5px;
}

.status-badge {
  border: 1px solid;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.timeline {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
}

.tl-step {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.tl-step i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  margin-bottom: 4px;
}

.tl-step.done i {
  background: var(--mint);
  box-shadow: 0 0 12px rgba(46, 230, 197, 0.6);
}

.tl-step b {
  font-size: 13px;
}

.tl-step span {
  font-size: 11.5px;
  color: var(--muted);
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.oi-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.oi-head h3 {
  font-size: 14.5px;
  margin: 0 0 5px;
}

.oi-head .sub,
.order-item .sub {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0;
}

/* 管理后台 */
.admin-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 26px 90px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.table-wrap.tall {
  max-height: 560px;
  overflow: auto;
}

.table-wrap.tall th {
  background: var(--surface-2);
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
}

.kpi small {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.kpi b {
  display: block;
  font-size: 26px;
  margin: 8px 0 4px;
  letter-spacing: -0.8px;
}

.kpi em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 14px;
}

.section-head h2 {
  font-size: 17px;
  margin: 0;
}

.section-head .spacer {
  margin-left: auto;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 720px;
}

th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(46, 230, 197, 0.03);
}

.tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tag.ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}

.tag.warn {
  color: var(--amber);
  border-color: rgba(255, 194, 71, 0.4);
  background: rgba(255, 194, 71, 0.08);
}

.tag.bad {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.bar-col i {
  width: 100%;
  max-width: 34px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--mint), rgba(46, 230, 197, 0.15));
  min-height: 3px;
  transition: height 0.4s;
}

.bar-col span {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.bar-col b {
  font-size: 10.5px;
  color: var(--text);
  font-weight: 600;
}

.login-card {
  max-width: 380px;
  margin: 12vh auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  background: linear-gradient(180deg, var(--surface-2), var(--bg-soft));
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 21px;
  margin: 0 0 6px;
}

.login-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 22px;
}

.price-input {
  width: 88px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.price-input:focus {
  border-color: rgba(46, 230, 197, 0.5);
}

.events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  max-height: 260px;
  overflow: auto;
}

.event {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.event time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}


.drawer-mask,
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 10, 0.7);
  backdrop-filter: blur(6px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

.drawer-mask.on,
.modal-mask.on {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  z-index: 95;
  transform: translateX(102%);
  transition: 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.drawer.on {
  transform: none;
}

.drawer header,
.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer header h3,
.modal header h3 {
  margin: 0;
  font-size: 16px;
}

.x-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.cart-thumb {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  flex-shrink: 0;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 45%), hsl(var(--hue) 60% 20%));
}

.cart-item .info {
  flex: 1;
  min-width: 0;
}

.cart-item h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item .sub {
  font-size: 11.5px;
  color: var(--muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-top: 8px;
}

.qty button {
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
}

.qty span {
  width: 34px;
  text-align: center;
  font-size: 12.5px;
}

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 10px;
  font-size: 13px;
}

.drawer footer {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.total-row span {
  color: var(--muted);
  font-size: 12.5px;
}

.total-row b {
  font-size: 24px;
  letter-spacing: -0.5px;
}

.total-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

.wide {
  width: 100%;
  padding: 13px;
  font-size: 14px;
}

/* 结算弹窗 */
.modal {
  position: fixed;
  z-index: 96;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.98);
  width: min(620px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--surface-2), var(--bg-soft));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s;
  box-shadow: var(--shadow);
}

.modal.on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-body {
  padding: 22px;
}

.steps {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}

.steps span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.steps i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  font-style: normal;
  font-size: 11px;
}

.steps span.active {
  color: var(--mint);
}

.steps span.active i {
  background: rgba(46, 230, 197, 0.16);
  border-color: rgba(46, 230, 197, 0.5);
  color: var(--mint);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: 0.2s;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(46, 230, 197, 0.5);
}

.summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 16px;
}

.summary .line {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 0;
}

.summary .line b {
  color: var(--text);
  font-weight: 600;
}

.summary .divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

.summary .grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary .grand b {
  font-size: 20px;
}

.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  background: rgba(46, 230, 197, 0.06);
  border: 1px solid rgba(46, 230, 197, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}

.codes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.code {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px dashed rgba(46, 230, 197, 0.35);
  background: rgba(46, 230, 197, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.code button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-size: 11px;
  padding: 5px 9px;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: rgba(14, 20, 32, 0.96);
  border: 1px solid rgba(46, 230, 197, 0.4);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 30px 34px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .nav {
    padding: 12px 18px;
    gap: 14px;
  }
  .brand {
    font-size: 13px;
    white-space: nowrap;
  }
  .logo-mark {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .nav-right .pill {
    display: none;
  }
  .nav-right .btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  nav.links {
    display: none;
  }
  .hero {
    padding: 40px 18px 24px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .hero-visual {
    width: min(300px, 82%);
    justify-self: center;
    order: -1;
  }
  .chip-1 {
    left: -6%;
  }
  .chip-2 {
    right: -4%;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .catalog {
    padding: 10px 18px 120px;
  }
  .search {
    margin-left: 0;
    width: 100%;
  }
  .search input {
    width: 100%;
  }
  .cart-fab {
    right: 16px;
    bottom: 16px;
    padding: 10px 14px;
    gap: 6px;
  }
}

/* ===== 主题工作台（后台） ===== */
.theme-studio {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 20px;
  margin-bottom: 8px;
}

.theme-left,
.theme-right {
  min-width: 0;
}

.studio-label {
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.preset-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  background: var(--bg-soft);
  transition: 0.18s;
  text-align: left;
  color: var(--text);
}

.preset-card:hover {
  border-color: color-mix(in srgb, var(--mint) 45%, transparent);
}

.preset-card.active {
  border-color: var(--mint);
  box-shadow: 0 0 0 1px var(--mint) inset;
}

.preset-chip {
  height: 46px;
  border-radius: 10px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preset-chip i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.preset-chip em {
  width: 30px;
  height: 4px;
  border-radius: 99px;
  display: block;
  font-style: normal;
}

.preset-card b {
  font-size: 12.5px;
  display: block;
}

.preset-card span {
  font-size: 11px;
  color: var(--muted);
}

.control-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.control label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.control label b {
  color: var(--text);
  font-weight: 600;
  margin-left: 4px;
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.swatch.active {
  border-color: var(--text);
}

.swatch.wild {
  width: 34px;
  background: conic-gradient(#f87171, #fbbf24, #34d399, #38bdf8, #a78bfa, #f87171);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--mint);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 12px;
  transition: 0.15s;
  cursor: pointer;
}

.seg-btn.active {
  background: color-mix(in srgb, var(--mint) 16%, transparent);
  color: var(--mint);
  font-weight: 600;
}

.theme-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  padding: 14px;
  min-height: 226px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  overflow: hidden;
}

.mini-thumb {
  height: 78px;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--mint) 30%, transparent), transparent 62%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 90%, #000), var(--bg-soft) 72%);
  position: relative;
}

.mini-thumb span {
  font-size: 25px;
  font-weight: 800;
  color: color-mix(in srgb, var(--mint) 84%, #fff);
}

.mini-body {
  padding: 11px 12px 12px;
}

.mini-cat {
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 5px;
  text-transform: uppercase;
}

.mini-body h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-row b {
  font-size: 17px;
}

.mini-row small {
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
}

.mini-row .add-btn {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 11px;
  border-radius: calc(var(--radius) / 2);
  border: none;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #06121a;
  font-weight: 700;
  cursor: pointer;
}

.mini-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}

.mini-stock i {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  display: block;
}

.mini-tags {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.mini-tags em {
  font-size: 10px;
  font-style: normal;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.mini-tags em.ok {
  color: var(--ok, #6ee7b7);
  border-color: color-mix(in srgb, var(--ok, #6ee7b7) 40%, transparent);
}

.theme-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
}

.btn.wide {
  width: 100%;
}

@media (max-width: 980px) {
  .theme-studio {
    grid-template-columns: 1fr;
  }
}

/* 主题工作台：滑杆与取色器 */input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: var(--line-strong);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--mint);
  cursor: pointer;
}

#accentPicker {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

/* 定价控制条 */
.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.inline-field input {
  width: 62px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
}

.inline-field input:focus {
  border-color: var(--mint);
  outline: none;
}

.section-foot {
  color: var(--muted);
  font-size: 11.5px;
  margin: 8px 2px 4px;
  line-height: 1.7;
}

[data-theme="dawn"] .inline-field input,
[data-theme="sand"] .inline-field input {
  background: var(--surface-2);
}

body.is-drawer .cart-fab,
body.is-modal .cart-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* ================= H5 移动端适配（390 / 414 / 768 宽） ================= */
@media (max-width: 760px) {
  .nav {
    flex-wrap: nowrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .brand {
    font-size: 12.5px;
    flex: 0 0 auto;
  }
  nav.links {
    display: flex;
    gap: 12px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  nav.links::-webkit-scrollbar {
    display: none;
  }
  nav.links a {
    font-size: 12px;
    white-space: nowrap;
    padding: 4px 0;
  }

  .hero {
    padding: 24px 16px 18px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero h1 {
    font-size: clamp(28px, 8.6vw, 40px);
    letter-spacing: -1px;
    margin-bottom: 12px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.4px;
    margin-bottom: 10px;
  }
  .lede {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
  }
  .hero-visual {
    order: 2;
    width: min(230px, 58%);
    justify-self: center;
    margin: 2px auto 0;
  }
  .chip-1 {
    left: -4%;
    top: 4%;
  }
  .chip-2 {
    right: -4%;
    bottom: 6%;
  }
  .hero-chip {
    font-size: 11px;
    padding: 7px 11px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .hero-stat {
    padding: 12px 14px;
    border-radius: 14px;
  }
  .hero-stat b {
    font-size: 20px;
  }
  .hero-stat span {
    font-size: 11px;
  }

  .catalog {
    padding: 6px 14px 110px;
  }
  .catalog-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .catalog-head h2 {
    font-size: 20px;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: 0 0 auto;
    font-size: 12.5px;
    padding: 7px 13px;
  }
  .search,
  .search input {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card .thumb {
    height: 118px;
  }
  .card-body {
    padding: 13px 14px 12px;
  }
  .card h3 {
    font-size: 14.5px;
  }
  .card .desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .price-row {
    margin-top: 10px;
  }
  .cart-fab {
    right: 14px;
    bottom: 14px;
    padding: 11px 16px;
    font-size: 13px;
  }
  .drawer {
    width: 100%;
    border-left: none;
  }
  .modal {
    width: 100%;
    max-height: 92vh;
  }
  .steps {
    font-size: 11.5px;
    gap: 6px;
  }
  .footer {
    flex-direction: column;
    gap: 6px;
    padding: 22px 16px 30px;
    text-align: center;
    font-size: 11.5px;
  }
  .order-wrap {
    padding: 26px 14px 90px;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 27px;
  }
  .hero-stat b {
    font-size: 18px;
  }
  .brand {
    font-size: 11.5px;
  }
  nav.links a {
    font-size: 11.5px;
  }
}

/* 后台在手机/平板上也能用 */
@media (max-width: 760px) {
  .section-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .inline-field {
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }
  .table-wrap table {
    min-width: 720px;
  }
  .dash-head {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* 手机端提示条移到顶部，避免盖住抽屉底部按钮 */
@media (max-width: 760px) {
  .toast {
    top: 76px;
    bottom: auto;
    transform: translate(-50%, -14px);
    max-width: 88vw;
    text-align: center;
  }
  .toast.on {
    transform: translate(-50%, 0);
  }
}

/* 抽屉/弹窗打开时，提示条落在底部按钮上方，避免遮挡内容 */
@media (max-width: 760px) {
  body.is-drawer .toast,
  body.is-modal .toast {
    top: auto;
    bottom: 172px;
    transform: translate(-50%, 14px);
  }
  body.is-drawer .toast.on,
  body.is-modal .toast.on {
    transform: translate(-50%, 0);
  }
}

/* 提示条恒为深底浅字（浅色主题下也保证可读） */
.toast {
  color: #eaf2ff;
}

/* 结算优惠码 */
.promo-row { display: flex; gap: 8px; margin: 10px 0 6px; }
.promo-row input { flex: 1; min-width: 0; }
.promo-row .btn { flex: 0 0 auto; }
.promo-msg { min-height: 16px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.promo-msg.ok { color: #0f9d58; }
.promo-msg.bad { color: #e5484d; }
