:root {
  --accent: #5b5bd6;
  --accent-2: #8b5cf6;
  --ink: #171a2b;
  --sub: #6b7080;
  --muted: #9aa0b2;
  --line: rgba(28, 32, 58, 0.09);
  --card: rgba(255, 255, 255, 0.84);
  --white: #fff;
  --ok: #149a76;
  --warn: #b7791f;
  --danger: #d14b4b;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(31, 35, 70, 0.12);
  --shadow-sm: 0 6px 20px rgba(31, 35, 70, 0.08);
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background: #f6f7fc;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- 背景 ---------- */
.bg-aurora, .bg-image, .bg-veil { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.bg-aurora {
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(128, 124, 255, 0.30), transparent 65%),
    radial-gradient(50% 45% at 92% 14%, rgba(255, 196, 120, 0.38), transparent 70%),
    radial-gradient(50% 50% at 82% 88%, rgba(255, 156, 196, 0.28), transparent 70%),
    radial-gradient(45% 45% at 10% 92%, rgba(126, 226, 206, 0.26), transparent 70%),
    linear-gradient(160deg, #f9f9ff 0%, #f5f5fb 50%, #fdf8f4 100%);
}
.bg-aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: float 12s ease-in-out infinite;
}
.bg-aurora i:nth-child(1) { width: 180px; height: 180px; right: 10%; top: 14%; background: linear-gradient(145deg, #ffe2a8, #ffc46b); }
.bg-aurora i:nth-child(2) { width: 90px; height: 90px; left: 8%; top: 38%; background: linear-gradient(145deg, #d7d5ff, #a9a5ff); animation-delay: -4s; }
.bg-aurora i:nth-child(3) { width: 130px; height: 130px; right: 22%; bottom: 12%; background: linear-gradient(145deg, #c8f2e6, #8fdfc9); animation-delay: -7s; }
.bg-aurora i:nth-child(4) { width: 46px; height: 46px; left: 30%; top: 16%; background: linear-gradient(145deg, #ffd4e3, #ff9fc1); animation-delay: -2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.bg-image { background-position: center; background-size: cover; z-index: -4; }
.bg-veil {
  z-index: -2;
  background: rgba(247, 248, 252, var(--veil, 0.42));
  backdrop-filter: blur(var(--blur, 0px));
}
@media (prefers-reduced-motion: reduce) {
  .bg-aurora i { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 通用 ---------- */
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: transform .18s, box-shadow .18s, background .18s, opacity .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
html.no-gradient .btn-primary,
html.no-gradient .brand-logo,
html.no-gradient .login-logo { background: var(--accent); }
.btn-dark { background: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); border-color: var(--line); }
.btn-soft { background: color-mix(in srgb, var(--accent) 9%, white); color: var(--accent); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-danger { background: color-mix(in srgb, var(--danger) 10%, white); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.72); color: var(--ink); font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.icon-btn:hover { background: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.66);
  color: var(--sub); font-size: 12.5px; text-decoration: none;
}
.pill { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 600; }
.pill-green { background: #e8f8f1; color: #0d8a65; }
.pill-amber { background: #fff4df; color: #a86a10; }
.pill-red { background: #fdecec; color: #c23b3b; }
.pill-gray { background: #eef0f6; color: #6c7284; }
.muted { color: var(--sub); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 顶部导航 ---------- */
.nav-wrap { position: fixed; top: 18px; left: 0; right: 0; z-index: 40; pointer-events: none; }
.nav {
  width: min(1180px, calc(100% - 40px)); margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 20px; padding: 0 12px 0 18px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 20px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(30,35,70,.08); pointer-events: auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 20px; box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.brand b { display: block; font-size: 15.5px; letter-spacing: -.2px; line-height: 1.15; }
.brand span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a, .nav-links button {
  border: 0; background: transparent; color: var(--sub); font-size: 13px; font-weight: 500;
  padding: 9px 13px; border-radius: 10px; text-decoration: none;
}
.nav-links a:hover, .nav-links button:hover { background: rgba(91,91,214,.07); color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.nav-buy { height: 42px; padding: 0 22px; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { height: 58px; }
  .nav-wrap { top: 10px; }
}

/* ---------- 首屏 ---------- */
main { position: relative; z-index: 1; }
.hero { padding: 140px 0 10px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 30px; align-items: center; min-height: 590px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--sub); font-size: 12px; font-weight: 500; letter-spacing: .3px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.hero h1 { margin: 20px 0 18px; font-size: clamp(40px, 5.3vw, 70px); line-height: 1.08; letter-spacing: -2px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(110deg, var(--accent), #a855f7 60%, #e879b9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 520px; margin: 0 0 28px; color: var(--sub); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 480px; }
.hero-stats b { display: block; font-size: 22px; letter-spacing: -.5px; }
.hero-stats span { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.hero-art { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; }
.hero-card {
  position: relative; width: min(420px, 92%); border-radius: 26px; padding: 16px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 40px 90px rgba(70,60,140,.18); transform: rotate(3deg);
}
.hero-cover {
  height: 230px; border-radius: 18px; display: grid; place-items: center; font-size: 74px;
  background: linear-gradient(145deg, #8f8cf7, #6966e8); position: relative; overflow: hidden;
}
.hero-cover::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; bottom: -90px; background: rgba(255,255,255,.16); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art[hidden] { display: none; }
.hero-card-meta { padding: 14px 8px 6px; }
.hero-card-meta .row-between b { font-size: 20px; }
.hero-card-meta .price { font-size: 24px; font-weight: 800; }
.floating {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.9);
  padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-sm); font-size: 12px;
}
.floating.f1 { left: -18px; top: 24%; }
.floating.f2 { right: -12px; bottom: -22px; top: auto; }
.floating .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e8f8f1; color: var(--ok); font-size: 14px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 105px; min-height: 0; }
  .hero-art { order: -1; min-height: 300px; }
  .hero-card { transform: none; width: min(340px, 94%); }
  .hero-cover { height: 175px; font-size: 58px; }
  .floating.f1 { left: 0; } .floating.f2 { right: 0; }
  .hero h1 { letter-spacing: -1px; }
  .hero-stats { gap: 24px; }
}

/* ---------- 公告 ---------- */
.notice-wrap { margin: 18px auto 0; display: flex; justify-content: center; }
.notice {
  width: 100%; max-width: 100%; border-radius: 18px; border: 1px solid rgba(255,255,255,.82);
  background: rgba(255,255,255,.74); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm); padding: 16px 18px; display: flex; gap: 13px;
  overflow: auto; transition: width .25s;
}
.notice-tag {
  flex: none; height: 25px; padding: 0 9px; border-radius: 7px; display: inline-flex; align-items: center;
  background: color-mix(in srgb, var(--accent) 9%, white); color: var(--accent); font-size: 11px; font-weight: 700;
}
.notice-body { font-size: 13.5px; line-height: 1.9; color: #3c4157; min-width: 0; }
.notice-body a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.notice-body a:hover { opacity: .78; }
.notice-body .notice-br { display: block; height: 2px; }

/* ---------- 商品区 ---------- */
.store-section { padding: 64px 0 20px; scroll-margin-top: 92px; }
.slogan-slot { padding: 20px 0 0; scroll-margin-top: 92px; }
.slogan-slot[hidden] { display: none; }
.slogan-text { font-weight: 800; letter-spacing: -.6px; line-height: 1.35; color: var(--ink); }
.slogan-preview {
  margin-top: 14px; padding: 20px; border: 1px dashed var(--line); border-radius: 12px;
  background: rgba(255,255,255,.55); color: var(--ink); font-weight: 800;
  letter-spacing: -.6px; line-height: 1.35; overflow-wrap: anywhere;
}
.slogan-preview.off { opacity: .4; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 8px 0 7px; font-size: 34px; letter-spacing: -1px; }
.section-head p { margin: 0; color: var(--sub); font-size: 13px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 44px; width: 260px; padding: 0 14px;
  border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.74);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; color: var(--ink); }
.search span { color: var(--muted); }
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 24px 0 22px; }
.filter {
  height: 35px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.62); color: var(--sub); font-size: 12.5px;
}
.filter.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 7px 16px color-mix(in srgb, var(--accent) 24%, transparent); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  border-radius: 20px; border: 1px solid rgba(255,255,255,.86); background: rgba(255,255,255,.84);
  overflow: hidden; box-shadow: 0 8px 28px rgba(31,35,70,.06); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(31,35,70,.12); }
.card-cover { aspect-ratio: 1.55 / 1; position: relative; overflow: hidden; display: grid; place-items: center; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .emoji { font-size: 58px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.18)); }
.card-cover .blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.18); }
.card-cover .blob.b1 { width: 130px; height: 130px; left: -40px; bottom: -60px; }
.card-cover .blob.b2 { width: 90px; height: 90px; right: -25px; top: -35px; }
.card-badge {
  position: absolute; left: 11px; top: 11px; z-index: 2; height: 25px; padding: 0 9px;
  border-radius: 8px; background: rgba(255,255,255,.9); color: #333a55; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; backdrop-filter: blur(6px);
}
.card-cat { position: absolute; right: 11px; bottom: 11px; z-index: 2; font-size: 10px; color: rgba(255,255,255,.92); background: rgba(20,22,40,.38); padding: 4px 8px; border-radius: 6px; backdrop-filter: blur(5px); }
.card-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; line-height: 1.35; }
.card-sub { color: var(--sub); font-size: 11.5px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); margin-top: 3px; min-height: 17px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -.6px; }
.price small { font-size: 12px; font-weight: 700; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 10.5px; margin-left: 5px; }
.card .btn { height: 32px; padding: 0 14px; font-size: 12px; }
.sold-out .card-cover { filter: grayscale(.55); }
.sold-out-mask { position: absolute; inset: 0; background: rgba(30,32,50,.46); display: grid; place-items: center; z-index: 1; }
.sold-out-mask span { color: #fff; font-size: 12px; border: 1px solid rgba(255,255,255,.7); padding: 7px 12px; border-radius: 8px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } .search { width: 100%; } .store-section { padding-top: 48px; } }

/* 封面配色 */
.tint-indigo { background: linear-gradient(145deg, #9d9bf8, #6d69e9); }
.tint-amber { background: linear-gradient(145deg, #ffd66e, #f0a72f); }
.tint-rose { background: linear-gradient(145deg, #ffb3c7, #ef709a); }
.tint-mint { background: linear-gradient(145deg, #9ce8d4, #4dbca0); }
.tint-slate { background: linear-gradient(145deg, #98a3bd, #59657e); }
.tint-sky { background: linear-gradient(145deg, #9fe0ff, #54aee5); }
.tint-violet { background: linear-gradient(145deg, #cfb2ff, #9560e6); }
.tint-orange { background: linear-gradient(145deg, #ffc08a, #ee8246); }

/* ---------- 信任条 / 页脚 ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 36px 0 10px; }
.trust-item { display: flex; gap: 12px; padding: 16px; border-radius: 15px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); }
.trust-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); flex: none; font-size: 20px; }
.trust-ico img { width: 24px; height: 24px; object-fit: contain; display: block; }
.trust-editor { display: flex; flex-direction: column; gap: 12px; }
.trust-edit-row { display: grid; grid-template-columns: 140px 1fr 2fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.5); }
@media (max-width: 760px) { .trust-edit-row { grid-template-columns: 1fr; } }
.trust-item b { display: block; font-size: 12.5px; }
.trust-item span { display: block; color: var(--sub); font-size: 10.5px; margin-top: 3px; line-height: 1.6; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 34px 0 40px; margin-top: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.footer a { color: var(--sub); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 16px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } .footer { flex-direction: column; align-items: flex-start; } }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(18,20,38,.46);
  backdrop-filter: blur(7px); display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 540px; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: #fdfdfd; border-radius: 22px; box-shadow: 0 40px 100px rgba(10,12,30,.35);
  overflow: hidden; animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet.detail { max-width: 940px; }
.sheet.wide { max-width: 860px; }
.sheet.narrow { max-width: 430px; }
.sheet-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px 0; flex: none; }
.sheet-head h3 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.sheet-head p { margin: 5px 0 0; color: var(--sub); font-size: 11.5px; }
.sheet-close { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--sub); flex: none; font-size: 15px; }
.sheet-body { padding: 18px 24px 24px; overflow: auto; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; flex: none; }
@media (max-width: 640px) {
  .overlay { padding: 10px; }
  .sheet { max-height: calc(100vh - 20px); border-radius: 18px; }
  .sheet-head { padding: 16px 18px 0; }
  .sheet-body { padding: 15px 18px 20px; }
  .sheet-foot { padding: 12px 18px; }
}

/* ---------- 商品详情 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.detail-media { border-radius: 16px; min-height: 300px; display: grid; place-items: center; overflow: hidden; position: relative; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.detail-media .emoji { font-size: 92px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.2)); }
.detail-info h2 { margin: 9px 0 6px; font-size: 28px; letter-spacing: -.8px; line-height: 1.25; }
.detail-sub { color: var(--sub); font-size: 12.5px; }
.detail-price { margin: 18px 0 12px; font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.detail-price small { font-size: 16px; }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-buy { height: 46px; width: 100%; border-radius: 12px; font-size: 14px; }
.detail-note { margin-top: 12px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.detail-desc { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; }
.detail-desc h4 { margin: 0 0 10px; font-size: 12.5px; }
.detail-desc p { margin: 0; white-space: pre-line; color: #4d5266; font-size: 12.5px; line-height: 2; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; gap: 18px; } .detail-media { min-height: 210px; } .detail-media img { min-height: 210px; } .detail-media .emoji { font-size: 70px; } .detail-info h2 { font-size: 23px; } }

/* ---------- 结算 ---------- */
.co-product { display: flex; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.co-thumb { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-size: 24px; flex: none; overflow: hidden; }
.co-thumb img { width: 100%; height: 100%; object-fit: cover; }
.co-product b { display: block; font-size: 12.5px; }
.co-product span { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.co-price { margin-left: auto; font-weight: 700; font-size: 13.5px; }
.field { margin-top: 16px; }
.field > label, .field-label { display: block; font-size: 11px; font-weight: 600; color: var(--sub); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  padding: 0 12px; outline: 0; color: var(--ink); font-size: 13px; transition: border .18s, box-shadow .18s;
}
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.input:focus, select.input:focus, textarea.input:focus { border-color: color-mix(in srgb, var(--accent) 50%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.input::placeholder { color: #b9bdcb; }
.field-hint { margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.field-err { margin-top: 5px; color: var(--danger); font-size: 10.5px; min-height: 15px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 36px; height: 38px; border: 0; background: transparent; color: var(--sub); font-size: 16px; }
.qty button:hover { background: #f4f5f9; }
.qty input { width: 50px; height: 38px; border: 0; text-align: center; outline: 0; font-size: 13px; font-weight: 600; background: transparent; }
.qty-note { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.name-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.name-mode {
  border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 11px 6px;
  text-align: center; color: var(--sub); transition: .15s;
}
.name-mode b { display: block; font-size: 11.5px; color: var(--ink); }
.name-mode small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.name-mode.on { border-color: color-mix(in srgb, var(--accent) 48%, white); background: color-mix(in srgb, var(--accent) 7%, white); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 9%, transparent); }
.name-mode .nm-ico { font-size: 16px; display: block; margin-bottom: 3px; }
.pay-options { display: grid; gap: 8px; }
.pay-option { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #fff; text-align: left; }
.pay-option.on { border-color: color-mix(in srgb, var(--accent) 48%, white); background: color-mix(in srgb, var(--accent) 6%, white); }
.pay-option .pay-ico { width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; background: #f1f2f8; font-size: 14px; }
.pay-option b { display: block; font-size: 11.5px; }
.pay-option span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.co-total { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--sub); }
.co-total b { color: var(--ink); font-size: 22px; letter-spacing: -.5px; }
@media (max-width: 520px) { .name-mode small { display: none; } }

/* ---------- 支付 / 成功 ---------- */
.pay-box { text-align: center; padding: 6px 0 0; }
.pay-logo { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: #fff6df; font-size: 24px; }
.pay-box h3 { margin: 0; font-size: 21px; }
.pay-no { color: var(--muted); font-size: 10.5px; margin-top: 5px; }
.qr-wrap { width: 196px; height: 196px; margin: 18px auto 8px; border-radius: 14px; background: #fff; padding: 9px; box-shadow: 0 10px 30px rgba(20,22,50,.1); }
.qr-wrap canvas { width: 100%; height: 100%; display: block; }
.pay-amount { font-size: 28px; font-weight: 800; letter-spacing: -.8px; }
.pay-desc { color: var(--muted); font-size: 10.5px; margin-top: 6px; }
.pay-tip { margin: 16px 0; padding: 10px 12px; border-radius: 10px; background: #fff8e8; color: #9a6a19; font-size: 10.5px; line-height: 1.7; text-align: left; }
.success { text-align: center; }
.success-ico { width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #e5f8f1; color: #0f9a72; font-size: 28px; }
.success h3 { margin: 0; font-size: 24px; }
.success p { color: var(--sub); font-size: 11.5px; margin: 6px 0 0; }
.key-panel { margin-top: 18px; border-radius: 12px; border: 1px solid #d8f0e6; background: #f2fbf7; padding: 12px; text-align: left; }
.key-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: #0c7d5f; }
.key-panel-head button { border: 0; background: transparent; color: #0c7d5f; font-size: 10.5px; font-weight: 600; }
.keys { margin-top: 8px; display: grid; gap: 5px; max-height: 150px; overflow: auto; }
.key-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e0f2ea; border-radius: 8px; padding: 7px 8px; }
.key-row code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; color: #145c47; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.key-row button { border: 0; background: transparent; color: #0c7d5f; font-size: 10px; }
.order-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; text-align: left; }
.meta-cell { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; }
.meta-cell span { display: block; color: var(--muted); font-size: 9.5px; }
.meta-cell b { display: block; font-size: 11.5px; margin-top: 3px; word-break: break-all; }
.success-actions { display: flex; gap: 9px; margin-top: 18px; }
.success-actions .btn { flex: 1; }
@media (max-width: 520px) { .order-meta { grid-template-columns: 1fr; } .success-actions { flex-direction: column; } }

/* ---------- 订单列表 ---------- */
.order-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; text-align: left; margin-bottom: 8px;
}
.order-row:hover { border-color: color-mix(in srgb, var(--accent) 28%, white); }
.order-row .o-main { flex: 1; min-width: 0; }
.order-row b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.order-row .o-amount { font-weight: 700; font-size: 13px; }
.order-state { font-size: 10px; padding: 5px 7px; border-radius: 6px; font-weight: 600; }
.st-pending { background: #fff4df; color: #a86a10; }
.st-paid { background: #e8f8f1; color: #0d8a65; }
.st-delivered { background: #e8f8f1; color: #0d8a65; }
.st-closed { background: #eef0f6; color: #777d8f; }

/* ---------- 后台 ---------- */
.admin-body { background: #f4f5fa; }
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.admin-side { background: rgba(255,255,255,.78); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; backdrop-filter: blur(16px); }
.admin-brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 24px; }
.admin-brand .brand-logo { width: 34px; height: 34px; border-radius: 11px; font-size: 17px; }
.admin-brand b { display: block; font-size: 13.5px; }
.admin-brand span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--sub); font-size: 12.5px; text-align: left;
}
.admin-nav button:hover { background: rgba(91,91,214,.06); color: var(--ink); }
.admin-nav button.on { background: var(--accent); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 24%, transparent); }
.admin-nav .nav-ico { width: 18px; text-align: center; font-size: 14px; }
.admin-side-foot { margin-top: auto; display: grid; gap: 3px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-side-foot button { border: 0; background: transparent; color: var(--muted); text-align: left; font-size: 11px; padding: 8px; border-radius: 7px; }
.admin-side-foot button:hover { background: #f1f2f8; color: var(--ink); }
.admin-main { padding: 28px 32px 50px; min-width: 0; }
.admin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-top h1 { margin: 0; font-size: 26px; letter-spacing: -.8px; }
.admin-top p { margin: 6px 0 0; color: var(--sub); font-size: 12px; }
.admin-top-actions { display: flex; gap: 8px; flex: none; }
.admin-card { border-radius: 15px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.86); box-shadow: 0 8px 25px rgba(31,35,70,.05); padding: 18px; }
.admin-card h3 { margin: 0 0 4px; font-size: 14px; }
.admin-card > p { margin: 0 0 14px; color: var(--sub); font-size: 11px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { border-radius: 14px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.86); padding: 14px 15px; box-shadow: 0 8px 25px rgba(31,35,70,.05); }
.kpi span { display: block; color: var(--muted); font-size: 10px; }
.kpi b { display: block; font-size: 23px; letter-spacing: -.7px; margin-top: 7px; }
.kpi small { display: block; color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid #f0f1f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .p-name { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.table .p-thumb { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; flex: none; overflow: hidden; }
.table .p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table .p-name b { display: block; font-size: 11.5px; }
.table .p-name span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.mini-btn { height: 27px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--sub); font-size: 10px; }
.mini-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, white); }
.mini-btn.danger { color: var(--danger); }
.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 10.5px; color: var(--sub); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 34px; height: 20px; border-radius: 99px; background: #d7dbe7; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; box-shadow: 0 1px 3px rgba(20,25,50,.25); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }
.field label.switch { display: inline-flex; margin-bottom: 0; min-height: 42px; font-weight: 500; color: var(--sub); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.bg-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bg-type { border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 12px; text-align: left; font-size: 12px; font-weight: 600; }
.bg-type small { display: block; color: var(--muted); font-weight: 400; font-size: 9.5px; margin-top: 3px; }
.bg-type.on { border-color: color-mix(in srgb, var(--accent) 45%, white); background: color-mix(in srgb, var(--accent) 6%, white); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.upload-box { border: 1px dashed #cfd3e2; border-radius: 11px; background: #fbfbfe; padding: 14px; display: flex; align-items: center; justify-content: center; min-height: 90px; overflow: hidden; }
.upload-box img { max-height: 170px; border-radius: 8px; }
.upload-box .placeholder { color: var(--muted); font-size: 10.5px; text-align: center; }
.seg-list { display: grid; gap: 9px; }
.seg-item { border: 1px solid var(--line); border-radius: 11px; padding: 9px; background: #fff; }
.seg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.seg-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.seg-actions button { width: 26px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--sub); font-size: 10px; }
.notice-preview { border: 1px solid var(--line); border-radius: 12px; background: #f7f8fc; padding: 12px; min-height: 100px; overflow: auto; }
.notice-preview .notice { box-shadow: none; background: #fff; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs-line button { border: 0; background: transparent; padding: 8px 12px; color: var(--sub); font-size: 11px; border-bottom: 2px solid transparent; }
.tabs-line button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; border-radius: 20px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); padding: 30px; }
.login-logo { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 24px; margin-bottom: 16px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card p { margin: 0 0 20px; color: var(--sub); font-size: 11.5px; line-height: 1.7; }
.login-foot { margin-top: 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; padding: 12px; flex-direction: row; align-items: center; gap: 10px; overflow: auto; }
  .admin-brand { padding: 0 12px 0 0; flex: none; }
  .admin-nav { display: flex; gap: 3px; flex: 1; }
  .admin-nav button { width: auto; white-space: nowrap; height: 36px; padding: 0 10px; font-size: 11px; }
  .admin-side-foot { display: none; }
  .admin-main { padding: 20px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-top { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 14px; }
  .kpis { gap: 8px; }
}

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: grid; gap: 7px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  padding: 10px 14px; border-radius: 10px; background: rgba(24,26,44,.92); color: #fff;
  font-size: 11.5px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  animation: toastIn .2s ease;
}
.toast.ok { background: #0f8d69; }
.toast.err { background: #c24545; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 邮箱查单 / 订单详情 ---------- */
.divider {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 12px;
  color: var(--muted); font-size: 11px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.detail-rows { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 10px 12px; font-size: 12px; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--sub); flex: none; }
.detail-row b { font-weight: 600; text-align: right; word-break: break-all; }
@media (max-width: 520px) { .detail-row { flex-direction: column; gap: 3px; } .detail-row b { text-align: left; } }

/* 首屏推荐卡关闭后，左栏占满并保持视觉平衡 */
.hero.no-art { grid-template-columns: 1fr; min-height: 520px; }
.hero.no-art .hero-copy { max-width: 780px; }
.hero.no-art .hero p { max-width: 620px; }
