/* ==========================================================================
   V Studio store stylesheet: dark glass UI with one neon purple accent
   Colours come from the tokens below. brand.accent and brand.accentAlt in
   config.js override --accent (neon purple) and --accent-2 (deep indigo).
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #07060b;
  --bg-2: #0b0a12;
  --surface: #121019;          /* cards */
  --surface-2: #1a1724;        /* raised */
  --surface-3: #25202f;        /* pressed / selected */
  --fill: rgb(140 124 180 / 0.14);
  --fill-2: rgb(140 124 180 / 0.24);
  --sep: rgb(255 255 255 / 0.07);
  --sep-2: rgb(255 255 255 / 0.12);

  --text: #f6f3fb;
  --text-2: rgb(234 228 246 / 0.66);
  --text-3: rgb(234 228 246 / 0.4);

  --accent: #a855f7;           /* neon purple */
  --accent-2: #6d5dfc;         /* deep indigo */
  --neon: color-mix(in srgb, var(--accent) 45%, white);
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --grad-text: linear-gradient(92deg, #f7f0ff 0%, var(--neon) 42%, var(--accent) 100%);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-text: color-mix(in srgb, var(--accent) 55%, white);
  --accent-line: color-mix(in srgb, var(--accent) 42%, transparent);

  --ok: #3ddc84;
  --danger: #ff5a6a;

  --font-cjk: "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Microsoft JhengHei UI", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC";
  --font: "Geist Variable", "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", var(--font-cjk), sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, var(--font-cjk), monospace;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-slide: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 0 0 1px var(--sep) inset, 0 18px 40px -22px rgb(0 0 0 / 0.8);
  --shadow-lg: 0 40px 90px -30px rgb(0 0 0 / 0.9), 0 0 0 1px var(--sep-2) inset;
  --glow: 0 0 0 1px var(--accent-line) inset, 0 22px 56px -24px color-mix(in srgb, var(--accent) 70%, transparent);
  --glow-sm: 0 0 16px -2px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* Traditional Chinese: CJK fonts first for Han characters, no negative tracking, a bit more leading. */
html:lang(zh-Hant) {
  --font: "Geist Variable", "Geist", var(--font-cjk), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html:lang(zh-Hant) body * { letter-spacing: 0 !important; }
html:lang(zh-Hant) body { line-height: 1.7; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 72px);
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  background:
    radial-gradient(1000px 620px at 82% -12%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%),
    radial-gradient(760px 520px at -12% 38%, color-mix(in srgb, var(--accent-2) 8%, transparent), transparent 65%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--surface-3) var(--bg);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border: 3px solid var(--bg); border-radius: 10px; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; }

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.input:focus-visible, .search input:focus-visible, .select select:focus-visible { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow { display: block; margin: 0 0 10px; font: 600 15px/1.2 var(--font); letter-spacing: -0.01em; color: var(--accent-text); }
.h2 {
  font: 700 clamp(30px, 3.6vw, 46px)/1.06 var(--font);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
html:lang(zh-Hant) .h2 { line-height: 1.2; }
.section-note { max-width: 40ch; color: var(--text-3); font-size: 14px; line-height: 1.5; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--xs { width: 12px; height: 12px; stroke-width: 2.2; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 26px; height: 26px; }

/* App-icon style squircle: dark glass with a neon outline and glowing glyph */
.app-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--neon);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent-line), inset 0 1px 0 rgb(255 255 255 / 0.1), 0 10px 28px -14px color-mix(in srgb, var(--accent) 80%, transparent);
}
.app-icon .i { width: 24px; height: 24px; stroke-width: 1.9; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 85%, transparent)); }
.app-icon--sm { width: 32px; height: 32px; border-radius: 9px; }
.app-icon--sm .i { width: 17px; height: 17px; stroke-width: 2; }

/* ---------- Buttons & controls ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 22px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--spring), background 0.2s, box-shadow 0.25s, filter 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not([disabled]) { transform: scale(0.96); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 10px 30px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}
.btn--primary:hover:not([disabled]) {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 0 0 1px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 26px -2px color-mix(in srgb, var(--accent) 70%, transparent), 0 14px 36px -12px color-mix(in srgb, var(--accent) 95%, transparent);
}
.btn--secondary { background: var(--fill); color: var(--text); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn--secondary:hover:not([disabled]) { background: var(--fill-2); }
.btn--in-cart { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.btn--in-cart:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover:not([disabled]) { background: var(--fill); color: var(--text); }
.btn--get { height: 32px; padding-inline: 16px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn--get:hover:not([disabled]) { background: color-mix(in srgb, var(--accent) 26%, transparent); box-shadow: inset 0 0 0 1px var(--accent-line), var(--glow-sm); }
.btn--get.btn--in-cart { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); box-shadow: none; }
.btn--sm { height: 36px; padding-inline: 15px; font-size: 14px; }
.btn--lg { height: 54px; padding-inline: 28px; font-size: 16px; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--text);
  transition: background 0.2s, transform 0.25s var(--spring), box-shadow 0.2s;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn--bare { background: transparent; color: var(--text-2); }
.icon-btn--bare:hover { background: var(--fill); color: var(--text); }

/* Language switch (top right) */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--text);
  font: 600 14px/1 var(--font);
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.25s, transform 0.25s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.lang-btn:hover { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--accent-line), var(--glow-sm); }
.lang-btn:active { transform: scale(0.95); }
.lang-btn__icon { width: 22px; height: 22px; flex: none; }
.lang-btn__fill { fill: var(--accent); }
.lang-btn:hover .lang-btn__icon { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 80%, transparent)); }
.lang-btn__label { font-family: var(--font); }

.spinner {
  width: 16px; height: 16px; flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill);
  color: var(--text);
  font: 400 15px var(--font);
  transition: box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; background: var(--fill-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
select.input { appearance: none; padding-right: 38px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9a1bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select.input option { background: var(--surface-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding-inline: 10px;
  border-radius: 999px;
  font: 600 12px/1 var(--font);
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: #fff;
  background: rgb(12 10 18 / 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.22);
}
.badge--sale { background: #f4ecff; color: #3b0764; box-shadow: 0 0 14px -2px color-mix(in srgb, var(--accent) 70%, transparent); }
.badge--label { background: var(--grad); box-shadow: 0 0 14px -3px color-mix(in srgb, var(--accent) 80%, transparent); }
.badge--free { background: var(--ok); color: #032312; box-shadow: none; }
.badge--time, .badge--sub { color: #fff; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; line-height: 1; }
.price strong { font: 700 20px/1 var(--font); letter-spacing: -0.025em; color: var(--text); font-variant-numeric: tabular-nums; }
.price s { color: var(--text-3); font-size: 14px; font-weight: 500; }
.price__per { color: var(--text-3); font-size: 13px; font-weight: 500; }

.fw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fw {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding-inline: 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--text-2);
  font: 500 12px/1 var(--font);
}
.src { display: inline-flex; align-items: center; gap: 5px; font: 500 12.5px/1 var(--font); color: var(--text-3); }
.src--open { color: var(--ok); }

/* ---------- Demo bar & announcement ---------- */
.demo-bar { background: var(--bg-2); border-bottom: 1px solid var(--sep); color: var(--text-2); font-size: 13.5px; }
.demo-bar__inner { display: flex; align-items: center; gap: 12px; min-height: 44px; padding-block: 6px; }
.demo-bar__inner p { flex: 1; line-height: 1.45; }
.demo-bar code { font-family: var(--font-mono); font-size: 12px; color: var(--text); background: var(--fill); padding: 2px 7px; border-radius: 6px; }
.demo-bar__tag { flex: none; padding: 5px 10px; border-radius: 999px; font: 600 12px/1 var(--font); color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.demo-bar .icon-btn { width: 32px; height: 32px; }

.announce {
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 18%, transparent) 50%, transparent),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), color-mix(in srgb, var(--accent-2) 14%, var(--bg)));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 14px;
}
.announce__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; min-height: 44px; padding-block: 8px; text-align: center; }
.announce__text { font-weight: 600; color: #fff; text-decoration: none; }
a.announce__text:hover { text-decoration: underline; text-underline-offset: 3px; }
.announce__code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 4px 0 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  font: 600 12.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: #fff;
}
.announce__code button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.announce__code button:hover { background: rgb(255 255 255 / 0.14); }
.announce__timer { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: rgb(8 7 13 / 0.68);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--sep);
}
.header__inner { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; }
.brand__logo { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.brand__mark { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 45%, transparent)); }
.brand__wordmark { display: block; height: 36px; width: auto; max-width: min(230px, 46vw); object-fit: contain; object-position: left center; }
.footer__about .brand__wordmark { height: 48px; max-width: 280px; }
.brand__name { font: 700 18px/1 var(--font); letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding-inline: 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text); background: var(--fill); }

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.menu-btn { display: none; }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  min-width: 240px;
  padding: 6px;
  border-radius: 16px;
  background: rgb(26 23 36 / 0.9);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: menu-in 0.2s var(--spring);
}
.dropdown__menu--left { left: 0; right: auto; transform-origin: top left; }
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.dropdown__item .i { color: var(--text-2); }
.dropdown__item:hover { background: var(--fill-2); }
.dropdown__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--sep); margin-bottom: 6px; }
.dropdown__head small { display: block; font-size: 12.5px; color: var(--text-3); }
.dropdown__head strong { font-size: 15px; font-weight: 650; }
.dropdown__note { padding: 4px 12px 8px; color: var(--text-3); font-size: 12.5px; line-height: 1.45; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  max-width: 220px;
  padding: 0 12px 0 4px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.user-chip:hover { background: var(--fill-2); }
.user-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font: 700 12px/1 var(--font);
  text-transform: uppercase;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.cart-btn__count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 700 11.5px/20px var(--font);
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.cart-btn__count.is-bumped { animation: bump 0.45s var(--spring); }

.mobile-nav { border-top: 1px solid var(--sep); background: rgb(11 10 17 / 0.97); }
.mobile-nav__inner { display: grid; padding-block: 8px 18px; }
.mobile-nav a, .mobile-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--sep);
  background: none;
  color: var(--text);
  font: 500 17px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  text-align: left;
}
.mobile-nav a .i, .mobile-nav button .i { color: var(--text-3); }
.mobile-nav__label { padding: 18px 4px 6px; font-size: 13px; font-weight: 500; color: var(--text-3); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 72px);
}
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__orbs span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: drift 20s ease-in-out infinite alternate;
}
.hero__orbs span:nth-child(1) { width: 700px; height: 700px; left: 44%; top: -32%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 50%, transparent), transparent); }
.hero__orbs span:nth-child(2) { width: 540px; height: 540px; left: 72%; top: 22%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent); animation-delay: -9s; }
.hero__orbs.is-off span { animation: none; }
.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--fill);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  font: 500 14px/1 var(--font);
  color: var(--text-2);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent), 0 0 10px var(--accent); }
.hero__title {
  margin-top: 22px;
  font: 700 clamp(40px, 4.6vw, 60px)/1.04 var(--font);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
html:lang(zh-Hant) .hero__title { font-size: clamp(32px, 3.9vw, 54px); line-height: 1.18; }
.hero__title span { display: block; }
.hero__title .hl {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 45%, transparent));
}
.hero__text { margin-top: 22px; max-width: 50ch; color: var(--text-2); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; letter-spacing: -0.01em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 40px 0 0; }
.stats > div { display: flex; flex-direction: column; }
.stats dd { order: 1; margin: 0; font: 700 28px/1 var(--font); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.stats dt { order: 2; margin-top: 7px; font-size: 13.5px; font-weight: 500; color: var(--text-3); }

.hero__visual { position: relative; display: grid; place-items: center; }
.holo { position: relative; width: min(100%, 540px); aspect-ratio: 1 / 1; }
.holo__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.holo__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.holo__mark { width: 46%; height: auto; filter: drop-shadow(0 30px 60px color-mix(in srgb, var(--accent) 60%, transparent)); }

/* Floating glass widgets */
.widget {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 0;
  border-radius: 20px;
  background: rgb(22 19 32 / 0.66);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09), 0 24px 50px -22px rgb(0 0 0 / 0.85);
  color: var(--text);
  text-align: left;
  translate: var(--px, 0px) var(--py, 0px);
  animation: float 7s ease-in-out infinite;
  transition: translate 0.5s var(--ease), box-shadow 0.25s, background 0.2s;
}
button.widget { cursor: pointer; }
button.widget:hover { background: rgb(30 26 44 / 0.76); box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 30px -8px color-mix(in srgb, var(--accent) 55%, transparent), 0 28px 60px -22px rgb(0 0 0 / 0.8); }
.widget--feature { right: -3%; bottom: 9%; width: min(300px, 64%); }
.widget__img { flex: none; width: 88px; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.widget__text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.widget__text small { font: 600 12px/1.2 var(--font); color: var(--accent-text); }
.widget__text strong { font: 650 15px/1.2 var(--font); letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget__text span { font-size: 13px; color: var(--text-2); }
.widget__go { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); color: var(--text); }
.widget--notice { left: -9%; top: 2%; width: min(290px, 62%); align-items: flex-start; padding: 12px 14px 12px 12px; animation-delay: -3.5s; }
.widget--notice .app-icon { margin-top: 2px; }
.widget__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.widget__row small { color: var(--text-2); font-weight: 600; }
.widget__row time { font-size: 12px; color: var(--text-3); }
.widget--notice strong { white-space: normal; font-size: 14px; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(56px, 7vw, 104px); }
.store { padding-top: clamp(40px, 5vw, 72px); }
.showcase { padding-block: clamp(16px, 2.5vw, 32px) clamp(24px, 3.5vw, 48px); }
.showcase + .store { padding-top: clamp(32px, 4vw, 56px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: clamp(20px, 3vw, 30px); }

/* ---------- 3D slide gallery ---------- */
.gallery { position: relative; }
.cg { position: relative; }
.cg__viewport {
  --cg-w: 560px;
  position: relative;
  height: 380px;
  margin-inline: calc(var(--gutter) * -1);
  perspective: 1500px;
  perspective-origin: 50% 45%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.cg__viewport.is-dragging { cursor: grabbing; }
.cg__viewport::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(80%, 900px);
  height: 46px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent);
  filter: blur(10px);
  pointer-events: none;
}
/* The stage sits in front of the cards in 3D space, so it must not catch clicks meant for them. */
.cg__stage { position: absolute; inset: 0; transform-style: preserve-3d; transition: translate 0.45s var(--ease-slide); pointer-events: none; }
.is-dragging .cg__stage { transition: none; }
.cg__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cg-w);
  aspect-ratio: 16 / 9;
  margin: calc(var(--cg-w) * -0.28125) 0 0 calc(var(--cg-w) * -0.5);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--surface-2);
  color: #fff;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  will-change: transform;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 34px 60px -34px rgb(0 0 0 / 0.95);
  transition: transform 0.6s var(--ease-slide), opacity 0.6s var(--ease-slide), box-shadow 0.4s, visibility 0s linear 0s;
  -webkit-tap-highlight-color: transparent;
}
.cg__card.is-off { opacity: 0; visibility: hidden; pointer-events: none; transition: transform 0.6s var(--ease-slide), opacity 0.45s ease, visibility 0s linear 0.6s; }
.cg__card.is-jump, .is-instant .cg__card { transition: none !important; }
.cg__card.is-active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 46px -10px color-mix(in srgb, var(--accent) 70%, transparent), 0 40px 80px -36px rgb(0 0 0 / 0.95);
}
.cg__card:focus-visible { outline-offset: 4px; }
.cg__card img, .cg__card .placeholder-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cg__veil { position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(180deg, transparent, rgb(7 6 11 / 0.55) 45%, rgb(7 6 11 / 0.9)); pointer-events: none; }
.cg__text { position: absolute; left: clamp(14px, 2.4vw, 22px); right: clamp(14px, 2.4vw, 22px); bottom: clamp(12px, 2vw, 20px); display: grid; justify-items: start; gap: 5px; pointer-events: none; }
.cg__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 9px;
  border-radius: 999px;
  background: rgb(10 8 16 / 0.62);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--neon);
  font: 600 11.5px/1 var(--font);
}
.cg__title { font: 700 clamp(17px, 2vw, 24px)/1.15 var(--font); letter-spacing: -0.02em; text-shadow: 0 2px 14px rgb(0 0 0 / 0.6); }
.cg__sub { color: rgb(255 255 255 / 0.72); font-size: clamp(13px, 1.3vw, 14.5px); line-height: 1.35; }
.cg__open {
  position: absolute;
  top: clamp(10px, 1.6vw, 16px);
  right: clamp(10px, 1.6vw, 16px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: rgb(10 8 16 / 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--accent-line), var(--glow-sm);
  color: #fff;
  font: 600 13px/1 var(--font);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-slide);
  pointer-events: none;
}
.cg__card.is-active .cg__open { opacity: 1; transform: none; transition-delay: 0.15s; }
.cg__play { position: absolute; left: 50%; top: 42%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgb(10 8 16 / 0.6); box-shadow: inset 0 0 0 1px var(--accent-line), var(--glow-sm); color: #fff; pointer-events: none; }
.cg__play .i { width: 22px; height: 22px; fill: currentColor; }
.cg__dim { position: absolute; inset: 0; background: #06050a; opacity: 0.55; transition: opacity 0.6s var(--ease-slide); pointer-events: none; }
.cg__card.is-active .cg__dim { opacity: 0; }
.cg__card:not(.is-active):hover .cg__dim { opacity: 0.4; }

.cg__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 16px; }
.cg__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--text);
  transition: background 0.2s, box-shadow 0.25s, transform 0.25s var(--spring);
}
.cg__btn:hover { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--accent-line), var(--glow-sm); }
.cg__btn:active { transform: scale(0.92); }
.cg__btn--quiet { width: 36px; height: 36px; background: transparent; color: var(--text-3); }
.cg__btn--quiet:hover { background: var(--fill); color: var(--text); box-shadow: none; }
.cg__dots { display: flex; align-items: center; }
.cg__dot { display: grid; place-items: center; height: 28px; padding: 0 3px; border: 0; background: none; }
.cg__dot::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fill-2);
  transition: width 0.45s var(--ease-slide), background 0.3s, box-shadow 0.3s;
}
.cg__dot:hover::before { background: var(--text-3); }
.cg__dot[aria-current="true"]::before { width: 24px; background: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent); }
.cg__count { min-width: 4.5ch; color: var(--text-3); font: 500 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; text-align: center; }
.cg__dots:not(:empty) + .cg__count { display: none; }
.cg.is-single .cg__bar { display: none; }
.cg.is-single .cg__viewport { cursor: default; }

/* ---------- Store ---------- */
.store-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.search { position: relative; display: flex; align-items: center; }
.search__icon { position: absolute; left: 12px; display: grid; color: var(--text-3); pointer-events: none; }
.search input {
  width: 270px;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill);
  color: var(--text);
  font: 400 15px var(--font);
  transition: box-shadow 0.2s, background 0.2s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { background: var(--fill-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }
.select select {
  height: 42px;
  padding: 0 38px 0 14px;
  appearance: none;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9a1bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text);
  font: 500 15px var(--font);
}
.select select:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.select option { background: var(--surface-2); }

/* Category segmented control */
.rail-bar {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
  z-index: 20;
  margin: 0 calc(var(--gutter) * -1) clamp(24px, 3vw, 34px);
  padding: 10px var(--gutter);
  background: rgb(7 6 11 / 0.76);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}
.rail {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  padding: 3px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--fill);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 36px;
  padding-inline: 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-2);
  font: 600 14px/1 var(--font);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.2s, box-shadow 0.25s;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] {
  background: linear-gradient(180deg, #30273f, #241d31);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.45), inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent);
}
.chip__count { font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__count { color: var(--accent-text); }

.results-note { margin-bottom: 18px; color: var(--text-2); font-size: 15px; }
.results-note strong { color: var(--text); }

.cat { scroll-margin-top: calc(var(--header-h) + 80px); }
.cat + .cat { margin-top: clamp(48px, 6vw, 76px); }
.cat__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 16px; margin-bottom: 20px; }
.cat__title { font: 700 clamp(24px, 2.4vw, 30px)/1.1 var(--font); letter-spacing: -0.03em; }
.cat__desc { margin-top: 6px; max-width: 64ch; color: var(--text-2); font-size: 15px; }
.cat__count { font-size: 14px; font-weight: 500; color: var(--text-3); white-space: nowrap; }

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

/* Script card */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012)), var(--surface);
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.55s var(--ease), box-shadow 0.3s;
}
.pcard.is-tilting { transition: transform 0.12s linear, box-shadow 0.3s; }
.pcard:hover { --lift: -4px; box-shadow: var(--shadow), var(--glow); }
.pcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -20%), rgb(255 255 255 / 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.pcard:hover::after { opacity: 1; }
.pcard__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__badges { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.pcard__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 6px 4px; }
.pcard__cat { font-size: 13px; font-weight: 500; color: var(--accent-text); }
.pcard__title { font: 650 18px/1.25 var(--font); letter-spacing: -0.02em; }
.pcard__title button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; }
.pcard__title button::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.pcard__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}
.pcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.pcard__foot { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }

.placeholder-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 90% at 80% 10%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    radial-gradient(60% 80% at 10% 100%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 70%),
    var(--surface-2);
  color: rgb(255 255 255 / 0.6);
  font: 700 clamp(26px, 4vw, 38px)/1 var(--font);
  letter-spacing: -0.03em;
}

/* Featured scripts */
.spots { display: grid; gap: 20px; margin-bottom: clamp(48px, 6vw, 76px); }
.spots--solo { margin-bottom: 0; }
.spot {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  padding: 12px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}
.spot:hover { box-shadow: var(--shadow), var(--glow); }
.spot__media { position: relative; aspect-ratio: 16 / 9; align-self: center; padding: 0; border: 0; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.spot:nth-child(even) .spot__media { order: 2; }
.spot__media img, .spot__media .placeholder-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.spot:hover .spot__media img { transform: scale(1.03); }
.spot__body { display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 2.4vw, 30px); }
.spot__kicker { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--font); color: var(--accent-text); }
.spot__title { font: 700 clamp(26px, 2.6vw, 36px)/1.06 var(--font); letter-spacing: -0.035em; }
html:lang(zh-Hant) .spot__title { line-height: 1.2; }
.spot__title button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; }
.spot__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-2);
  font-size: 15px;
}
.spot__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.spot__foot .price strong { font-size: 28px; }

/* Loading, empty and error states */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.pcard--skel .pcard__media { background: none; }
.pcard--skel .pcard__media .skel { width: 100%; height: 100%; border-radius: 14px; }
.skel--line { height: 12px; }
.skel--title { height: 18px; width: 70%; }
.skel--price { height: 24px; width: 80px; }
.skel--btn { height: 32px; width: 70px; border-radius: 999px; }

.state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(40px, 7vw, 72px) 24px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--text-2);
}
.state__icon, .dialog__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  color: var(--neon);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 34px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.state__icon .i, .dialog__icon .i { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 85%, transparent)); }
.state h3 { color: var(--text); font: 700 22px/1.2 var(--font); letter-spacing: -0.025em; }
.state p { max-width: 52ch; }
.state code { font-family: var(--font-mono); font-size: 13px; background: var(--fill); padding: 2px 7px; border-radius: 6px; color: var(--text); }

/* ---------- Steps ---------- */
.steps__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.step .app-icon { margin-bottom: 10px; }
.step__num { font-size: 13.5px; font-weight: 500; color: var(--text-3); }
.step__title { font: 650 20px/1.2 var(--font); letter-spacing: -0.025em; }
.step__text { color: var(--text-2); }
.steps__help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 200% at 0% 50%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
}
.steps__help p { flex: 1 1 260px; color: var(--text-2); }
.steps__help strong { color: var(--text); font-weight: 650; }
.footer__help { justify-self: start; }

/* ---------- Activity widgets ---------- */
.community__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.ccard { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.ccard__label { display: flex; align-items: center; gap: 10px; font: 600 15px/1.2 var(--font); letter-spacing: -0.015em; color: var(--text); }
.supporter { display: flex; align-items: center; gap: 16px; margin-block: auto; }
.ccard--supporter .avatar { width: 68px; height: 68px; font-size: 22px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--accent) 45%, transparent); }
.supporter__name { font: 700 22px/1.2 var(--font); letter-spacing: -0.025em; word-break: break-word; }
.supporter__total { color: var(--text-2); font-size: 14px; }
.feed { display: grid; margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; }
.feed li + li { border-top: 1px solid var(--sep); }
.feed .avatar { width: 32px; height: 32px; font-size: 11px; }
.feed__who { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__what { display: block; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__when { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.goal { display: flex; align-items: center; gap: 18px; margin-block: auto; }
.ring { position: relative; flex: none; width: 108px; height: 108px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 45%, transparent)); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring__track { stroke: var(--fill-2); }
.ring__pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; font: 700 26px/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring__pct small { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.goal__title { font: 650 17px/1.3 var(--font); letter-spacing: -0.02em; }
.goal__meta { margin-top: 6px; color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- FAQ (grouped list) ---------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(28px, 5vw, 72px); }
.faq__intro .h2 { margin-bottom: 16px; }
.faq__intro p { max-width: 40ch; color: var(--text-2); font-size: 16px; }
.faq__intro .btn { margin-top: 24px; }
.faq__list { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.qa { position: relative; }
.qa + .qa::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--sep); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; list-style: none; cursor: pointer; font: 600 16px/1.4 var(--font); letter-spacing: -0.015em; transition: background 0.2s; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { background: rgb(255 255 255 / 0.03); }
.qa summary .i { color: var(--text-3); transition: transform 0.3s var(--ease); }
.qa[open] summary .i { transform: rotate(90deg); color: var(--accent-text); }
.qa__a { max-width: 64ch; padding: 0 20px 20px; color: var(--text-2); }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: 24px; background: var(--bg-2); border-top: 1px solid var(--sep); }
.footer::before { content: ""; position: absolute; top: -1px; left: 50%; width: min(560px, 70%); height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.6; }
.footer__main { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 36px; padding-block: 56px 40px; }
.footer__about { display: grid; gap: 16px; align-content: start; }
.footer__about p { max-width: 44ch; color: var(--text-2); font-size: 14.5px; }
.footer__col h3 { margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--text-3); }
.footer__col ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer__col a, .footer__col button { padding: 0; border: 0; background: none; color: var(--text-2); font-size: 14.5px; text-decoration: none; text-align: left; transition: color 0.2s; }
.footer__col a:hover, .footer__col button:hover { color: var(--text); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px; border-top: 1px solid var(--sep); color: var(--text-3); font-size: 13px; }
.legal { background: var(--bg); border-top: 1px solid var(--sep); }
.legal__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); color: var(--text-3); font-size: 12.5px; line-height: 1.55; }
.legal__inner p { max-width: 86ch; }
.legal__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legal__links a { color: var(--text-2); text-decoration: none; }
.legal__links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cart drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in 0.2s ease; }
.drawer__panel {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  width: min(calc(100% - 20px), 440px);
  overflow: hidden;
  border-radius: var(--r-xl);
  background: rgb(18 16 26 / 0.92);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-lg);
  animation: slide-in 0.38s var(--ease);
}
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 12px 24px; }
.drawer__title { font: 700 28px/1 var(--font); letter-spacing: -0.035em; }
.drawer__count { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--text-3); }
.drawer__head .icon-btn { margin-left: auto; }
.drawer__body { flex: 1; overflow-y: auto; padding: 4px 16px 20px; overscroll-behavior: contain; }
.drawer__foot { display: grid; gap: 14px; padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sep); background: rgb(11 10 17 / 0.6); }

.who { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill); }
.who__label { display: block; font-size: 12.5px; color: var(--text-3); }
.who__name { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who > div { min-width: 0; flex: 1; }
.who .btn { flex: none; }

.lines { margin: 0; padding: 0 14px; list-style: none; border-radius: var(--r-md); background: var(--fill); }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 14px 0; }
.line + .line { border-top: 1px solid var(--sep); }
.line.is-busy { opacity: 0.5; pointer-events: none; }
.line__img { width: 76px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__img .placeholder-art { font-size: 16px; }
.line__name { font: 600 15px/1.3 var(--font); letter-spacing: -0.015em; }
.line__vars { margin-top: 2px; color: var(--text-3); font-size: 12.5px; }
.line__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.line__price { text-align: right; font: 650 16px/1 var(--font); white-space: nowrap; font-variant-numeric: tabular-nums; }
.line__unit { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.line__qty-fixed { font-size: 12.5px; color: var(--text-3); }
.link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--text-3); font-size: 13px; font-weight: 500; }
.link-btn:hover { color: var(--danger); }

.stepper { display: inline-flex; align-items: center; overflow: hidden; border-radius: 999px; background: var(--fill); }
.stepper button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; background: none; color: var(--text); }
.stepper button:hover:not([disabled]) { background: var(--fill-2); }
.stepper button[disabled] { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 26px; text-align: center; font: 600 14px/1 var(--font); font-variant-numeric: tabular-nums; }
.stepper--lg button { width: 46px; height: 54px; }
.stepper--lg output { min-width: 34px; font-size: 16px; }

.codes { margin-top: 14px; border-radius: var(--r-md); background: var(--fill); }
.codes summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; list-style: none; cursor: pointer; font-weight: 600; font-size: 15px; }
.codes summary::-webkit-details-marker { display: none; }
.codes summary .i { color: var(--text-3); transition: transform 0.25s var(--ease); }
.codes[open] summary .i { transform: rotate(180deg); }
.codes__body { display: grid; gap: 10px; padding: 0 14px 14px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 11px; background: rgb(0 0 0 / 0.25); }
.seg button { height: 32px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 600 13px/1 var(--font); }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #30273f, #241d31); color: #fff; box-shadow: 0 3px 10px -2px rgb(0 0 0 / 0.5), inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent); }
.code-form { display: flex; gap: 8px; }
.code-form .input { height: 44px; background: rgb(0 0 0 / 0.25); font-family: var(--font-mono); letter-spacing: 0.04em; }
.code-form .btn { height: 44px; }
.applied { display: flex; flex-wrap: wrap; gap: 8px; }
.applied__chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); font: 600 12.5px/1 var(--font-mono); }
.applied__chip small { color: var(--text-2); font: 500 12px var(--font); }
.applied__chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.applied__chip button:hover { background: rgb(255 255 255 / 0.1); }

.totals { display: grid; gap: 8px; margin: 0; }
.totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.totals dt { font-size: 14.5px; color: var(--text-2); }
.totals dd { margin: 0; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.totals .is-save dd { color: var(--ok); }
.totals .total { padding-top: 10px; border-top: 1px solid var(--sep); }
.totals .total dt { color: var(--text); font-weight: 600; font-size: 16px; }
.totals .total dd { font: 700 28px/1 var(--font); letter-spacing: -0.03em; }
.fineprint { display: block; color: var(--text-3); font-size: 12.5px; line-height: 1.5; text-align: center; }
.fineprint .i { display: inline-block; margin-right: 4px; vertical-align: -3px; }

.cart-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 12px 24px; text-align: center; color: var(--text-2); }
.cart-empty h3 { color: var(--text); font: 700 20px/1.2 var(--font); letter-spacing: -0.025em; }
.cart-empty p { max-width: 32ch; }
.cart-empty .btn { margin-top: 4px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade-in 0.2s ease; }
.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 1020px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: var(--r-xl);
  background: rgb(19 17 27 / 0.95);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.34s var(--spring);
}
.modal--sm .modal__panel { width: min(100%, 440px); }
.modal--md .modal__panel { width: min(100%, 760px); }
.modal__content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 4; background: rgb(36 32 50 / 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.pm {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "media info" "desc info";
  grid-template-rows: auto 1fr;
  align-items: start;
}
.pm__media { grid-area: media; display: grid; align-content: start; gap: 10px; padding: 16px; }
.pm__stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.pm__stage img, .pm__stage iframe, .pm__stage video { width: 100%; height: 100%; object-fit: cover; border: 0; }
.pm__stage .pcard__badges { z-index: 2; }
.pm__caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 22px; padding-inline: 4px; font-size: 14px; color: var(--text-2); }
.pm__caption strong { color: var(--text); font-weight: 650; }
.pm__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.pm__thumb { flex: none; width: 92px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--surface-2); opacity: 0.55; box-shadow: inset 0 0 0 2px transparent; transition: opacity 0.2s, box-shadow 0.2s; }
.pm__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm__thumb:hover { opacity: 0.85; }
.pm__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent), 0 0 14px -2px color-mix(in srgb, var(--accent) 80%, transparent); }
.pm__thumb--video { display: grid; place-items: center; color: var(--text); }
.pm__info { grid-area: info; position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 26px 10px; }
.pm__info .eyebrow { margin: 0; font-size: 14px; }
.pm__title { padding-right: 44px; font: 700 clamp(28px, 3vw, 38px)/1.05 var(--font); letter-spacing: -0.04em; text-wrap: balance; }
html:lang(zh-Hant) .pm__title { line-height: 1.2; }
.pm__price .price strong { font-size: 34px; }
.pm__price .price s { font-size: 16px; }
.pm__ends { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); font-size: 14px; font-weight: 500; }
.pm__form { display: grid; gap: 14px; }
.pm__buy { display: flex; align-items: stretch; gap: 10px; }
.pm__buy .btn { flex: 1; }
.specs { display: grid; margin: 0; padding-inline: 16px; border-radius: var(--r-md); background: var(--fill); }
.specs > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 0; }
.specs > div + div { border-top: 1px solid var(--sep); }
.specs dt { font-size: 14px; color: var(--text-2); }
.specs dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; color: var(--text); font-size: 14.5px; font-weight: 500; }
.specs dd code { padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / 0.25); font: 500 12.5px/1.5 var(--font-mono); color: var(--accent-text); }
.pm__info .pcard__meta { margin-top: -2px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field__hint { color: var(--text-3); font-size: 12.5px; }
.field__error { color: var(--danger); font-size: 13px; font-weight: 500; }
.field.is-invalid .input { box-shadow: 0 0 0 2px var(--danger); }
.assure { display: grid; gap: 12px; margin: 0; padding: 4px 0 0; list-style: none; color: var(--text-2); font-size: 14px; }
.assure li { display: flex; align-items: center; gap: 12px; }
.assure li .i { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--fill); color: var(--accent-text); }
.assure code { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.pm__desc { grid-area: desc; padding: 6px 18px 30px 22px; }
.pm__desc-head { margin-bottom: 10px; font: 650 17px/1.2 var(--font); letter-spacing: -0.02em; }
.pm__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.prose { max-width: 72ch; color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.prose > * + * { margin-top: 0.85em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin-top: 1.4em; color: var(--text); font-weight: 650; line-height: 1.25; letter-spacing: -0.02em; }
.prose h1, .prose h2 { font-size: 1.25em; }
.prose h3 { font-size: 1.08em; }
.prose > :first-child { margin-top: 0; }
.prose strong, .prose b { color: var(--text); }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose ul { margin-left: 0; padding-left: 0; list-style: none; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dcbcff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 10px;
}
.prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose img { border-radius: 14px; }
.prose iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--accent-soft); }
.prose hr { border: 0; border-top: 1px solid var(--sep); }
.prose code { padding: 2px 7px; border-radius: 6px; background: var(--fill); font: 500 0.88em var(--font-mono); color: var(--accent-text); }
.prose pre { padding: 14px; overflow-x: auto; border-radius: 12px; background: rgb(0 0 0 / 0.3); }
.prose pre code { padding: 0; background: none; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--sep-2); text-align: left; }

.dialog { display: grid; justify-items: center; gap: 12px; padding: 36px 28px 28px; text-align: center; }
.dialog__icon { width: 68px; height: 68px; border-radius: 20px; }
.dialog__icon--ok {
  color: #7ff0b0;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ok) 28%, transparent), transparent 70%), var(--surface-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent), 0 0 34px -8px color-mix(in srgb, var(--ok) 60%, transparent);
}
.dialog__icon--ok .i { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ok) 80%, transparent)); }
.dialog__title { margin-top: 6px; font: 700 26px/1.1 var(--font); letter-spacing: -0.035em; text-wrap: balance; }
.dialog p { max-width: 40ch; color: var(--text-2); }
.dialog__reason { padding: 10px 14px; border-radius: 12px; background: var(--fill); color: var(--text); font-size: 14px; }
.dialog__actions { display: grid; gap: 10px; width: 100%; margin-top: 10px; }
.dialog__note { color: var(--text-3); font-size: 13px; }
.dialog__note code { font-family: var(--font-mono); color: var(--text-2); }
.dialog__summary { width: 100%; padding: 14px 16px; border-radius: var(--r-md); background: var(--fill); }

/* Payment complete: text on the right, printed order summary on the left */
.dialog--paid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "print head" "print actions";
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: stretch;
  gap: 18px 30px;
  padding: 34px 30px 30px;
  text-align: left;
}
.paid__head { grid-area: head; display: grid; justify-items: start; gap: 12px; padding-top: 6px; }
.paid__head .dialog__icon { width: 56px; height: 56px; border-radius: 17px; }
.paid__head .dialog__title { padding-right: 40px; }
.paid__print { grid-area: print; position: relative; padding-bottom: 8px; }
.paid__actions { grid-area: actions; }
.paid__actions .dialog__actions { margin-top: 4px; }

/* ---------- Printer and order summary slip ---------- */
.printer { position: relative; z-index: 2; }
.printer__body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 18px 12px;
  border-radius: 20px 20px 14px 14px;
  background: linear-gradient(180deg, #2a2240 0%, #1a1528 58%, #110e1b 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 0 30px -12px color-mix(in srgb, var(--accent) 60%, transparent), 0 22px 40px -22px rgb(0 0 0 / 0.95);
  animation: hum 0.09s linear 0.35s 26;
}
.printer__led {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 12px var(--accent);
  animation: led-blink 0.26s linear 0.35s 9;
}
.printer__brand { flex: 1; min-width: 0; overflow: hidden; color: rgb(234 228 246 / 0.55); font: 600 11px/1 var(--font-mono); letter-spacing: 0.26em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.printer__grill { width: 36px; height: 12px; flex: none; border-radius: 3px; background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.13) 0 2px, transparent 2px 5px); }
.printer__slot { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 8px; border-radius: 6px; background: #030207; box-shadow: inset 0 2px 3px rgb(0 0 0 / 0.95), 0 1px 0 rgb(255 255 255 / 0.08); }
.printer__feed {
  position: relative;
  z-index: 1;
  margin: -12px 24px 0;
  overflow: hidden;
  filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.45));
}
.printer__feed::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 16px; background: linear-gradient(rgb(0 0 0 / 0.38), transparent); pointer-events: none; }
.receipt {
  --zz: 7px;
  position: relative;
  padding: 22px 16px calc(16px + var(--zz));
  background: #f6f3ee;
  color: #1d1a24;
  font: 500 12.5px/1.55 var(--font-mono);
  transform: translateY(-101%);
  animation: print-feed 2.4s steps(20, end) 0.35s forwards;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) bottom / calc(var(--zz) * 2) var(--zz) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zz) + 1px) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #000 90deg, #0000 0) bottom / calc(var(--zz) * 2) var(--zz) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zz) + 1px) no-repeat;
}
.receipt.is-still, .printer.is-still .printer__body, .printer.is-still .printer__led { transform: none; animation: none; }
/* ".receipt ..." keeps these ahead of the general dialog text colours. */
.receipt p { max-width: none; color: inherit; }
.receipt .receipt__brand { font: 700 16px/1.2 var(--font); letter-spacing: 0.01em; text-align: center; }
.receipt .receipt__title { margin-top: 3px; color: #5e5868; font-size: 10.5px; letter-spacing: 0.26em; text-align: center; text-transform: uppercase; }
.receipt .receipt__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-top: 12px; color: #5e5868; font-size: 11px; }
.receipt .receipt__rule { margin: 10px 0; border: 0; border-top: 1px dashed rgb(29 26 36 / 0.35); }
.receipt .receipt__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.receipt .receipt__row + .receipt__row { margin-top: 4px; }
.receipt .receipt__row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.receipt .receipt__row span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt .receipt__row--muted { color: #5e5868; }
.receipt .receipt__row.receipt__total { margin-top: 8px; font-size: 15px; font-weight: 800; }
.receipt .receipt__line { margin-top: 8px; color: #5e5868; font-size: 11px; text-align: center; }
.receipt .receipt__barcode { display: block; width: 100%; height: 38px; margin-top: 12px; fill: #1d1a24; }
.receipt .receipt__thanks { margin-top: 10px; color: #1d1a24; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-align: center; text-transform: uppercase; }
.receipt .receipt__note { margin-top: 6px; color: #6f6979; font-size: 10.5px; line-height: 1.45; text-align: center; }

.page-view { padding: 32px 30px 36px; }
.page-view__title { margin-bottom: 18px; padding-right: 44px; font: 700 clamp(26px, 3.2vw, 36px)/1.08 var(--font); letter-spacing: -0.04em; }

/* ---------- Toasts (notification banners) ---------- */
.toasts { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 95; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
html.cart-open .toasts { right: calc(min(100vw, 460px) + 20px); }
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  background: rgb(30 26 44 / 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 0.42s var(--spring);
}
.toast.is-leaving { animation: toast-out 0.22s ease forwards; }
.toast__icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; color: #fff; }
.toast--success .toast__icon { background: color-mix(in srgb, var(--ok) 22%, var(--surface-2)); color: #8af5bb; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent); }
.toast--error .toast__icon { background: color-mix(in srgb, var(--danger) 24%, var(--surface-2)); color: #ffb3bb; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 50%, transparent); }
.toast--info .toast__icon { background: color-mix(in srgb, var(--accent) 24%, var(--surface-2)); color: var(--neon); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slide-in { from { transform: translateX(110%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-50px, 40px, 0) scale(1.1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes print-feed { from { transform: translateY(-101%); } to { transform: translateY(0); } }
@keyframes hum { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(0.5px, -0.4px); } 75% { transform: translate(-0.5px, 0.4px); } }
@keyframes led-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.hero__copy > * { animation: rise 0.8s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.05s; }
.hero__copy > :nth-child(3) { animation-delay: 0.1s; }
.hero__copy > :nth-child(4) { animation-delay: 0.15s; }
.hero__copy > :nth-child(5) { animation-delay: 0.2s; }

@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;
  }
  .pcard { transform: none !important; }
  .receipt { transform: none; animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .community__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ccard--feed { grid-column: 1 / -1; }
  .footer__main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__about { grid-column: 1 / -1; }
  .spot { grid-template-columns: minmax(0, 1fr); }
  .spot__media, .spot:nth-child(even) .spot__media { order: 0; }
  .spot__body { padding: 16px 10px 8px; }
}

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { order: -1; }
  .holo { width: min(100%, 440px); }
  .widget--feature { right: 0; }
  .widget--notice { left: 0; }
}

@media (max-width: 920px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
}

@media (max-width: 900px) {
  html.cart-open .toasts { left: 16px; right: 16px; width: auto; top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; }
}

@media (max-width: 860px) {
  .pm { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "info" "desc"; grid-template-rows: auto; }
  .pm__info { position: static; padding: 4px 18px 22px; }
  .pm__desc { padding: 22px 18px 30px; border-top: 1px solid var(--sep); }
  .steps__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .faq__grid { grid-template-columns: minmax(0, 1fr); }
  .community__grid { grid-template-columns: minmax(0, 1fr); }
  .ccard--feed { grid-column: auto; }
  .store-tools { width: 100%; }
  .search { flex: 1 1 200px; }
  .search input { width: 100%; }
  .select { flex: 1 1 160px; }
  .select select { width: 100%; }
}

@media (max-width: 720px) {
  .rail-bar { position: relative; top: auto; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; padding-block: 4px 0; }
  .footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog--paid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "print" "actions"; grid-template-rows: auto; padding: 30px 20px 22px; }
  .paid__print { width: min(100%, 340px); justify-self: center; }
}

@media (max-width: 640px) {
  .hero { padding-top: 16px; }
  .holo { width: min(100%, 340px); }
  .widget--notice { display: none; }
  .widget--feature { right: 0; bottom: 4%; width: min(280px, 86%); }
  .modal { align-items: end; padding: 0; }
  .modal__panel, .modal--sm .modal__panel, .modal--md .modal__panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheet-up 0.38s var(--ease);
  }
  .modal__panel::before { content: ""; position: absolute; top: 7px; left: 50%; z-index: 5; width: 38px; height: 5px; margin-left: -19px; border-radius: 999px; background: rgb(255 255 255 / 0.28); }
  .drawer__panel { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: 92dvh; height: 92dvh; border-radius: 26px 26px 0 0; animation: sheet-up 0.38s var(--ease); }
  .toasts { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .announce__inner { justify-content: flex-start; text-align: left; }
  .cg__card { border-radius: 16px; }
  .cg__open { display: none; }
}

@media (max-width: 520px) {
  :root { --header-h: 58px; }
  .brand__name { font-size: 17px; }
  .brand__wordmark { height: 30px; }
  .signin-label { display: none; }
  .header__actions { gap: 8px; }
  .lang-btn { width: 40px; padding: 0; justify-content: center; }
  .lang-btn__label { display: none; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .stats { gap: 14px 26px; }
  .footer__main { grid-template-columns: minmax(0, 1fr); }
  .pm__buy { flex-wrap: wrap; }
  .specs > div { grid-template-columns: 84px minmax(0, 1fr); }
  .cg__text { gap: 3px; }
  .cg__sub { display: none; }
}
