/* ==========================================================================
   星卡屋 · 设计 Token
   风格：糖果色斜向渐变底 + 漂浮装饰层 + 半透明毛玻璃卡片
   分层：raw 调色板 → 语义变量 → 组件变量。主题切换只覆盖语义层。
   ========================================================================== */

:root {
  /* 间距阶梯（4px 基准） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* 字号阶梯 */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Consolas", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 300ms;

  --z-header: 50;
  --z-toast: 90;
  --shell: 1040px;

  --blur: 24px;
}

/* ---------- 亮色（默认） ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  --page: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 50%, #f5d5ed 100%) fixed;

  --glass: rgba(255, 255, 255, 0.45);
  --glass-2: rgba(255, 255, 255, 0.6);
  --glass-3: rgba(255, 255, 255, 0.76);
  --glass-solid: rgba(255, 255, 255, 0.93);
  --glass-sunken: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-border-strong: rgba(255, 255, 255, 0.9);
  --hairline: rgba(120, 110, 170, 0.16);

  --decor-fill: rgba(255, 255, 255, 0.18);
  --decor-line: rgba(255, 255, 255, 0.42);

  --text: #22223a;
  --text-muted: #4d5165;
  --text-subtle: #5e6377;

  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-line: rgba(139, 92, 246, 0.38);
  --ring: rgba(139, 92, 246, 0.3);

  --price-grad: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);

  --tint-violet-bg: rgba(139, 92, 246, 0.14);
  --tint-violet-fg: #6d28d9;
  --tint-blue-bg: rgba(59, 130, 246, 0.14);
  --tint-blue-fg: #1d4ed8;
  --tint-pink-bg: rgba(236, 72, 153, 0.14);
  --tint-pink-fg: #be185d;

  --success: #067a52;
  --success-soft: rgba(16, 185, 129, 0.16);
  --warn: #925700;
  --warn-soft: rgba(245, 158, 11, 0.2);
  --danger: #be123c;
  --danger-soft: rgba(244, 63, 94, 0.14);

  --shadow-sm: 0 1px 3px rgba(60, 45, 110, 0.12);
  --shadow-md: 0 10px 24px -14px rgba(60, 45, 110, 0.4);
  --shadow-lg: 0 24px 60px -24px rgba(46, 32, 92, 0.45);
  --shadow-glow: 0 10px 26px -10px rgba(124, 58, 237, 0.5);
  --overlay: rgba(46, 34, 84, 0.34);

  --scroll-thumb: rgba(109, 40, 217, 0.35);
  --scroll-thumb-hover: rgba(109, 40, 217, 0.6);
}

/* ---------- 暗色 ---------- */
[data-theme="dark"] {
  color-scheme: dark;

  --page: linear-gradient(135deg, #241b53 0%, #172a5c 50%, #3f1f4f 100%) fixed;

  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.13);
  --glass-3: rgba(30, 26, 62, 0.82);
  --glass-solid: rgba(24, 21, 52, 0.95);
  --glass-sunken: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.3);
  --hairline: rgba(255, 255, 255, 0.12);

  --decor-fill: rgba(255, 255, 255, 0.07);
  --decor-line: rgba(255, 255, 255, 0.16);

  --text: #f4f2fd;
  --text-muted: #c3bee2;
  --text-subtle: #a9a3ce;

  --accent: #a78bfa;
  --accent-strong: #c4b5fd;
  --accent-soft: rgba(167, 139, 250, 0.2);
  --accent-line: rgba(167, 139, 250, 0.45);
  --ring: rgba(167, 139, 250, 0.4);

  --price-grad: linear-gradient(90deg, #fbbf24 0%, #fb923c 100%);

  --tint-violet-bg: rgba(167, 139, 250, 0.2);
  --tint-violet-fg: #ddd0ff;
  --tint-blue-bg: rgba(96, 165, 250, 0.2);
  --tint-blue-fg: #cfe2ff;
  --tint-pink-bg: rgba(244, 114, 182, 0.2);
  --tint-pink-fg: #fdd3ea;

  --success: #6ee7a8;
  --success-soft: rgba(110, 231, 168, 0.18);
  --warn: #fcd34d;
  --warn-soft: rgba(252, 211, 77, 0.18);
  --danger: #fda4af;
  --danger-soft: rgba(253, 164, 175, 0.18);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 10px 26px -10px rgba(167, 139, 250, 0.5);
  --overlay: rgba(10, 6, 26, 0.6);

  --scroll-thumb: rgba(196, 181, 253, 0.28);
  --scroll-thumb-hover: rgba(196, 181, 253, 0.5);
}

/* ==========================================================================
   基础
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 84px;
  background: var(--page);
  min-block-size: 100%;
}

body {
  position: relative;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-md);
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------- 滚动条 ----------
   Chromium/Safari 走 ::-webkit-scrollbar（能做圆角和内缩），
   Firefox 走标准属性。两者同时写会让 Chrome 优先用标准属性、丢掉圆角，所以按支持度分开。 */

@supports selector(::-webkit-scrollbar) {
  /* 命中区留 12px 方便拖拽，可见部分靠透明边框收窄到 6px */
  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  ::-webkit-scrollbar-track,
  ::-webkit-scrollbar-corner {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb);
    background-clip: content-box;
    border: 3px solid transparent;
    border-radius: var(--radius-pill);
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--scroll-thumb-hover);
  }
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
  }
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset-block-start: var(--sp-2);
  inset-inline-start: var(--sp-2);
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.icon-sprite {
  display: none;
}

.shell {
  inline-size: min(100% - var(--sp-8), var(--shell));
  margin-inline: auto;
}

.muted {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.icon {
  inline-size: 18px;
  block-size: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  inline-size: 14px;
  block-size: 14px;
}

.icon--xl {
  inline-size: 32px;
  block-size: 32px;
  stroke-width: 1.4;
}

/* ==========================================================================
   漂浮装饰层
   ========================================================================== */

.decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}

.decor > * {
  position: absolute;
  display: block;
}

.decor__blob {
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.decor__blob--1 {
  inline-size: 380px;
  block-size: 380px;
  inset-block-start: -120px;
  inset-inline-start: -80px;
  background: rgba(167, 139, 250, 0.55);
}

.decor__blob--2 {
  inline-size: 320px;
  block-size: 320px;
  inset-block-start: 30%;
  inset-inline-end: -110px;
  background: rgba(125, 211, 252, 0.5);
}

.decor__blob--3 {
  inline-size: 300px;
  block-size: 300px;
  inset-block-end: -100px;
  inset-inline-start: 22%;
  background: rgba(249, 168, 212, 0.45);
}

.decor__chip {
  background: var(--decor-fill);
  border: 1px solid var(--decor-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: drift 14s var(--ease) infinite alternate;
}

.decor__chip--1 {
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  inset-block-start: 170px;
  inset-inline-start: 3.5%;
}

.decor__chip--2 {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 12px;
  inset-block-start: 40%;
  inset-inline-start: 6%;
  rotate: 45deg;
  animation-delay: -3s;
}

.decor__chip--3 {
  inline-size: 26px;
  block-size: 26px;
  border-radius: 9px;
  inset-block-end: 22%;
  inset-inline-start: 4.5%;
  rotate: 12deg;
  animation-delay: -6s;
}

.decor__chip--4 {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 15px;
  inset-block-start: 150px;
  inset-inline-end: 4.5%;
  rotate: 12deg;
  animation-delay: -2s;
}

.decor__chip--5 {
  inline-size: 56px;
  block-size: 56px;
  border-radius: 18px;
  inset-block-start: 62%;
  inset-inline-end: 6.5%;
  rotate: -8deg;
  animation-delay: -8s;
}

.decor__chip--6 {
  inline-size: 30px;
  block-size: 30px;
  border-radius: 50%;
  inset-block-end: 16%;
  inset-inline-end: 5%;
  animation-delay: -5s;
}

.decor__ring {
  border-radius: 50%;
  border: 1.5px solid var(--decor-line);
  animation: drift 18s var(--ease) infinite alternate;
}

.decor__ring--1 {
  inline-size: 90px;
  block-size: 90px;
  inset-block-start: 26%;
  inset-inline-start: 1.5%;
}

.decor__ring--2 {
  inline-size: 120px;
  block-size: 120px;
  inset-block-start: 46%;
  inset-inline-end: 1%;
  animation-delay: -7s;
}

.decor__dot {
  border-radius: 50%;
  background: var(--decor-line);
}

.decor__dot--1 {
  inline-size: 8px;
  block-size: 8px;
  inset-block-start: 30%;
  inset-inline-start: 9%;
}

.decor__dot--2 {
  inline-size: 6px;
  block-size: 6px;
  inset-block-start: 52%;
  inset-inline-start: 3%;
}

.decor__dot--3 {
  inline-size: 10px;
  block-size: 10px;
  inset-block-start: 34%;
  inset-inline-end: 8%;
}

.decor__dot--4 {
  inline-size: 6px;
  block-size: 6px;
  inset-block-end: 28%;
  inset-inline-end: 11%;
}

@keyframes drift {
  from {
    translate: 0 0;
  }
  to {
    translate: 0 -18px;
  }
}

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: transparent;
  --btn-shadow: none;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-block-size: 36px;
  padding-inline: var(--sp-4);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-shadow: var(--shadow-glow);
}

.btn--primary:hover:not(:disabled) {
  --btn-bg: var(--accent-strong);
  transform: translateY(-1px);
}

.btn--secondary {
  --btn-bg: var(--glass-2);
  --btn-fg: var(--text);
  --btn-border: var(--glass-border);
  --btn-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.btn--secondary:hover:not(:disabled) {
  --btn-bg: var(--glass-3);
  --btn-border: var(--glass-border-strong);
}

.btn--ghost {
  --btn-fg: var(--text-muted);
}

.btn--ghost:hover:not(:disabled) {
  --btn-bg: var(--glass-2);
  --btn-fg: var(--text);
}

.btn--sm {
  min-block-size: 30px;
  padding-inline: var(--sp-3);
  font-size: var(--text-sm);
}

.btn--lg {
  min-block-size: 42px;
  padding-inline: var(--sp-6);
  font-size: var(--text-md);
}

.btn--icon {
  min-inline-size: 36px;
  padding-inline: 0;
}

.btn--block {
  inline-size: 100%;
}

.btn:active:not(:disabled) {
  scale: 0.98;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn[data-loading="true"] {
  pointer-events: none;
  color: transparent;
}

.btn[data-loading="true"]::after {
  content: "";
  position: absolute;
  inline-size: 15px;
  block-size: 15px;
  border: 2px solid #fff;
  border-block-start-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.btn--secondary[data-loading="true"]::after,
.btn--ghost[data-loading="true"]::after {
  border-color: var(--text);
  border-block-start-color: transparent;
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

[data-theme="dark"] .icon--only-light,
[data-theme="light"] .icon--only-dark,
:root:not([data-theme="dark"]) .icon--only-dark {
  display: none;
}

/* ==========================================================================
   表单
   ========================================================================== */

.field {
  display: grid;
  gap: var(--sp-2);
}

.field--inline {
  grid-auto-flow: column;
  align-items: center;
  gap: var(--sp-2);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-block-start: calc(var(--sp-2) * -1 + 2px);
}

.field__error {
  display: none;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-xs);
  color: var(--danger);
  font-weight: 600;
}

.field[data-invalid="true"] .field__error {
  display: flex;
}

.input,
.select {
  inline-size: 100%;
  min-block-size: 40px;
  padding-inline: var(--sp-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass-2);
  color: var(--text);
  font-size: var(--text-base);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.input::placeholder {
  color: var(--text-subtle);
}

.input:hover:not(:disabled),
.select:hover:not(:disabled) {
  border-color: var(--glass-border-strong);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--glass-3);
  box-shadow: 0 0 0 3px var(--ring);
}

.field[data-invalid="true"] .input {
  border-color: var(--danger);
}

.select {
  appearance: none;
  padding-inline-end: var(--sp-8);
  background-image: linear-gradient(45deg, transparent 50%, currentcolor 50%),
    linear-gradient(135deg, currentcolor 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* ==========================================================================
   公告条
   ========================================================================== */

.announce {
  position: relative;
  z-index: 1;
  background: var(--glass-2);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-block-end: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.announce__inner {
  inline-size: min(100% - var(--sp-8), var(--shell));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-block: var(--sp-2);
}

.announce .icon {
  color: var(--accent);
}

.announce__text {
  flex: 1;
  min-inline-size: 0;
}

.announce__close {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.announce__close:hover {
  background: var(--glass-3);
  color: var(--text);
}

/* ==========================================================================
   页头
   ========================================================================== */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border-block-end: 1px solid var(--glass-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-block-size: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.brand__mark .icon {
  inline-size: 15px;
  block-size: 15px;
}

.brand__text {
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-start: auto;
}

.site-nav a {
  padding: var(--sp-1) var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 550;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.site-nav a:hover {
  background: var(--glass-2);
  color: var(--text);
}

.site-nav a.is-active {
  background: var(--glass-3);
  border-color: var(--glass-border);
  color: var(--text);
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   路由视图
   ========================================================================== */

.view {
  padding-block: var(--sp-8) var(--sp-12);
  animation: view-in var(--dur) var(--ease);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.page-head {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  margin-block-end: var(--sp-6);
  text-align: center;
}

.page-head h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-head__icon {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  margin-block-end: var(--sp-1);
  border-radius: 50%;
  background: var(--glass-3);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  margin-block-end: var(--sp-6);
  padding: var(--sp-8) var(--sp-6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass-2);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-md);
  text-align: center;
  overflow: hidden;
}

/* 卡片内的角落点缀 */
.hero__card::before,
.hero__card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--accent-soft);
}

.hero__card::before {
  inline-size: 120px;
  block-size: 120px;
  inset-block-start: -50px;
  inset-inline-start: -30px;
}

.hero__card::after {
  inline-size: 90px;
  block-size: 90px;
  inset-block-end: -40px;
  inset-inline-end: -20px;
  background: var(--tint-pink-bg);
}

.hero__card > * {
  position: relative;
}

.hero__card h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, #4c1d95 0%, #7c3aed 55%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="dark"] .hero__card h1 {
  background: linear-gradient(90deg, #ddd6fe 0%, #c4b5fd 55%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0;
  list-style: none;
}

.trust li {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
}

.trust--violet {
  background: var(--tint-violet-bg);
  color: var(--tint-violet-fg);
}

.trust--blue {
  background: var(--tint-blue-bg);
  color: var(--tint-blue-fg);
}

.trust--pink {
  background: var(--tint-pink-bg);
  color: var(--tint-pink-fg);
}

.search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  inline-size: min(100%, 220px);
  min-inline-size: 0;
  min-block-size: 32px;
  padding-inline: var(--sp-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass-2);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.search:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--ring);
}

.search__icon {
  color: var(--text-subtle);
}

.search__input {
  flex: 1;
  min-inline-size: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: var(--text-base);
}

.search__input::placeholder {
  color: var(--text-subtle);
}

.search__input::-webkit-search-cancel-button {
  filter: grayscale(1);
  opacity: 0.55;
}

/* ==========================================================================
   商品区
   ========================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-block-end: var(--sp-5);
}

.toolbar__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  min-inline-size: 0;
}

.select--sm {
  inline-size: auto;
  min-block-size: 32px;
  padding-inline: var(--sp-3) var(--sp-8);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
}

.tabs {
  display: flex;
  gap: var(--sp-2);
  padding-block-end: var(--sp-1);
  overflow-x: auto;
}

.tab {
  flex: none;
  min-block-size: 32px;
  padding-inline: var(--sp-4);
  border: 1px solid var(--decor-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-base);
  font-weight: 550;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.tab:hover {
  background: var(--glass-2);
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--glass-3);
  border-color: var(--glass-border-strong);
  color: var(--text);
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: var(--sp-4);
}

.card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
}

.product {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.product:hover:not([data-soldout="true"]) {
  background: var(--glass-2);
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.product[data-soldout="true"] {
  opacity: 0.7;
}

.product__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}

.product__icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--glass-3);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.product:hover:not([data-soldout="true"]) .product__icon {
  background: var(--accent);
  color: #fff;
}

.product__title {
  font-size: var(--text-md);
  font-weight: 700;
}

.product__summary {
  margin-block-start: 3px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--brand {
  background: var(--tint-violet-bg);
  color: var(--tint-violet-fg);
}

.badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--muted {
  background: var(--glass-sunken);
  color: var(--text-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.product__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.product__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-block-start: auto;
  padding-block-start: var(--sp-3);
}

.product__pricing {
  display: grid;
  gap: 2px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
  font-variant-numeric: tabular-nums;
}

.price__label {
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

.price__now {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--price-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price__now::before {
  content: "¥";
  font-size: var(--text-sm);
  font-weight: 700;
}

.price__was {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  text-decoration: line-through;
}

.product__cta {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--tint-violet-fg);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.product:hover:not([data-soldout="true"]) .product__cta {
  background: var(--accent);
  color: #fff;
}

.product__cta--off {
  background: var(--glass-sunken);
  color: var(--text-subtle);
}

/* ---------- 骨架屏 ---------- */

.skeleton {
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
}

.sk-line {
  block-size: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--glass-sunken), var(--glass-3), var(--glass-sunken));
  background-size: 200% 100%;
  animation: sk 1.4s var(--ease) infinite;
}

.sk-line--lg {
  block-size: 40px;
  inline-size: 40px;
}

.sk-line--60 {
  inline-size: 60%;
}

.sk-line--40 {
  inline-size: 40%;
}

.sk-line--80 {
  inline-size: 80%;
}

@keyframes sk {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- 空态 / 错误态 ---------- */

.state {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-12) var(--sp-6);
  border: 1px dashed var(--glass-border-strong);
  border-radius: var(--radius-xl);
  background: var(--glass-sunken);
  text-align: center;
}

.state .icon {
  color: var(--accent);
}

.state--error .icon {
  color: var(--danger);
}

.state .btn {
  margin-block-start: var(--sp-2);
}

/* ==========================================================================
   订单查询
   ========================================================================== */

.lookup__form {
  display: grid;
  gap: var(--sp-3);
  max-inline-size: 440px;
  margin-inline: auto;
  padding: var(--sp-5);
}

.lookup__result {
  max-inline-size: 620px;
  margin: var(--sp-6) auto 0;
}

.lookup__result:empty {
  display: none;
}

.lookup__count {
  margin-block-end: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-subtle);
  text-align: center;
}

.order-card {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
}

.order-card__name {
  font-size: var(--text-base);
  font-weight: 700;
}

/* 待支付订单：提示剩余时间并给一个继续付款的入口 */
.order-card__pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3);
  border: 1px dashed var(--warn);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
}

.order-card__pending p {
  flex: 1;
  min-inline-size: 180px;
  margin: 0;
}

.order-card + .order-card {
  margin-block-start: var(--sp-3);
}

.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--text-sm);
}

.order-card__no {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ==========================================================================
   卡密展示
   ========================================================================== */

.secret {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.secret code {
  flex: 1;
  min-inline-size: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
  /* 固定文案发货时内容可能是多行说明，要保留换行 */
  white-space: pre-wrap;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq__list {
  display: grid;
  gap: var(--sp-2);
  max-inline-size: 720px;
  margin-inline: auto;
}

.faq__item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
}

.faq__item[open] {
  background: var(--glass-2);
  border-color: var(--glass-border-strong);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-base);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur-fast) var(--ease);
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  background: var(--glass-2);
}

.faq__q::after {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  flex: none;
  border-inline-end: 2px solid var(--accent);
  border-block-end: 2px solid var(--accent);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate var(--dur) var(--ease);
}

.faq__item[open] .faq__q::after {
  rotate: 225deg;
  translate: 0 2px;
}

.faq__a {
  padding: 0 var(--sp-5) var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  margin-block-start: auto;
  padding-block: var(--sp-6);
}

.site-footer__inner {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

/* ==========================================================================
   弹窗
   ========================================================================== */

.modal {
  /* 基础 reset 的 * { margin: 0 } 会清掉 dialog 默认的 margin: auto，这里补回来 */
  margin: auto;
  inline-size: min(100% - var(--sp-8), 600px);
  max-block-size: min(88dvh, 840px);
  padding: 0;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-xl);
  background: var(--glass-3);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

.modal::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal[open] {
  animation: modal-in var(--dur) var(--ease);
}

.modal[open]::backdrop {
  animation: fade-in var(--dur) var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal__dismiss {
  position: absolute;
  inset-block-start: var(--sp-3);
  inset-inline-end: var(--sp-3);
  z-index: 2;
}

/* 内容滚动时会从关闭按钮下方穿过，给它一个实底保持可辨识 */
.modal__dismiss .btn {
  background: var(--glass-solid);
  border-color: var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.modal__dismiss .btn:hover {
  color: var(--text);
  border-color: var(--glass-border-strong);
}

.modal__body {
  max-block-size: min(88dvh, 840px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: inherit;
  /* 聚焦输入框时自动滚动要避开吸底的结算栏 */
  scroll-padding-block-end: 104px;
}

.modal__head {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-6);
  padding-inline-end: var(--sp-12);
  border-block-end: 1px solid var(--hairline);
}

.modal__head h2 {
  font-size: var(--text-xl);
}

.modal__section {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-block-end: 1px solid var(--hairline);
}

.modal__section:last-of-type {
  border-block-end: 0;
}

.modal__section h3 {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modal__foot {
  position: sticky;
  inset-block-end: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-block-start: 1px solid var(--hairline);
  background: var(--glass-solid);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-end-start-radius: inherit;
  border-end-end-radius: inherit;
}

.detail-list {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding-inline-start: var(--sp-5);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* 规格选择 */
.spec-list {
  display: grid;
  gap: var(--sp-2);
}

.spec {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-2);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.spec:hover:not([data-disabled="true"]) {
  border-color: var(--accent-line);
}

.spec:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.spec:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.spec[data-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.spec input {
  accent-color: var(--accent);
  inline-size: 15px;
  block-size: 15px;
  flex: none;
}

.spec__name {
  flex: 1;
  min-inline-size: 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.spec__price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* 数量步进器 */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass-2);
  overflow: hidden;
}

.stepper button {
  inline-size: 34px;
  block-size: 34px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.stepper button:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
}

.stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper input {
  inline-size: 46px;
  block-size: 34px;
  border: 0;
  border-inline: 1px solid var(--hairline);
  background: transparent;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}

.total {
  display: grid;
  gap: 0;
}

.total__label {
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

.total__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: var(--price-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.total__value::before {
  content: "¥";
  font-size: var(--text-md);
}

/* 支付方式 */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
}

.pay-method {
  position: relative;
  display: grid;
  gap: 0;
  padding: var(--sp-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-2);
  text-align: center;
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.pay-method:hover {
  border-color: var(--accent-line);
}

.pay-method:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pay-method:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pay-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-method small {
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

.qr {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-2);
}

.qr__code {
  inline-size: 160px;
  block-size: 160px;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* 跳收银台后站内只能等回调，用一个转圈提示 */
.qr--wait {
  padding-block: var(--sp-8);
  text-align: center;
}

.qr__spinner {
  inline-size: 34px;
  block-size: 34px;
  border: 3px solid var(--accent-soft);
  border-block-start-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .qr__spinner {
    animation-duration: 2s;
  }
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}

.result {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-8) var(--sp-6) var(--sp-4);
  text-align: center;
}

.result__mark {
  display: grid;
  place-items: center;
  inline-size: 52px;
  block-size: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
  animation: pop 400ms var(--ease);
}

.result__mark .icon {
  stroke-width: 2.6;
  inline-size: 24px;
  block-size: 24px;
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.4;
  }
  60% {
    scale: 1.12;
  }
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-stack {
  position: fixed;
  inset-block-end: var(--sp-6);
  inset-inline: 0;
  z-index: var(--z-toast);
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding-inline: var(--sp-4);
  padding-block-end: env(safe-area-inset-bottom, 0);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-inline-size: min(100%, 400px);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-pill);
  background: var(--glass-solid);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--dur) var(--ease);
}

.toast[data-tone="success"] .icon {
  color: var(--success);
}

.toast[data-tone="error"] .icon {
  color: var(--danger);
}

.toast[data-leaving="true"] {
  animation: toast-out var(--dur) var(--ease) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 860px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
  }

  .search {
    inline-size: auto;
    flex: 1;
  }

  /* 下拉框按内容定宽，剩余空间全给搜索框，避免窄屏被挤出容器 */
  .select--sm {
    flex: none;
  }
}

@media (max-width: 760px) {
  :root {
    --blur: 18px;
  }

  .shell {
    inline-size: min(100% - var(--sp-5), var(--shell));
  }

  /* 分页之后导航是唯一入口，小屏也要留着，只收紧尺寸 */
  .site-header__inner {
    gap: var(--sp-2);
  }

  .site-nav a {
    padding-inline: var(--sp-3);
    font-size: var(--text-xs);
  }

  .brand__text {
    font-size: var(--text-sm);
  }

  .view {
    padding-block: var(--sp-5) var(--sp-10);
  }

  .hero__card {
    padding: var(--sp-6) var(--sp-5);
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .decor__ring,
  .decor__chip--2,
  .decor__chip--3,
  .decor__dot--1,
  .decor__dot--2 {
    display: none;
  }

  .modal {
    inline-size: 100%;
    max-inline-size: 100%;
    max-block-size: 92dvh;
    margin-block: auto 0;
    border-start-start-radius: var(--radius-xl);
    border-start-end-radius: var(--radius-xl);
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }

  .modal__body {
    max-block-size: 92dvh;
  }

  .modal__foot {
    flex-direction: column;
    align-items: stretch;
    padding-block-end: max(var(--sp-4), env(safe-area-inset-bottom, 0));
  }

  .modal__foot .btn {
    inline-size: 100%;
  }
}

@media (max-width: 430px) {
  .brand__text {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .pay-methods {
    grid-template-columns: minmax(0, 1fr);
  }

  .decor__chip,
  .decor__dot {
    display: none;
  }
}

/* ==========================================================================
   偏好适配
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .product:hover,
  .btn--primary:hover {
    transform: none;
  }
}

/* 不支持 backdrop-filter 时提高不透明度，保证文字可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass: rgba(255, 255, 255, 0.88);
    --glass-2: rgba(255, 255, 255, 0.93);
    --glass-3: rgba(255, 255, 255, 0.96);
    --glass-sunken: rgba(255, 255, 255, 0.82);
  }

  [data-theme="dark"] {
    --glass: rgba(26, 22, 56, 0.92);
    --glass-2: rgba(32, 27, 66, 0.95);
    --glass-3: rgba(28, 24, 58, 0.97);
    --glass-sunken: rgba(20, 17, 46, 0.9);
  }
}

@media (forced-colors: active) {
  .decor,
  .hero__card::before,
  .hero__card::after {
    display: none;
  }

  .card,
  .modal,
  .product,
  .tab,
  .spec,
  .pay-method,
  .btn,
  .stat,
  .faq__item,
  .hero__card {
    border: 1px solid CanvasText;
    background: Canvas;
    backdrop-filter: none;
  }

  .hero h1 em,
  .price__now,
  .total__value {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }

  .tab[aria-selected="true"],
  .spec:has(input:checked),
  .pay-method:has(input:checked) {
    outline: 2px solid Highlight;
  }

  .sk-line {
    display: none;
  }
}
