/* c145 (2026-04-30): Google Fonts @import 移到 HTML <link> for parallel
   download + <link rel="preconnect"> 暖 TLS to fonts.gstatic.com。
   原本 @import 在 styles bundle 第一行 = render-blocking + 序列下載
   (bundle parse → fetch font CSS → fetch woff2)。改 <link> 後 font CSS
   跟 main bundle 並行下載，preconnect 提早 100-200ms 完成 TLS。 */

:root {
  color-scheme: dark;
  --bg: #090d17;
  --bg-2: #10182b;
  --card: rgba(18, 24, 45, 0.78);
  --ink: #edf6ff;
  --muted: #99aeca;
  --accent: #00ff88;
  --accent-2: #00d4ff;
  --border: rgba(102, 124, 164, 0.22);
  --line: var(--border);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --layout-max-width: 1200px;
  --layout-padding: 40px;
  --news-content-max: 1680px;
  --news-home-dock-width: 360px;
  --news-home-dock-gap: 24px;
  --news-full-max: 1840px;
  --news-inline-gutter: clamp(12px, 1.8vw, 32px);
  --news-rail-width: clamp(340px, 24vw, 430px);
  --heading-size: 32px;
  --admin-title-size: 30px;
  --admin-title-weight: 800;
  --admin-title-spacing: 0.01em;
  --admin-title-color: #f8fafc;
  --admin-title-accent-color: #38bdf8;
  --admin-title-border: rgba(56, 189, 248, 0.35);
  --table-padding-y: 6px;
  --table-padding-x: 8px;
  --button-height: 32px;
  --button-font-size: 13px;
  --card-gap: 24px;
  --font-body: "Noto Sans TC", "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans TC", "Segoe UI", sans-serif;
  --theme-motion-page-in: 420ms;
  --theme-motion-hover: 170ms;
  --theme-motion-pop: 240ms;
  --public-btn-radius: 999px;
  --public-btn-ghost-radius: 999px;
  --public-btn-compact-radius: 999px;
  --public-btn-primary-bg: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  --public-btn-primary-border: rgba(167, 255, 224, 0.3);
  --public-btn-primary-color: #07121d;
  --public-btn-primary-shadow: 0 16px 32px rgba(0, 255, 136, 0.2);
  --public-btn-ghost-bg: rgba(13, 20, 39, 0.72);
  --public-btn-ghost-border: rgba(120, 148, 191, 0.24);
  --public-btn-ghost-color: #edf6ff;
  --public-btn-ghost-shadow: 0 12px 30px rgba(2, 6, 23, 0.2);
  --public-btn-chip-radius: 999px;
  --public-btn-chip-bg: rgba(14, 22, 42, 0.82);
  --public-btn-chip-border: rgba(102, 124, 164, 0.28);
  --public-btn-chip-color: var(--ink);
  --public-btn-chip-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
  --public-btn-chip-active-bg: linear-gradient(135deg, rgba(0, 255, 136, 0.94), rgba(0, 212, 255, 0.92));
  --public-btn-chip-active-border: rgba(167, 255, 224, 0.3);
  --public-btn-chip-active-color: #07121d;
  --public-btn-chip-active-shadow: 0 16px 28px rgba(0, 255, 136, 0.16);
  --public-btn-focus-ring: rgba(0, 255, 136, 0.18);
  --public-btn-letter-spacing: 0.03em;
  --public-btn-text-transform: none;
  --public-btn-font-weight: 700;
  --public-btn-chip-font-weight: 600;
  --cosmic-surface: rgba(13, 19, 37, 0.72);
  --cosmic-surface-strong: rgba(16, 23, 43, 0.92);
  --cosmic-line: rgba(120, 148, 191, 0.18);
  --cosmic-glow-green: 0 0 18px rgba(0, 255, 136, 0.2), 0 0 36px rgba(0, 255, 136, 0.08);
  --cosmic-glow-blue: 0 0 18px rgba(0, 212, 255, 0.18), 0 0 32px rgba(0, 212, 255, 0.08);
  --cosmic-panel-shadow: 0 24px 60px rgba(2, 8, 23, 0.42);

  /* ---------- Admin semantic tokens (2026-04 table-shell redesign) ---------- */
  /* status chip semantic palette — neutral / info / success / warn / danger / accent */
  --chip-neutral-bg: rgba(148, 163, 184, 0.12);
  --chip-neutral-border: rgba(148, 163, 184, 0.28);
  --chip-neutral-text: #cbd5e1;
  --chip-info-bg: rgba(56, 189, 248, 0.14);
  --chip-info-border: rgba(56, 189, 248, 0.38);
  --chip-info-text: #7dd3fc;
  --chip-success-bg: rgba(16, 185, 129, 0.14);
  --chip-success-border: rgba(16, 185, 129, 0.4);
  --chip-success-text: #34d399;
  --chip-warn-bg: rgba(245, 158, 11, 0.14);
  --chip-warn-border: rgba(245, 158, 11, 0.4);
  --chip-warn-text: #fbbf24;
  --chip-danger-bg: rgba(244, 63, 94, 0.14);
  --chip-danger-border: rgba(244, 63, 94, 0.4);
  --chip-danger-text: #fb7185;
  --chip-accent-bg: rgba(0, 255, 136, 0.14);
  --chip-accent-border: rgba(0, 255, 136, 0.38);
  --chip-accent-text: #4ade80;

  /* order lifecycle tokens (pending → shipping → done / cancelled) */
  --order-pending-color: #fbbf24;
  --order-shipping-color: #7dd3fc;
  --order-done-color: #34d399;
  --order-cancelled-color: #94a3b8;

  /* VIP / member level palette (VIP0-VIP9, gradient ramp) */
  --level-0: #64748b;
  --level-1: #94a3b8;
  --level-2: #38bdf8;
  --level-3: #22d3ee;
  --level-4: #34d399;
  --level-5: #a3e635;
  --level-6: #fbbf24;
  --level-7: #fb923c;
  --level-8: #f472b6;
  --level-9: #c084fc;

  /* rarity palette (card / gacha) — 沿用既有稀有度顏色系統 */
  --rarity-A: #fbbf24;
  --rarity-B: #c084fc;
  --rarity-C: #38bdf8;
  --rarity-D: #22d3ee;

  /* admin table/hero shell surfaces */
  --shell-hero-surface: linear-gradient(135deg, rgba(17, 24, 44, 0.96) 0%, rgba(10, 16, 32, 0.9) 100%);
  --shell-hero-border: rgba(102, 124, 164, 0.22);
  --shell-hero-shadow: 0 24px 60px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shell-card-surface: rgba(13, 19, 37, 0.72);
  --shell-card-border: rgba(102, 124, 164, 0.2);
  --shell-card-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
  --shell-table-head-bg: rgba(15, 23, 42, 0.78);
  --shell-table-row-hover: rgba(56, 189, 248, 0.06);
  --shell-table-row-border: rgba(102, 124, 164, 0.12);

  /* ---------- a11y v7 (2026-04-20) ---------- */
  /* Focus ring — cyan 3px solid + 2px offset. WCAG 1.4.11 non-text
     contrast 3:1 vs dark bg (#38bdf8 on #090d17 ≈ 6.7:1). */
  --focus-ring: 3px solid #38bdf8;
  --focus-ring-offset: 2px;
}

body.frontend-theme-default {
  --bg: #121320;
  --bg-2: #191b2b;
  --card: rgba(26, 28, 44, 0.78);
  --line: var(--border);
  --border: rgba(124, 132, 160, 0.14);
  --text: var(--ink);
  --muted: #a4acc4;
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --layout-max-width: 1280px;
  --layout-padding: 32px;
  --font-body: "Noto Sans TC", "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --public-btn-primary-shadow: 0 10px 20px rgba(0, 255, 136, 0.1);
  --public-btn-ghost-bg: rgba(22, 25, 39, 0.68);
  --public-btn-ghost-border: rgba(124, 132, 160, 0.16);
  --public-btn-ghost-shadow: 0 8px 18px rgba(3, 8, 24, 0.12);
  --public-btn-chip-bg: rgba(24, 27, 42, 0.7);
  --public-btn-chip-border: rgba(124, 132, 160, 0.16);
  --public-btn-chip-shadow: 0 6px 14px rgba(3, 8, 24, 0.1);
  --public-btn-chip-active-shadow: 0 10px 18px rgba(0, 255, 136, 0.08);
  --cosmic-surface: rgba(24, 27, 42, 0.7);
  --cosmic-surface-strong: rgba(27, 30, 46, 0.88);
  --cosmic-line: rgba(124, 132, 160, 0.14);
  --cosmic-glow-green: 0 0 10px rgba(0, 255, 136, 0.08), 0 0 18px rgba(0, 255, 136, 0.03);
  --cosmic-glow-blue: 0 0 10px rgba(0, 212, 255, 0.08), 0 0 18px rgba(0, 212, 255, 0.03);
  --cosmic-panel-shadow: 0 12px 28px rgba(2, 8, 23, 0.18);
}

body.frontend-theme-cute {
  --bg: #ffeaf3;
  --bg-2: #fff4f9;
  --card: rgba(255, 255, 255, 0.86);
  --ink: #4d2e44;
  --muted: #7f5e75;
  --accent: #ff6ea8;
  --accent-2: #ffc85c;
  --border: rgba(255, 140, 185, 0.28);
  --line: rgba(255, 140, 185, 0.35);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
}

body.frontend-theme-tech {
  --bg: #030915;
  --bg-2: #081326;
  --card: rgba(7, 18, 38, 0.86);
  --ink: #dce9ff;
  --muted: #8ea5cc;
  --accent: #33d1ff;
  --accent-2: #6d5cff;
  --border: rgba(51, 209, 255, 0.28);
  --line: rgba(92, 174, 255, 0.35);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
}

body.frontend-theme-board08 {
  --bg: #fff0f7;
  --bg-2: #f6e8ff;
  --card: rgba(255, 249, 253, 0.9);
  --ink: #3a2940;
  --muted: #8e7c96;
  --accent: #ff8bc2;
  --accent-2: #8bcbff;
  --border: rgba(255, 162, 205, 0.28);
  --line: rgba(255, 162, 205, 0.34);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Fredoka", "Noto Sans TC", sans-serif;
  --public-btn-radius: 18px;
  --public-btn-ghost-radius: 999px;
  --public-btn-compact-radius: 16px;
  --public-btn-primary-bg: linear-gradient(135deg, #ff8fc8 0%, #ffb4d5 48%, #8bcbff 100%);
  --public-btn-primary-border: rgba(255, 255, 255, 0.54);
  --public-btn-primary-color: #fffafd;
  --public-btn-primary-shadow: 0 16px 28px rgba(255, 139, 194, 0.26);
  --public-btn-ghost-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 248, 0.86));
  --public-btn-ghost-border: rgba(255, 162, 205, 0.36);
  --public-btn-ghost-color: #7e4367;
  --public-btn-ghost-shadow: 0 10px 18px rgba(255, 184, 215, 0.18);
  --public-btn-chip-radius: 18px;
  --public-btn-chip-bg: rgba(255, 255, 255, 0.84);
  --public-btn-chip-border: rgba(255, 162, 205, 0.28);
  --public-btn-chip-color: #734765;
  --public-btn-chip-shadow: 0 8px 16px rgba(255, 184, 215, 0.15);
  --public-btn-chip-active-bg: linear-gradient(135deg, rgba(255, 139, 194, 0.94), rgba(139, 203, 255, 0.94));
  --public-btn-chip-active-border: rgba(255, 255, 255, 0.55);
  --public-btn-chip-active-color: #fffafd;
  --public-btn-chip-active-shadow: 0 14px 24px rgba(255, 139, 194, 0.26);
  --public-btn-focus-ring: rgba(255, 139, 194, 0.28);
  --public-btn-letter-spacing: 0.01em;
}

body.frontend-theme-board23 {
  --bg: #dde7ff;
  --bg-2: #f4daff;
  --card: rgba(248, 251, 255, 0.86);
  --ink: #1f2747;
  --muted: #6e76a2;
  --accent: #6a74ff;
  --accent-2: #ff8ad8;
  --border: rgba(106, 116, 255, 0.24);
  --line: rgba(121, 130, 255, 0.35);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --public-btn-radius: 14px;
  --public-btn-ghost-radius: 14px;
  --public-btn-compact-radius: 10px;
  --public-btn-primary-bg: linear-gradient(180deg, #8d94ff 0%, #6a74ff 56%, #5963f0 100%);
  --public-btn-primary-border: rgba(39, 49, 101, 0.88);
  --public-btn-primary-color: #fcfbff;
  --public-btn-primary-shadow:
    0 5px 0 rgba(55, 64, 143, 0.9),
    0 16px 26px rgba(83, 91, 198, 0.24);
  --public-btn-ghost-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 238, 255, 0.82));
  --public-btn-ghost-border: rgba(106, 116, 255, 0.42);
  --public-btn-ghost-color: #364285;
  --public-btn-ghost-shadow:
    0 4px 0 rgba(106, 116, 255, 0.22),
    0 12px 18px rgba(106, 116, 255, 0.12);
  --public-btn-chip-radius: 14px;
  --public-btn-chip-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 238, 255, 0.84));
  --public-btn-chip-border: rgba(106, 116, 255, 0.34);
  --public-btn-chip-color: #364285;
  --public-btn-chip-shadow:
    0 4px 0 rgba(106, 116, 255, 0.18),
    0 10px 18px rgba(106, 116, 255, 0.12);
  --public-btn-chip-active-bg: linear-gradient(135deg, #ffd86b 0%, #ff8ad8 52%, #6a74ff 100%);
  --public-btn-chip-active-border: rgba(43, 54, 124, 0.55);
  --public-btn-chip-active-color: #1c2245;
  --public-btn-chip-active-shadow:
    0 5px 0 rgba(72, 47, 128, 0.42),
    0 14px 24px rgba(106, 116, 255, 0.18);
  --public-btn-focus-ring: rgba(106, 116, 255, 0.28);
  --public-btn-letter-spacing: 0.08em;
  --public-btn-text-transform: uppercase;
  --public-btn-font-weight: 800;
  --public-btn-chip-font-weight: 700;
}

body.frontend-theme-board24 {
  --bg: #1f1a44;
  --bg-2: #46368a;
  --card: rgba(33, 28, 73, 0.86);
  --ink: #f6f1ff;
  --muted: #c9bceb;
  --accent: #b9a6ff;
  --accent-2: #7de7ff;
  --border: rgba(211, 201, 255, 0.2);
  --line: rgba(211, 201, 255, 0.26);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: Georgia, "Noto Serif TC", "Noto Sans TC", serif;
  --public-btn-radius: 999px;
  --public-btn-ghost-radius: 999px;
  --public-btn-compact-radius: 18px;
  --public-btn-primary-bg: linear-gradient(
    135deg,
    rgba(247, 241, 255, 0.98) 0%,
    rgba(211, 229, 255, 0.92) 48%,
    rgba(125, 231, 255, 0.92) 100%
  );
  --public-btn-primary-border: rgba(255, 255, 255, 0.5);
  --public-btn-primary-color: #211c49;
  --public-btn-primary-shadow: 0 18px 32px rgba(125, 231, 255, 0.16);
  --public-btn-ghost-bg: linear-gradient(180deg, rgba(55, 45, 115, 0.86), rgba(32, 27, 72, 0.9));
  --public-btn-ghost-border: rgba(201, 188, 235, 0.28);
  --public-btn-ghost-color: #f2edff;
  --public-btn-ghost-shadow: 0 12px 24px rgba(11, 14, 34, 0.22);
  --public-btn-chip-radius: 20px;
  --public-btn-chip-bg: rgba(40, 32, 87, 0.82);
  --public-btn-chip-border: rgba(201, 188, 235, 0.22);
  --public-btn-chip-color: #ede7ff;
  --public-btn-chip-shadow: 0 12px 22px rgba(9, 11, 28, 0.18);
  --public-btn-chip-active-bg: linear-gradient(
    135deg,
    rgba(185, 166, 255, 0.95) 0%,
    rgba(125, 231, 255, 0.9) 100%
  );
  --public-btn-chip-active-border: rgba(255, 255, 255, 0.42);
  --public-btn-chip-active-color: #1e1a43;
  --public-btn-chip-active-shadow: 0 16px 28px rgba(125, 231, 255, 0.14);
  --public-btn-focus-ring: rgba(185, 166, 255, 0.28);
  --public-btn-letter-spacing: 0.03em;
}

body.frontend-theme-cute {
  background: radial-gradient(circle at top, #ffd7ea 0%, var(--bg) 62%);
}

body.frontend-theme-tech {
  background: radial-gradient(circle at top, #0b1b3a 0%, var(--bg) 66%);
}

body.frontend-theme-board08 {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 173, 216, 0.55), transparent 26%),
    radial-gradient(circle at 82% 8%, rgba(255, 204, 112, 0.36), transparent 24%),
    linear-gradient(155deg, #fff7fb 0%, var(--bg) 48%, #fff3fa 100%);
}

body.frontend-theme-board23 {
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 216, 107, 0.26), transparent 20%),
    radial-gradient(circle at 84% 16%, rgba(106, 116, 255, 0.24), transparent 24%),
    linear-gradient(135deg, #edf2ff 0%, var(--bg) 52%, #f3e6ff 100%);
}

body.frontend-theme-board24 {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at 80% 12%, rgba(185, 166, 255, 0.16), transparent 20%),
    linear-gradient(145deg, #171337 0%, var(--bg) 48%, #362b78 100%);
}

body.frontend-theme-cute .topbar {
  background: rgba(255, 244, 250, 0.92);
  border-bottom-color: rgba(255, 135, 180, 0.34);
}

body.frontend-theme-tech .topbar {
  background: rgba(4, 12, 26, 0.88);
  border-bottom-color: rgba(58, 165, 255, 0.35);
}

body.frontend-theme-board08 .topbar {
  background: rgba(255, 249, 253, 0.92);
  border-bottom-color: rgba(255, 162, 205, 0.34);
}

body.frontend-theme-board23 .topbar {
  background: rgba(250, 250, 255, 0.9);
  border-bottom-color: rgba(106, 116, 255, 0.32);
}

body.frontend-theme-board24 .topbar {
  background: rgba(24, 20, 54, 0.88);
  border-bottom-color: rgba(185, 166, 255, 0.28);
}

body.frontend-theme-cute .card {
  border-radius: 22px;
  box-shadow: 0 16px 32px rgba(233, 122, 163, 0.2);
}

body.frontend-theme-tech .card {
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(10, 98, 190, 0.24);
}

body.frontend-theme-board08 .card {
  border-radius: 24px;
  box-shadow: 0 16px 32px rgba(255, 139, 194, 0.16);
}

body.frontend-theme-board23 .card {
  border-radius: 20px;
  box-shadow: 0 18px 34px rgba(106, 116, 255, 0.16);
}

body.frontend-theme-board24 .card {
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(6, 8, 20, 0.34);
}

body.frontend-theme-cute .btn.primary {
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 110, 168, 0.32);
}

body.frontend-theme-tech .btn.primary {
  color: #041024;
  box-shadow: 0 12px 26px rgba(51, 209, 255, 0.34);
}

body.frontend-theme-board08 .btn.primary {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 139, 194, 0.24);
}

body.frontend-theme-board23 .btn.primary {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(106, 116, 255, 0.22);
}

body.frontend-theme-board24 .btn.primary {
  color: #161235;
  box-shadow: 0 14px 30px rgba(125, 231, 255, 0.18);
}

body.frontend-theme-cute .store-category-link {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-tech .store-category-link {
  border-radius: 10px;
  background: rgba(8, 23, 45, 0.9);
}

body.frontend-theme-board08 .store-category-link {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

body.frontend-theme-board23 .store-category-link {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-board24 .store-category-link {
  border-radius: 18px;
  background: rgba(38, 31, 83, 0.88);
}

body.frontend-theme-cute .store-card-subtitle,
body.frontend-theme-cute .nav a {
  color: #8a5f7c;
}

body.frontend-theme-tech .store-card-subtitle,
body.frontend-theme-tech .nav a {
  color: #8ea5cc;
}

body.frontend-theme-board08 .store-card-subtitle,
body.frontend-theme-board08 .nav a {
  color: #8e7c96;
}

body.frontend-theme-board23 .store-card-subtitle,
body.frontend-theme-board23 .nav a {
  color: #6e76a2;
}

body.frontend-theme-board24 .store-card-subtitle,
body.frontend-theme-board24 .nav a {
  color: #c9bceb;
}

/* Store V3.4 */
.store-layout {
  align-items: start;
}

.store-category-pane {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.store-category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-category-link {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(11, 19, 37, 0.6);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.store-category-link:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(17, 28, 55, 0.88);
  transform: translateY(-1px);
}

.store-category-link.active {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(20, 34, 66, 0.95);
  color: #fff;
}

.store-category-link span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 10px;
}

.store-card-link {
  cursor: pointer;
}

.store-card {
  min-height: 330px;
}

.store-card-thumb {
  aspect-ratio: 4 / 3;
}

.store-card-body {
  gap: 10px;
}

.store-card-category {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-subtitle {
  margin: -2px 0 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-meta-icons {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-card-actions,
.store-card-actions-row {
  display: none !important;
}

.store-category-select {
  min-width: 220px;
}

@media (min-width: 1440px) {
  .store-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) and (max-width: 1439px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .store-category-select {
    display: none !important;
  }
}

@media (max-width: 1079px) {
  .store-layout {
    grid-template-columns: 1fr;
  }

  .store-category-pane {
    display: none !important;
  }

  .store-toolbar {
    grid-template-columns: 1fr;
  }

  .store-search,
  .store-sort,
  .store-category-select {
    width: 100%;
  }

  .store-category-select {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--ink);
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  z-index: 0;
}

.bg-orb-1 {
  width: 420px;
  height: 420px;
  background: #f97316;
  top: -120px;
  left: -120px;
}

.bg-orb-2 {
  width: 520px;
  height: 520px;
  background: #22d3ee;
  bottom: -200px;
  right: -140px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Defensive umbrella — any future logo/image inside topbar or brand-link
 * is capped to a reasonable size even without its own class-specific rule.
 * Prevents another "image accidentally rendered at natural 460x195" incident. */
.topbar img,
.brand-link img {
  max-height: 48px;
  max-width: min(260px, 45vw);
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
  min-height: 32px;
  --brand-lockup-text: currentColor;
  --brand-lockup-accent: #38bdf8;
}

.brand-logo-image {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
}

.brand-link__image {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
}

@media (max-width: 640px) {
  .brand-link__image {
    height: 36px;
    max-width: 45vw;
  }
}

.brand-logo-text {
  font-weight: 800;
  letter-spacing: 0.12em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-link[data-brand-font="modern"] {
  font-family: "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.brand-link[data-brand-font="display"] {
  font-family: "Trebuchet MS", "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.brand-link[data-brand-font="serif"] {
  font-family: "Georgia", "Times New Roman", "Noto Serif TC", "PMingLiU", serif;
}

.brand-link[data-brand-font="mono"] {
  font-family: "Consolas", "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.topbar-actions .btn {
  white-space: nowrap;
}

.topbar-actions .btn.is-active {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(14, 116, 144, 0.22);
}

.topbar-actions #customerLoginLink {
  display: none;
}

.site-music-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.site-music-toggle:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.56);
  background: rgba(14, 116, 144, 0.2);
}

.site-music-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.72);
  outline-offset: 3px;
}

.site-music-toggle:active {
  transform: scale(0.96);
}

.site-music-toggle.is-active {
  color: #07111f;
  border-color: rgba(125, 211, 252, 0.84);
  background: linear-gradient(135deg, #7dd3fc, #facc15);
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.22);
}

.site-music-toggle.is-unavailable {
  display: none;
}

.site-music-toggle__icon {
  /* legacy - now hidden in v35d, replaced by ::before SVG icon below */
  display: none !important;
}
/* v35d: gpt-image-2 PNG 在 24px 看起來「擠雜」，改用乾淨 inline SVG
   line-art (跟搜尋 icon 同風格)。藏 IMG，用 ::before pseudo-element 注入 */
.site-music-toggle {
  overflow: hidden;
  position: relative;
}
.site-music-toggle::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18V5l12-2v13'/><circle cx='6' cy='18' r='3'/><circle cx='18' cy='16' r='3'/></svg>") no-repeat center / contain;
  filter: drop-shadow(0 0 4px rgba(103, 232, 249, 0.55));
  pointer-events: none;
}
.site-music-toggle.is-active::before {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2367e8f9' stroke='%2307111f' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18V5l12-2v13'/><circle cx='6' cy='18' r='3'/><circle cx='18' cy='16' r='3'/></svg>") no-repeat center / contain;
}

/* ── Notification bell (右上角通知) ──────────────────────────────────
   Mirrors .site-music-toggle pill styling so the two sit beside each
   other as a coherent pair. Adds a red dot for unread count and a
   slide-down panel anchored to the topbar-actions container.            */
.site-notification-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.site-notification-toggle:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.56);
  background: rgba(14, 116, 144, 0.2);
}

.site-notification-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.72);
  outline-offset: 3px;
}

.site-notification-toggle:active {
  transform: scale(0.96);
}

.site-notification-toggle.has-unread {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(127, 29, 29, 0.32);
}

.site-notification-toggle__icon {
  /* legacy - hidden in v35d, replaced by ::before SVG icon below */
  display: none !important;
}
/* v35d: gpt-image-2 PNG 在 24px 看起來「擠雜」，改用乾淨 inline SVG
   line-art (跟 music + search icon 同風格)。藏 IMG，用 ::before pseudo */
.site-notification-toggle {
  overflow: hidden;
}
.site-notification-toggle::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/><path d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/></svg>") no-repeat center / contain;
  filter: drop-shadow(0 0 4px rgba(103, 232, 249, 0.55));
  pointer-events: none;
}

.site-notification-toggle__dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
  border: 1.5px solid rgba(15, 23, 42, 0.95);
  pointer-events: none;
}

/* ── Panel ─────────────────────────────────────────────────────────── */
.topbar-actions {
  position: relative; /* anchor for the absolute-positioned panel */
}

.site-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.56), 0 0 0 1px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  overflow: hidden;
  animation: site-notification-panel-in 0.18s ease-out;
}

/* 2026-04-28 emergency fix — author CSS `display: flex` on .site-notification-panel
   was overriding the UA stylesheet's `[hidden] { display: none }` rule
   (same specificity, author wins on later cascade). Result: panel was
   permanently visible after first mount. The class+attribute selector
   below has higher specificity than the bare class rule, so `hidden`
   actually hides. */
.site-notification-panel[hidden] {
  display: none !important;
}

@keyframes site-notification-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.site-notification-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-notification-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.05em;
}

.site-notification-panel__close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.66);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.16s ease, color 0.16s ease;
}

.site-notification-panel__close:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.18);
}

.site-notification-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 16px;
  color: rgba(148, 163, 184, 0.78);
}

.site-notification-panel__empty-icon { font-size: 32px; }
.site-notification-panel__empty-text { font-size: 13px; }

.site-notification-panel__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0;
}

.site-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
  text-decoration: none;
  transition: background 0.16s ease;
  cursor: pointer;
}

.site-notification-item:last-child {
  border-bottom: none;
}

.site-notification-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

.site-notification-item.is-unread {
  background: rgba(56, 189, 248, 0.05);
}

.site-notification-item.is-unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

.site-notification-item {
  position: relative;
}

.site-notification-item__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.14);
}

/* 2026-04-28 — when icon is a PNG (gpt-image-2 升級), 不需要背景 tint
   因為 PNG 本身已含光暈. img 填滿 32x32. */
.site-notification-item__icon.site-notification-item__icon--png {
  background: transparent !important;
}
.site-notification-item__icon--png img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.site-notification-item--upgrade .site-notification-item__icon {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.28), rgba(244, 114, 182, 0.28));
}
.site-notification-item--success .site-notification-item__icon {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.26), rgba(56, 189, 248, 0.26));
}
.site-notification-item--warning .site-notification-item__icon {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.26), rgba(251, 146, 60, 0.26));
}
.site-notification-item--draw .site-notification-item__icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(56, 189, 248, 0.28));
}
.site-notification-item--order .site-notification-item__icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(125, 211, 252, 0.28));
}

.site-notification-item__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.site-notification-item__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.35;
  word-wrap: break-word;
}

.site-notification-item__desc {
  font-size: 12.5px;
  color: rgba(203, 213, 225, 0.82);
  line-height: 1.4;
  word-wrap: break-word;
}

.site-notification-item__time {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .site-notification-panel {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 24px));
  }
}

/* ── Filter chips (panel head) ─────────────────────────────────────── */
.site-notification-panel__filters {
  display: flex;
  gap: 6px;
  padding: 8px 12px 10px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  scrollbar-width: thin;
}

.site-notification-panel__filters::-webkit-scrollbar {
  height: 6px;
}

.site-notification-panel__filters::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 3px;
}

.site-notification-chip {
  flex: 0 0 auto;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.4);
  color: rgba(203, 213, 225, 0.78);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-notification-chip__icon {
  /* 2026-04-28 gpt-image-2 PNG 取代 emoji prefix */
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  pointer-events: none;
}

.site-notification-chip:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 116, 144, 0.18);
}

.site-notification-chip.is-active {
  color: #07111f;
  border-color: rgba(125, 211, 252, 0.84);
  background: linear-gradient(135deg, #7dd3fc, #facc15);
  font-weight: 700;
}

/* ── Per-item delete button ────────────────────────────────────────── */
.site-notification-item__del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(148, 163, 184, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-notification-item:hover .site-notification-item__del,
.site-notification-item:focus-within .site-notification-item__del {
  opacity: 1;
}

.site-notification-item__del:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.14);
}

/* On touch devices show the delete button always (no hover state). */
@media (hover: none) {
  .site-notification-item__del { opacity: 0.7; }
}

/* ── /my-notifications page ────────────────────────────────────────── */
.my-notifications-page {
  padding: 32px 16px 80px;
  max-width: 760px;
  margin: 0 auto;
}

.my-notifications-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.my-notifications-head h1 {
  font-size: 28px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.my-notifications-sub {
  margin: 0;
  font-size: 13px;
  color: rgba(203, 213, 225, 0.78);
  line-height: 1.6;
}

.my-notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.my-notifications-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.my-notifications-meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.78);
  letter-spacing: 0.05em;
}

.my-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(2, 6, 23, 0.5));
  overflow: hidden;
}

.my-notifications-list .site-notification-item {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0;
}

.my-notifications-list li:last-child .site-notification-item {
  border-bottom: none;
}

.my-notifications-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 16px;
  color: rgba(148, 163, 184, 0.78);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 14px;
}

.my-notifications-empty__icon {
  font-size: 48px;
  opacity: 0.7;
}

.my-notifications-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.my-notifications-login-gate {
  padding: 60px 16px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  color: rgba(203, 213, 225, 0.86);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ── "查看全部通知" footer link ─────────────────────────────────────── */
.site-notification-panel__view-all {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  color: rgba(125, 211, 252, 0.92);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  background: rgba(14, 116, 144, 0.12);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-notification-panel__view-all:hover {
  color: #fff;
  background: rgba(14, 116, 144, 0.28);
}
.ftp-shell {
  display: grid;
  gap: 0;
}

.ftp-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.ftp-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.ftp-title {
  font-size: 12px;
  font-weight: 700;
}

.ftp-badge {
  margin-left: auto;
  font-size: 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  opacity: 0.85;
}

.ftp-body {
  padding: 10px;
  display: grid;
  gap: 10px;
}

@media (max-width: 1120px) {
  .auth-provider-grid {
    grid-template-columns: 1fr;
  }

  .auth-provider-card__head {
    flex-direction: column;
  }

  .admin-brand-card {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .admin-brand-card .field,
  .admin-brand-upload,
  .admin-brand-preview-shell,
  .frontend-theme-preview {
    grid-column: 1;
  }
}

.ftp-subtitle {
  margin: 0;
  font-size: 12px;
  opacity: 0.84;
}

.ftp-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 10px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
}

.ftp-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.4), rgba(51, 65, 85, 0.45));
}

.ftp-info {
  display: grid;
  gap: 3px;
}

.ftp-info strong {
  font-size: 13px;
  line-height: 1.2;
}

.ftp-info span {
  font-size: 12px;
  opacity: 0.88;
}

.ftp-card button {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
}

.frontend-theme-preview[data-theme="default"] {
  color: #edf6ff;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 255, 136, 0.18), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(0, 212, 255, 0.18), transparent 28%),
    linear-gradient(155deg, rgba(7, 13, 28, 0.96), rgba(14, 23, 44, 0.9));
  border-color: rgba(120, 148, 191, 0.22);
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.32);
}

.frontend-theme-preview[data-theme="default"] .ftp-topbar {
  border-bottom-color: rgba(120, 148, 191, 0.18);
}

.frontend-theme-preview[data-theme="default"] .ftp-shell {
  background:
    linear-gradient(180deg, rgba(9, 14, 27, 0.88), rgba(11, 18, 35, 0.72));
}

.frontend-theme-preview[data-theme="default"] .ftp-chip,
.frontend-theme-preview[data-theme="default"] .ftp-topnav span,
.frontend-theme-preview[data-theme="default"] .ftp-field {
  background: rgba(15, 24, 45, 0.86);
  border-color: rgba(120, 148, 191, 0.16);
}

.frontend-theme-preview[data-theme="default"] .ftp-card button {
  background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  color: #07121d;
  box-shadow: 0 12px 26px rgba(0, 255, 136, 0.18);
}

.frontend-theme-preview[data-theme="cute"] {
  color: #7a355f;
  background: linear-gradient(145deg, #ffeef7, #ffe3f1);
}

.frontend-theme-preview[data-theme="cute"] .ftp-topbar {
  border-bottom-color: rgba(248, 122, 172, 0.28);
}

.frontend-theme-preview[data-theme="cute"] .ftp-card {
  border-color: rgba(248, 122, 172, 0.3);
  background: rgba(255, 255, 255, 0.72);
}

.frontend-theme-preview[data-theme="cute"] .ftp-thumb {
  background: linear-gradient(135deg, #ffd1e5, #ffc9a8);
}

.frontend-theme-preview[data-theme="cute"] .ftp-card button {
  background: #ff6ea8;
  color: #fff;
}

.frontend-theme-preview[data-theme="tech"] {
  color: #d8eeff;
  background: linear-gradient(150deg, #041229, #0a2144);
}

.frontend-theme-preview[data-theme="tech"] .ftp-topbar {
  border-bottom-color: rgba(61, 198, 255, 0.25);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card {
  border-color: rgba(61, 198, 255, 0.32);
  background: rgba(8, 23, 46, 0.8);
}

.frontend-theme-preview[data-theme="tech"] .ftp-thumb {
  background: linear-gradient(135deg, #1f8dff, #61f0ff);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card button {
  background: #33d1ff;
  color: #081a36;
}

.error-text {
  color: #fca5a5;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user:empty {
  display: none;
}

.mobile-tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 8px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(10px);
  z-index: 60;
}

.mobile-tabbar a {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: rgba(226, 232, 240, 0.82);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-tabbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  line-height: 1;
}

.mobile-tabbar__label {
  line-height: 1.1;
}

.mobile-tabbar a.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.42);
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.mobile-tabbar a.is-active .mobile-tabbar__icon {
  background: rgba(255, 255, 255, 0.18);
}

.mobile-install-fab {
  position: fixed;
  right: 16px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 61;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.38);
}

.mobile-install-fab.is-hidden {
  display: none;
}

.user-chip {
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.user-name {
  font-weight: 700;
  color: var(--ink);
}

.user-menu {
  position: relative;
}

.avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
}

.avatar-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--accent-2);
}

.avatar-icon svg,
.avatar-icon img,
.avatar-icon__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-icon svg {
  width: 60%;
  height: 60%;
}

/* ── User dropdown panel — game style ─────────────────────── */
.user-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 300px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(78, 255, 195, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(10, 15, 28, 0.97), rgba(6, 10, 22, 0.98));
  border: 1px solid rgba(230, 187, 102, 0.3);
  border-radius: 16px;
  padding: 0;
  display: none;
  flex-direction: column;
  z-index: 6;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 230, 190, 0.08);
  overflow: hidden;
  animation: upanelIn 0.2s ease-out;
}
@keyframes upanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu.open .user-panel {
  display: flex;
}

/* ── Profile header row ───────────────────────────────────── */
.up-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, rgba(230, 187, 102, 0.08), rgba(56, 189, 248, 0.04));
  border-bottom: 1px solid rgba(230, 187, 102, 0.15);
}
/* Main clickable area (avatar + nickname) links to personal center. The
 * pencil beside it stays as a separate link to profile-edit for quick edits. */
.up-profile-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  padding: 4px;
  margin: -4px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.up-profile-main:hover {
  background: rgba(255, 255, 255, 0.04);
}
.up-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(230, 187, 102, 0.5);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(230, 187, 102, 0.2);
}
.up-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.up-meta {
  flex: 1;
  min-width: 0;
}
.up-nickname {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.up-account {
  font-size: 11px;
  color: rgba(203, 213, 225, 0.6);
  margin: 2px 0 0;
}
.up-edit {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.up-edit:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(230, 187, 102, 0.4);
  color: #e6bb66;
}

/* ── Stats grid (points / coins / balance) ────────────────── */
.up-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(230, 187, 102, 0.1);
}
.up-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}
.up-stat__icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  background: radial-gradient(circle, #1a2440 0%, #0b1223 70%);
}
.up-stat__icon {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px;
  max-height: 40px;
  object-fit: cover;
  display: block;
  transform: scale(1.55);
}
.up-stat__value {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
  max-width: 100%;
}
.up-stat__label {
  font-size: 10px;
  color: rgba(203, 213, 225, 0.6);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.up-stat--points .up-stat__value { color: #4effc3; }
.up-stat--coins .up-stat__value { color: #e6bb66; }
.up-stat--market .up-stat__value { color: #38bdf8; }

/* ── Member level row ─────────────────────────────────────── */
.up-level {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(230, 187, 102, 0.1);
  text-decoration: none;
}
.up-level:hover {
  background: rgba(230, 187, 102, 0.05);
}
.up-level-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(230, 187, 102, 0.35);
}
.up-level-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.up-level-name {
  font-size: 13px;
  font-weight: 700;
  color: #e6bb66;
}
.up-level-bonus {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ── Inventory section ────────────────────────────────────── */
.up-section {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(230, 187, 102, 0.1);
}
.up-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(230, 187, 102, 0.7);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.up-inventory {
  font-size: 13px;
  color: var(--ink, #f8fafc);
  font-weight: 700;
}
.up-inv-summary {
  color: rgba(203, 213, 225, 0.7);
}

.up-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.up-actions a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(78, 255, 195, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(78, 255, 195, 0.2);
  color: #4effc3;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.up-actions a:hover {
  background: linear-gradient(135deg, rgba(78, 255, 195, 0.2), rgba(56, 189, 248, 0.14));
  border-color: rgba(78, 255, 195, 0.4);
}

/* ── Settings + logout ────────────────────────────────────── */
.up-footer {
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.up-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(203, 213, 225, 0.6);
}
.up-setting-row .switch {
  margin-left: auto;
}
.up-logout {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(203, 213, 225, 0.6);
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s, border-color 0.15s;
}
.up-logout:hover {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.3);
}

/* ── Legacy compat aliases (keep old selectors working) ──── */
.user-section { display: none; }
.user-section-title { display: none; }
.user-info { display: none; }
.user-info span { display: none; }
.user-points { font-weight: 700; }
.user-level-row { display: none; }
.user-level-badge { display: none; }
.user-level-name { display: none; }
.user-level-bonus { display: none; }
.user-inventory-preview { display: none; }
.user-menu-actions { display: none; }
.user-inventory-item { display: none; }
.user-inventory-item .count { color: var(--accent); font-weight: 700; }
.user-panel a, .user-panel button { text-decoration: none; font-weight: 600; }
.user-setting-row { display: none; }
.user-setting-row .switch { margin-left: auto; }

.no-scroll {
  overflow: hidden;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--layout-padding) 5vw calc(var(--layout-padding) * 2);
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: min(420px, 92vw);
  display: grid;
  gap: 16px;
  text-align: center;
}

.auth-card-wide {
  width: min(520px, 92vw);
  text-align: left;
}

.auth-card-wide .logo {
  text-align: center;
}

.tab-group {
  display: flex;
  gap: 10px;
}

.tab {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.15);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.auth-card h1 {
  margin: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.admin-sidebar {
  background: rgba(11, 15, 26, 0.9);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.store-page {
  position: relative;
  z-index: 1;
}

.store-shell {
  display: block;
}

.store-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.store-category-pane {
  position: sticky;
  top: 84px;
  z-index: 2;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.92), rgba(8, 12, 24, 0.86));
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.38);
}

.store-category-pane-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-category-sidebar {
  display: grid;
  gap: 9px;
}

.store-category-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--public-btn-chip-border);
  border-radius: var(--public-btn-chip-radius);
  color: var(--public-btn-chip-color);
  background: var(--public-btn-chip-bg);
  box-shadow: var(--public-btn-chip-shadow);
  font-size: 13px;
  font-weight: var(--public-btn-chip-font-weight);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  white-space: nowrap;
}

.store-category-link span {
  color: rgba(148, 163, 184, 0.92);
  font-weight: 700;
}

.store-category-link:hover {
  border-color: color-mix(in srgb, var(--public-btn-chip-border) 45%, var(--accent) 55%);
  transform: translateY(-1px);
}

.store-category-link.active {
  border-color: var(--public-btn-chip-active-border);
  background: var(--public-btn-chip-active-bg);
  color: var(--public-btn-chip-active-color);
  box-shadow: var(--public-btn-chip-active-shadow);
}

.store-category-link:focus-visible {
  outline: none;
  box-shadow:
    var(--public-btn-chip-shadow),
    0 0 0 4px var(--public-btn-focus-ring);
}

.store-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.store-toolbar {
  position: sticky;
  top: 84px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.36);
}

.store-search .input-inline {
  width: 100%;
  min-height: 40px;
}

.store-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.store-category-select {
  display: none !important;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.store-category-tabs {
  display: none !important;
  gap: 8px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.store-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(11, 17, 33, 0.86), rgba(9, 14, 28, 0.9));
  box-shadow: 0 14px 28px rgba(3, 7, 18, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.44);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.48);
}

.store-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.store-card-thumb {
  position: relative;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.62));
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.72);
  overflow: hidden;
}

.store-card-thumb.has-image {
  background-size: cover;
  background-position: center 42%;
}

.store-card-thumb.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.5));
}

.store-card-body {
  display: grid;
  gap: 11px;
  padding: 14px;
  position: relative;
  z-index: 2;
}

.store-card-category {
  font-size: 11px;
  color: rgba(125, 211, 252, 0.96);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.store-card h3 a:hover {
  color: #e2e8f0;
}

.store-card-subtitle {
  margin: -6px 0 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.84);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.store-card-meta strong {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.store-card-meta-icons .store-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.1;
}

.store-card-meta-icons .store-stat-icon {
  width: 14px;
  height: 14px;
  color: rgba(148, 163, 184, 0.95);
}

.store-card-meta-icons .store-stat-icon svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

.store-card-meta-icons .store-stat-text {
  color: rgba(203, 213, 225, 0.92);
  font-size: 12px;
}

.store-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.store-card-actions .btn {
  position: relative;
  z-index: 2;
  min-height: 38px;
  font-weight: 700;
}

.store-card-skeleton {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 18, 34, 0.62);
}

.store-card-skeleton .store-card-thumb {
  min-height: 180px;
  background: linear-gradient(120deg, rgba(30, 41, 59, 0.38), rgba(51, 65, 85, 0.22));
}

.store-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
}

.store-skeleton-line.short {
  width: 68%;
}

.store-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(2, 6, 23, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.store-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 95vw);
  height: 100dvh;
  z-index: 35;
  border-left: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(8, 12, 24, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: -14px 0 34px rgba(2, 6, 23, 0.5);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  transform: translateX(100%);
  transition: transform 0.18s ease;
  overflow-y: auto;
}

.store-drawer.is-open {
  transform: translateX(0);
}

.store-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.store-drawer-head h3 {
  margin: 0;
  font-size: 20px;
}

.store-drawer-subtitle {
  margin: -6px 0 0;
  color: rgba(148, 163, 184, 0.94);
  font-size: 12px;
  line-height: 1.45;
}

.store-drawer-thumb {
  min-height: 220px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.58));
  color: rgba(203, 213, 225, 0.85);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.store-drawer-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-drawer-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.52);
}

.store-drawer-desc {
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.store-drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1439px) and (min-width: 1080px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1079px) and (min-width: 768px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .store-category-pane {
    display: none;
  }

  .store-toolbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .store-category-select {
    display: inline-flex !important;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .store-category-pane {
    display: none;
  }

  .store-toolbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .store-sort,
  .store-category-select {
    justify-content: space-between;
  }

  .store-category-select {
    display: inline-flex !important;
  }

  .store-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .store-drawer {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    box-shadow: none;
  }
}

@media (min-width: 1080px) {
  .store-category-select {
    display: none !important;
  }
}

.store-card-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-qty-field,
.store-cart-qty-field {
  display: grid;
  gap: 6px;
}

.store-qty-field span,
.store-cart-qty-field span {
  font-size: 12px;
  color: var(--muted);
}

.store-drawer-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.store-cart-page,
.store-orders-page,
.store-detail-page,
.store-success-page,
.store-order-detail-page {
  position: relative;
  z-index: 1;
}

.store-cart-shell,
.store-checkout-shell,
.store-orders-shell,
.store-detail-shell,
.store-success-card,
.store-order-detail-shell {
  display: grid;
  gap: 14px;
}

.store-cart-rows {
  display: grid;
  gap: 10px;
}

/* v55ha: store-cart cosmic redesign — 從 flat slate-grey 升級成
 * glassmorphism + cosmic accent，配合首頁 pool-card 跟 modal 統一視覺
 * 語言。這是結帳轉換頁，premium 視覺直接影響 conversion rate。 */
.store-cart-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(26, 26, 46, 0.6), rgba(18, 19, 35, 0.78));
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.store-cart-row:hover {
  border-color: rgba(78, 255, 195, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.45);
}

.store-cart-row-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: rgba(203, 213, 225, 0.65);
  text-decoration: none;
  font-size: 11px;
  background: rgba(8, 14, 27, 0.55);
  overflow: hidden;
}

.store-cart-row-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-cart-row-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.store-cart-row-main h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.store-cart-row-main h3 a {
  color: var(--ink);
  text-decoration: none;
}

.store-cart-row-main h3 a:hover {
  color: rgba(103, 232, 249, 0.95);
}

.store-cart-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.store-cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.store-cart-row-total {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, #00ff88, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* v55ha: checkout-card 升級成 cosmic gradient + section dividers */
.store-checkout-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 22px 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 255, 136, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(28, 28, 50, 0.78), rgba(18, 19, 35, 0.92));
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.4);
  display: grid;
  gap: 14px;
}

.store-checkout-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink, #f8fafc);
}
.store-checkout-card h3:not(:first-child) {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.store-checkout-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.store-checkout-actions .btn.primary {
  flex: 1;
  min-height: 48px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #00ff88, #38bdf8);
  color: #0f172a;
  border: 0;
  box-shadow: 0 12px 28px rgba(0, 255, 136, 0.28);
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.store-checkout-actions .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 255, 136, 0.38);
}

/* v55ha: store-cart kv-row (商品金額 / 訂單總額 / 目前點數) — 純 row，
 * 不要 admin .kv-row 的 border/background 風格。最後一筆「訂單總額」
 * 用 gradient text 強調 (visual hierarchy)。 */
.store-cart-page .store-checkout-card .kv-row,
.store-checkout-shell .store-checkout-card .kv-row {
  background: transparent;
  border: 0;
  padding: 6px 0;
  font-size: 14px;
  color: var(--muted, #99aeca);
}
.store-cart-page .store-checkout-card .kv-row strong,
.store-checkout-shell .store-checkout-card .kv-row strong {
  color: var(--ink, #f8fafc);
  font-weight: 700;
  font-size: 15px;
}
/* 訂單總額 (倒數第 2 row) — gradient text 強調 */
.store-cart-page .store-checkout-card .kv-row:nth-last-child(2) strong,
.store-checkout-shell .store-checkout-card .kv-row:nth-last-child(2) strong {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #00ff88, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
}
/* 訂單總額 row 加 top divider */
.store-cart-page .store-checkout-card .kv-row:nth-last-child(2),
.store-checkout-shell .store-checkout-card .kv-row:nth-last-child(2) {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.store-orders-list {
  display: grid;
  gap: 10px;
}

.store-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 12px;
  background: rgba(10, 15, 30, 0.7);
}

.store-order-main {
  display: grid;
  gap: 6px;
}

.store-order-main h3 {
  margin: 0;
}

.store-order-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.store-order-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.store-order-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(14, 116, 144, 0.22);
  color: rgba(186, 230, 253, 0.96);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.store-order-status.status-shipping {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(146, 64, 14, 0.26);
  color: rgba(254, 240, 138, 0.95);
}

.store-order-status.status-completed {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(6, 78, 59, 0.28);
  color: rgba(187, 247, 208, 0.95);
}

.store-order-status.status-cancelled {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.32);
  color: rgba(254, 202, 202, 0.95);
}

.store-detail-card {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.75);
}

.store-detail-image {
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.7);
  color: rgba(203, 213, 225, 0.82);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.store-detail-image.has-image {
  background-size: cover;
  background-position: center;
}

.store-detail-gallery {
  display: grid;
  gap: 10px;
}

.store-detail-main-image-wrap {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.store-detail-main-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.store-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.store-detail-thumb {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
  cursor: pointer;
}

.store-detail-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.store-detail-thumb.is-active {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
}

.store-detail-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.store-detail-main h1 {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.store-detail-category {
  color: rgba(103, 232, 249, 0.94);
  font-size: 13px;
  font-weight: 700;
}

.store-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.store-detail-breadcrumb__seg {
  color: rgba(103, 232, 249, 0.78);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  letter-spacing: 0.01em;
}

.store-detail-breadcrumb__seg.is-current {
  color: rgba(255, 213, 74, 0.95);
  background: rgba(255, 213, 74, 0.12);
}

.store-detail-breadcrumb__sep {
  color: rgba(148, 163, 184, 0.7);
  font-size: 12px;
  padding: 0 2px;
}

.store-detail-meta {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
}

.store-detail-desc {
  margin: 0;
  color: rgba(226, 232, 240, 0.95);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.store-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-detail-empty,
.store-order-login-hint {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 18px;
  background: rgba(8, 12, 24, 0.72);
  display: grid;
  gap: 10px;
}

.store-detail-empty h2,
.store-order-login-hint h3 {
  margin: 0;
}

.store-detail-empty p,
.store-order-login-hint p {
  margin: 0;
  color: var(--muted);
}

.store-success-inner {
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 18px;
  padding: 18px;
  background: rgba(6, 78, 59, 0.2);
  display: grid;
  gap: 12px;
}

.store-success-badge {
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(187, 247, 208, 0.96);
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(6, 95, 70, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
}

.store-success-inner h2 {
  margin: 0;
}

.store-success-inner p {
  margin: 0;
  color: rgba(216, 254, 229, 0.94);
}

.store-success-summary {
  border: 1px solid rgba(167, 243, 208, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(4, 47, 46, 0.32);
  display: grid;
  gap: 8px;
}

.store-success-actions,
.store-order-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-order-detail-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.75);
  display: grid;
  gap: 12px;
}

.store-order-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.store-order-detail-head h2 {
  margin: 0;
}

.store-order-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.store-order-detail-summary {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  display: grid;
  gap: 8px;
}

.store-order-detail-lines {
  display: grid;
  gap: 10px;
}

.store-order-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.42);
}

.store-order-line-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.66);
  display: grid;
  place-items: center;
  color: rgba(203, 213, 225, 0.8);
  text-decoration: none;
  font-size: 11px;
}

.store-order-line-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-order-line-main {
  min-width: 0;
}

.store-order-line-main h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.store-order-line-main h4 a {
  color: var(--ink);
  text-decoration: none;
}

.store-order-line-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.store-order-line strong {
  white-space: nowrap;
}

@media (max-width: 1079px) {
  .store-detail-card {
    grid-template-columns: 1fr;
  }

  .store-detail-image {
    min-height: 300px;
  }

  .store-detail-main-image {
    height: 300px;
  }
}

@media (max-width: 767px) {
  .store-cart-row {
    grid-template-columns: 1fr;
  }

  .store-cart-row-thumb {
    width: 100%;
    height: 180px;
  }

  .store-order-card {
    grid-template-columns: 1fr;
  }

  .store-order-side {
    justify-items: start;
  }

  .store-order-line {
    grid-template-columns: 1fr;
  }

  .store-order-line-thumb {
    width: 100%;
    height: 170px;
  }
}

.store-shipping-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* v55ha: pill-style cosmic radio — selected state 用 cosmic green tint */
.store-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(8, 14, 27, 0.55);
  color: var(--muted, #99aeca);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.store-radio:hover {
  border-color: rgba(78, 255, 195, 0.32);
  color: var(--ink, #f8fafc);
}
.store-radio:has(input:checked) {
  border-color: rgba(78, 255, 195, 0.6);
  color: #4effc3;
  background: rgba(78, 255, 195, 0.08);
}

.store-radio input {
  margin: 0;
  accent-color: #4effc3;
}

.store-shipping-form {
  display: grid;
  gap: 12px;
}

.store-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.store-form-grid label,
.store-shipping-form > label,
.store-shipping-group > label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.store-shipping-group {
  display: grid;
  gap: 10px;
}

.store-shipping-group.is-hidden {
  display: none;
}

.store-orders-toolbar {
  display: flex;
  justify-content: flex-end;
}

.store-order-detail-timeline {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  gap: 8px;
}

.store-order-detail-timeline h3 {
  margin: 0;
  font-size: 14px;
}

.store-order-detail-timeline ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.store-order-detail-timeline li {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.store-order-detail-timeline li strong {
  color: var(--ink);
}

.admin-store-orders-filter .admin-store-orders-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-store-orders-list {
  display: grid;
  gap: 10px;
}

.admin-store-order-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.74);
  display: grid;
  gap: 12px;
}

.admin-store-order-detail.empty {
  color: var(--muted);
}

.admin-store-order-detail-head h3 {
  margin: 0;
}

.admin-store-order-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-store-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-store-order-detail-grid > div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.44);
  display: grid;
  gap: 4px;
}

.admin-store-order-detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.admin-store-order-contact {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.admin-store-order-contact h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.admin-store-order-contact p {
  margin: 0;
  color: var(--muted);
}

.admin-store-order-table-wrap {
  overflow-x: auto;
}

.admin-store-order-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-store-order-table th,
.admin-store-order-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  padding: 8px 6px;
  font-size: 13px;
}

.admin-store-order-table th {
  color: rgba(203, 213, 225, 0.95);
  font-weight: 700;
}

.admin-store-order-update .admin-store-orders-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-store-order-timeline {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.admin-store-order-timeline h4 {
  margin: 0 0 8px;
}

.admin-store-order-timeline ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.admin-store-order-timeline li {
  color: var(--muted);
  font-size: 13px;
}

.admin-store-order-timeline li strong {
  display: block;
  color: var(--ink);
}

@media (max-width: 1079px) {
  .store-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-store-orders-filter .admin-store-orders-grid,
  .admin-store-order-update .admin-store-orders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-store-order-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .store-form-grid {
    grid-template-columns: 1fr;
  }

  .store-orders-toolbar {
    justify-content: stretch;
  }

  .store-orders-toolbar .store-sort {
    width: 100%;
    justify-content: space-between;
  }

  .admin-store-orders-filter .admin-store-orders-grid,
  .admin-store-order-update .admin-store-orders-grid,
  .admin-store-order-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
 * Admin Store Orders (2026-04 refresh)
 * ===================================================================== */

body[data-layout-page="admin-store-orders"] .admin-store-orders-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-overview-card {
  min-height: 124px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(34, 197, 94, 0.08), transparent 65%),
    rgba(13, 19, 37, 0.82);
  border: 1px solid rgba(102, 124, 164, 0.22);
  box-shadow: 0 20px 44px rgba(8, 11, 24, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-overview-card span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-overview-card strong {
  font-size: 30px;
  line-height: 1.08;
  color: #f4f8ff;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-overview-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #9db1cb;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: start;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-list-panel,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector {
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.22);
  background: rgba(13, 19, 37, 0.82);
  box-shadow: 0 18px 40px rgba(8, 11, 24, 0.24);
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-list-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector {
  position: sticky;
  top: 24px;
  padding: 20px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-panel-head,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-section-head,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-panel-head h3,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-head h3,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-section-head h4 {
  margin: 0;
  color: #f4f8ff;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-panel-head h3 {
  font-size: 18px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-head h3 {
  font-size: 24px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-panel-head p,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-head p,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-section-head p {
  margin: 6px 0 0;
  color: #97aac6;
  font-size: 13px;
  line-height: 1.55;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-list-meta {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
  color: #8feaff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-filter {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(9, 13, 24, 0.68);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-field--wide {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-field > span {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #9fb4ce;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-field input,
body[data-layout-page="admin-store-orders"] .admin-store-orders-field select {
  width: 100%;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-list {
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-list-footer {
  display: flex;
  justify-content: center;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background: rgba(12, 18, 32, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 14px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card:hover,
body[data-layout-page="admin-store-orders"] .admin-store-order-card.is-selected {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(12, 34, 54, 0.82);
  transform: translateY(-1px);
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__main {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__media {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.22);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(160deg, rgba(36, 53, 88, 0.95), rgba(10, 15, 29, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eff6ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__media.has-image {
  color: transparent;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__eyebrow,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__body strong {
  color: #f4f8ff;
  font-size: 18px;
  line-height: 1.25;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__meta,
body[data-layout-page="admin-store-orders"] .admin-store-order-card__item {
  display: block;
  color: #94abca;
  font-size: 12.5px;
  line-height: 1.55;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__item {
  color: #dce7f8;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__fact,
body[data-layout-page="admin-store-orders"] .admin-store-orders-stat,
body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid > div {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background: rgba(9, 13, 24, 0.66);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__fact span,
body[data-layout-page="admin-store-orders"] .admin-store-orders-stat span,
body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid > div span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7f98ba;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__fact strong,
body[data-layout-page="admin-store-orders"] .admin-store-orders-stat strong,
body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid > div strong {
  color: #f4f8ff;
  font-size: 14px;
  line-height: 1.45;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__fact small {
  color: #8fa6c2;
  font-size: 12px;
  line-height: 1.55;
}

body[data-layout-page="admin-store-orders"] .admin-store-order-card__actions {
  display: flex;
  justify-content: flex-end;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-total {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(14, 165, 233, 0.12);
  color: #8feaff;
  font-size: 20px;
  font-weight: 800;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(102, 124, 164, 0.16);
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid > div.is-wide {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-list,
body[data-layout-page="admin-store-orders"] .admin-store-orders-timeline {
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card,
body[data-layout-page="admin-store-orders"] .admin-store-orders-timeline-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background: rgba(9, 13, 24, 0.66);
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__media {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.2);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(160deg, rgba(36, 53, 88, 0.95), rgba(10, 15, 29, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eff6ff;
  font-size: 12px;
  font-weight: 800;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__media.has-image {
  color: transparent;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__body strong,
body[data-layout-page="admin-store-orders"] .admin-store-orders-timeline-item strong {
  color: #f4f8ff;
  font-size: 14px;
  line-height: 1.45;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__body span,
body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__meta span,
body[data-layout-page="admin-store-orders"] .admin-store-orders-timeline-item span,
body[data-layout-page="admin-store-orders"] .admin-store-orders-timeline-item p,
body[data-layout-page="admin-store-orders"] .admin-store-orders-form-hint {
  margin: 0;
  color: #8fa6c2;
  font-size: 12.5px;
  line-height: 1.55;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__meta strong {
  color: #f4f8ff;
  font-size: 14px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-update-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-update-form .form-actions {
  gap: 8px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-empty,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-empty {
  padding: 40px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(102, 124, 164, 0.2);
  background: rgba(9, 13, 24, 0.56);
  text-align: center;
  color: #93a8c4;
  font-size: 13px;
  line-height: 1.6;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-empty strong,
body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-empty strong {
  display: block;
  margin-bottom: 6px;
  color: #f4f8ff;
  font-size: 16px;
}

body[data-layout-page="admin-store-orders"] .admin-store-orders-empty--inline {
  padding: 18px;
}

body[data-layout-page="admin-store-orders"] .chip--neutral {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(59, 130, 246, 0.1);
}

body[data-layout-page="admin-store-orders"] .chip--info {
  color: #8feaff;
  border-color: rgba(34, 211, 238, 0.24);
  background: rgba(14, 165, 233, 0.1);
}

@media (max-width: 1220px) {
  body[data-layout-page="admin-store-orders"] .admin-store-orders-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-shell {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector {
    position: static;
  }
}

/* =====================================================================
 * Admin Market Monitor (2026-04 refresh)
 * ===================================================================== */

body[data-layout-page="admin-manage"] .admin-market-monitor-page {
  display: grid;
  gap: 18px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(13, 19, 37, 0.78);
  box-shadow: 0 18px 40px rgba(8, 11, 24, 0.18);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-window,
body[data-layout-page="admin-manage"] .admin-market-monitor-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-window .btn,
body[data-layout-page="admin-manage"] .admin-market-monitor-tabs .btn {
  min-width: 112px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-window .btn.is-active,
body[data-layout-page="admin-manage"] .admin-market-monitor-tabs .btn.is-active {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(14, 165, 233, 0.16);
  color: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.12);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-search input {
  min-width: 280px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(102, 124, 164, 0.22);
  background: rgba(9, 13, 24, 0.68);
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-search input::placeholder {
  color: rgba(151, 170, 198, 0.76);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.2);
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(34, 197, 94, 0.06), transparent 70%),
    rgba(13, 19, 37, 0.82);
  box-shadow: 0 20px 44px rgba(8, 11, 24, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card[data-tone="trade"] {
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(59, 130, 246, 0.14), transparent 72%),
    rgba(13, 19, 37, 0.82);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card[data-tone="value"] {
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(250, 204, 21, 0.14), transparent 72%),
    rgba(13, 19, 37, 0.82);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card[data-tone="ask"] {
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(249, 115, 22, 0.14), transparent 72%),
    rgba(13, 19, 37, 0.82);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card[data-tone="bid"] {
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(14, 165, 233, 0.14), transparent 72%),
    rgba(13, 19, 37, 0.82);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card strong {
  font-size: 30px;
  line-height: 1.08;
  color: #f4f8ff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-overview-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #9db1cb;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 18px;
  align-items: start;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-rank-panel,
body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-panel,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail {
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.22);
  background: rgba(13, 19, 37, 0.82);
  box-shadow: 0 18px 40px rgba(8, 11, 24, 0.24);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-rank-panel,
body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-panel-head,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-panel-head h3,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-panel__head h4,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head h3 {
  margin: 0;
  color: #f4f8ff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-panel-head h3 {
  font-size: 18px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-panel-head p,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-panel__head p,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head p {
  margin: 6px 0 0;
  color: #97aac6;
  font-size: 13px;
  line-height: 1.55;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
  color: #8feaff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-ranking,
body[data-layout-page="admin-manage"] .admin-market-monitor-pulse {
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(9, 13, 24, 0.72);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  text-align: left;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.26);
  background: rgba(11, 16, 30, 0.9);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item.is-active {
  border-color: rgba(14, 165, 233, 0.38);
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(34, 197, 94, 0.05)),
    rgba(11, 16, 30, 0.92);
  box-shadow:
    0 16px 34px rgba(8, 11, 24, 0.26),
    inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__media {
  min-width: 92px;
  min-height: 92px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 40%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__placeholder {
  color: rgba(203, 213, 225, 0.82);
  font-size: 13px;
  font-weight: 700;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__body {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__head strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__head p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #9db1cb;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item-metric {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item-metric span {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-item-metric strong {
  font-size: 14px;
  line-height: 1.35;
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(9, 13, 24, 0.72);
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-item strong {
  color: #f8fbff;
  font-size: 15px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-item p,
body[data-layout-page="admin-manage"] .admin-market-monitor-pulse-item small {
  margin: 0;
  color: #9db1cb;
  font-size: 12.5px;
  line-height: 1.5;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-empty,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(102, 124, 164, 0.26);
  background: rgba(9, 13, 24, 0.62);
  display: grid;
  gap: 6px;
  color: #9db1cb;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-empty.compact {
  min-height: 0;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-empty.is-error,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty.is-error {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(60, 18, 18, 0.28);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-empty strong,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty h3,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty-card strong {
  color: #f8fbff;
  margin: 0;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-empty p,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty p,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty-card p {
  margin: 0;
  color: #9db1cb;
  line-height: 1.55;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail {
  padding: 20px;
  display: grid;
  gap: 18px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__main {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__media {
  min-width: 116px;
  min-height: 116px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 40%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__media span {
  color: #f8fbff;
  font-weight: 700;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8feaff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__copy h3 {
  font-size: 28px;
  line-height: 1.15;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(9, 13, 24, 0.72);
  display: grid;
  gap: 6px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat span,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat-card span {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat strong,
body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat-card strong {
  font-size: 22px;
  line-height: 1.18;
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stat-card p {
  margin: 0;
  color: #97aac6;
  font-size: 12.5px;
  line-height: 1.55;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-grid,
body[data-layout-page="admin-manage"] .admin-market-monitor-orderbooks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-panel {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.2);
  background: rgba(9, 13, 24, 0.7);
  display: grid;
  gap: 14px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-chart {
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.06), rgba(9, 13, 24, 0.16)),
    rgba(9, 13, 24, 0.62);
  overflow: hidden;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-chart-empty {
  min-height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #9db1cb;
  text-align: center;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-list,
body[data-layout-page="admin-manage"] .admin-market-monitor-book-list {
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item,
body[data-layout-page="admin-manage"] .admin-market-monitor-book-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(102, 124, 164, 0.16);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item strong,
body[data-layout-page="admin-manage"] .admin-market-monitor-book-row strong {
  display: block;
  color: #f8fbff;
  font-size: 15px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item p,
body[data-layout-page="admin-manage"] .admin-market-monitor-book-row p,
body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item__meta small {
  margin: 4px 0 0;
  color: #9db1cb;
  font-size: 12.5px;
  line-height: 1.5;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item__meta {
  display: grid;
  gap: 4px;
  text-align: right;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item__meta span,
body[data-layout-page="admin-manage"] .admin-market-monitor-book-row > span {
  color: #8fa4c3;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 1399px) {
  body[data-layout-page="admin-manage"] .admin-market-monitor-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__status,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  body[data-layout-page="admin-manage"] .admin-market-monitor-shell,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-grid,
  body[data-layout-page="admin-manage"] .admin-market-monitor-orderbooks {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-item__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body[data-layout-page="admin-manage"] .admin-market-monitor-toolbar {
    padding: 14px;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-window,
  body[data-layout-page="admin-manage"] .admin-market-monitor-search,
  body[data-layout-page="admin-manage"] .admin-market-monitor-tabs {
    width: 100%;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-window .btn,
  body[data-layout-page="admin-manage"] .admin-market-monitor-tabs .btn,
  body[data-layout-page="admin-manage"] .admin-market-monitor-search .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-search input {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-overview,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__main,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-head__status,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-stats-grid,
  body[data-layout-page="admin-manage"] .admin-market-monitor-item__metrics {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-item {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-item__media {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-item__head,
  body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item,
  body[data-layout-page="admin-manage"] .admin-market-monitor-book-row,
  body[data-layout-page="admin-manage"] .admin-market-monitor-panel-head,
  body[data-layout-page="admin-manage"] .admin-market-monitor-detail-panel__head {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-trade-item__meta {
    text-align: left;
  }
}

@media (max-width: 900px) {
  body[data-layout-page="admin-store-orders"] .admin-sidebar {
    position: static;
    top: auto;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-grid,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-kv-grid,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-card__facts,
  body[data-layout-page="admin-store-orders"] .admin-store-order-card__facts,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-stats {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-panel-head,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-head,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-section-head {
    flex-direction: column;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-inspector-total {
    align-self: flex-start;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  body[data-layout-page="admin-store-orders"] .admin-store-orders-line-card__meta {
    grid-column: 1 / -1;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  body[data-layout-page="admin-store-orders"] .admin-store-orders-overview {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-order-card__main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  body[data-layout-page="admin-store-orders"] .admin-store-order-card__media {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-order-card__facts {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-order-card__actions,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-update-form .form-actions {
    justify-content: stretch;
  }

  body[data-layout-page="admin-store-orders"] .admin-store-order-card__actions .btn,
  body[data-layout-page="admin-store-orders"] .admin-store-orders-update-form .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.pool-list {
  grid-template-columns: 1fr;
}

.pool-card {
  background: rgba(15, 23, 42, 0.6);
}

.pool-card.is-selected {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.pool-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.4);
}

.pool-card {
  grid-template-rows: auto minmax(160px, 1fr) auto;
  gap: 0;
}

.pool-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.6);
}

.pool-card-image {
  position: relative;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  min-height: 220px;
  overflow: hidden;
  cursor: pointer;
}

.pool-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
  opacity: 0;
}

.pool-card-image.has-image::before {
  opacity: 0.45;
}

.pool-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.pool-card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 1;
}

.pool-card-image.is-tower-preview img {
  object-fit: cover;
}

.pool-card-bottom {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
  background: rgba(15, 23, 42, 0.7);
}

.pool-card-bottom .progress {
  margin: 0;
}

.pool-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.draw-overlay {
  position: fixed;
  inset: 0;
  /* v55ew (2026-04-30): 撤回 v55ev 過度透明 — 影片本身就是暗 cosmic 主題，
     如果 backdrop 也透明 + mix-blend-mode screen → 兩個 dark blend 變看不見。
     回到深色 backdrop 但拿掉 backdrop-blur (那是給 modal 用的)，
     這樣影片清楚顯示但無 popup card 框感。 */
  background: rgba(3, 5, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.draw-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.draw-handoff-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 35;
  --flash-in-ms: 190ms;
  --flash-out-ms: 260ms;
}

.draw-handoff-flash.is-flash-in {
  opacity: 1;
  transition: opacity var(--flash-in-ms) ease-out;
}

.draw-handoff-flash.is-flash-out {
  opacity: 0;
  transition: opacity var(--flash-out-ms) ease-out;
}

.draw-overlay-card {
  /* v55ev: 拿掉 card chrome（border / bg / shadow / padding），讓影片直接 full bleed */
  width: 100vw;
  height: 100vh;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.draw-video {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  /* v55ew: 撤掉 mix-blend-mode: screen（讓影片暗色保留可見） */
  background: transparent;
  object-fit: contain;
}

.draw-video--intro {
  display: none;
  object-fit: cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(2, 6, 23, 0.34);
}

.draw-skip {
  /* v55ev: 完全隱藏跳過按鈕（純動畫，no chrome） */
  display: none !important;
  position: absolute;
  top: 16px;
  right: 16px;
}

.draw-skip.is-visible {
  display: inline-flex;
}

.draw-result {
  display: none;
  gap: 12px;
}

.draw-result.is-visible {
  display: grid;
}

.result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.result-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.result-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.6);
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-info strong {
  display: block;
  font-size: 14px;
}

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

.result-count {
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
}

.result-lord-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.26);
  color: rgba(255, 237, 213, 0.96);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.draw-result-notice {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
}

.draw-result-notice strong {
  font-size: 15px;
  color: var(--ink);
}

.draw-result-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.draw-result-notice.is-lord-crowned {
  border-color: rgba(249, 115, 22, 0.36);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.78), rgba(15, 23, 42, 0.84));
}

.draw-result-notice.is-lord-credit {
  border-color: rgba(56, 189, 248, 0.32);
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.78), rgba(15, 23, 42, 0.84));
}

/* v55fz: 物品庫 grid + cards 重設計（cosmic premium） */
.inventory-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.inventory-card {
  position: relative;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(78, 255, 195, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(28, 28, 50, 0.78), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 10px;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 180ms ease,
              box-shadow 220ms ease;
}

.inventory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 255, 195, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(78, 255, 195, 0.16);
}

.inventory-card.is-selected {
  border-color: rgba(78, 255, 195, 0.55);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32),
              0 0 0 2px rgba(78, 255, 195, 0.32),
              inset 0 0 0 1px rgba(78, 255, 195, 0.18);
}

.inventory-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(78, 255, 195, 0.06), transparent 60%),
    linear-gradient(135deg, rgba(8, 12, 24, 0.85), rgba(15, 23, 42, 0.7));
  display: grid;
  place-items: center;
  position: relative;
}

.inventory-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.inventory-card:hover .inventory-thumb img {
  transform: scale(1.04);
}

.inventory-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-meta strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #f8fafc);
  line-height: 1.35;
  /* clamp 2 行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inventory-meta span {
  font-size: 11px;
  color: var(--muted, #99aeca);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-count {
  font-weight: 800;
  font-size: 14px;
  color: #4effc3;
  letter-spacing: 0.02em;
}

.inventory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

/* v55fz: status badge color-code by status */
.inventory-status.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.inventory-card[data-status="stored"] .inventory-status.badge {
  background: rgba(78, 255, 195, 0.14);
  color: #4effc3;
  border: 1px solid rgba(78, 255, 195, 0.32);
}
.inventory-card[data-status="listed"] .inventory-status.badge {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.32);
}
.inventory-card[data-status="ship_requested"] .inventory-status.badge {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.inventory-card[data-status="shipped"] .inventory-status.badge {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.32);
}
.inventory-card[data-status="delivered"] .inventory-status.badge {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.32);
}
.inventory-card[data-status="recycled"] .inventory-status.badge,
.inventory-card[data-status="recycle"] .inventory-status.badge {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.inventory-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inventory-actions .btn {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.inventory-bid {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* --- v55fz: inventory status tabs 重設計 --- */
.inventory-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  align-items: center;
}
.inventory-status-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 160ms ease,
              color 160ms ease,
              border-color 160ms ease,
              transform 140ms ease;
  white-space: nowrap;
  flex: 0 0 auto;
}
.inventory-status-tab:hover {
  background: rgba(78, 255, 195, 0.06);
  color: #f8fafc;
}
.inventory-status-tab:focus-visible {
  outline: 2px solid rgba(78, 255, 195, 0.55);
  outline-offset: 2px;
}
.inventory-status-tab.is-active {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.18), rgba(56, 189, 248, 0.18));
  border-color: rgba(78, 255, 195, 0.45);
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.18),
              inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* v55fz: status-aware tint when active — each tab gets its own color */
.inventory-status-tab[data-status="ship"].is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.20), rgba(251, 191, 36, 0.14));
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18);
}
.inventory-status-tab[data-status="listed"].is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.14));
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.18);
}
.inventory-status-tab[data-status="recycle"].is-active {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.20), rgba(100, 116, 139, 0.14));
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.16);
}
.inventory-status-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.inventory-status-tab.is-active .inventory-status-tab__count {
  background: rgba(0, 0, 0, 0.32);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.08);
}
.inventory-status-tab[data-count-zero="true"] .inventory-status-tab__count {
  opacity: 0.42;
}
@media (max-width: 600px) {
  .inventory-status-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 14px;
  }
  .inventory-status-tabs::-webkit-scrollbar { display: none; }
  .inventory-status-tab {
    padding: 7px 14px;
    min-height: 36px;
    font-size: 12px;
  }
  .inventory-status-tab__count {
    min-width: 22px;
    height: 20px;
    font-size: 10px;
  }
}

/* v55ga: inventory toolbar 升級 */
.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.inventory-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-selected {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #99aeca);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

/* v55ga: 全選 checkbox row */
.inventory-selectall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #99aeca);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
}

.inventory-selectall input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4effc3;
  cursor: pointer;
}

.inventory-select {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 24, 0.55);
  backdrop-filter: blur(6px);
}

.inventory-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: rgba(56, 189, 248, 1);
}

.text-ok {
  color: rgba(34, 197, 94, 0.92);
  font-weight: 650;
}

.text-bad {
  color: rgba(239, 68, 68, 0.9);
  font-weight: 650;
}

.store-page--fusion {
  display: grid;
  gap: 28px;
}

.store-hero-panel,
.store-shell-v2 {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.store-hero-panel {
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid rgba(120, 132, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(78, 255, 195, 0.2), transparent 34%),
    radial-gradient(circle at bottom right, rgba(57, 189, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(9, 14, 28, 0.92), rgba(7, 11, 23, 0.94));
  box-shadow: 0 26px 56px rgba(2, 6, 23, 0.42);
}

.store-hero-panel--simple {
  padding: 24px 30px;
}

.store-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr);
  gap: 24px;
  align-items: stretch;
}

.store-hero-panel--simple .store-hero-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.store-hero-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.store-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(110, 231, 255, 0.92);
}

.store-hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.store-hero-desc {
  margin: 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.76);
}

.store-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-hero-stats {
  display: grid;
  gap: 12px;
}

.store-stat-card {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(140, 158, 255, 0.18);
  background: linear-gradient(180deg, rgba(13, 20, 37, 0.9), rgba(7, 11, 21, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.store-stat-card span {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.86);
}

.store-stat-card strong {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.store-shell-v2 {
  padding: 0;
}

.store-layout-v2 {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.store-aside {
  position: sticky;
  top: 88px;
  min-width: 0;
}

.store-category-bar {
  padding: 0;
  overflow: hidden;
}

.store-category-bar--aside {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
}

.store-category-bar--aside .store-category-bar__body {
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1 1 auto;
  min-height: 0;
}

.store-category-bar--aside .store-category-bar__body::-webkit-scrollbar {
  width: 6px;
}

.store-category-bar--aside .store-category-bar__body::-webkit-scrollbar-thumb {
  background: rgba(95, 105, 145, 0.4);
  border-radius: 3px;
}

.store-category-bar__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(95, 105, 145, 0.18);
}

.store-category-bar--aside .store-category-bar__head {
  padding: 16px 16px 10px;
}

.store-category-bar__head h2 {
  margin: 0;
  font-size: 20px;
}

.store-category-bar__stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.store-category-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(95, 105, 145, 0.28);
}

.store-category-stat__value {
  font-weight: 800;
  font-size: 14px;
  color: rgba(110, 231, 255, 0.95);
  letter-spacing: 0.02em;
}

.store-category-stat__label {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.8);
  letter-spacing: 0.08em;
}

.store-category-bar__body {
  padding: 14px 18px 18px;
  display: grid;
  gap: 10px;
}

.store-category-bar--aside .store-category-bar__body {
  padding: 10px 12px 18px;
  gap: 6px;
}

.store-category-bar__stats,
.store-category-stat,
.store-category-stat__value,
.store-category-stat__label {
  display: none !important;
}

.store-category-tab__chevron {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(105, 196, 255, 0.14);
  color: rgba(155, 225, 255, 0.9);
  font-size: 11px;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.store-category-tab.has-children:hover .store-category-tab__chevron {
  background: rgba(105, 196, 255, 0.28);
  color: #cdeaff;
}

.store-category-tab.has-children.is-active .store-category-tab__chevron {
  transform: rotate(180deg);
  background: rgba(0, 255, 136, 0.2);
  color: #d0ffe6;
}

.store-category-tabs-row--vertical .store-category-tab__count {
  margin-left: auto;
}

.store-category-tabs-row--vertical .store-category-tab.has-children .store-category-tab__count {
  margin-right: 2px;
}

.store-category-tabs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.store-category-tabs-row[hidden] {
  display: none !important;
}

.store-category-tabs-row::-webkit-scrollbar {
  height: 6px;
}

.store-category-tabs-row::-webkit-scrollbar-thumb {
  background: rgba(95, 105, 145, 0.4);
  border-radius: 3px;
}

.store-category-tabs-row--vertical {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  overflow-x: visible;
  padding-bottom: 2px;
}

.store-category-tabs-row--child {
  padding-top: 6px;
  border-top: 1px dashed rgba(95, 105, 145, 0.22);
}

.store-category-tabs-row--vertical.store-category-tabs-row--child {
  margin-top: 6px;
  padding-top: 8px;
  padding-left: 6px;
  border-left: 1px dashed rgba(95, 105, 145, 0.22);
  border-top: 0;
}

.store-category-children-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 6px 14px;
  padding: 6px 0 6px 8px;
  border-left: 2px solid rgba(105, 196, 255, 0.28);
}

.store-category-children-inline .store-category-tab--child {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(11, 18, 34, 0.56);
}

.store-category-children-inline .store-category-tab--child:hover {
  background: rgba(13, 24, 46, 0.82);
}

.store-category-children-inline .store-category-tab--child.is-active {
  background: linear-gradient(180deg, rgba(19, 54, 54, 0.88), rgba(11, 26, 30, 0.96));
}

.store-category-children-inline .store-category-tab--child-all {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.92);
}

.store-category-tabs-row--drawer {
  overflow-x: visible;
  flex-wrap: wrap;
}

.store-category-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(95, 105, 145, 0.3);
  border-radius: 999px;
  background: rgba(11, 18, 34, 0.72);
  color: rgba(226, 232, 240, 0.9);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.store-category-tabs-row--vertical .store-category-tab {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  padding: 10px 12px;
  white-space: normal;
  text-align: left;
}

.store-category-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(105, 226, 255, 0.5);
  background: rgba(13, 24, 46, 0.88);
}

.store-category-tab.is-active {
  border-color: rgba(78, 255, 195, 0.62);
  background: linear-gradient(180deg, rgba(19, 54, 54, 0.96), rgba(11, 26, 30, 0.98));
  color: #eafff5;
  box-shadow:
    0 10px 24px rgba(4, 12, 26, 0.36),
    0 0 10px rgba(0, 255, 136, 0.12);
}

.store-category-tab.is-empty {
  opacity: 0.5;
}

.store-category-tab.is-empty:hover {
  opacity: 0.85;
}

.store-category-tab--home {
  padding: 10px 14px;
  font-size: 14px;
}

.store-category-tab--all {
  background: linear-gradient(180deg, rgba(28, 48, 90, 0.9), rgba(10, 20, 40, 0.95));
  border-color: rgba(148, 163, 184, 0.35);
}

.store-category-tab--all.is-active {
  background: linear-gradient(180deg, rgba(58, 108, 220, 0.82), rgba(28, 60, 140, 0.92));
  border-color: rgba(105, 196, 255, 0.82);
  color: #eef4ff;
  box-shadow:
    0 10px 24px rgba(4, 12, 26, 0.36),
    0 0 14px rgba(105, 196, 255, 0.22);
}

.store-category-tab__icon {
  flex: none;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.store-category-tab__icon img,
.store-category-tab__icon svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.store-category-tab__label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.store-category-tab__count {
  flex: none;
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.92);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  margin-left: auto;
}

.store-category-tab.is-active .store-category-tab__count {
  background: rgba(0, 255, 136, 0.18);
  color: rgba(210, 255, 230, 0.95);
}

.store-category-tab--all.is-active .store-category-tab__count {
  background: rgba(105, 196, 255, 0.25);
  color: #eaf5ff;
}

.store-category-tab__depth-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 213, 74, 0.14);
  color: #ffd54a;
  border: 1px solid rgba(255, 213, 74, 0.4);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.store-category-tab[data-depth="1"] .store-category-tab__depth-badge {
  background: rgba(34, 211, 238, 0.16);
  color: #8be6f5;
  border-color: rgba(34, 211, 238, 0.42);
}

.store-category-tab[data-depth="2"] .store-category-tab__depth-badge {
  background: rgba(168, 85, 247, 0.18);
  color: #c4a6f5;
  border-color: rgba(168, 85, 247, 0.44);
}

.store-category-tab[data-depth="3"] .store-category-tab__depth-badge,
.store-category-tab[data-depth="4"] .store-category-tab__depth-badge,
.store-category-tab[data-depth="5"] .store-category-tab__depth-badge {
  background: rgba(236, 72, 153, 0.18);
  color: #f5a6c8;
  border-color: rgba(236, 72, 153, 0.44);
}

.store-category-tab.is-depth-1 {
  margin-left: 4px;
}

.store-category-tab.is-depth-2 {
  margin-left: 12px;
}

.store-category-tab.is-depth-3,
.store-category-tab.is-depth-4,
.store-category-tab.is-depth-5 {
  margin-left: 18px;
}

.store-category-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(95, 105, 145, 0.18);
  margin-top: 2px;
}

.store-category-breadcrumb[hidden] {
  display: none !important;
}

.store-category-breadcrumb__seg {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(148, 163, 184, 0.9);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.store-category-breadcrumb__seg:hover {
  color: rgba(105, 226, 255, 1);
  background: rgba(14, 30, 50, 0.6);
}

.store-category-breadcrumb__seg.is-current {
  color: rgba(255, 213, 74, 0.95);
  cursor: default;
}

.store-category-breadcrumb__sep {
  color: rgba(95, 105, 145, 0.6);
  font-size: 13px;
  padding: 0 2px;
}

.store-drawer-panel__body {
  padding: 14px 18px 22px;
  display: grid;
  gap: 12px;
}

.store-catalog-panel {
  border-radius: 24px;
  border: 1px solid rgba(132, 145, 255, 0.16);
  background: linear-gradient(180deg, rgba(8, 13, 25, 0.9), rgba(6, 10, 20, 0.94));
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.34);
}

.store-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.store-section-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(110, 231, 255, 0.78);
}

.store-panel-head h2,
.store-drawer-panel__head h2 {
  margin: 0;
  font-size: 20px;
}

.store-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.store-category-list {
  display: grid;
  gap: 10px;
  padding: 18px 20px 22px;
}

.store-category-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(95, 105, 145, 0.3);
  border-radius: 16px;
  background: rgba(11, 18, 34, 0.72);
  color: rgba(226, 232, 240, 0.9);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.store-category-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(105, 226, 255, 0.4);
  background: rgba(13, 24, 46, 0.88);
}

.store-category-btn.is-active {
  border-color: rgba(78, 255, 195, 0.48);
  background: linear-gradient(180deg, rgba(21, 54, 54, 0.94), rgba(11, 26, 30, 0.96));
  box-shadow:
    0 12px 28px rgba(4, 12, 26, 0.32),
    0 0 12px rgba(0, 255, 136, 0.08);
}

.store-category-btn.is-active .store-category-btn__meta {
  background: rgba(0, 255, 136, 0.18);
  color: rgba(0, 255, 136, 0.9);
}

.store-category-btn__main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.store-category-btn__icon {
  flex: none;
  width: 1.35rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.store-category-btn__label {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.store-category-btn__meta {
  flex: none;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
  text-align: center;
}

/* v62 toolbar polish — base rules only. Theme overrides
 * (80e fusion / 80f demo) layer on top and are NOT touched here.
 * Grid: row 1 search spans both cols; row 2 col 1 = actions, col 2 = meta chip. */
.store-toolbar-v2 {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(14, 22, 42, 0.55) 0%,
    rgba(8, 12, 24, 0.35) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.store-toolbar-v2__search {
  grid-column: 1 / -1;
}

.store-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 4px 18px 4px 6px;
  border: 1px solid rgba(111, 125, 165, 0.32);
  border-radius: 999px;
  background: rgba(6, 11, 24, 0.82);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.store-search-field__icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #8be6f5;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.store-search-field .input-inline {
  border: 0;
  background: transparent;
  min-height: 0;
  padding: 0;
  box-shadow: none;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.95);
}

.store-search-field .input-inline::placeholder {
  color: rgba(148, 163, 184, 0.55);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.store-search-field:hover {
  border-color: rgba(34, 211, 238, 0.28);
}

.store-search-field:focus-within {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(6, 11, 24, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 4px rgba(34, 211, 238, 0.1),
    0 8px 26px -12px rgba(34, 211, 238, 0.35);
}

.store-search-field:focus-within .store-search-field__icon {
  background: rgba(34, 211, 238, 0.25);
  border-color: rgba(34, 211, 238, 0.55);
  color: #fff;
  transform: scale(1.05);
}

.store-toolbar-v2__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.store-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 14px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(111, 125, 165, 0.3);
  background: rgba(10, 15, 28, 0.72);
  color: rgba(210, 220, 240, 0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.store-sort-control > span {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.78);
  white-space: nowrap;
  flex-shrink: 0;
}

.store-sort-control .input-inline {
  min-height: 34px;
  padding: 0 28px 0 10px;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font-weight: 600;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(148, 163, 184, 0.6) 50%),
    linear-gradient(135deg, rgba(148, 163, 184, 0.6) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  appearance: none;
}

.store-sort-control:focus-within {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(14, 20, 36, 0.95);
}

.store-view-toggle {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  background: rgba(6, 11, 24, 0.72);
  border: 1px solid rgba(111, 125, 165, 0.3);
  border-radius: 999px;
}

.store-view-btn {
  min-width: 58px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(210, 220, 240, 0.7);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.store-view-btn:hover {
  color: rgba(255, 255, 255, 0.96);
}

.store-view-btn.is-active {
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.28) 0%,
    rgba(34, 211, 238, 0.14) 100%
  );
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(34, 211, 238, 0.35);
}

.store-mobile-filter-btn {
  display: none;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(111, 125, 165, 0.3);
  background: rgba(10, 15, 28, 0.72);
  font-weight: 600;
}

.store-results-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  justify-self: end;
  align-self: center;
}

.store-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.store-products-grid.is-list {
  grid-template-columns: 1fr;
}

/* v64 fix: theme overrides (.store-page--fusion/demo/demo-v3) set
 * grid-template-columns with higher specificity and override the
 * .is-list modifier, so clicking 列表 view kept 4 columns. Force
 * list mode to 1fr across all themes. !important is intentional —
 * .is-list is a state class that must win over theme. */
body .store-products-grid.is-list {
  grid-template-columns: 1fr !important;
}

.store-card-v2 {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0;
  border-radius: 22px;
  border: 1px solid rgba(105, 116, 156, 0.22);
  background:
    radial-gradient(circle at top left, rgba(78, 255, 195, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 17, 32, 0.94), rgba(7, 11, 21, 0.96));
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.3);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.store-card-v2:hover {
  transform: translateY(-3px);
  border-color: rgba(104, 230, 255, 0.34);
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.42);
}

.store-card-v2--list {
  grid-template-columns: 240px minmax(0, 1fr);
}

.store-card-v2--skeleton {
  min-height: 380px;
}

.store-card-v2--list.store-card-v2--skeleton {
  min-height: 220px;
}

.store-card-v2__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.store-card-v2__media {
  position: relative;
  min-height: 280px;
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(10, 15, 28, 0.98));
}

.store-card-v2--list .store-card-v2__media {
  min-height: 100%;
}

.store-card-v2__media.has-image {
  background-size: cover;
  background-position: center;
}

.store-card-v2__media.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.48));
}

.store-card-v2__body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.store-card-v2__headline h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.store-card-v2__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.78);
}

.store-card-v2__summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(203, 213, 225, 0.78);
}

.store-card-v2__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(95, 106, 146, 0.3);
  background: rgba(10, 16, 29, 0.82);
  font-size: 11px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.86);
}

.store-chip--primary {
  border-color: rgba(104, 230, 255, 0.3);
  color: rgba(125, 211, 252, 0.98);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.store-badge--featured {
  background: rgba(0, 255, 136, 0.9);
  color: #0a0a1a;
}

.store-badge--low {
  background: rgba(245, 158, 11, 0.88);
  color: #0a0a1a;
  animation: store-badge-pulse 2s ease-in-out infinite;
}

.store-badge--soldout {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

@keyframes store-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.store-card-v2__badges {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.store-card-v2__price {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 11, 21, 0.82);
  border: 1px solid rgba(104, 230, 255, 0.22);
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.store-card-v2__price--inline {
  position: static;
  justify-self: start;
}

.store-card-v2__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(226, 232, 240, 0.58);
}

.store-stock {
  display: grid;
  gap: 8px;
}

.store-stock__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.84);
}

.store-stock__meta strong {
  color: #f8fafc;
}

.store-stock__bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  overflow: hidden;
}

.store-stock__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.96), rgba(125, 211, 252, 0.96));
  transition: width 0.5s ease;
}

.store-stock__bar--low span {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.9), rgba(251, 191, 36, 0.9));
}

.store-stock__bar--empty span {
  width: 0 !important;
  background: rgba(239, 68, 68, 0.5);
}

.store-card-v2__actions,
.store-card-v2__list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Hover quick-action overlay ── */
.store-card-v2__quick-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.store-card-v2:hover .store-card-v2__quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.store-quick-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.store-quick-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

.store-quick-btn--wishlisted,
.store-quick-btn.is-active {
  background: rgba(239, 68, 68, 0.75);
  color: #fff;
}

.store-quick-btn--wishlisted:hover,
.store-quick-btn.is-active:hover {
  background: rgba(239, 68, 68, 0.9);
}

/* ── Add-to-cart CTA glow ── */
.store-card-v2__actions .btn.primary {
  transition:
    background 0.2s ease,
    box-shadow 0.3s ease,
    transform 0.12s ease;
}

.store-card-v2__actions .btn.primary:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
}

.store-card-v2__actions .btn.primary:active:not(:disabled) {
  transform: scale(0.97);
}

/* ── Sidebar stats ── */
.store-sidebar-stats {
  margin-top: 18px;
  padding: 16px 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
}

.store-sidebar-stats__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.4);
}

.store-sidebar-stats__value {
  color: rgba(0, 255, 136, 0.55);
}

/* ── Empty state ── */
.store-empty-v2 {
  padding: 48px 24px;
  color: rgba(148, 163, 184, 0.88);
  text-align: center;
}

.store-empty-v2__icon {
  font-size: 48px;
  color: rgba(148, 163, 184, 0.15);
  margin-bottom: 16px;
}

.store-empty-v2__text {
  font-size: 14px;
  color: rgba(148, 163, 184, 0.5);
  margin-bottom: 12px;
}

.store-empty-v2__clear {
  display: inline-block;
  font-size: 12px;
  color: rgba(0, 255, 136, 0.55);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.store-empty-v2__clear:hover {
  color: rgba(0, 255, 136, 0.9);
}

.store-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
}

.store-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(420px, calc(100vw - 20px));
  padding: 20px;
  background: rgba(5, 9, 18, 0.96);
  border-left: 1px solid rgba(111, 125, 165, 0.3);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.store-drawer-panel.is-open {
  transform: translateX(0);
}

.store-drawer-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.store-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.7), rgba(71, 85, 105, 0.4), rgba(30, 41, 59, 0.7));
  background-size: 200% 100%;
  animation: store-skeleton-shimmer 1.15s linear infinite;
}

.store-skeleton-line.short {
  width: 48%;
}

@keyframes store-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1200px) {
  .store-layout-v2 {
    grid-template-columns: 1fr;
  }

  .store-aside {
    display: none;
  }

  .store-mobile-filter-btn {
    display: inline-flex;
  }

  .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .store-category-bar__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .store-category-bar__stats {
    justify-content: flex-start;
  }

  .store-category-tab--home {
    padding: 8px 12px;
    font-size: 13.5px;
  }

  .store-category-tab__count {
    font-size: 10.5px;
  }

  .store-category-breadcrumb {
    font-size: 12px;
  }
}

@media (max-width: 960px) {
  .store-hero-panel,
  .store-shell-v2 {
    width: min(100%, calc(100vw - 24px));
  }

  .store-hero-grid {
    grid-template-columns: 1fr;
  }

  .store-toolbar-v2__actions {
    justify-content: flex-start;
  }

  .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
  }

  .store-card-v2--list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .store-hero-panel {
    padding: 22px 18px;
  }

  .store-toolbar-v2,
  .store-panel-head,
  .store-category-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .store-products-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .store-card-v2__media {
    min-height: 240px;
  }
}

@media (hover: none) {
  .store-card-v2__quick-actions {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-layout-page="admin-manage"] .admin-market-monitor-shell {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-ranking {
  gap: 16px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(34, 197, 94, 0.04)),
    rgba(10, 15, 27, 0.92);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner.is-muted {
  background: rgba(9, 13, 24, 0.72);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner span {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner strong {
  display: block;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #97aac6;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  background: rgba(9, 13, 24, 0.74);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.28);
  background: rgba(11, 16, 30, 0.9);
  box-shadow: 0 12px 26px rgba(5, 9, 18, 0.22);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card.is-active {
  border-color: rgba(34, 211, 238, 0.4);
  background:
    radial-gradient(160px 100px at 100% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    rgba(10, 15, 27, 0.96);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.16);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__media {
  position: relative;
  aspect-ratio: 1.12;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 22, 0.96));
  border: 1px solid rgba(102, 124, 164, 0.16);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__media .chip {
  position: absolute;
  top: 12px;
  left: 12px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(226, 232, 240, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__id {
  font-weight: 700;
  color: #cbd5e1;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__pool {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__title {
  display: block;
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: #f8fbff;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #97aac6;
  min-height: 40px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__metric {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 124, 164, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__metric span {
  display: block;
  margin: 0 0 5px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8fa4c3;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-card__metric strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #f8fbff;
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail.is-collapsed {
  padding: 14px 18px;
}

body[data-layout-page="admin-manage"] .admin-market-monitor-detail-empty.is-collapsed {
  min-height: 0;
  padding: 18px;
}

@media (max-width: 1200px) {
  body[data-layout-page="admin-manage"] .admin-market-monitor-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  body[data-layout-page="admin-manage"] .admin-market-monitor-shell {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-selection-banner {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-layout-page="admin-manage"] .admin-market-monitor-card-grid {
    grid-template-columns: 1fr;
  }
}
.market-list-form {
  display: grid;
  gap: 12px;
}

.market-list-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.market-list-field .input-inline {
  min-width: 0;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.market-filters .input-inline {
  width: auto;
}

.market-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

.market-checkbox input {
  width: 16px;
  height: 16px;
}

.market-search {
  flex: 1 1 260px;
  max-width: 420px;
}

.market-sort {
  flex: 0 0 auto;
}

.market-official {
  opacity: 0.92;
}

.market-ask {
  font-weight: 700;
  color: rgba(251, 191, 36, 0.95);
}

.market-bid {
  font-weight: 700;
  color: rgba(34, 197, 94, 0.92);
}

.market-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink);
}

.market-price-badge.is-discount {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.16);
}

.market-price-badge.is-premium {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.16);
}

.market-price-badge.is-neutral {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
}

.market-floor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.16);
  color: var(--ink);
}

.market-group {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.62));
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.market-group-summary {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-areas:
    "thumb meta"
    "actions actions";
  gap: 14px 16px;
  padding: 14px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}
.market-group-summary > .market-group-thumb {
  grid-area: thumb;
  aspect-ratio: 1 / 1;
}
.market-group-summary > .market-meta {
  grid-area: meta;
  min-width: 0;
  gap: 6px;
  align-self: center;
}
.market-group-summary > .market-group-actions { grid-area: actions; width: 100%; }

.market-group-summary:hover {
  background: rgba(8, 12, 24, 0.18);
}

.market-group-summary::-webkit-details-marker {
  display: none;
}

.market-group[open] .market-group-summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.market-group-body {
  padding: 0 12px 12px;
}

.market-last-trade {
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
}

.market-spread {
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
}

.market-depth {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 24, 0.14);
}

.market-depth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-depth-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.market-depth-last {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-depth-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-depth-col {
  display: grid;
  gap: 6px;
}

.market-depth-col-title {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.market-depth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 2px 0;
}

.market-depth-row.is-clickable {
  cursor: pointer;
  padding: 6px 8px;
  margin: -4px -6px;
  border-radius: 10px;
}

.market-depth-row.is-clickable:hover {
  background: rgba(8, 12, 24, 0.22);
}

.market-depth-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.market-trades {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 24, 0.14);
}

.market-trades-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-trades-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.market-trades-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.market-tape {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.market-tape-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 12px;
}

.market-tape-row.is-up .market-tape-price {
  color: rgba(34, 197, 94, 0.95);
}

.market-tape-row.is-down .market-tape-price {
  color: rgba(239, 68, 68, 0.95);
}

.market-tape-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.market-tape-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.market-tape-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.market-tape-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 2px;
}

.market-offer-list {
  display: grid;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.market-offer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(8, 12, 24, 0.14);
}

.market-offer + .market-offer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.market-offer:hover {
  background: rgba(8, 12, 24, 0.22);
}

.market-offer-meta {
  display: grid;
  gap: 4px;
}

.market-offer-meta strong {
  font-size: 13px;
}

.market-offer-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.market-offer-right {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.market-offer-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .market-group-summary {
    grid-template-columns: 84px 1fr;
  }
  .market-group-actions {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .market-depth-grid {
    grid-template-columns: 1fr;
  }
  .market-offer {
    grid-template-columns: 1fr;
  }
  .market-offer-right {
    justify-items: start;
  }
  .market-offer-price {
    justify-content: flex-start;
  }
}

.market-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.market-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
  max-width: 320px;
  width: 100%;
}

/* --- market skeleton loading ------------------------------------------
   Shown in #marketList while the listings + buy-orders + snapshot APIs
   settle. Replaced automatically the moment renderMarketGroups runs
   (it wipes innerHTML before painting real cards). */
.market-card--skeleton {
  pointer-events: none;
  animation: market-skel-fade-in 240ms ease-out both;
}
.market-card--skeleton .market-skel,
.market-card--skeleton .market-thumb {
  background: linear-gradient(
    100deg,
    rgba(30, 41, 59, 0.55) 0%,
    rgba(56, 189, 248, 0.16) 48%,
    rgba(30, 41, 59, 0.55) 100%
  );
  background-size: 220% 100%;
  animation: market-skel-shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}
.market-card--skeleton .market-thumb {
  border-radius: 12px;
}
.market-card--skeleton .market-skel-line {
  height: 12px;
}
.market-card--skeleton .market-skel-line--title {
  height: 16px;
  width: 72%;
}
.market-card--skeleton .market-skel-line--short {
  width: 40%;
}
.market-card--skeleton .market-skel-line--medium {
  width: 58%;
}
.market-card--skeleton .market-skel-btn {
  height: 38px;
  border-radius: 999px;
  width: 100%;
}
@keyframes market-skel-shimmer {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}
@keyframes market-skel-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .market-card--skeleton,
  .market-card--skeleton .market-skel,
  .market-card--skeleton .market-thumb {
    animation: none;
  }
}

/* --- richer empty state for #marketEmpty ------------------------------
   Replaces the flat "目前沒有可顯示的市集商品" text with a treasure chest
   icon, guidance copy, and a jump-back-to-pools CTA. JS still toggles
   display between "block" and "none", so the root stays block-level. */
.market-empty {
  padding: 56px 20px 40px;
  text-align: center;
}
.market-empty__inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  margin: 0 auto;
}
.market-empty__icon {
  width: 76px;
  height: 76px;
  color: var(--accent, #22d3ee);
  opacity: 0.92;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.28));
  animation: market-empty-float 4.2s ease-in-out infinite;
}
.market-empty__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #eff6ff);
  margin: 4px 0 0;
  letter-spacing: 0.02em;
}
.market-empty__hint {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted, rgba(226, 232, 240, 0.72));
  margin: 0;
}
.market-empty__cta {
  margin-top: 8px;
}
@keyframes market-empty-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .market-empty__icon {
    animation: none;
  }
}

/* --- market card CTA hierarchy ---------------------------------------
   Primary (一鍵買入) is the dominant action. 購買最低價 is the
   single-unit alternative and reads as ghost. 掛求購 sits next to it.
   一鍵賣出 is a sell-side action, so tint it amber to signal the
   opposite direction from the cyan buy path. */
.market-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.market-action {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
  justify-content: center;
}
.market-action--buy {
  flex-basis: 100%;
  order: 0;
}
.market-action--single {
  order: 1;
}
.market-action--buyorder {
  order: 2;
}
.market-action--sell {
  order: 3;
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.42);
}
.market-action--sell:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.6);
}
.market-action--sell:disabled {
  color: rgba(251, 191, 36, 0.38);
  border-color: rgba(251, 191, 36, 0.16);
}
@media (min-width: 720px) {
  .market-action--buy {
    flex-basis: 100%;
  }
}

/* --- "我的" section tabs -----------------------------------------------
   Replaces the vertical stack of 我的上架 / 我的買單 / 我的成交 with a
   tab strip — only one section is visible at a time. Keeps page short
   for buyers, focused for sellers. */
.my-market-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.my-market-tab {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 14px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.my-market-tab:hover {
  background: rgba(56, 189, 248, 0.08);
  color: #f8fafc;
}
.my-market-tab:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}
.my-market-tab.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.14));
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.18);
}
.market-tab-hidden {
  display: none !important;
}
@media (max-width: 600px) {
  .my-market-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .my-market-tab {
    flex: 0 0 auto;
    padding: 10px 20px;
  }
}

.market-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.6);
}

.market-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.market-meta {
  display: grid;
  gap: 8px;
}

.market-meta strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #f8fafc;
}

/* --- Steam-mode spread widget --------------------------------------
   ASK | spread | BID. The ASK block is the "market price" the buyer
   pays right now; the BID block is what a seller can instantly cash
   out at. Visually splitting them lets a user read the state of the
   market in a single glance without parsing a prose sentence. */
.market-spread-widget {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.market-spread-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.market-spread-block--bid {
  text-align: right;
}
.market-spread-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.55);
  text-transform: uppercase;
}
.market-spread-price {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.market-spread-block--ask .market-spread-price {
  color: #22d3ee;
}
.market-spread-block--bid .market-spread-price {
  color: #fbbf24;
}
.market-spread-price--empty {
  color: rgba(226, 232, 240, 0.35) !important;
  font-weight: 500;
}
.market-spread-depth {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.58);
  font-variant-numeric: tabular-nums;
}
.market-spread-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.market-spread-value {
  font-size: 11px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.72);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .market-spread-widget {
    padding: 8px 10px;
  }
  .market-spread-price {
    font-size: 17px;
  }
  .market-spread-label {
    font-size: 10px;
  }
}

/* --- Body actions (secondary CTAs inside the drawer) --------------- */
.market-group-actions--body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  margin-bottom: 12px;
}
.market-group-actions--body .market-action {
  flex: 1 1 calc(50% - 6px);
  min-width: 120px;
  justify-content: center;
}

/* Summary keeps just the primary CTA — make it full-width, punchy. */
.market-group-actions--summary {
  display: flex;
  gap: 8px;
  width: 100%;
}
.market-group-actions--summary .market-action--buy {
  flex: 1 1 100%;
  justify-content: center;
  font-size: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* --- Buy modal: 5-minute reservation countdown ---------------------- */
.market-buy-reservation {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: rgba(226, 232, 240, 0.92);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
  margin-bottom: 4px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.market-buy-reservation__icon {
  font-size: 16px;
  opacity: 0.85;
}
.market-buy-reservation[data-state="warning"] {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}
.market-buy-reservation[data-state="expired"] {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}
.market-buy-reservation[data-state="blocked"] {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.44);
  color: #fecaca;
}
.market-buy-reservation[data-state="idle"] {
  display: none;
}

/* --- Listing card: "reserved by another buyer" chip ----------------- */
.market-group[data-reserved="other"] {
  opacity: 0.55;
  filter: saturate(0.7);
}
.market-reserved-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.market-sub,
.market-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.market-sub .dot,
.market-price-row .dot {
  opacity: 0.6;
}

.market-total {
  color: var(--ink);
  font-weight: 700;
}

.market-suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.market-suggest-row .btn {
  margin-left: auto;
}

.market-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pool-draw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card .thumb {
  height: clamp(170px, 20vw, 220px);
  background: linear-gradient(140deg, rgba(249, 115, 22, 0.2), rgba(34, 211, 238, 0.2));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card .thumb.has-image::before {
  opacity: 0.45;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.thumb-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.thumb-overlay.top {
  top: 12px;
}

.thumb-overlay.bottom {
  bottom: 12px;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0), rgba(8, 12, 24, 0.75));
  padding: 22px 10px 10px;
  border-radius: 12px;
}

.thumb-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.6);
}

.card .card-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 10px;
}

.pagination {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pagination .page-label {
  color: var(--muted);
  font-size: 13px;
}

/* pool 18 adventure post-legacy overrides */
.detail--pool18-adventure {
  width: min(100%, 1320px);
  max-width: 100%;
  margin-inline: auto;
  justify-self: stretch;
}

body.item-page--tower .detail.detail--pool18-adventure {
  width: min(100%, 1320px);
  max-width: 100%;
}

.detail--pool18-adventure #detailTowerSection,
.detail--pool18-adventure .tower-p18-shell--adventure,
.detail--pool18-adventure .tower-p18-stage--adventure,
.detail--pool18-adventure .tower-p18-bottom,
.detail--pool18-adventure .tower-p18-drawer,
.detail--pool18-adventure .tower-p18-controls {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.detail--pool18-adventure .tower-p18-stage--adventure {
  overflow: hidden;
}

.detail--pool18-adventure .tower-p18-stage__overlay.tower-p18-stage__overlay--adventure {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(148px, 184px);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "rail hud odds"
    "rail . odds"
    "rail message odds";
  gap: 18px;
  padding: 24px;
  align-items: start;
}

.detail--pool18-adventure .tower-p18-hud.tower-p18-hud--adventure {
  position: relative;
  inset: auto;
  display: grid;
  grid-area: hud;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 184px);
  gap: 0;
  width: 100%;
  max-width: min(620px, 100%);
  min-width: 0;
  align-items: stretch;
  justify-content: stretch;
  z-index: 4;
}

.detail--pool18-adventure .tower-p18-summary {
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-self: stretch;
}

.detail--pool18-adventure .tower-p18-odds.tower-p18-odds--adventure {
  grid-area: auto;
  align-self: start;
  width: 100%;
  min-width: 0;
}

.detail--pool18-adventure .tower-p18-stage__track {
  grid-area: rail;
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
}

.detail--pool18-adventure .tower-p18-floor-rail {
  position: relative;
  inset: auto;
}

.detail--pool18-adventure .tower-p18-stage__scene {
  transform: scale(1.08);
  transform-origin: center center;
}

.detail--pool18-adventure .tower-p18-stage__actor {
  left: 50% !important;
  bottom: 5% !important;
}

@media (max-width: 920px) {
  .detail--pool18-adventure {
    width: 100%;
    max-width: 100%;
  }

  .detail--pool18-adventure .tower-p18-stage__overlay.tower-p18-stage__overlay--adventure {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hud"
      "odds"
      "."
      "rail"
      "message";
    grid-template-rows: auto auto 1fr auto auto;
    padding: 18px;
  }

  .detail--pool18-adventure .tower-p18-hud.tower-p18-hud--adventure {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .detail--pool18-adventure .tower-p18-summary {
    width: 100%;
    grid-column: 1 / -1;
  }

  .detail--pool18-adventure .tower-p18-odds.tower-p18-odds--adventure {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail--pool18-adventure .tower-p18-floor-rail {
    gap: 4px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }

  .detail--pool18-adventure .tower-p18-floor-row {
    min-width: 0;
    flex: 1 1 0;
  }

  .detail--pool18-adventure .tower-p18-floor-index {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .detail--pool18-adventure .tower-p18-floor-row.is-current .tower-p18-floor-index {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 720px) {
  .detail--pool18-adventure {
    width: 100%;
    max-width: 100%;
  }

  .detail--pool18-adventure .tower-p18-bottom,
  .detail--pool18-adventure .tower-p18-results__body,
  .detail--pool18-adventure .tower-p18-results__stats {
    grid-template-columns: 1fr;
  }

  .detail--pool18-adventure .tower-p18-stage__scene {
    transform: scale(1.04);
  }

  .detail--pool18-adventure .tower-p18-floor-rail {
    padding-inline: 8px;
  }

  .detail--pool18-adventure .tower-p18-floor-index {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .detail--pool18-adventure .tower-p18-floor-row.is-current .tower-p18-floor-index {
    width: 24px;
    height: 24px;
  }
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__machine,
.tower-p18-slot-machine.is-variant-bonus-10slots .tower-p18-slot-machine__machine {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: min(96vh, 1120px);
}

.tower-p18-slot-machine__ornament {
  display: none;
}

.tower-p18-slot-machine__graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 4;
  opacity: 1;
  filter: none;
}

.tower-p18-slot-machine.is-mode-spinning .tower-p18-slot-machine__machine {
  animation: towerP18MachineDrive 920ms ease-in-out infinite;
}

.tower-p18-slot-machine.is-mode-spinning.is-variant-bonus-long-spin .tower-p18-slot-machine__machine,
.tower-p18-slot-machine.is-mode-spinning.is-variant-bonus-10slots .tower-p18-slot-machine__machine {
  animation-duration: 760ms;
}

.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__machine,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__machine,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__machine,
.tower-p18-slot-machine.is-stop-track .tower-p18-slot-machine__machine {
  animation: towerP18MachineLatch 220ms cubic-bezier(0.18, 0.88, 0.24, 1);
}

.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__reel.is-reel-left,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__reel.is-reel-right,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(254, 240, 138, 0.42),
    0 18px 42px rgba(2, 6, 23, 0.34),
    0 0 34px rgba(250, 204, 21, 0.24);
}

.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__reel.is-reel-left::before,
.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__reel.is-reel-left::after,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__reel.is-reel-right::before,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__reel.is-reel-right::after,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center::before,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center::after {
  opacity: 0.96;
}

.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__reel.is-reel-left .tower-p18-slot-machine__detent,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__reel.is-reel-right .tower-p18-slot-machine__detent,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center .tower-p18-slot-machine__detent {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 12px 24px rgba(2, 6, 23, 0.28),
    0 0 24px rgba(250, 204, 21, 0.18);
  animation: towerP18DetentSnap 190ms cubic-bezier(0.18, 0.88, 0.24, 1);
}

.tower-p18-slot-machine__reels {
  position: absolute;
  inset: 26.167% 19.875% 28.833% 18.75%;
  z-index: 3;
  display: grid;
  grid-template-columns: 25.66% 29.12% 29.12%;
  column-gap: 8.05%;
  align-items: stretch;
  isolation: isolate;
}

.tower-p18-slot-machine__reels::before,
.tower-p18-slot-machine__reels::after {
  content: none;
  display: none;
  opacity: 0;
}

.tower-p18-slot-machine__reel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  transition: transform 140ms cubic-bezier(0.18, 0.88, 0.24, 1);
}

.tower-p18-slot-machine__reel.is-phase-driving {
  box-shadow: none;
}

.tower-p18-slot-machine__reel.is-phase-driving .tower-p18-slot-machine__item {
  filter: none;
}

.tower-p18-slot-machine__reel.is-phase-driving .tower-p18-slot-machine__detent {
  animation: none;
}

.tower-p18-slot-machine__reel.is-phase-braking {
  box-shadow: none;
  filter: none;
}

.tower-p18-slot-machine__reel.is-phase-braking .tower-p18-slot-machine__detent {
  opacity: 0;
  transform: none;
  animation: none;
}

.tower-p18-slot-machine__reel.is-phase-latched {
  transform: translateY(-1px);
  box-shadow: none;
}

.tower-p18-slot-machine__reel.is-phase-latched .tower-p18-slot-machine__item {
  border-color: rgba(254, 240, 138, 0.16);
}

.tower-p18-slot-machine__reel.is-phase-locked {
  box-shadow: none;
}

.tower-p18-slot-machine__detent {
  display: none;
}

.tower-p18-slot-machine__reel.is-settled {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(254, 240, 138, 0.3),
    0 18px 42px rgba(2, 6, 23, 0.34),
    0 0 26px rgba(250, 204, 21, 0.14);
}

.tower-p18-slot-machine__reel.is-reel-center {
  border-radius: 32px;
}

.tower-p18-slot-machine__reel::before,
.tower-p18-slot-machine__reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 58px;
  z-index: 3;
  pointer-events: none;
}

.tower-p18-slot-machine__reel::before {
  top: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0));
}

.tower-p18-slot-machine__reel::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
}

.tower-p18-slot-machine__reel.is-reel-center::before,
.tower-p18-slot-machine__reel.is-reel-center::after {
  height: 72px;
}

.tower-p18-slot-machine__track {
  display: grid;
  gap: 12px;
  padding: 12px;
  transition-property: transform;
  transition-timing-function: linear;
  will-change: transform;
}

.tower-p18-slot-machine.is-mode-spinning .tower-p18-slot-machine__reel:not(.is-settled) .tower-p18-slot-machine__item {
  filter: saturate(0.92) brightness(0.96);
}

.tower-p18-slot-machine.is-mode-spinning .tower-p18-slot-machine__reel.is-reel-center .tower-p18-slot-machine__item {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(2, 6, 23, 0.24),
    0 0 16px rgba(250, 204, 21, 0.1);
}

.tower-p18-slot-machine__item {
  height: 152px;
  border-radius: 24px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at 50% 16%, rgba(250, 204, 21, 0.12), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(2, 6, 23, 0.24);
  display: grid;
  place-items: center;
  padding: 14px;
  transition:
    transform 160ms cubic-bezier(0.18, 0.88, 0.24, 1),
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.tower-p18-slot-machine__reel.is-reel-center .tower-p18-slot-machine__item {
  border-radius: 26px;
  padding: 18px;
}

.tower-p18-slot-machine.is-stop-left .tower-p18-slot-machine__reel.is-reel-left .tower-p18-slot-machine__item,
.tower-p18-slot-machine.is-stop-right .tower-p18-slot-machine__reel.is-reel-right .tower-p18-slot-machine__item,
.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center .tower-p18-slot-machine__item {
  border-color: rgba(254, 240, 138, 0.44);
}

.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reel.is-reel-center .tower-p18-slot-machine__item {
  transform: scale(1.026);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(2, 6, 23, 0.24),
    0 0 36px rgba(250, 204, 21, 0.24);
}

.tower-p18-slot-machine.is-stop-center .tower-p18-slot-machine__reels::before {
  opacity: 0.92;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.12),
    inset 0 0 54px rgba(250, 204, 21, 0.22),
    0 0 36px rgba(250, 204, 21, 0.16);
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-single-spin .tower-p18-slot-machine__reel:not(.is-reel-center) {
  opacity: 0.28;
  transform: scale(0.984);
  filter: blur(1.2px) saturate(0.82);
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-single-spin .tower-p18-slot-machine__reel.is-reel-center {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(254, 240, 138, 0.42),
    0 18px 42px rgba(2, 6, 23, 0.34),
    0 0 44px rgba(250, 204, 21, 0.28);
  transform: scale(1.018);
}

.tower-p18-slot-machine.is-variant-bonus-10slots .tower-p18-slot-machine__machine {
  aspect-ratio: var(--tower-p18-bonus-canvas-width, 1600) / var(--tower-p18-bonus-canvas-height, 1200);
}

.tower-p18-slot-machine__bonus-window {
  position: absolute;
  z-index: 3;
  border-radius: var(--tower-p18-bonus-window-radius, 16px);
  overflow: hidden;
}

.tower-p18-slot-machine__bonus-mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.tower-p18-slot-machine__bonus-bays {
  position: absolute;
  inset: 0;
  display: block;
}

.tower-p18-slot-machine__bonus-bay {
  position: absolute;
  min-width: 0;
  min-height: 0;
  border-radius: var(--tower-p18-bonus-bay-radius, 16px);
}

.tower-p18-slot-machine__bonus-bay-mask {
  position: absolute;
  inset: var(--tower-p18-bonus-mask-inset-y, 10px) var(--tower-p18-bonus-mask-inset-x, 6px);
  overflow: hidden;
  border-radius: var(--tower-p18-bonus-mask-radius, 10px);
  background: var(--tower-p18-bonus-bay-background, rgba(8, 10, 16, 0.10));
  box-shadow: none;
}

.tower-p18-slot-machine__bonus-bay-mask::before {
  content: none;
}

.tower-p18-slot-machine__bonus-bay-mask::after {
  content: none;
}

.tower-p18-slot-machine__bonus-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: var(--tower-p18-bonus-bay-height, 216px);
  gap: var(--tower-p18-bonus-bay-gap, 6px);
  padding: 0;
  justify-items: stretch;
  transition-property: transform;
  transition-timing-function: linear;
  will-change: transform;
}

.tower-p18-slot-machine__bonus-bay-fill {
  display: none !important;
}

.tower-p18-slot-machine__reveal-layer,
.tower-p18-slot-machine__reveal-card,
.tower-p18-slot-machine__reveal-board,
.tower-p18-slot-machine__bonus-stage,
.tower-p18-slot-machine__bonus-stage-marquee,
.tower-p18-slot-machine__bonus-stage-glow,
.tower-p18-slot-machine__bonus-stage-pedestal,
.tower-p18-slot-machine__bonus-stage-runway {
  display: none !important;
}

.tower-p18-slot-machine__bonus-media,
.tower-p18-slot-machine__bonus-badge {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  transform: translate3d(0, var(--tower-p18-bonus-content-offset-y, 0px), 0);
}

.tower-p18-slot-machine__bonus-media {
  background: transparent;
  box-shadow: none;
}

.tower-p18-slot-machine__bonus-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  transform-origin: center center;
  filter: none;
  display: block;
  margin: auto;
}

.tower-p18-slot-machine__bonus-badge {
  position: relative;
  background: transparent;
  box-shadow: none;
}

.tower-p18-slot-machine__bonus-badge-core {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.tower-p18-slot-machine__bonus-badge-core img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  transform-origin: center center;
  filter: none;
  display: block;
  margin: auto;
}

.tower-p18-slot-machine__bonus-badge-orb {
  display: none;
}

.tower-p18-slot-machine__bonus-badge-orb.is-left {
  justify-self: start;
}

.tower-p18-slot-machine__bonus-badge-orb.is-right {
  justify-self: end;
}

.tower-p18-slot-machine__bonus-item {
  width: 100%;
  height: var(--tower-p18-bonus-bay-height, 216px);
  border-radius: 12px;
  border: none;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  justify-self: stretch;
  padding: var(--tower-p18-bonus-content-inset-y, 0px) var(--tower-p18-bonus-content-inset-x, 0px);
  transition:
    transform 160ms cubic-bezier(0.18, 0.88, 0.24, 1),
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.tower-p18-slot-machine__bonus-item.is-final-hit {
  border-color: transparent;
}

.tower-p18-slot-machine.is-mode-spinning.is-variant-bonus-10slots .tower-p18-slot-machine__bonus-item {
  filter: saturate(0.94) brightness(0.98);
}

.tower-p18-slot-machine.is-mode-settled.is-variant-bonus-10slots .tower-p18-slot-machine__bonus-bay,
.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-10slots .tower-p18-slot-machine__bonus-bay {
  border-color: transparent;
  box-shadow: none;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-10slots .tower-p18-slot-machine__bonus-bay.is-final-hit,
.tower-p18-slot-machine.is-stop-track.is-variant-bonus-10slots .tower-p18-slot-machine__bonus-bay.is-final-hit {
  box-shadow: none;
}

.tower-p18-slot-machine__symbol,
.tower-p18-slot-machine__badge,
.tower-p18-slot-machine__media {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: grid;
  place-items: center;
}

.tower-p18-slot-machine__symbol {
  padding: 14px;
}

.tower-p18-slot-machine__symbol img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tower-p18-slot-machine__media {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.32)),
    radial-gradient(circle at 50% 40%, rgba(250, 204, 21, 0.12), transparent 76%);
  overflow: hidden;
}

.tower-p18-slot-machine__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tower-p18-slot-machine__media span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 247, 237, 0.84);
}

.tower-p18-slot-machine__badge {
  align-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(120, 53, 15, 0.18), rgba(2, 6, 23, 0)),
    radial-gradient(circle at 50% 36%, rgba(250, 204, 21, 0.14), transparent 74%);
}

.tower-p18-slot-machine__badge span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(254, 243, 199, 0.78);
}

.tower-p18-slot-machine__badge strong {
  font-size: 24px;
  letter-spacing: 0.08em;
  color: #fff7ed;
}

.tower-p18-slot-machine__reveal-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 56px);
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-single-spin .tower-p18-slot-machine__reveal-layer {
  background:
    radial-gradient(circle at 50% 42%, rgba(250, 204, 21, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.48));
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-single-spin .tower-p18-slot-machine__reveal-layer::after {
  content: "";
  position: absolute;
  inset: 18% 28%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.18), transparent 66%);
  filter: blur(28px);
}

.tower-p18-slot-machine__reveal-layer .tower-p18-slot-machine__reveal-card {
  animation: towerP18RevealCardIn 260ms cubic-bezier(0.18, 0.88, 0.24, 1);
}

.tower-p18-slot-machine__reveal-card,
.tower-p18-slot-machine__reveal-board {
  position: relative;
  z-index: 1;
}

.tower-p18-slot-machine__reveal-card {
  width: min(420px, calc(100vw - 40px));
  min-height: 0;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px 18px 20px;
  border-radius: 30px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at 50% 16%, rgba(250, 204, 21, 0.12), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 56px rgba(2, 6, 23, 0.42),
    0 0 42px rgba(250, 204, 21, 0.12);
  overflow: hidden;
}

.tower-p18-slot-machine__reveal-card::before,
.tower-p18-slot-machine__reveal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tower-p18-slot-machine__reveal-card::before {
  background: radial-gradient(circle at 50% 0%, rgba(255, 248, 220, 0.12), transparent 48%);
}

.tower-p18-slot-machine__reveal-card::after {
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.18),
    inset 0 18px 42px rgba(255, 248, 220, 0.04),
    inset 0 -18px 42px rgba(2, 6, 23, 0.18);
}

.tower-p18-slot-machine__reveal-card.is-final-hit {
  border-color: rgba(254, 240, 138, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 64px rgba(2, 6, 23, 0.44),
    0 0 54px rgba(250, 204, 21, 0.18);
}

.tower-p18-slot-machine__reveal-card.is-final-hit::before {
  inset: -14%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.28), transparent 62%);
  filter: blur(24px);
}

.tower-p18-slot-machine__reveal-card.is-final-hit::after {
  box-shadow:
    inset 0 0 0 1px rgba(254, 240, 138, 0.2),
    inset 0 18px 42px rgba(255, 248, 220, 0.05);
}

.tower-p18-slot-machine__reveal-card.is-final-hit .tower-p18-slot-machine__reveal-thumb {
  animation: towerP18RevealThumbPulse 1320ms ease-out 220ms 1;
  transform-origin: center;
}

.tower-p18-slot-machine__reveal-index {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background:
    linear-gradient(180deg, rgba(120, 53, 15, 0.74), rgba(120, 53, 15, 0.42)),
    radial-gradient(circle at 50% 50%, rgba(250, 204, 21, 0.2), transparent 70%);
  color: #fef3c7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tower-p18-slot-machine__reveal-thumb {
  display: grid;
  place-items: center;
}

.tower-p18-slot-machine__reveal-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  text-align: center;
}

.tower-p18-slot-machine__reveal-copy strong {
  font-size: 19px;
  line-height: 1.38;
  color: #fff7ed;
}

.tower-p18-slot-machine__reveal-copy span {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(254, 243, 199, 0.78);
}

.tower-p18-slot-machine__reveal-board {
  width: min(1120px, calc(100vw - 96px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  animation: towerP18RevealBoardIn 280ms cubic-bezier(0.18, 0.88, 0.24, 1) both;
  transform-origin: center top;
  perspective: 1800px;
}

.tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-card {
  width: auto;
  min-height: 0;
  padding: 18px 16px 18px;
  gap: 12px;
}

.tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-card {
  animation-delay: calc(var(--tower-p18-reveal-order, 0) * 70ms + 150ms);
}

.tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-thumb-card {
  width: 108px;
  height: 108px;
  padding: 10px;
  border-radius: 20px;
}

.tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-copy strong {
  font-size: 14px;
}

.tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-copy span {
  font-size: 11px;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-single-spin .tower-p18-slot-machine__reveal-card.is-final-hit {
  transform: translateY(10px) scale(0.94);
  animation:
    towerP18RevealCardIn 540ms cubic-bezier(0.18, 0.88, 0.24, 1) forwards,
    towerP18RevealHeroPulse 1200ms ease-out 620ms 1;
}

.tower-p18-slot-machine__reveal-thumb-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  padding: 12px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(2, 6, 23, 0.84)),
    radial-gradient(circle at 50% 24%, rgba(250, 204, 21, 0.14), transparent 68%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(250, 204, 21, 0.18),
    0 18px 34px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.tower-p18-slot-machine__reveal-thumb-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.22),
    inset 0 12px 24px rgba(255, 248, 220, 0.04);
}

.tower-p18-slot-machine__reveal-thumb-card .tower-p18-slot-machine__symbol,
.tower-p18-slot-machine__reveal-thumb-card .tower-p18-slot-machine__badge,
.tower-p18-slot-machine__reveal-thumb-card .tower-p18-slot-machine__media {
  border-radius: 18px;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer::before {
  content: "";
  position: absolute;
  inset: 8% 10% 12%;
  border-radius: 40px;
  background:
    radial-gradient(circle at 50% 20%, rgba(250, 204, 21, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(120, 53, 15, 0.14), rgba(2, 6, 23, 0.1));
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.16),
    0 24px 64px rgba(2, 6, 23, 0.36);
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer .tower-p18-slot-machine__reveal-board {
  position: relative;
  width: min(1320px, calc(100vw - 56px));
  padding: 26px 26px 22px;
  border-radius: 34px;
  border: 1px solid rgba(250, 204, 21, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(2, 6, 23, 0.22)),
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.12), transparent 58%);
  filter: drop-shadow(0 24px 58px rgba(0, 0, 0, 0.32));
  overflow: hidden;
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer .tower-p18-slot-machine__reveal-board::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -28%;
  width: 34%;
  background:
    linear-gradient(
      90deg,
      rgba(255, 248, 220, 0) 0%,
      rgba(255, 248, 220, 0.06) 24%,
      rgba(255, 248, 220, 0.18) 50%,
      rgba(255, 248, 220, 0.06) 76%,
      rgba(255, 248, 220, 0) 100%
    );
  transform: skewX(-18deg);
  opacity: 0;
  animation: towerP18BonusBoardSweep 920ms ease-out 240ms 1 forwards;
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer .tower-p18-slot-machine__reveal-board::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.14),
    inset 0 18px 42px rgba(255, 248, 220, 0.04),
    inset 0 -18px 42px rgba(2, 6, 23, 0.18);
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer {
  overflow: hidden;
}

.tower-p18-slot-machine.is-variant-bonus-10slots .tower-p18-slot-machine__reveal-layer {
  display: none;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-board {
  animation:
    towerP18RevealBoardIn 280ms cubic-bezier(0.18, 0.88, 0.24, 1) both,
    towerP18BonusBoardPulse 1560ms ease-out 420ms 1,
    towerP18BonusBoardFinale 1240ms cubic-bezier(0.18, 0.88, 0.24, 1) 240ms 1;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin
  .tower-p18-slot-machine__reveal-board
  .tower-p18-slot-machine__reveal-card {
  transform: translateY(22px) rotateX(-16deg) scale(0.94);
  animation: towerP18BonusCardFlipIn 560ms cubic-bezier(0.18, 0.88, 0.24, 1) forwards;
  animation-delay: calc(var(--tower-p18-reveal-order, 0) * 82ms + 180ms);
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-card.is-final-hit {
  transform: translateY(18px) scale(0.94);
  animation:
    towerP18BonusCardFlipIn 620ms cubic-bezier(0.18, 0.88, 0.24, 1) forwards,
    towerP18BonusFinalHitPulse 1620ms ease-out 760ms 1;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin
  .tower-p18-slot-machine__reveal-card.is-final-hit
  .tower-p18-slot-machine__reveal-thumb {
  animation: towerP18RevealThumbPulse 1760ms ease-out 760ms 1;
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-card.is-final-hit::before {
  inset: -20%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.34), transparent 60%);
  filter: blur(28px);
}

.tower-p18-slot-machine.is-mode-reveal.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-card.is-final-hit::after {
  box-shadow:
    inset 0 0 0 1px rgba(254, 240, 138, 0.3),
    inset 0 18px 42px rgba(255, 248, 220, 0.08),
    0 0 36px rgba(250, 204, 21, 0.18);
}

.tower-p18-slot-machine-overlay.is-closing .tower-p18-slot-machine__reveal-board {
  animation: towerP18RevealBoardOut 180ms ease forwards;
}

.tower-p18-slot-machine-overlay.is-closing .tower-p18-slot-machine__reveal-card {
  animation: towerP18RevealCardOut 180ms ease forwards;
}

.tower-p18-slot-machine__bonus-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(1360px, calc(100vw - 44px));
  padding: 24px 0 54px;
  animation: towerP18BonusStageIn 360ms cubic-bezier(0.18, 0.88, 0.24, 1) both;
}

.tower-p18-slot-machine__bonus-stage-marquee {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  gap: clamp(12px, 1.4vw, 20px);
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  min-width: min(420px, 40vw);
  transform: translate(-50%, -18%);
  pointer-events: none;
}

.tower-p18-slot-machine__bonus-stage-marquee span {
  width: clamp(18px, 1.4vw, 24px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 38%, rgba(255, 255, 255, 0.92), rgba(255, 248, 220, 0.42) 36%, rgba(250, 204, 21, 0.14) 62%, rgba(250, 204, 21, 0) 74%),
    linear-gradient(180deg, rgba(255, 248, 220, 0.92), rgba(191, 148, 64, 0.78));
  box-shadow:
    0 0 0 1px rgba(255, 248, 220, 0.12),
    0 0 18px rgba(250, 204, 21, 0.32),
    0 0 38px rgba(250, 204, 21, 0.16);
  animation: towerP18BonusBulbPulse 1360ms ease-in-out infinite;
}

.tower-p18-slot-machine__bonus-stage-marquee span:nth-child(2) {
  animation-delay: 120ms;
}

.tower-p18-slot-machine__bonus-stage-marquee span:nth-child(3) {
  animation-delay: 240ms;
}

.tower-p18-slot-machine__bonus-stage-marquee span:nth-child(4) {
  animation-delay: 360ms;
}

.tower-p18-slot-machine__bonus-stage-marquee span:nth-child(5) {
  animation-delay: 480ms;
}

.tower-p18-slot-machine__bonus-stage::before,
.tower-p18-slot-machine__bonus-stage::after {
  content: "";
  position: absolute;
  top: 8%;
  width: min(160px, 14vw);
  height: 72%;
  pointer-events: none;
  opacity: 0.72;
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.22), rgba(255, 248, 220, 0)),
    linear-gradient(90deg, rgba(250, 204, 21, 0.3), rgba(250, 204, 21, 0));
  filter: blur(10px);
}

.tower-p18-slot-machine__bonus-stage::before {
  left: 2%;
  transform: skewX(-14deg);
}

.tower-p18-slot-machine__bonus-stage::after {
  right: 2%;
  transform: scaleX(-1) skewX(-14deg);
}

.tower-p18-slot-machine__bonus-stage-glow {
  position: absolute;
  inset: 0 10% 18%;
  border-radius: 40px;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.18), transparent 48%),
    radial-gradient(circle at 50% 100%, rgba(120, 53, 15, 0.2), transparent 54%);
  filter: blur(20px);
  opacity: 0.92;
  pointer-events: none;
}

.tower-p18-slot-machine__bonus-stage-pedestal {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(780px, 72vw);
  height: 52px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.28), rgba(120, 53, 15, 0.16)),
    radial-gradient(circle at 50% 10%, rgba(255, 248, 220, 0.22), transparent 72%);
  box-shadow:
    0 22px 54px rgba(2, 6, 23, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 36px rgba(250, 204, 21, 0.16);
  opacity: 0.94;
  pointer-events: none;
}

.tower-p18-slot-machine__bonus-stage-runway {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 0;
  width: min(980px, 80vw);
  height: 94px;
  transform: translateX(-50%) perspective(980px) rotateX(70deg);
  transform-origin: center bottom;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.16), rgba(255, 248, 220, 0) 24%),
    linear-gradient(90deg, rgba(120, 53, 15, 0.12), rgba(250, 204, 21, 0.12) 50%, rgba(120, 53, 15, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.12),
    0 18px 48px rgba(2, 6, 23, 0.34);
  opacity: 0.9;
  pointer-events: none;
}

.tower-p18-slot-machine__bonus-stage-runway::before,
.tower-p18-slot-machine__bonus-stage-runway::after {
  content: "";
  position: absolute;
  top: 16%;
  bottom: 16%;
  width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.76), rgba(250, 204, 21, 0.18));
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.18);
}

.tower-p18-slot-machine__bonus-stage-runway::before {
  left: 7%;
}

.tower-p18-slot-machine__bonus-stage-runway::after {
  right: 7%;
}

.tower-p18-slot-machine__bonus-stage-runway span {
  position: absolute;
  top: 26%;
  bottom: 26%;
  width: 7%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.82), rgba(250, 204, 21, 0.14)),
    linear-gradient(90deg, rgba(255, 248, 220, 0), rgba(255, 248, 220, 0.3), rgba(255, 248, 220, 0));
  filter: blur(0.2px);
  opacity: 0.76;
  animation: towerP18BonusRunwayPulse 1560ms ease-in-out infinite;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(1) {
  left: 14%;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(2) {
  left: 27%;
  animation-delay: 140ms;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(3) {
  left: 40%;
  animation-delay: 280ms;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(4) {
  right: 40%;
  animation-delay: 420ms;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(5) {
  right: 27%;
  animation-delay: 560ms;
}

.tower-p18-slot-machine__bonus-stage-runway span:nth-child(6) {
  right: 14%;
  animation-delay: 700ms;
}

.tower-p18-slot-machine.is-variant-bonus-long-spin .tower-p18-slot-machine__reveal-layer::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 50%;
  width: min(720px, 68vw);
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(250, 204, 21, 0.18), transparent 70%);
  filter: blur(32px);
  opacity: 0.86;
  pointer-events: none;
  animation: towerP18BonusHaloPulse 1080ms ease-out 120ms 1;
}

@keyframes towerP18RevealBoardIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes towerP18RevealBoardOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
}

@keyframes towerP18RevealCardIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes towerP18RevealCardOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@keyframes towerP18RevealHeroPulse {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(2, 6, 23, 0.42),
      0 0 42px rgba(250, 204, 21, 0.18);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(2, 6, 23, 0.42),
      0 0 72px rgba(250, 204, 21, 0.28);
  }
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(2, 6, 23, 0.42),
      0 0 42px rgba(250, 204, 21, 0.18);
  }
}

@keyframes towerP18BonusBoardPulse {
  0% {
    transform: translateY(0) scale(1);
  }
  38% {
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes towerP18BonusStageIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes towerP18BonusBulbPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.92);
    box-shadow:
      0 0 0 1px rgba(255, 248, 220, 0.08),
      0 0 14px rgba(250, 204, 21, 0.2),
      0 0 28px rgba(250, 204, 21, 0.08);
  }
  45% {
    opacity: 1;
    transform: scale(1.06);
    box-shadow:
      0 0 0 1px rgba(255, 248, 220, 0.16),
      0 0 24px rgba(250, 204, 21, 0.34),
      0 0 52px rgba(250, 204, 21, 0.18);
  }
  100% {
    opacity: 0.8;
    transform: scale(0.96);
    box-shadow:
      0 0 0 1px rgba(255, 248, 220, 0.1),
      0 0 16px rgba(250, 204, 21, 0.22),
      0 0 30px rgba(250, 204, 21, 0.1);
  }
}

@keyframes towerP18BonusBoardFinale {
  0% {
    transform: translateY(10px) scale(0.986);
  }
  42% {
    transform: translateY(0) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes towerP18BonusBoardSweep {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-18deg);
  }
  24% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translate3d(390%, 0, 0) skewX(-18deg);
  }
}

@keyframes towerP18BonusHaloPulse {
  0% {
    opacity: 0.3;
    transform: translateX(-50%) scale(0.88);
  }
  45% {
    opacity: 0.96;
    transform: translateX(-50%) scale(1.06);
  }
  100% {
    opacity: 0.82;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes towerP18BonusCardFlipIn {
  0% {
    opacity: 0;
    transform: translateY(22px) rotateX(-16deg) scale(0.94);
  }
  52% {
    opacity: 1;
    transform: translateY(-4px) rotateX(6deg) scale(1.015);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

@keyframes towerP18RevealThumbPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0));
  }
  44% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 22px rgba(250, 204, 21, 0.28));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0));
  }
}

@keyframes towerP18BonusFinalHitPulse {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(2, 6, 23, 0.42),
      0 0 42px rgba(250, 204, 21, 0.18);
  }
  42% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 28px 72px rgba(2, 6, 23, 0.46),
      0 0 90px rgba(250, 204, 21, 0.32);
  }
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(2, 6, 23, 0.42),
      0 0 42px rgba(250, 204, 21, 0.18);
  }
}

@media (max-width: 1024px) {
  .tower-p18-slot-machine-overlay__viewport {
    width: min(1180px, 88vw);
  }

  .tower-p18-slot-machine-overlay.is-variant-bonus-long-spin .tower-p18-slot-machine-overlay__viewport,
  .tower-p18-slot-machine-overlay.is-variant-bonus-10slots .tower-p18-slot-machine-overlay__viewport {
    width: min(1320px, 98vw);
  }

  .tower-p18-slot-machine__track {
    padding: 10px;
  }

  .tower-p18-slot-machine__item {
    height: 132px;
    border-radius: 20px;
  }

  .tower-p18-slot-machine__reveal-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tower-p18-slot-machine-overlay {
    padding: 10px;
  }

  .tower-p18-slot-machine-overlay__viewport {
    width: min(1180px, 100vw);
  }

  .tower-p18-slot-machine__machine {
    min-height: min(78vh, 760px);
  }

  .tower-p18-slot-machine__track {
    gap: 8px;
    padding: 8px;
  }

  .tower-p18-slot-machine__item {
    height: 104px;
    padding: 10px;
  }

  .tower-p18-slot-machine__badge strong {
    font-size: 18px;
  }

  .tower-p18-slot-machine__reel {
    border-radius: 18px;
  }

  .tower-p18-slot-machine__reveal-card {
    width: min(340px, calc(100vw - 36px));
  }

  .tower-p18-slot-machine__reveal-thumb-card {
    width: 132px;
    height: 132px;
    border-radius: 22px;
  }

  .tower-p18-slot-machine__reveal-board {
    width: min(760px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tower-p18-slot-machine__reveal-board .tower-p18-slot-machine__reveal-thumb-card {
    width: 96px;
    height: 96px;
    border-radius: 18px;
  }
}

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

/* A11y: visually hidden but readable to screen readers. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* A11y: unified keyboard focus ring across interactive elements.
 * Uses :focus-visible so mouse clicks don't show it. */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Tighter ring on circular / icon buttons */
.carousel-control:focus-visible,
.modal-close:focus-visible {
  outline-offset: 1px;
  border-radius: 999px;
}

.card-info {
  display: grid;
  gap: 6px;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.card .status {
  font-weight: 700;
  color: var(--accent-2);
}

.draw-options {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
}

.draw-option {
  border-radius: var(--public-btn-chip-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--public-btn-chip-color);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: var(--public-btn-chip-font-weight);
  letter-spacing: var(--public-btn-letter-spacing);
  text-transform: var(--public-btn-text-transform);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.draw-option.active {
  border-color: var(--public-btn-chip-active-border);
  background: var(--public-btn-chip-active-bg);
  color: var(--public-btn-chip-active-color);
  box-shadow: var(--public-btn-chip-active-shadow);
}

.modal-message {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.draw-option:hover {
  color: var(--public-btn-chip-color);
  background: rgba(255, 255, 255, 0.08);
}

.draw-option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.draw-option:focus-visible {
  outline: none;
  box-shadow:
    var(--public-btn-chip-shadow),
    0 0 0 4px var(--public-btn-focus-ring);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tag {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(34, 211, 238, 0.18);
  color: var(--accent-2);
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.empty {
  display: none;
  text-align: center;
  color: var(--muted);
}

.detail {
  display: grid;
  gap: 32px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr minmax(220px, 280px);
  gap: 32px;
  align-items: center;
}

.detail-main {
  display: grid;
  gap: 12px;
}

.detail-thumb {
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(249, 115, 22, 0.25), rgba(34, 211, 238, 0.25));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-tags {
  color: var(--muted);
  margin: 6px 0 14px;
}

.detail-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-meta div {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.detail-meta strong {
  color: var(--ink);
  font-size: 20px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-side {
  display: grid;
  gap: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 18px;
}

.detail-side span {
  color: var(--muted);
  font-size: 13px;
}

.detail-side strong {
  font-size: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.detail-grid.is-tabbed {
  grid-template-columns: 1fr;
}

.detail-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
}

.detail-card ul {
  padding-left: 20px;
  color: var(--muted);
}

.detail-lord-card {
  display: grid;
  gap: 16px;
}

.detail-lord-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.detail-lord-kpi {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.28);
}

.detail-lord-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.detail-lord-kpi strong {
  font-size: 15px;
  color: var(--ink);
}

.detail-lord-rule,
.detail-lord-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-lord-champion-slot[hidden] {
  display: none !important;
}

.detail-tower-slot[hidden] {
  display: none !important;
}

/* ── Shared empty-state illustration component ───────────────────
 * Used on list pages (my-coupons, my-watchlist, my-cdk, my-addresses,
 * my-recycle-history, my-points-history, my-coins-history) when
 * there are no records yet. Shows a NanoBanana 2 illustration plus
 * a forward-looking title + hint so the absence feels intentional
 * rather than broken. */
.empty-state {
  display: grid;
  gap: 14px;
  place-items: center;
  padding: 48px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  animation: empty-state-fade-in 0.4s ease-out;
}
.empty-state__icon {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0.92;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.02);
}
.empty-state__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.3);
}
.empty-state__title {
  font-size: 17px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.empty-state__hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 320px;
  line-height: 1.65;
  margin: 0;
}
.empty-state__hint a {
  color: #4effc3;
  text-decoration: none;
  font-weight: 600;
}
.empty-state__hint a:hover {
  text-decoration: underline;
}
@keyframes empty-state-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Illustrated steps (homepage 抽獎流程) ───────────────────
 * Replaces the plain circle-number steps with premium NanoBanana 2
 * illustrations + title + description. Laid out horizontally on
 * wide screens, stacked on mobile.
 *
 * Specificity guard (body prefix) is deliberate — the existing
 * `body.frontend-theme-default .page.home-page.page-composer-home
 * .steps li` rule in 80f-demo-structure.css has a stronger selector
 * and would otherwise override the layout. */
body .steps.steps--illustrated {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  margin: 20px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 720px) {
  body .steps.steps--illustrated {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
body .steps.steps--illustrated li {
  display: flex !important;
  flex-direction: row !important;
  grid-template-columns: none !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 16px 18px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  background: linear-gradient(135deg, rgba(230, 187, 102, 0.04), rgba(34, 211, 238, 0.04)) !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease !important;
}
body .steps.steps--illustrated li:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(230, 187, 102, 0.22) !important;
  background: linear-gradient(135deg, rgba(230, 187, 102, 0.07), rgba(34, 211, 238, 0.07)) !important;
}
body .steps.steps--illustrated .step-icon {
  width: 72px !important;
  height: 72px !important;
  flex: 0 0 72px !important;
  min-width: 72px !important;
  background: transparent !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body .steps.steps--illustrated .step-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transform: none !important;
  display: block !important;
  filter: drop-shadow(0 6px 14px rgba(0, 212, 255, 0.22));
}
body .steps.steps--illustrated .step-body {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 !important;
}
body .steps.steps--illustrated .step-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--ink, #f8fafc) !important;
  letter-spacing: 0.02em !important;
}
body .steps.steps--illustrated .step-desc {
  font-size: 13px !important;
  color: rgba(226, 232, 240, 0.72) !important;
  line-height: 1.55 !important;
}
body .steps.steps--illustrated li span:first-child:not(.step-icon) {
  display: none !important;
}


/* c153 (2026-05-01): View Transitions API — cross-document smooth fade.
   Triggered by <meta name="view-transition" content="same-origin"> in HTML.
   Browsers WITHOUT support fall back to instant page swap (no animation,
   no broken state). Chrome 126+, Safari 18+, Edge 126+. Firefox: working.

   配合 c152 prefetch — prefetched 頁面 + view-transition = 真正接近
   SPA-router 體感（瞬切 + smooth fade）。 */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 尊重 user 的 prefers-reduced-motion 設定 — 跳過動畫直接 cut */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
/* ── Lord Throne (recovered from commit 6232fe4) ── */

.lord-throne {
  --throne-gold-bright: #ffe5a8;
  --throne-gold:        #e6bb66;
  --throne-gold-deep:   #6b4a1d;
  position: relative;
  padding: 28px 32px;
  border-radius: 22px;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(120% 100% at 18% 0%, rgba(255, 205, 125, 0.22), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(163, 100, 42, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(35, 24, 10, 0.88) 0%, rgba(12, 10, 6, 0.92) 100%);
  border: 1px solid rgba(255, 215, 150, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 190, 0.16),
    0 26px 54px rgba(2, 8, 18, 0.4);
}
.lord-throne::before {
  /* Soft gold top highlight line */
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 230, 190, 0.42), transparent);
  pointer-events: none;
}

.lord-throne__head {
  position: relative;
  z-index: 1;
}
.lord-throne__eyebrow {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3d48c 0%, #a96e20 100%);
  color: #14100a;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin-bottom: 8px;
}
.lord-throne.is-vacant .lord-throne__eyebrow {
  background: linear-gradient(135deg, #cbb58a 0%, #7a5a2a 100%);
}
.lord-throne__title {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.02em;
  color: #fff3d6;
  text-shadow: 0 0 14px rgba(255, 222, 170, 0.18);
}
.lord-throne__summary {
  margin: 0 0 22px;
  color: rgba(235, 224, 196, 0.85);
  line-height: 1.65;
  font-size: 13.5px;
  max-width: 780px;
}

/* Stage: prize left, throne right */
.lord-throne__stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 20px;
}

/* --- Prize pedestal ------------------------------------------------------ */
.lord-throne__prize {
  position: relative;
  border-radius: 18px;
  padding: 20px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 222, 170, 0.26), transparent 60%),
    linear-gradient(180deg, rgba(12, 18, 36, 0.82) 0%, rgba(6, 9, 20, 0.94) 100%);
  border: 1px solid rgba(255, 215, 150, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 190, 0.12),
    0 14px 28px rgba(2, 6, 14, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.lord-throne__prize-pedestal {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 58px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 222, 170, 0.85) 35%, rgba(255, 222, 170, 0.85) 65%, transparent 100%);
  box-shadow: 0 0 14px rgba(255, 222, 170, 0.45);
  pointer-events: none;
}
.lord-throne__prize-img {
  width: min(70%, 220px);
  max-height: 180px;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55))
    drop-shadow(0 2px 8px rgba(255, 210, 140, 0.25));
  margin-bottom: 20px;
  animation: lord-throne-float 5.6s ease-in-out infinite;
}
.lord-throne__prize-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(255, 222, 170, 0.75);
  min-height: 140px;
  border: 1px dashed rgba(255, 222, 170, 0.24);
  border-radius: 14px;
}
.lord-throne__prize-badge {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(32, 24, 10, 0.86) 0%, rgba(12, 10, 6, 0.94) 100%);
  border: 1px solid rgba(255, 215, 150, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.18);
  max-width: 100%;
}
.lord-throne__prize-badge-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: #ffd77a;
  font-weight: 800;
}
.lord-throne__prize-badge-name {
  font-size: 13px;
  color: #fff3d6;
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Throne portrait column -------------------------------------------- */
.lord-throne__crown-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lord-throne__throne {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 100% at 50% -10%, rgba(255, 222, 170, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(24, 20, 10, 0.9) 0%, rgba(8, 6, 2, 0.95) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 230, 190, 0.2),
    inset 0 0 0 1px rgba(255, 215, 150, 0.32),
    0 18px 42px rgba(2, 6, 14, 0.52);
}
.lord-throne__throne::before {
  /* Rotating gold rim highlight */
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg,
    #f3d48c 0%, #a96e20 12%, #f3d48c 25%,
    #6b4a1d 40%, #ffe5a8 52%, #a96e20 68%,
    #f3d48c 82%, #6b4a1d 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: lord-throne-spin 16s linear infinite;
  pointer-events: none;
}
.lord-throne__crown-mark {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #ffe5a8;
  stroke-width: 3;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(255, 215, 150, 0.55));
}
.lord-throne__portrait {
  position: relative;
  z-index: 1;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(10, 8, 4, 0.6);
  display: grid;
  place-items: center;
}
.lord-throne__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lord-throne__portrait-fallback {
  font-size: 44px;
  font-weight: 900;
  color: #ffe5a8;
  letter-spacing: 0.06em;
}
.lord-throne.is-vacant .lord-throne__portrait {
  background: rgba(14, 12, 8, 0.7);
}
.lord-throne.is-vacant .lord-throne__portrait-fallback {
  color: rgba(255, 222, 170, 0.55);
}
.lord-throne__caption {
  margin: 0;
  font-size: 12.5px;
  color: rgba(235, 224, 196, 0.7);
  letter-spacing: 0.06em;
  text-align: center;
}

/* --- Stat plate --------------------------------------------------------- */
.lord-throne__plate {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(32, 24, 10, 0.78) 0%, rgba(12, 10, 6, 0.9) 100%);
  border: 1px solid rgba(255, 215, 150, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.14);
  flex-wrap: wrap;
}
.lord-throne__plate-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.lord-throne__plate-label {
  color: rgba(235, 224, 196, 0.62);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.lord-throne__plate-item strong {
  color: #fff3d6;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.lord-throne__plate-sep {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 215, 150, 0.4) 50%, transparent 100%);
}

.lord-throne__rule {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: rgba(235, 224, 196, 0.62);
  font-size: 12px;
  line-height: 1.65;
}

@keyframes lord-throne-float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@keyframes lord-throne-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================================================================
   45-gacha-reveal.css — Mobile-game gacha reveal animation system
   Inspired by Arknights / Genshin Impact rarity reveals
   ================================================================ */

/* ----------------------------------------------------------------
   Stage overlay
   ---------------------------------------------------------------- */
.gacha-stage {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.gacha-stage.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- rotating light burst background ---- */
.gacha-stage__burst {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.gacha-stage__burst::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180vmax;
  height: 180vmax;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 215, 0, 0.07) 10deg,
    transparent 20deg,
    transparent 30deg,
    rgba(168, 85, 247, 0.06) 40deg,
    transparent 50deg,
    transparent 60deg,
    rgba(59, 130, 246, 0.06) 70deg,
    transparent 80deg,
    transparent 90deg,
    rgba(255, 215, 0, 0.07) 100deg,
    transparent 110deg,
    transparent 120deg,
    rgba(168, 85, 247, 0.06) 130deg,
    transparent 140deg,
    transparent 150deg,
    rgba(59, 130, 246, 0.06) 160deg,
    transparent 170deg,
    transparent 180deg,
    rgba(255, 215, 0, 0.07) 190deg,
    transparent 200deg,
    transparent 210deg,
    rgba(168, 85, 247, 0.06) 220deg,
    transparent 230deg,
    transparent 240deg,
    rgba(59, 130, 246, 0.06) 250deg,
    transparent 260deg,
    transparent 270deg,
    rgba(255, 215, 0, 0.07) 280deg,
    transparent 290deg,
    transparent 300deg,
    rgba(168, 85, 247, 0.06) 310deg,
    transparent 320deg,
    transparent 330deg,
    rgba(59, 130, 246, 0.06) 340deg,
    transparent 350deg,
    transparent 360deg
  );
  border-radius: 50%;
  opacity: 0;
  animation: gachaLightBurst 8s linear infinite;
}
.gacha-stage.is-active .gacha-stage__burst::before {
  opacity: 1;
  transition: opacity 1s ease 0.2s;
}

/* ---- central radial glow (static) ---- */
.gacha-stage__burst::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vmin;
  height: 80vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(100, 140, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: gachaCenterPulse 3s ease-in-out infinite;
}
.gacha-stage.is-active .gacha-stage__burst::after {
  opacity: 1;
  transition: opacity 0.6s ease 0.4s;
}

/* ----------------------------------------------------------------
   Card arena (grid)
   ---------------------------------------------------------------- */
.gacha-card-arena {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 14px;
  padding: 16px;
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}

/* single card: bigger */
.gacha-card-arena[data-card-count="1"] {
  max-width: 300px;
}
.gacha-card-arena[data-card-count="1"] .gacha-card {
  width: 220px;
}

/* 2-5 cards: 2 columns */
.gacha-card-arena[data-card-count="2"] .gacha-card,
.gacha-card-arena[data-card-count="3"] .gacha-card,
.gacha-card-arena[data-card-count="4"] .gacha-card,
.gacha-card-arena[data-card-count="5"] .gacha-card {
  width: calc(50% - 10px);
  max-width: 155px;
}

/* 6-10 cards: 5 columns desktop, 3 columns mobile — wider gap for glow */
.gacha-card-arena[data-card-count="6"] .gacha-card,
.gacha-card-arena[data-card-count="7"] .gacha-card,
.gacha-card-arena[data-card-count="8"] .gacha-card,
.gacha-card-arena[data-card-count="9"] .gacha-card,
.gacha-card-arena[data-card-count="10"] .gacha-card {
  width: calc(20% - 36px);
  max-width: 108px;
}
.gacha-card-arena[data-card-count="6"],
.gacha-card-arena[data-card-count="7"],
.gacha-card-arena[data-card-count="8"],
.gacha-card-arena[data-card-count="9"],
.gacha-card-arena[data-card-count="10"] {
  gap: 36px;
  row-gap: 40px;
  max-width: 900px;
}

@media (max-width: 600px) {
  .gacha-card-arena[data-card-count="6"] .gacha-card,
  .gacha-card-arena[data-card-count="7"] .gacha-card,
  .gacha-card-arena[data-card-count="8"] .gacha-card,
  .gacha-card-arena[data-card-count="9"] .gacha-card,
  .gacha-card-arena[data-card-count="10"] .gacha-card {
    width: calc(33.333% - 24px);
    max-width: 100px;
  }
  .gacha-card-arena[data-card-count="6"],
  .gacha-card-arena[data-card-count="7"],
  .gacha-card-arena[data-card-count="8"],
  .gacha-card-arena[data-card-count="9"],
  .gacha-card-arena[data-card-count="10"] {
    gap: 22px;
  }
}

/* ----------------------------------------------------------------
   Footer (progress + skip)
   ---------------------------------------------------------------- */
.gacha-stage__footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gacha-stage.is-active .gacha-stage__footer {
  opacity: 1;
  transition-delay: 1.6s;
}

.gacha-progress {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  user-select: none;
}

.gacha-skip-btn {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.18);
  padding: 6px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.gacha-skip-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ----------------------------------------------------------------
   Card component
   ---------------------------------------------------------------- */
.gacha-card {
  position: relative;
  aspect-ratio: 0.68;
  perspective: 900px;
  isolation: isolate;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
  opacity: 0;
  animation: gachaCardLand 620ms cubic-bezier(0.18, 0.88, 0.24, 1) both;
  animation-delay: calc(var(--gacha-card-delay, 0) * 1ms);
}
/* after landing animation completes, lock opacity via class so
   subsequent animations (hint-pulse, etc.) cannot reset it to 0 */
.gacha-card.gacha-landed {
  opacity: 1;
}
.gacha-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 16px;
}
.gacha-card[data-flipped="true"] {
  cursor: default;
}
/* hover lift — only on __flip to avoid conflicting with card landing animation */
.gacha-card:not([data-flipped="true"]):hover .gacha-card__flip {
  transform: translateY(-3px);
  transition: transform 0.18s ease;
}

/* 3D flip container */
.gacha-card__flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}
.gacha-card.is-flipped .gacha-card__flip {
  transform: rotateY(180deg);
}

/* shared face styles */
.gacha-card__back,
.gacha-card__front {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Card back (face-down) ---- */
.gacha-card__back {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(100, 140, 255, 0.08) 0%, transparent 70%),
    linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* card back image fills the entire card */
.gacha-card__back-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  pointer-events: none;
  user-select: none;
}

/* shimmer sweep on card back */
.gacha-card__back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 65%
  );
  background-size: 300% 100%;
  animation: gachaBackShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
  border-radius: 16px;
}

/* ---- Card front (prize) ---- */
.gacha-card__front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 10px 8px 8px;
  gap: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gacha-card__prize-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.gacha-card__prize-image img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.gacha-card__prize-image span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

.gacha-card__prize-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  width: 100%;
  min-height: 0;
}
.gacha-card__prize-info strong {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.gacha-card__prize-info span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.gacha-card__count {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

/* ---- Glow system: integrated into the card itself ---- */
/* The glow div provides outer aura */
.gacha-card__glow {
  position: absolute;
  inset: -12px;
  border-radius: 28px;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

/* Style G: radial glow halo around card (no rectangular edge) */
.gacha-card.gacha-landed .gacha-card__back {
  overflow: visible;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: gachaEdgePulse 2.2s ease-in-out infinite;
}
/* (glow halo configured per color below — inset -60%, circular, blurred) */

/* hover: brighten + lift */
.gacha-card.gacha-landed:not([data-flipped="true"]):hover {
  filter: brightness(1.2);
  transform: translateY(-3px) scale(1.02);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.gacha-card.gacha-landed:not([data-flipped="true"]):hover .gacha-card__back {
  animation: none;
  filter: brightness(1.3);
}

/* flip: burst */
.gacha-card.is-flipped .gacha-card__back {
  animation: none;
  filter: brightness(1.4);
}

/* ---- Particle / ray burst layer ---- */
.gacha-card__particles {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
}
.gacha-card__particles::before,
.gacha-card__particles::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
}

/* ---- Light rays (rotating behind card on flip) ---- */
.gacha-card__rays {
  position: absolute;
  inset: -80%;
  pointer-events: none;
  z-index: -2;
  opacity: 0;
}
.gacha-card__rays::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

/* ----------------------------------------------------------------
   LEGENDARY (A賞 / SSR) — GOLD
   ---------------------------------------------------------------- */
.gacha-card--legendary .gacha-card__back {
  border-color: rgba(250, 204, 21, 0.35);
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(250, 204, 21, 0.1) 0%, transparent 60%),
    linear-gradient(145deg, #2a1f00 0%, #1a1505 50%, #0f3460 100%);
}
.gacha-card--legendary .gacha-card__back::after {
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(250, 204, 21, 0.06) 40%,
    rgba(250, 204, 21, 0.14) 50%,
    rgba(250, 204, 21, 0.06) 60%,
    transparent 65%
  );
  background-size: 300% 100%;
}

.gacha-card--legendary .gacha-card__glow {
  box-shadow:
    0 0 30px 8px rgba(250, 204, 21, 0.5),
    0 0 70px 20px rgba(250, 204, 21, 0.2),
    0 0 120px 40px rgba(250, 204, 21, 0.08),
    inset 0 0 20px rgba(250, 204, 21, 0.06);
}
.gacha-card--legendary .gacha-card__front {
  border-color: rgba(250, 204, 21, 0.4);
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(250, 204, 21, 0.06) 0%, transparent 70%),
    linear-gradient(160deg, #1a1505 0%, #1e293b 100%);
}
.gacha-card--legendary .gacha-card__prize-info span {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.15);
}

/* legendary particle burst: double layer + rays */
.gacha-card--legendary.is-flipped .gacha-card__particles {
  opacity: 1;
}
.gacha-card--legendary.is-flipped .gacha-card__particles::before {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.5) 0%, rgba(250, 204, 21, 0.15) 40%, transparent 70%);
  animation: gachaParticleBurst 1s ease-out forwards;
}
.gacha-card--legendary.is-flipped .gacha-card__particles::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 230, 150, 0.1) 30%, transparent 60%);
  animation: gachaParticleBurst 0.7s ease-out 0.08s forwards;
}
/* golden rays behind legendary cards */
.gacha-card--legendary.is-flipped .gacha-card__rays {
  opacity: 1;
  transition: opacity 0.3s ease 0.3s;
}
.gacha-card--legendary.is-flipped .gacha-card__rays::before {
  background: conic-gradient(
    from 0deg,
    transparent, rgba(250, 204, 21, 0.12) 5deg, transparent 10deg,
    transparent 20deg, rgba(250, 204, 21, 0.1) 25deg, transparent 30deg,
    transparent 40deg, rgba(250, 204, 21, 0.12) 45deg, transparent 50deg,
    transparent 60deg, rgba(250, 204, 21, 0.1) 65deg, transparent 70deg,
    transparent 80deg, rgba(250, 204, 21, 0.12) 85deg, transparent 90deg,
    transparent 100deg, rgba(250, 204, 21, 0.1) 105deg, transparent 110deg,
    transparent 120deg, rgba(250, 204, 21, 0.12) 125deg, transparent 130deg,
    transparent 140deg, rgba(250, 204, 21, 0.1) 145deg, transparent 150deg,
    transparent 160deg, rgba(250, 204, 21, 0.12) 165deg, transparent 170deg,
    transparent 180deg, rgba(250, 204, 21, 0.1) 185deg, transparent 190deg,
    transparent 200deg, rgba(250, 204, 21, 0.12) 205deg, transparent 210deg,
    transparent 220deg, rgba(250, 204, 21, 0.1) 225deg, transparent 230deg,
    transparent 240deg, rgba(250, 204, 21, 0.12) 245deg, transparent 250deg,
    transparent 260deg, rgba(250, 204, 21, 0.1) 265deg, transparent 270deg,
    transparent 280deg, rgba(250, 204, 21, 0.12) 285deg, transparent 290deg,
    transparent 300deg, rgba(250, 204, 21, 0.1) 305deg, transparent 310deg,
    transparent 320deg, rgba(250, 204, 21, 0.12) 325deg, transparent 330deg,
    transparent 340deg, rgba(250, 204, 21, 0.1) 345deg, transparent 350deg,
    transparent 360deg
  );
  animation: gachaRaySpin 6s linear infinite;
  opacity: 0.8;
}

/* ----------------------------------------------------------------
   EPIC (B賞 / SR) — PURPLE
   ---------------------------------------------------------------- */
.gacha-card--epic .gacha-card__back {
  border-color: rgba(168, 85, 247, 0.3);
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(168, 85, 247, 0.07) 0%, transparent 60%),
    linear-gradient(145deg, #1a102e 0%, #16213e 50%, #0f3460 100%);
}
.gacha-card--epic .gacha-card__back::after {
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(168, 85, 247, 0.06) 40%,
    rgba(168, 85, 247, 0.12) 50%,
    rgba(168, 85, 247, 0.06) 60%,
    transparent 65%
  );
  background-size: 300% 100%;
}

.gacha-card--epic .gacha-card__glow {
  box-shadow:
    0 0 25px 7px rgba(168, 85, 247, 0.45),
    0 0 60px 16px rgba(168, 85, 247, 0.18),
    0 0 100px 30px rgba(168, 85, 247, 0.06);
}
.gacha-card--epic .gacha-card__front {
  border-color: rgba(168, 85, 247, 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(168, 85, 247, 0.05) 0%, transparent 70%),
    linear-gradient(160deg, #15102a 0%, #1e293b 100%);
}
.gacha-card--epic .gacha-card__prize-info span {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.12);
}

/* epic particle burst */
.gacha-card--epic.is-flipped .gacha-card__particles {
  opacity: 1;
}
.gacha-card--epic.is-flipped .gacha-card__particles::before {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
  animation: gachaParticleBurst 0.9s ease-out forwards;
}
.gacha-card--epic.is-flipped .gacha-card__particles::after {
  background: radial-gradient(circle, rgba(200, 160, 255, 0.2) 0%, transparent 55%);
  animation: gachaParticleBurst 0.65s ease-out 0.06s forwards;
}
/* subtle rays for epic */
.gacha-card--epic.is-flipped .gacha-card__rays {
  opacity: 0.6;
  transition: opacity 0.3s ease 0.3s;
}
.gacha-card--epic.is-flipped .gacha-card__rays::before {
  background: conic-gradient(
    from 0deg,
    transparent, rgba(168, 85, 247, 0.1) 10deg, transparent 20deg,
    transparent 40deg, rgba(168, 85, 247, 0.08) 50deg, transparent 60deg,
    transparent 80deg, rgba(168, 85, 247, 0.1) 90deg, transparent 100deg,
    transparent 120deg, rgba(168, 85, 247, 0.08) 130deg, transparent 140deg,
    transparent 160deg, rgba(168, 85, 247, 0.1) 170deg, transparent 180deg,
    transparent 200deg, rgba(168, 85, 247, 0.08) 210deg, transparent 220deg,
    transparent 240deg, rgba(168, 85, 247, 0.1) 250deg, transparent 260deg,
    transparent 280deg, rgba(168, 85, 247, 0.08) 290deg, transparent 300deg,
    transparent 320deg, rgba(168, 85, 247, 0.1) 330deg, transparent 340deg,
    transparent 360deg
  );
  animation: gachaRaySpin 8s linear infinite;
  opacity: 0.7;
}

/* ----------------------------------------------------------------
   RARE (C賞 / R) — BLUE
   ---------------------------------------------------------------- */
.gacha-card--rare .gacha-card__back {
  border-color: rgba(59, 130, 246, 0.22);
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
    linear-gradient(145deg, #101a2e 0%, #16213e 50%, #0f3460 100%);
}
.gacha-card--rare .gacha-card__back::after {
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(59, 130, 246, 0.06) 40%,
    rgba(59, 130, 246, 0.12) 50%,
    rgba(59, 130, 246, 0.06) 60%,
    transparent 65%
  );
  background-size: 300% 100%;
}

.gacha-card--rare .gacha-card__glow {
  box-shadow:
    0 0 20px 5px rgba(59, 130, 246, 0.4),
    0 0 50px 12px rgba(59, 130, 246, 0.15),
    0 0 80px 20px rgba(59, 130, 246, 0.05);
}
.gacha-card--rare .gacha-card__front {
  border-color: rgba(59, 130, 246, 0.3);
}
.gacha-card--rare .gacha-card__prize-info span {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* rare: subtle particle */
.gacha-card--rare.is-flipped .gacha-card__particles {
  opacity: 1;
}
.gacha-card--rare.is-flipped .gacha-card__particles::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 65%);
  animation: gachaParticleBurst 0.7s ease-out forwards;
}

/* ----------------------------------------------------------------
   COMMON (D賞+ / N) — TEAL
   ---------------------------------------------------------------- */
.gacha-card--common .gacha-card__glow {
  box-shadow:
    0 0 14px 4px rgba(20, 184, 166, 0.3),
    0 0 35px 8px rgba(20, 184, 166, 0.1);
}
.gacha-card--common .gacha-card__front {
  border-color: rgba(20, 184, 166, 0.22);
}
.gacha-card--common .gacha-card__prize-info span {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
}

/* ----------------------------------------------------------------
   Flip effects
   ---------------------------------------------------------------- */

/* prize spotlight scale on reveal */
.gacha-card.is-flipped .gacha-card__front {
  animation: gachaPrizeSpotlight 0.55s ease-out 0.6s;
}

/* card border flash on flip */
.gacha-card--legendary.is-flipped .gacha-card__front {
  animation: gachaPrizeSpotlight 0.55s ease-out 0.6s, gachaBorderFlash-gold 0.8s ease-out 0.3s;
}
.gacha-card--epic.is-flipped .gacha-card__front {
  animation: gachaPrizeSpotlight 0.55s ease-out 0.6s, gachaBorderFlash-purple 0.8s ease-out 0.3s;
}

/* ----------------------------------------------------------------
   Tap hint
   ---------------------------------------------------------------- */
.gacha-card.gacha-hint-pulse {
  animation: gachaCardHintPulse 1.4s ease-in-out infinite;
}

/* ----------------------------------------------------------------
   @keyframes
   ---------------------------------------------------------------- */

@keyframes gachaLightBurst {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gachaCenterPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes gachaCardLand {
  0% {
    opacity: 0;
    transform: translateY(-80px) scale(0.85) rotateX(-15deg);
    filter: brightness(2);
  }
  50% {
    opacity: 1;
    filter: brightness(1.3);
  }
  75% {
    transform: translateY(5px) scale(1.03) rotateX(1.5deg);
    filter: brightness(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: brightness(1);
  }
}

@keyframes gachaCardHintPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50%      { transform: scale(1.04); filter: brightness(1.15); }
}

@keyframes gachaEdgePulse {
  0%, 100% { filter: brightness(0.9); }
  50%      { filter: brightness(1.25); }
}

@keyframes gachaGlowPulse {
  0%   { opacity: 1.5; }
  30%  { opacity: 0.6; }
  60%  { opacity: 1.1; }
  100% { opacity: 1; }
}

@keyframes gachaParticleBurst {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  60% {
    opacity: 0.4;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes gachaRaySpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes gachaPrizeSpotlight {
  0%   { transform: rotateY(180deg) scale(1); }
  35%  { transform: rotateY(180deg) scale(1.06); }
  100% { transform: rotateY(180deg) scale(1); }
}

@keyframes gachaBorderFlash-gold {
  0%   { border-color: rgba(250, 204, 21, 0.9); box-shadow: inset 0 0 20px rgba(250, 204, 21, 0.3); }
  100% { border-color: rgba(250, 204, 21, 0.4); box-shadow: inset 0 0 0 rgba(250, 204, 21, 0); }
}

@keyframes gachaBorderFlash-purple {
  0%   { border-color: rgba(168, 85, 247, 0.9); box-shadow: inset 0 0 16px rgba(168, 85, 247, 0.25); }
  100% { border-color: rgba(168, 85, 247, 0.35); box-shadow: inset 0 0 0 rgba(168, 85, 247, 0); }
}

@keyframes gachaBackShimmer {
  0%   { background-position: 250% 0; }
  100% { background-position: -100% 0; }
}

/* ================================================================
   10 GLOW COLORS — Style G: edge overflow light
   Light overflows from card edges, border glows, inner glow, pulsing
   ================================================================ */

/* Each color: ONLY a large radial-gradient halo behind the card.
   No drop-shadow (would follow card shape), no colored border, no inset glow.
   The halo is big enough (inset -60%) and intense at center to create
   a clear glowing aura without any rectangular edges.
*/

.gacha-card.gacha-landed .gacha-card__glow {
  opacity: 1;
  inset: -35%;
  border-radius: 50%;
  animation: gachaEdgePulse 2.4s ease-in-out infinite;
  filter: blur(6px);
}

/* ---- glow-gold 金光 ---- */
.gacha-glow-gold .gacha-card__glow { background: radial-gradient(circle at center, rgba(250,204,21,0.95) 0%, rgba(250,204,21,0.55) 25%, rgba(250,204,21,0.2) 50%, transparent 72%); }
.gacha-glow-gold.is-flipped .gacha-card__particles { opacity:1; }
.gacha-glow-gold.is-flipped .gacha-card__particles::before { background:radial-gradient(circle,rgba(250,204,21,0.6) 0%,transparent 70%); animation:gachaParticleBurst 1s ease-out forwards; }

/* ---- glow-red 紅光 ---- */
.gacha-glow-red .gacha-card__glow { background: radial-gradient(circle at center, rgba(239,68,68,0.95) 0%, rgba(239,68,68,0.55) 25%, rgba(239,68,68,0.2) 50%, transparent 72%); }
.gacha-glow-red.is-flipped .gacha-card__particles { opacity:1; }
.gacha-glow-red.is-flipped .gacha-card__particles::before { background:radial-gradient(circle,rgba(239,68,68,0.6) 0%,transparent 70%); animation:gachaParticleBurst 1s ease-out forwards; }

/* ---- glow-purple 紫光 ---- */
.gacha-glow-purple .gacha-card__glow { background: radial-gradient(circle at center, rgba(168,85,247,0.9) 0%, rgba(168,85,247,0.5) 25%, rgba(168,85,247,0.18) 50%, transparent 72%); }
.gacha-glow-purple.is-flipped .gacha-card__particles { opacity:1; }
.gacha-glow-purple.is-flipped .gacha-card__particles::before { background:radial-gradient(circle,rgba(168,85,247,0.5) 0%,transparent 70%); animation:gachaParticleBurst 0.9s ease-out forwards; }

/* ---- glow-blue 藍光 ---- */
.gacha-glow-blue .gacha-card__glow { background: radial-gradient(circle at center, rgba(59,130,246,0.9) 0%, rgba(59,130,246,0.5) 25%, rgba(59,130,246,0.18) 50%, transparent 72%); }

/* ---- glow-white 白光 ---- */
.gacha-glow-white .gacha-card__glow { background: radial-gradient(circle at center, rgba(230,235,255,0.85) 0%, rgba(230,235,255,0.45) 25%, rgba(230,235,255,0.15) 50%, transparent 72%); }

/* ---- glow-pink 粉光 ---- */
.gacha-glow-pink .gacha-card__glow { background: radial-gradient(circle at center, rgba(244,114,182,0.9) 0%, rgba(244,114,182,0.5) 25%, rgba(244,114,182,0.18) 50%, transparent 72%); }

/* ---- glow-orange 橙光 ---- */
.gacha-glow-orange .gacha-card__glow { background: radial-gradient(circle at center, rgba(249,115,22,0.95) 0%, rgba(249,115,22,0.5) 25%, rgba(249,115,22,0.18) 50%, transparent 72%); }
.gacha-glow-orange.is-flipped .gacha-card__particles { opacity:1; }
.gacha-glow-orange.is-flipped .gacha-card__particles::before { background:radial-gradient(circle,rgba(249,115,22,0.5) 0%,transparent 70%); animation:gachaParticleBurst 0.9s ease-out forwards; }

/* ---- glow-cyan 青光 ---- */
.gacha-glow-cyan .gacha-card__glow { background: radial-gradient(circle at center, rgba(20,184,166,0.85) 0%, rgba(20,184,166,0.45) 25%, rgba(20,184,166,0.15) 50%, transparent 72%); }

/* ---- glow-green 綠光 ---- */
.gacha-glow-green .gacha-card__glow { background: radial-gradient(circle at center, rgba(34,197,94,0.9) 0%, rgba(34,197,94,0.5) 25%, rgba(34,197,94,0.18) 50%, transparent 72%); }

/* ---- glow-rainbow 虹光 ---- */
.gacha-glow-rainbow .gacha-card__glow { animation: gachaEdgePulse 2.4s ease-in-out infinite, gachaRainbowHalo 3s linear infinite; }
.gacha-glow-rainbow.is-flipped .gacha-card__particles { opacity:1; }
.gacha-glow-rainbow.is-flipped .gacha-card__particles::before { background:radial-gradient(circle,rgba(255,255,255,0.4) 0%,transparent 60%); animation:gachaParticleBurst 0.8s ease-out forwards; }
@keyframes gachaRainbowHalo {
  0%   { background: radial-gradient(circle at center, rgba(255,50,50,0.9) 0%, rgba(255,50,50,0.45) 25%, rgba(255,50,50,0.15) 50%, transparent 72%); }
  17%  { background: radial-gradient(circle at center, rgba(255,165,0,0.9) 0%, rgba(255,165,0,0.45) 25%, rgba(255,165,0,0.15) 50%, transparent 72%); }
  33%  { background: radial-gradient(circle at center, rgba(250,220,0,0.9) 0%, rgba(250,220,0,0.45) 25%, rgba(250,220,0,0.15) 50%, transparent 72%); }
  50%  { background: radial-gradient(circle at center, rgba(0,210,80,0.9) 0%, rgba(0,210,80,0.45) 25%, rgba(0,210,80,0.15) 50%, transparent 72%); }
  67%  { background: radial-gradient(circle at center, rgba(50,120,255,0.9) 0%, rgba(50,120,255,0.45) 25%, rgba(50,120,255,0.15) 50%, transparent 72%); }
  83%  { background: radial-gradient(circle at center, rgba(170,60,255,0.9) 0%, rgba(170,60,255,0.45) 25%, rgba(170,60,255,0.15) 50%, transparent 72%); }
  100% { background: radial-gradient(circle at center, rgba(255,50,50,0.9) 0%, rgba(255,50,50,0.45) 25%, rgba(255,50,50,0.15) 50%, transparent 72%); }
}

/* ----------------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gacha-stage__burst::before,
  .gacha-stage__burst::after { animation: none; opacity: 0.4; }
  .gacha-card { animation: none; opacity: 1; transform: none; filter: none; }
  .gacha-card__flip { transition-duration: 0.01ms; }
  .gacha-card__back::after { animation: none; }
  .gacha-card.is-flipped .gacha-card__front { animation: none; }
  .gacha-card.is-flipped .gacha-card__glow { animation: none; }
  .gacha-card.is-flipped .gacha-card__rays::before { animation: none; }
  .gacha-card__particles::before,
  .gacha-card__particles::after { animation: none; }
  .gacha-card.gacha-hint-pulse { animation: none; }
}

/* ====================================================================
   POLISH OVERRIDES — 2026-04 edge-neon MAX+
   These overrides make real customer item.js reveal match the admin
   preview / test-gacha-all.html exactly. Placed AFTER all upstream
   rules so the CSS cascade wins without !important where possible.
   ==================================================================== */

/* 1. Strip brightness flash from landing — was brightness(2→1.3→1) */
@keyframes gachaCardLand {
  0%   { opacity: 0; transform: translateY(-80px) scale(0.85) rotateX(-15deg); }
  50%  { opacity: 1; }
  75%  { transform: translateY(5px) scale(1.03) rotateX(1.5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

/* 2. flipBurst on reveal (brightness + scale pulse) */
.gacha-card.is-flipped .gacha-card__front { animation: flipBurst 0.9s ease-out both; }
@keyframes flipBurst {
  0%   { filter: brightness(1) saturate(1);    transform: scale(0.96); }
  25%  { filter: brightness(1.8) saturate(1.35); transform: scale(1.06); }
  60%  { filter: brightness(1.25) saturate(1.15); transform: scale(1.02); }
  100% { filter: brightness(1) saturate(1);    transform: scale(1); }
}

/* 3. Map existing .gacha-glow-* classes to --glow CSS variable so the
      MAX edge-neon box-shadow below can consume it. */
.gacha-glow-gold    { --glow: rgba(250,204,21,0.95); }
.gacha-glow-red     { --glow: rgba(239,68,68,0.95); }
.gacha-glow-purple  { --glow: rgba(168,85,247,0.9); }
.gacha-glow-blue    { --glow: rgba(59,130,246,0.9); }
.gacha-glow-white   { --glow: rgba(230,235,255,0.85); }
.gacha-glow-pink    { --glow: rgba(244,114,182,0.9); }
.gacha-glow-orange  { --glow: rgba(249,115,22,0.95); }
.gacha-glow-cyan    { --glow: rgba(20,184,166,0.85); }
.gacha-glow-green   { --glow: rgba(34,197,94,0.9); }
.gacha-glow-rainbow { --glow: rgba(168,85,247,0.9); }

/* 4. MAX edge neon + cardEdgePulse (must override upstream gachaEdgePulse
      + 425-line filter:brightness(1.4) + 419 hover filter). */
.gacha-card .gacha-card__back,
.gacha-card.is-flipped .gacha-card__front {
  box-shadow:
    0 0 80px 0 var(--glow, rgba(250,204,21,1)) inset,
    0 0 40px 2px var(--glow, rgba(250,204,21,1)) inset,
    0 0 18px 0 var(--glow, rgba(255,255,255,0.9)) inset,
    0 0 0 3px var(--glow, rgba(250,204,21,1)),
    0 0 20px 2px var(--glow, rgba(250,204,21,1)),
    0 12px 28px rgba(0,0,0,0.5) !important;
  animation: cardEdgePulse 1.6s ease-in-out infinite !important;
}
.gacha-card.gacha-landed.is-flipped .gacha-card__back { filter: none !important; }

@keyframes cardEdgePulse {
  0%, 100% {
    filter: saturate(1.3) brightness(1.1)
      drop-shadow(0 0 14px var(--glow, rgba(250,204,21,0.85)))
      drop-shadow(0 0 26px var(--glow, rgba(250,204,21,0.55)));
  }
  50% {
    filter: saturate(1.55) brightness(1.3)
      drop-shadow(0 0 20px var(--glow, rgba(250,204,21,1)))
      drop-shadow(0 0 40px var(--glow, rgba(250,204,21,0.75)));
  }
}

/* 5. Kill upstream ::after shimmer + default navy gradient + 1.5px white
      border so the cardBack image shows pure edge-to-edge. */
.gacha-card__back::after { display: none !important; }
.gacha-card__back { border: 0 !important; background: transparent !important; }
.gacha-card__front { border: 0 !important; }

/* 6. Arena overflow visible so the big drop-shadow glow doesn't clip at
      the scroll container's edge. */
.gacha-card-arena { overflow: visible !important; max-height: none !important; }

/* 7. 嚴禁外圓 halo / 橢圓光罩 — item.js 會渲染 __glow / __rays / __particles
      三個效果 div，但 .gacha-card__glow 是 border-radius:50% + inset:-35% 的 radial-gradient，
      會在卡外形成明顯橢圓光圈（跟 test-gacha-all 不一致，違反 SKILL:
      「光要從卡邊本身發出，不要做卡外大光罩」）。全部 hide，純 edge-neon。*/
.gacha-card__glow,
.gacha-card__rays,
.gacha-card__particles { display: none !important; }
/* Profile personal center — recovered from commit 3ecd478 (latest complete version) */
/* Includes avatar cropper modal added in feat(profile): avatar upload circle cropper */
/* See AGENTS.md RULE 2: never write to built output files. */

.profile-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.profile-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(255, 205, 125, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(24, 26, 44, 0.66) 0%, rgba(10, 12, 26, 0.82) 100%);
  border: 1px solid rgba(255, 215, 150, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.12), 0 18px 42px rgba(2, 8, 18, 0.28);
}
.profile-hero__avatar {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0f1e;
}
.profile-hero__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-hero__avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f3d48c 0%, #a96e20 50%, #f3d48c 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.profile-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(255, 232, 198, 0.7);
  margin: 0;
  text-transform: uppercase;
}
.profile-hero__title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  color: #f8fafc;
  letter-spacing: 0.02em;
}
.profile-hero__account {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
}
.profile-hero__account span {
  color: #ffe5a8;
  font-weight: 700;
}

.profile-login-gate {
  padding: 48px 24px;
  text-align: center;
  border-radius: 18px;
  background: rgba(24, 26, 44, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.profile-login-gate.is-hidden,
.profile-form.is-hidden { display: none; }

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-card {
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(18, 20, 36, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-card__head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #f8fafc;
}
.profile-card__hint {
  margin: 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Optional inline icon for section heads that want a visual (e.g. the
 * shield on 安全設定). Follows the ai-image-integration SKILL: the
 * container is transparent / border:none / overflow:visible so the
 * alpha edge never reveals a container disc or ring. Glow comes from
 * filter: drop-shadow, never from background:. */
.profile-card__head--with-icon {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-card__head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-card__icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: block;
  background: transparent;
  border: none;
  overflow: visible;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(250, 204, 21, 0.25));
}

.profile-nickname-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.profile-nickname-row input {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(10, 12, 24, 0.5);
  color: #f8fafc;
  font-size: 14px;
  letter-spacing: 0.02em;
  min-height: 42px;
}
.profile-nickname-row input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

/* Avatar grid is now two packs (luxe + pixel). Each pack gets its own
   heading and its own row of circular tiles; the container stacks them. */
.profile-avatar-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-avatar-pack-heading {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 232, 198, 0.72);
  font-weight: 700;
}
.profile-avatar-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
}
.profile-avatar-choice {
  appearance: none;
  border: 2px solid rgba(148, 163, 184, 0.2);
  background: rgba(10, 12, 24, 0.5);
  padding: 4px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
/* Pixel-pack tiles: nearest-neighbour so the 8-bit sprites stay crisp
   at small sizes instead of turning into a smudge. */
.profile-avatar-choice[data-pack="pixel"] img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.profile-avatar-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 150, 0.45);
}
.profile-avatar-choice.is-active {
  border-color: #e6bb66;
  box-shadow: 0 0 0 2px rgba(230, 187, 102, 0.35), 0 8px 18px rgba(230, 187, 102, 0.22);
}

.profile-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.profile-upload-status {
  color: rgba(203, 213, 225, 0.72);
  font-size: 12.5px;
}

.form-message[data-tone="error"]   { color: #fca5a5; }
.form-message[data-tone="success"] { color: #86efac; }
.form-message[data-tone="warn"]    { color: #fcd34d; }
.form-message[data-tone="pending"] { color: rgba(226, 232, 240, 0.7); }

@media (max-width: 560px) {
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .profile-hero__avatar { width: 96px; height: 96px; }
  .profile-nickname-row { flex-direction: column; }
  .profile-avatar-grid { grid-template-columns: repeat(4, 1fr); }
}

/* v55hc: footer cosmic upgrade — 從 slate-grey 換 cosmic glassmorphism
 * + green-cyan title 一致全站 visual language。每頁底部用戶 scroll 到
 * 必看，提升 brand 信任感。 */
.footer-legal-shell {
  max-width: min(var(--layout-max-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 28px 22px;
  border-radius: 24px;
  border: 1px solid rgba(78, 255, 195, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.06), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0, 255, 136, 0.05), transparent 50%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(8, 14, 27, 0.85));
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.footer-legal-title {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  background: linear-gradient(135deg, #4effc3, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
}

.footer-legal-list {
  display: grid;
  gap: 10px;
}

.footer-legal-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.footer-legal-line {
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
}

.footer-legal-line--company {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-legal-line-label {
  color: rgba(226, 232, 240, 0.78);
}

.footer-legal-line-value {
  color: #f8fafc;
  font-weight: 600;
}

.footer-legal-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.82);
}

.footer-legal-value {
  color: #f8fafc;
  font-weight: 600;
  word-break: break-word;
}

.footer-legal-link {
  color: inherit;
  text-decoration: none;
}

.footer-legal-link:hover {
  text-decoration: underline;
}

.footer-legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* v55hc: footer-legal-pill cosmic — hover green-cyan accent (action items
 * like 客服信箱 / 退款政策) */
.footer-legal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 27, 0.55);
  color: rgba(226, 232, 240, 0.85);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.footer-legal-pill:hover {
  border-color: rgba(78, 255, 195, 0.4);
  color: #4effc3;
  background: rgba(78, 255, 195, 0.06);
}

.footer-legal-copy {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.66);
  font-size: 13px;
}

.btn {
  text-decoration: none;
  padding: 0 18px;
  border-radius: var(--public-btn-radius);
  border: 1px solid transparent;
  font-weight: var(--public-btn-font-weight);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--button-height);
  line-height: var(--button-height);
  font-size: var(--button-font-size);
  letter-spacing: var(--public-btn-letter-spacing);
  text-transform: var(--public-btn-text-transform);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.btn.primary {
  background: var(--public-btn-primary-bg);
  border-color: var(--public-btn-primary-border);
  color: var(--public-btn-primary-color);
  box-shadow: var(--public-btn-primary-shadow);
}

.btn.ghost {
  border-color: var(--public-btn-ghost-border);
  color: var(--public-btn-ghost-color);
  background: var(--public-btn-ghost-bg);
  box-shadow: var(--public-btn-ghost-shadow);
}

/* v55hd: .btn.danger 變體 — 破壞性動作（刪除/取消上架/回收/移除）視覺
 * 區分自 .btn.ghost (中性 cancel)。紅色 palette + hover 加深，避免用
 * 戶誤觸。比直接寫 inline color 統一管理。 */
.btn.danger {
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: none;
}
.btn.danger:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fff;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.32), rgba(220, 38, 38, 0.4));
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.32);
}
.btn.danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
}

/* v55hd: .btn.success 變體 — 重要正向動作（確認儲值/送出訂單已升級用
 * primary，但部分 secondary 確認也可用此）。cosmic green + 暗底適合
 * 次要 confirm action 比 primary 顯眼度低一階。 */
.btn.success {
  border-color: rgba(34, 197, 94, 0.32);
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  box-shadow: none;
}
.btn.success:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.55);
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.32), rgba(22, 163, 74, 0.4));
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.32);
}
.btn.success:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: none;
  box-shadow:
    var(--public-btn-primary-shadow),
    0 0 0 4px var(--public-btn-focus-ring);
}

.btn.ghost:focus-visible {
  box-shadow:
    var(--public-btn-ghost-shadow),
    0 0 0 4px var(--public-btn-focus-ring);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.btn-compact {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--public-btn-compact-radius);
}

.admin-simple .btn-compact {
  padding: 0 16px;
  font-size: var(--button-font-size);
  border-radius: 10px;
  line-height: var(--button-height);
  height: var(--button-height);
}

.admin-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
}

.admin-form textarea {
  resize: vertical;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.4;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: center;
}

.ui-form {
  max-width: 860px;
}

.ui-form__section {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ui-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.ui-form__field-wide {
  grid-column: 1 / -1;
}

.ui-form__stack {
  display: grid;
  gap: 14px;
}

.ui-form__checkbox {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ui-form__checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.audio-upload-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(130% 140% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 58%),
    rgba(15, 23, 42, 0.48);
}

.audio-upload-row__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.audio-upload-row__head strong {
  display: block;
  color: #f8fafc;
  font-size: 15px;
}

.audio-upload-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.audio-upload-row__actions .btn {
  justify-content: center;
  min-width: 92px;
}

@media (max-width: 720px) {
  .footer {
    padding: 24px 16px 48px;
  }

  .footer-legal-shell {
    padding: 20px;
    border-radius: 18px;
  }

  .footer-legal-grid,
  .ui-form__grid {
    grid-template-columns: 1fr;
  }

  .audio-upload-row__head {
    flex-direction: column;
  }

  .audio-upload-row__actions {
    justify-content: stretch;
  }

  .audio-upload-row__actions .btn {
    width: 100%;
  }

  .ui-form__field-wide {
    grid-column: auto;
  }
}

.is-hidden {
  display: none;
}

.form-actions {
  display: flex;
  gap: 10px;
}

/* v55gy: premium toast pattern — empty stays hidden, has-content 自動
 * 變 banner with icon + tone-aware tint。整站一致的訊息呈現語言。
 *
 * Backward compat:
 *   - .form-message (default) = info tone (cosmic green-cyan)
 *   - .form-message[data-tone="error"] OR .is-error = red
 *   - .form-message[data-tone="success"] = green
 *   - .form-message[data-tone="warn"] = amber
 *   - .form-message[data-tone="pending"] = muted grey
 *   - .form-message:empty = display:none (legacy 邊界情境保留)
 */
.form-message {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--accent-2);
}

.form-message:empty {
  display: none;
}

.form-message:not(:empty) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 255, 136, 0.1),
    rgba(56, 189, 248, 0.06)
  );
  border: 1px solid rgba(78, 255, 195, 0.32);
  color: #4effc3;
  animation: formMessageIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Icon dot — flexible svg mask 不夠安全（CSP 對 mask 有時嚴格），改用
 * unicode emoji，CSS 控制大小一致 */
.form-message:not(:empty)::before {
  content: "ⓘ";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  border-radius: 50%;
  background: rgba(78, 255, 195, 0.18);
  color: currentColor;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Symbol",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
}

/* Error tone — red palette */
.form-message[data-tone="error"]:not(:empty),
.form-message.is-error:not(:empty) {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.1),
    rgba(239, 68, 68, 0.04)
  );
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}
.form-message[data-tone="error"]:not(:empty)::before,
.form-message.is-error:not(:empty)::before {
  content: "✕";
  background: rgba(239, 68, 68, 0.18);
}

/* Success tone */
.form-message[data-tone="success"]:not(:empty) {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.12),
    rgba(34, 197, 94, 0.04)
  );
  border-color: rgba(34, 197, 94, 0.32);
  color: #86efac;
}
.form-message[data-tone="success"]:not(:empty)::before {
  content: "✓";
  background: rgba(34, 197, 94, 0.18);
}

/* Warn tone — amber */
.form-message[data-tone="warn"]:not(:empty) {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.12),
    rgba(245, 158, 11, 0.04)
  );
  border-color: rgba(245, 158, 11, 0.32);
  color: #fcd34d;
}
.form-message[data-tone="warn"]:not(:empty)::before {
  content: "!";
  background: rgba(245, 158, 11, 0.18);
}

/* Pending — neutral muted */
.form-message[data-tone="pending"]:not(:empty) {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.78);
}
.form-message[data-tone="pending"]:not(:empty)::before {
  content: "…";
  background: rgba(148, 163, 184, 0.18);
}

@keyframes formMessageIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-list {
  display: grid;
  gap: var(--card-gap);
  position: relative;
  z-index: 1;
}

.admin-title-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.admin-id {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.admin-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 16px;
}

.admin-thumb {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-info h3 {
  margin: 0;
  font-size: 18px;
}

.admin-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.status-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-pill.active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
}

.status-pill.draft {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.38);
}

.status-pill.inactive {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.admin-stat.admin-weight-inline {
  grid-column: 1 / -1;
}

.admin-weight {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.admin-weight-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.admin-weight-summary::-webkit-details-marker {
  display: none;
}

.admin-weight-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.admin-weight-body {
  display: none;
  margin-top: 10px;
  gap: 6px;
}

.admin-weight.is-open .admin-weight-body,
.admin-weight[open] .admin-weight-body {
  display: grid;
}

.admin-weight-row input {
  flex: 1;
  min-width: 0;
}

.admin-weight-inline .admin-weight-row input {
  padding: 8px 10px;
}

.admin-weight-inline .admin-weight-hint {
  display: none;
}

.admin-weight-hint,
.admin-weight-msg {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.admin-weight-msg.is-error {
  color: rgba(248, 113, 113, 0.95);
}

.admin-weight-msg.is-ok {
  color: rgba(52, 211, 153, 0.95);
}

.admin-stat {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}

.admin-stat .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-layout-page="admin-list"] .admin-main {
  overflow-x: hidden;
}

body[data-layout-page="admin-list"] .admin-main > .section[data-layout-container="main"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 1160px;
  margin: 0 auto;
}

body[data-layout-page="admin-list"] .admin-main > .section[data-layout-container="main"] > .layout-block {
  min-width: 0;
}

body[data-layout-page="admin-list"] .section-head {
  align-items: flex-start;
  gap: 18px;
}

body[data-layout-page="admin-list"] .form-actions[data-layout-block="actions"],
body[data-layout-page="admin-list"] .admin-user-toolbar,
body[data-layout-page="admin-list"] .admin-category-tabs {
  margin: 0;
}

body[data-layout-page="admin-list"] .admin-category-tabs {
  padding: 12px;
  border: 1px solid rgba(102, 124, 164, 0.18);
  border-radius: 16px;
  background: rgba(8, 13, 26, 0.54);
}

.admin-product-results-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(102, 124, 164, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(8, 13, 26, 0.88)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.26);
  min-width: 0;
}

.admin-product-results-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid rgba(102, 124, 164, 0.18);
}

.admin-product-results-panel__title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-product-results-panel__title span {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-product-results-panel__title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  text-wrap: balance;
}

.admin-product-results-panel__summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.12);
  color: rgba(186, 230, 253, 0.94);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-product-results-panel .admin-list {
  gap: 12px;
}

.admin-product-results-panel .admin-item {
  grid-template-columns: 96px minmax(0, 1fr) auto;
  background: rgba(8, 13, 26, 0.72);
  border-color: rgba(102, 124, 164, 0.2);
  border-radius: 14px;
  content-visibility: auto;
  contain-intrinsic-size: 130px;
}

.admin-product-results-panel .admin-info,
.admin-product-results-panel .admin-title-block {
  min-width: 0;
}

.admin-product-results-panel .admin-title-row {
  align-items: flex-start;
}

.admin-product-results-panel .admin-info h3 {
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-product-results-panel .admin-stats {
  grid-template-columns: repeat(4, minmax(86px, 1fr));
}

.admin-product-results-panel .admin-stat {
  min-width: 0;
}

.admin-product-results-panel .admin-stat strong {
  display: block;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.admin-product-results-panel__message {
  min-height: 22px;
  padding: 0 2px;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.admin-pagination__button,
.admin-pagination__gap {
  min-width: 44px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.admin-pagination__button {
  border: 1px solid rgba(102, 124, 164, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.admin-pagination__button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 145, 178, 0.16);
  color: #f2faff;
}

.admin-pagination__button:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.72);
  outline-offset: 2px;
}

.admin-pagination__button.is-current {
  border-color: rgba(45, 212, 191, 0.6);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(45, 212, 191, 0.22));
  color: #f8fafc;
}

.admin-pagination__button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.admin-pagination__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.82);
}

@media (max-width: 768px) {
  body[data-layout-page="admin-list"] .admin-main {
    padding-inline: 16px;
  }

  body[data-layout-page="admin-list"] .admin-sidebar:has(.sidebar-shell) {
    max-height: 320px;
    overflow: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid rgba(102, 124, 164, 0.22);
  }

  body[data-layout-page="admin-list"] .form-actions[data-layout-block="actions"] {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-list"] .admin-user-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel {
    padding: 12px;
    border-radius: 16px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel__head {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel__summary {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    contain-intrinsic-size: 360px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-thumb {
    width: 88px;
    height: 88px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 160px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-actions .btn {
    min-height: 40px;
    padding-inline: 14px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-info {
    grid-column: 1 / -1;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-title-row {
    padding-right: 0;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-title-block {
    flex-wrap: wrap;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-info h3 {
    font-size: 17px;
  }

  body[data-layout-page="admin-list"] .admin-product-results-panel .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-list"] .admin-pagination {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-pagination__button {
    transition: none;
  }
}

.assignment-list {
  display: grid;
  gap: 10px;
}

.assignment-item {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
}

.assignment-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assignment-order {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
}

.preview-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-table thead th {
  background: rgba(15, 23, 42, 0.85);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table th,
.admin-table td {
  padding: var(--table-padding-y) var(--table-padding-x);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-table.resizable {
  table-layout: fixed;
}

.admin-table.resizable th,
.admin-table.resizable td {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table tbody tr {
  background: rgba(15, 23, 42, 0.38);
  transition: background 0.2s ease;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.25);
}

.admin-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.12);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.input-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
  font-size: 13px;
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge.ok {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--accent-2);
}

.badge.warn {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.35);
  color: rgba(253, 186, 116, 0.95);
}

.badge.muted {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--muted);
}

.admin-table td.table-warn {
  color: rgba(253, 186, 116, 0.95);
  font-weight: 700;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.row-text strong {
  display: block;
}

.row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
}

/* v55hb: .input-inline cosmic upgrade — 100+ instance 受惠
 * (search / filter / login form / recharge picker / admin form 等)。
 * focus / hover 用 cosmic green-cyan accent，<select> 自訂 SVG 箭頭
 * 取代醜陋瀏覽器預設。 */
.input-inline {
  width: 100%;
  min-width: 140px;
  background: rgba(8, 14, 27, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  color: var(--ink, #f8fafc);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.input-inline::placeholder {
  color: rgba(153, 174, 202, 0.65);
}
.input-inline:hover:not(:disabled):not([readonly]) {
  border-color: rgba(255, 255, 255, 0.18);
}
.input-inline:focus,
.input-inline:focus-visible {
  outline: none;
  border-color: rgba(78, 255, 195, 0.55);
  box-shadow: 0 0 0 3px rgba(78, 255, 195, 0.12);
  background: rgba(8, 14, 27, 0.75);
}
.input-inline:disabled,
.input-inline[readonly] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* <select.input-inline> — 自訂 cosmic 箭頭取代瀏覽器預設 */
select.input-inline {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234effc3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}
select.input-inline option {
  background: #0f172a;
  color: var(--ink, #f8fafc);
}

.input-inline.compact {
  min-width: 90px;
  max-width: 120px;
}

.video-thumb {
  width: 160px;
  height: 90px;
  background: #000;
  border-radius: 10px;
}

.level-thumb-cell {
  vertical-align: middle;
}

.level-thumb-link {
  display: inline-flex;
  align-items: center;
}

.level-thumb {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  width: 42px;
  height: 22px;
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  border: 1px solid var(--border);
}

.switch .slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: rgba(56, 189, 248, 0.55);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.switch-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.image-preview {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(12, 16, 30, 0.6);
  padding: 8px;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-preview.is-visible {
  display: flex;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.image-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 44px;
}

.image-upload-row .btn {
  white-space: nowrap;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.tag-option input {
  accent-color: var(--accent);
}

.tag-option .chip-label-wrap {
  min-width: 0;
}

.tag-option .chip-icon {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.88rem;
}

.tag-option.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tag-empty {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-pool-manage"] .admin-form {
  max-width: 1240px;
  width: 100%;
  align-items: start;
}

/* Use a 2-column grid only when not in free-canvas layout mode. */
body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 14px;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) > * {
  grid-column: 1 / -1;
  min-width: 0;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="name"] {
  grid-column: 1 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"] {
  grid-column: 7 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"] {
  grid-column: 10 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"] {
  grid-column: 1 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
  grid-column: 4 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="image"] {
  grid-column: 1 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="video"] {
  grid-column: 7 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #inventoryMetaSection {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierList {
  grid-column: 1 / span 8;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
  grid-column: 9 / -1;
  align-self: start;
  position: sticky;
  top: 20px;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) .form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="name"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="tags"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="image"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="video"] {
    grid-column: 1 / -1;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
    grid-column: span 3;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierList,
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
    grid-column: 1 / -1;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
    position: static;
  }
}

@media (max-width: 768px) {
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
    grid-column: 1 / -1;
  }
}

body[data-layout-page="admin-manage"] .admin-form {
  max-width: 980px;
  width: 100%;
  align-items: start;
}

body[data-layout-page="admin-manage"] [data-layout-container="main"].layout-canvas[data-layout-free="true"] {
  overflow: auto;
  min-width: 100%;
}

body[data-layout-page="admin-manage"] .admin-form.layout-canvas[data-layout-free="true"] {
  max-width: none;
  overflow: auto;
  min-width: 100%;
}

.footer-legal-pages {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-legal-pages-title {
  margin: 0;
  color: rgba(226, 232, 240, 0.76);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-legal-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-legal-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.16);
  background: rgba(248, 250, 252, 0.06);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.footer-legal-page-link:hover,
.footer-legal-page-link:focus-visible {
  border-color: rgba(211, 233, 122, 0.46);
  background: rgba(211, 233, 122, 0.14);
  transform: translateY(-1px);
}

.footer-legal-page-link.is-active {
  border-color: rgba(211, 233, 122, 0.56);
  background: rgba(211, 233, 122, 0.2);
}

body.frontend-theme-default:has(.page.legal-page--demo-v3) {
  background-color: #0a0a1a;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(0, 255, 136, 0.03), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(0, 212, 255, 0.03), transparent 24%),
    radial-gradient(circle at 0% 60%, rgba(107, 33, 168, 0.04), transparent 20%),
    linear-gradient(180deg, #0a0a1a 0%, #0c0c1d 52%, #090915 100%);
}

body.frontend-theme-default .page.legal-page--demo-v3 {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 84px 32px 72px;
  display: grid;
  gap: 24px;
}

body.frontend-theme-default .page.legal-page--demo-v3 > * {
  width: 100%;
}

body.frontend-theme-default .legal-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background: rgba(24, 26, 44, 0.58);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.frontend-theme-default .legal-card--hero {
  padding: 30px 32px;
}

body.frontend-theme-default .legal-card--document {
  padding: 28px 32px;
}

.legal-page-head {
  display: grid;
  gap: 10px;
}

.legal-page-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.company-disclosure-list {
  display: grid;
  gap: 14px;
}

.company-disclosure-item {
  margin: 0;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.7;
}

.company-disclosure-item--emphasis {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.legal-richtext {
  margin: 0;
  color: rgba(248, 250, 252, 0.92);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  body.frontend-theme-default .page.legal-page--demo-v3 {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default .page.legal-page--demo-v3 {
    padding: 80px 16px 56px;
    gap: 20px;
  }

  body.frontend-theme-default .legal-card--hero,
  body.frontend-theme-default .legal-card--document {
    padding: 22px 20px;
  }

  .footer-legal-page-links {
    gap: 8px;
  }

  .footer-legal-page-link {
    width: 100%;
  }

  .legal-richtext {
    font-size: 14px;
    line-height: 1.85;
  }
}
.column-dragger {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 6px;
  cursor: grab;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-table.resizable th:hover .column-dragger,
.admin-table.resizable th:focus-within .column-dragger {
  opacity: 1;
  pointer-events: auto;
}

.column-dragger:active {
  cursor: grabbing;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
}

.admin-table.resizable th:hover .column-resizer {
  background: rgba(248, 250, 252, 0.2);
}

.table-row {
  cursor: pointer;
}

.table-row.active {
  background: rgba(249, 115, 22, 0.15);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.integrity-job-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  flex-wrap: wrap;
}

.integrity-job-metrics {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}

.integrity-job-bar strong {
  font-weight: 700;
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast-title {
  font-size: 13px;
  font-weight: 800;
}

.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.toast-close:hover {
  color: rgba(226, 232, 240, 0.9);
}

.toast-body {
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
  line-height: 1.35;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
}

@media (max-width: 640px) {
  .toast-host {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* v55ga: 全站 modal 升級 cosmic 風格（同 v55fj ship-request modal 設計語言）。
 * 內部 .modal-head / .modal-message / form 結構不動，只升級外殼跟動畫。
 * 影響範圍：listToMarketModal / sellToBuyOrderModal / sellBestModal /
 * inventoryBulkResultModal / 任何其他用 .modal .modal-card pattern 的 modal。
 *
 * c169r 2026-05-01 FOUC fix：之前 `.modal { display: grid; animation: modal-backdrop-fade }`
 * 讓所有 modal 在 page load 時 auto-run 0→1 的 opacity 動畫一次，user 看
 * 到「上傳到市集」「抽獎結果」等 35 個 modal 閃過才被 .smooth-modal 的
 * opacity:0 蓋掉。
 *
 * 修法：modal 預設 display: none。.is-visible class 才切到 grid + 跑進場
 * 動畫。modal-card 進場動畫也跟著挪到 .is-visible 子層。這樣 page load 時
 * 完全不 layout、不跑動畫 → 0 FOUC。
 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 20;
}

.modal.is-visible {
  display: grid;
  animation: modal-backdrop-fade 220ms ease-out;
}

@keyframes modal-backdrop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.is-hidden {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(28, 28, 50, 0.98), rgba(18, 19, 35, 0.99));
  border-radius: 22px;
  border: 1px solid rgba(78, 255, 195, 0.18);
  padding: 24px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  overscroll-behavior: contain;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.modal.is-visible .modal-card {
  animation: modal-card-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-card-in {
  from {
    transform: translateY(24px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Wide variant for bulk result table etc */
.modal-card.modal-wide {
  width: min(880px, 100%);
}

/* Mobile: bottom-sheet pattern matching ship-request modal */
@media (max-width: 560px) {
  .modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-card {
    width: 100%;
    max-height: 95vh;
    border-radius: 22px 22px 0 0;
  }
  .modal.is-visible .modal-card {
    animation: modal-card-in-mobile 280ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes modal-card-in-mobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

.smooth-modal {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.smooth-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.smooth-modal.is-reveal-in {
  animation: modal-reveal-fade var(--reveal-fade-ms, 260ms) ease-out;
}

@keyframes modal-reveal-fade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.draw-confirm-card {
  width: min(420px, 100%);
}

.auto-draw-config-card {
  width: min(560px, 100%);
}

.auto-draw-kv {
  display: grid;
  gap: 10px;
}

.auto-draw-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.52);
  color: var(--muted);
  font-size: 13px;
}

.auto-draw-kv-row strong {
  color: var(--ink);
}

.auto-draw-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.auto-draw-field select {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
  padding: 10px 12px;
}

.auto-draw-field input {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
  padding: 10px 12px;
}

.auto-flip-targets {
  display: grid;
  gap: 8px;
  max-height: min(32vh, 280px);
  overflow: auto;
}

.auto-flip-targets .check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.auto-flip-config-card {
  --af-bg: #060b17;
  --af-panel: #0f172a;
  --af-panel-2: #111c36;
  --af-neon: #22d3ee;
  --af-neon-2: #a78bfa;
  --af-ok: #34d399;
  --af-warn: #f59e0b;
  --af-muted: rgba(148, 163, 184, 0.92);
  --af-border: rgba(34, 211, 238, 0.34);
  position: relative;
  width: min(740px, 96vw);
  border-radius: 20px;
  padding: 18px;
  gap: 14px;
  border: 1px solid var(--af-border);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(167, 139, 250, 0.2), transparent 55%),
    radial-gradient(110% 100% at 0% 100%, rgba(34, 211, 238, 0.17), transparent 52%),
    linear-gradient(180deg, var(--af-panel), var(--af-bg));
  box-shadow:
    0 22px 50px rgba(2, 6, 23, 0.5),
    inset 0 0 0 1px rgba(34, 211, 238, 0.12);
  overflow: hidden;
}

.auto-flip-config-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(167, 139, 250, 0.2);
  pointer-events: none;
}

.auto-flip-head h3 {
  margin: 0;
  font-size: 18px;
  color: rgba(240, 249, 255, 0.98);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.2);
  letter-spacing: -0.01em;
}

.auto-flip-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-kpi-grid .auto-draw-kv-row {
  position: relative;
  display: grid;
  justify-content: flex-start;
  align-content: center;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: linear-gradient(180deg, rgba(17, 28, 54, 0.86), rgba(10, 17, 33, 0.92));
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
  overflow: hidden;
}

.auto-flip-kpi-grid .auto-draw-kv-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(34, 211, 238, 0.15) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.auto-flip-kpi-grid .auto-draw-kv-row:hover::after {
  transform: translateX(120%);
}

.auto-flip-kpi-grid .auto-draw-kv-row span {
  font-size: 12px;
  color: var(--af-muted);
}

.auto-flip-kpi-grid .auto-draw-kv-row strong {
  font-size: 18px;
  line-height: 1.1;
  color: rgba(236, 254, 255, 0.96);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.18);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.auto-flip-mode-group,
.auto-flip-order-group {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(8, 14, 28, 0.72);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auto-flip-mode-group legend,
.auto-flip-order-group legend {
  color: var(--af-muted);
  padding: 0 4px;
  font-size: 12px;
}

.auto-flip-mode-group .check-pill,
.auto-flip-order-group .check-pill {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(9, 15, 29, 0.7));
  padding: 10px 12px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auto-flip-mode-group .check-pill input:checked + span,
.auto-flip-order-group .check-pill input:checked + span {
  color: rgba(236, 254, 255, 0.98);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.16);
}

.auto-flip-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-settings-grid .auto-draw-field {
  margin: 0;
}

.auto-flip-settings-grid .auto-draw-field > span,
.auto-flip-settings-grid .auto-draw-field {
  color: var(--af-muted);
}

.auto-flip-settings-grid input {
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(180deg, rgba(12, 21, 41, 0.9), rgba(7, 12, 23, 0.95));
}

.auto-flip-settings-grid .auto-draw-field.is-disabled {
  opacity: 0.58;
}

.auto-flip-settings-grid .auto-draw-field.is-disabled input {
  pointer-events: none;
}

.auto-flip-estimate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-estimate-grid .auto-draw-kv-row {
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(180deg, rgba(12, 21, 41, 0.8), rgba(7, 12, 23, 0.9));
}

.auto-flip-targets-wrap {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(8, 14, 28, 0.72);
}

.auto-flip-targets {
  max-height: min(34vh, 320px);
}

.auto-flip-targets .check-pill {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(9, 15, 29, 0.7));
  padding: 10px 12px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auto-flip-targets .check-pill input:checked + span {
  color: rgba(236, 254, 255, 0.98);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.16);
}

.auto-flip-targets .check-pill:focus-within {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
}

.auto-flip-config-hint {
  margin: 0;
  color: var(--af-muted);
}

.auto-flip-progress {
  margin: 0;
  min-height: 20px;
  color: rgba(186, 230, 253, 0.92);
}

.auto-flip-footer-actions {
  margin: 0;
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 11, 23, 0), rgba(6, 11, 23, 0.95) 46%);
  padding-top: 10px;
}

.auto-flip-config-card.is-invalid .auto-flip-config-hint {
  color: rgba(248, 113, 113, 0.95);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

.auto-flip-result-card {
  width: min(880px, 96vw);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(167, 139, 250, 0.16), transparent 54%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(6, 11, 23, 0.96));
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock {
  position: fixed;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(380px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(167, 139, 250, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(6, 11, 23, 0.95));
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.42);
  padding: 12px;
  display: grid;
  gap: 10px;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.inventory-auto-dock::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(167, 139, 250, 0.16);
  pointer-events: none;
}

.inventory-auto-dock__status {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(236, 254, 255, 0.95);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.14);
}

.inventory-auto-dock__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-auto-dock__actions .btn {
  min-width: 110px;
  border-color: rgba(34, 211, 238, 0.32);
}

.inventory-audio-toggle {
  min-width: 96px !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(244, 114, 182, 0.08)),
    rgba(248, 250, 252, 0.06) !important;
  color: rgba(255, 248, 224, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inventory-audio-toggle[aria-pressed="true"] {
  border-color: rgba(250, 204, 21, 0.58) !important;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.12),
    0 10px 20px rgba(234, 179, 8, 0.16);
}

.inventory-audio-toggle:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.inventory-auto-dock .btn.primary {
  background: linear-gradient(120deg, rgba(8, 145, 178, 0.95), rgba(37, 99, 235, 0.95));
  border-color: rgba(34, 211, 238, 0.7);
  color: #ecfeff;
  box-shadow: 0 0 0 rgba(34, 211, 238, 0);
}

.inventory-auto-dock[data-state="ready"] {
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.2),
    0 18px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock[data-state="ready"] .btn.primary {
  animation: afDockPulse 2.2s ease-in-out infinite;
}

.inventory-auto-dock[data-state="mine"] {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.2),
    0 18px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock[data-state="mine"] .btn.primary {
  background: linear-gradient(120deg, rgba(217, 119, 6, 0.95), rgba(234, 179, 8, 0.9));
  border-color: rgba(251, 191, 36, 0.78);
  color: #fff7ed;
}

.inventory-auto-dock[data-state="blocked"] {
  border-color: rgba(148, 163, 184, 0.28);
  filter: saturate(0.8);
}

.inventory-auto-dock[data-state="blocked"] .btn.primary {
  background: rgba(71, 85, 105, 0.75);
  border-color: rgba(148, 163, 184, 0.45);
  color: rgba(226, 232, 240, 0.82);
}

#autoFlipConfigModal.is-visible .auto-flip-config-card {
  animation: afModalRise 0.24s ease-out;
}

@keyframes afModalRise {
  from {
    opacity: 0.65;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes afDockPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18);
  }
}

@media (max-width: 768px) {
  #autoFlipConfigModal {
    align-items: flex-end;
    padding: 0;
  }

  #autoFlipConfigModal .auto-flip-config-card {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .auto-flip-kpi-grid {
    grid-template-columns: 1fr;
  }

  .auto-flip-kpi-grid .auto-draw-kv-row strong {
    font-size: 16px;
  }

  .auto-flip-settings-grid {
    grid-template-columns: 1fr;
  }

  .auto-flip-mode-group,
  .auto-flip-order-group,
  .auto-flip-estimate-grid {
    grid-template-columns: 1fr;
  }

  .inventory-auto-dock {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 10px;
  }
  .inventory-auto-dock__actions {
    justify-content: stretch;
  }
  .inventory-auto-dock__actions .btn {
    width: 100%;
  }

  .auto-flip-footer-actions {
    margin-inline: -12px;
    padding: 10px 12px 0;
  }
}

.auto-flip-targets .check-pill input:focus-visible,
.auto-flip-settings-grid input:focus-visible,
.auto-flip-mode-group .check-pill input:focus-visible,
.auto-flip-order-group .check-pill input:focus-visible,
.auto-flip-config-card .btn:focus-visible,
.inventory-auto-dock .btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.95);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .inventory-auto-dock[data-state="ready"] .btn.primary,
  #autoFlipConfigModal.is-visible .auto-flip-config-card,
  .inventory-result-modal .result-card::after,

  .auto-flip-kpi-grid .auto-draw-kv-row::after {
    transition: none;
  }
}

.auto-draw-round-card {
  width: min(760px, 96vw);
}

.auto-draw-round-card .result-grid {
  max-height: min(48vh, 360px);
  overflow: auto;
}

.auto-draw-round-card .form-hint {
  margin: 0;
}

.auto-draw-result-card {
  width: min(980px, 96vw);
}

.auto-draw-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.auto-result-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.52);
}

.auto-result-item span {
  font-size: 12px;
  color: var(--muted);
}

.auto-result-item strong {
  font-size: 14px;
  color: var(--ink);
}

.auto-draw-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.auto-draw-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.auto-draw-table th,
.auto-draw-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.auto-draw-table th {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.75);
}

.auto-draw-table tfoot th {
  color: var(--ink);
}

.auto-prize-preview-card {
  width: min(760px, 95vw);
}

.auto-prize-preview-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.52);
  min-height: 260px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auto-prize-preview-wrap img {
  width: 100%;
  max-width: min(680px, 90vw);
  max-height: min(72vh, 680px);
  object-fit: contain;
}

@media (max-width: 1080px) {
  .auto-draw-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .auto-draw-result-summary {
    grid-template-columns: 1fr;
  }
}

.draw-confirm-body {
  display: grid;
  gap: 12px;
}

.confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.confirm-row strong {
  color: var(--ink);
  font-size: 16px;
}

.draw-action-card {
  width: min(920px, 96vw);
  gap: 18px;
}

.inventory-result-modal .draw-action-card {
  position: relative;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.26), transparent 48%),
    radial-gradient(90% 80% at 80% 10%, rgba(244, 114, 182, 0.24), transparent 54%),
    radial-gradient(80% 90% at 18% 0%, rgba(56, 189, 248, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.62),
    0 0 48px rgba(250, 204, 21, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform-origin: center top;
}

.inventory-result-modal .draw-action-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.14);
  pointer-events: none;
}

.draw-action-card #drawResultList.result-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  justify-content: center;
  align-content: start;
  gap: 12px;
  max-height: min(52vh, 430px);
  overflow: auto;
  padding-right: 4px;
}

.draw-action-card .result-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.88));
  width: 100%;
  max-width: 220px;
  justify-self: center;
  padding: 10px;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.inventory-result-modal .result-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(250, 204, 21, 0.26);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.22), transparent 46%),
    radial-gradient(80% 70% at 20% 10%, rgba(244, 114, 182, 0.12), transparent 56%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.94));
  box-shadow:
    0 18px 36px rgba(2, 6, 23, 0.46),
    0 0 22px rgba(250, 204, 21, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-origin: center bottom;
}

.inventory-result-modal .result-card::after {
  content: "";
  position: absolute;
  inset: -18%;
  background: linear-gradient(120deg, transparent 34%, rgba(255, 255, 255, 0.22) 50%, transparent 64%);
  transform: translateX(-62%);
  animation: inventoryResultSweep 2.2s ease-in-out infinite;
  pointer-events: none;
}

.inventory-result-modal.is-prize-spotlight .draw-action-card {
  animation: inventoryPrizeCardSpotlight 1.2s ease-out;
}

.inventory-result-modal.is-prize-spotlight .result-card {
  animation: inventoryPrizeCardRise 0.82s cubic-bezier(0.18, 0.8, 0.22, 1);
}

.draw-action-card .result-image {
  aspect-ratio: auto;
  height: 148px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.45);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draw-action-card .result-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.draw-action-card .result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draw-action-card .result-market-btn {
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.1;
  border-radius: 999px;
}

.draw-action-card .result-market-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.draw-action-card .result-info strong {
  font-size: 14px;
  line-height: 1.3;
}

.draw-action-card .result-info span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-top: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.6);
  font-size: 11px;
}

.draw-action-card .result-count {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.4);
  font-size: 11px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.action-buttons .btn {
  justify-content: center;
}

@media (max-width: 760px) {
  .draw-action-card {
    width: min(560px, 96vw);
  }

  .draw-action-card #drawResultList.result-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    max-height: min(48vh, 360px);
  }

  .draw-action-card .result-image {
    height: 128px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }
}

/* v55ga: modal-head — bigger title, accent gradient underline */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(78, 255, 195, 0.12);
  position: relative;
}
.modal-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #00ff88, #38bdf8);
  border-radius: 2px;
}
.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink, #f8fafc);
}

.modal-card.modal-wide {
  width: min(1100px, 96vw);
  padding: 24px;
  gap: 18px;
}

.draw-list-market-card {
  width: min(520px, 94vw);
  gap: 16px;
}

.news-section--fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-inline: var(--news-inline-gutter);
}

.news-section-shell {
  width: min(var(--news-content-max), 100%);
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
}

.page.page--news {
  max-width: none;
  padding-inline: var(--news-inline-gutter);
}

.page.page--news > .section {
  width: min(var(--news-content-max), 100%);
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
}

.home-news-layout,
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 22vw, 420px);
  gap: clamp(14px, 1.8vw, 28px);
  align-items: start;
}

.home-news-main,
.news-layout-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.news-rail {
  display: grid;
  gap: 12px;
  align-self: start;
  justify-self: stretch;
}

.news-rail--sticky,
.home-news-rail {
  position: sticky;
  top: 88px;
}

.news-rail-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.3);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.news-rail-card h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
}

.news-rail-featured {
  display: grid;
  gap: 8px;
}

.news-rail-featured a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-rail-featured a:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.news-rail-featured .meta,
.news-rail-list .meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.news-rail-featured p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 13px;
  line-height: 1.55;
}

.news-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.news-rail-list li {
  margin: 0;
  padding: 0;
}

.news-rail-list li + li {
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.news-rail-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-rail-list a:hover {
  text-decoration: underline;
}

.news-rail-empty {
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
  line-height: 1.5;
}

#insights .home-news-layout {
  grid-template-columns: minmax(0, 1fr);
}

#insights .home-news-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#insights .home-news-secondary .news-rail-card {
  margin: 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.home-news-main .news-grid,
.news-layout-main .news-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.news-card-link {
  display: block;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.news-title {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.78);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.news-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.news-source-link,
.news-readmore {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.86);
  text-decoration: none;
}

.news-source-link:hover,
.news-readmore:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}

.news-article {
  max-width: 820px;
}

.news-layout-main .news-article {
  max-width: none;
}

.news-article-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.news-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.86);
  text-decoration: none;
}

.news-tag:hover {
  border-color: rgba(226, 232, 240, 0.3);
  color: rgba(255, 255, 255, 0.92);
}

.news-tag.is-active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 101, 52, 0.35);
  color: rgba(220, 252, 231, 0.95);
}

.news-article-content {
  margin-top: 18px;
}

.news-article-section + .news-article-section {
  margin-top: 18px;
}

.news-article-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: rgba(241, 245, 249, 0.96);
}

.news-cover {
  margin-top: 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28);
}

.news-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.news-article-lead {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(241, 245, 249, 0.94);
}

.news-article-content p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.9);
}

.news-article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.news-cta-block {
  margin: 8px 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.news-cta-block h3 {
  margin: 0;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.92);
  letter-spacing: 0.02em;
}

.news-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.news-cta-item {
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(14, 116, 144, 0.16);
  color: rgba(226, 232, 240, 0.94);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.news-cta-item strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-cta-item span {
  font-size: 12px;
  font-weight: 700;
  color: #67e8f9;
}

.news-cta-item:hover {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(8, 145, 178, 0.22);
  transform: translateY(-1px);
}

.news-related-list {
  margin: 0;
}

@media (max-width: 960px) {
  .home-conversion-grid {
    grid-template-columns: 1fr;
  }

  .home-conversion-primary .btn {
    width: 100%;
    justify-content: center;
  }

  .home-conversion-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .home-conversion-card-cta {
    grid-column: 2;
    justify-self: start;
  }

  .news-section--fullbleed {
    margin-inline: 0;
    padding-inline: 0;
  }

  .news-section-shell {
    width: 100%;
  }

  #insights .home-news-secondary {
    grid-template-columns: 1fr;
  }

  .page.page--news {
    padding-inline: max(14px, 3.2vw);
  }

  .page.page--news > .section {
    width: 100%;
  }

  .home-news-layout,
  .news-layout {
    grid-template-columns: 1fr;
  }

  .home-news-main .news-grid,
  .news-layout-main .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .news-rail--sticky,
  .home-news-rail {
    position: static;
  }

  .news-cta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-article {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .home-conversion-card {
    padding: 10px;
  }

  .home-conversion-card-thumb {
    width: 52px;
    height: 52px;
  }

  .home-conversion-card-meta strong {
    font-size: 13px;
  }

  .page.page--news {
    padding-inline: 12px;
  }

  .home-news-main .news-grid,
  .news-layout-main .news-grid {
    grid-template-columns: 1fr;
  }

  .news-rail-card {
    padding: 12px;
  }

  .news-rail-list a {
    font-size: 12px;
  }

  .news-title {
    font-size: 15px;
  }

  .news-cta-grid {
    grid-template-columns: 1fr;
  }

  .news-cta-block {
    padding: 12px;
  }

  body[data-layout-page="admin-news"] .admin-news-conv-priority-controls,
  body[data-layout-page="admin-news"] .admin-news-backfill-controls,
  body[data-layout-page="admin-news"] .admin-news-quality-controls {
    align-items: stretch;
  }

  body[data-layout-page="admin-news"] .admin-news-quality-kpis {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-ads"] .admin-main {
  display: grid;
  gap: 20px;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-layout-page="admin-ads"] .admin-ads-kpi .admin-pro-kpi__badge {
  width: auto;
  min-width: 0;
  height: auto;
  padding: 7px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi.is-hero {
  --kpi-accent: linear-gradient(90deg, #7c3aed, #38bdf8);
  --kpi-glow: radial-gradient(circle, rgba(124, 58, 237, 0.24), transparent 70%);
  --kpi-badge-bg: rgba(124, 58, 237, 0.16);
  --kpi-badge-border: rgba(124, 58, 237, 0.34);
  --kpi-badge-color: #ddd6fe;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi.is-links {
  --kpi-accent: linear-gradient(90deg, #06b6d4, #3b82f6);
  --kpi-glow: radial-gradient(circle, rgba(6, 182, 212, 0.24), transparent 70%);
  --kpi-badge-bg: rgba(6, 182, 212, 0.15);
  --kpi-badge-border: rgba(6, 182, 212, 0.32);
  --kpi-badge-color: #a5f3fc;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi.is-fallback {
  --kpi-accent: linear-gradient(90deg, #f59e0b, #ec4899);
  --kpi-glow: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%);
  --kpi-badge-bg: rgba(245, 158, 11, 0.15);
  --kpi-badge-border: rgba(245, 158, 11, 0.34);
  --kpi-badge-color: #fde68a;
}

/* === 首頁主視覺 永久素材 section (catalog slots) === */
body[data-layout-page="admin-ads"] .admin-ads-foundation-section {
  margin-bottom: 24px;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-group {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 18px 20px;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-group__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-group__head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #f8fafc;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-group__head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #94a3b8;
  max-width: 720px;
}

body[data-layout-page="admin-ads"] .admin-ads-foundation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 960px) {
  body[data-layout-page="admin-ads"] .admin-ads-foundation-grid {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.32);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__title {
  margin: 0;
  font-size: 13px;
  color: #f8fafc;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__key {
  margin-top: 2px;
  font-size: 10px;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__state {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__state.is-override {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.32);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__preview {
  position: relative;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(30, 41, 59, 0.85) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30, 41, 59, 0.85) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(30, 41, 59, 0.85) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(30, 41, 59, 0.85) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-color: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__spec strong {
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.4px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__actions .btn {
  font-size: 11px;
  padding: 6px 10px;
  flex: 1;
  min-width: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__msg {
  font-size: 11px;
  min-height: 14px;
  color: #94a3b8;
}
body[data-layout-page="admin-ads"] .admin-ads-slot-card__msg.is-error {
  color: #fca5a5;
}
body[data-layout-page="admin-ads"] .admin-ads-slot-card__msg.is-success {
  color: #86efac;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi.is-featured {
  --kpi-accent: linear-gradient(90deg, #22c55e, #14b8a6);
  --kpi-glow: radial-gradient(circle, rgba(34, 197, 94, 0.24), transparent 70%);
  --kpi-badge-bg: rgba(34, 197, 94, 0.14);
  --kpi-badge-border: rgba(34, 197, 94, 0.32);
  --kpi-badge-color: #bbf7d0;
}

body[data-layout-page="admin-ads"] .admin-ads-kpi.is-overrides {
  --kpi-accent: linear-gradient(90deg, #f59e0b, #fb7185);
  --kpi-glow: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 70%);
  --kpi-badge-bg: rgba(245, 158, 11, 0.14);
  --kpi-badge-border: rgba(245, 158, 11, 0.32);
  --kpi-badge-color: #fde68a;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-layout,
body[data-layout-page="admin-ads"] .admin-ads-featured-layout {
  gap: 20px;
}

body[data-layout-page="admin-ads"] .admin-ads-form,
body[data-layout-page="admin-ads"] .admin-ads-featured-main {
  display: grid;
  gap: 16px;
}

body[data-layout-page="admin-ads"] .admin-ads-form-card,
body[data-layout-page="admin-ads"] .admin-ads-slot-card,
body[data-layout-page="admin-ads"] .admin-ads-library-card,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card {
  border: 1px solid rgba(102, 124, 164, 0.24);
  background: rgba(15, 23, 42, 0.44);
  border-radius: 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-form-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

body[data-layout-page="admin-ads"] .admin-ads-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-layout-page="admin-ads"] .admin-ads-card-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

body[data-layout-page="admin-ads"] .admin-ads-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-form-grid--media {
  align-items: end;
}

body[data-layout-page="admin-ads"] .admin-ads-field-wide {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-ads"] .admin-ads-upload-panel {
  display: grid;
  gap: 8px;
  align-self: stretch;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.5);
  border: 1px dashed rgba(102, 124, 164, 0.26);
}

body[data-layout-page="admin-ads"] .admin-ads-upload-panel .btn {
  justify-self: start;
}

body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 12px 14px;
  border: 1px solid rgba(102, 124, 164, 0.24);
  border-radius: 14px;
  background: rgba(9, 13, 24, 0.66);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions .form-message {
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-state {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-status-head .pool-edit-rail__title {
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-status-card .chip {
  flex-shrink: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-status-card .pool-edit-checks {
  margin-top: 2px;
}

body[data-layout-page="admin-ads"] .admin-ads-editor-state strong {
  font-size: 16px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-editor-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body[data-layout-page="admin-ads"] .admin-ads-preview-panel {
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-ads"] .admin-ads-preview-panel .carousel-preview-shell--list {
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-preview-meta {
  display: grid;
  gap: 4px;
}

body[data-layout-page="admin-ads"] .admin-ads-preview-meta strong {
  font-size: 15px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-preview-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

body[data-layout-page="admin-ads"] .admin-ads-library-grid,
body[data-layout-page="admin-ads"] .admin-ads-featured-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__preview .carousel-preview-shell--list,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__preview .carousel-preview-shell--list {
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__head,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__head h3,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__top h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__head p,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__top p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__meta,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__meta div,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__meta div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.56);
  border: 1px solid rgba(102, 124, 164, 0.18);
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__meta dt,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__meta dt {
  font-size: 11px;
  color: var(--muted);
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__meta dd,
body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__meta a {
  color: #8fdcff;
  text-decoration: none;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__notes {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card__actions {
  align-items: flex-end;
}

body[data-layout-page="admin-ads"] .admin-ads-library-card--empty {
  grid-template-columns: minmax(0, 1fr);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-card__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-toggle {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

body[data-layout-page="admin-ads"] .admin-ads-featured-stats {
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-ads"] .admin-ads-featured-stat {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.56);
  border: 1px solid rgba(102, 124, 164, 0.18);
}

body[data-layout-page="admin-ads"] .admin-ads-featured-stat span {
  font-size: 11px;
  color: var(--muted);
}

body[data-layout-page="admin-ads"] .admin-ads-featured-stat strong {
  font-size: 18px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card--empty {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card--empty h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--ink);
}

body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card--empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  body[data-layout-page="admin-ads"] .admin-ads-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-ads"] .admin-ads-library-grid,
  body[data-layout-page="admin-ads"] .admin-ads-featured-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body[data-layout-page="admin-ads"] .admin-ads-form-grid,
  body[data-layout-page="admin-ads"] .admin-ads-slot-grid,
  body[data-layout-page="admin-ads"] .admin-ads-library-card__meta,
  body[data-layout-page="admin-ads"] .admin-ads-slot-preview-card__meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body[data-layout-page="admin-ads"] .admin-ads-kpi-grid {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-ads"] .admin-ads-kpi .admin-pro-kpi__badge {
    padding: 6px 8px;
    font-size: 11px;
  }

  body[data-layout-page="admin-ads"] .admin-ads-library-card {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-ads"] .admin-ads-library-card__actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions {
    align-items: stretch;
  }

  body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions .pool-edit-actions__left,
  body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions .pool-edit-actions__right {
    width: 100%;
  }

  body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions .pool-edit-actions__right {
    justify-content: stretch;
  }

  body[data-layout-page="admin-ads"] .pool-edit-actions.admin-ads-actions .btn {
    flex: 1 1 auto;
  }
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-status {
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-status.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync .section-head {
  margin-bottom: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncActive {
  font-size: 12px;
  color: #94a3b8;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.4);
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-section {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-head h4 {
  margin: 0;
  font-size: 13px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-list {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-empty {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  padding: 10px;
  display: grid;
  gap: 6px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-id {
  color: #cbd5e1;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-price {
  color: #86efac;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-title {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-link {
  font-size: 12px;
  word-break: break-all;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-link a {
  color: #7dd3fc;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-price strong {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-title strong {
  color: #fb7185;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-invalid-category strong {
  color: #fbbf24;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-subcategory strong {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-extra {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncRunsBody tr[data-run-id] {
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncRunsBody tr.is-selected {
  background: rgba(56, 189, 248, 0.14);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-end-cell {
  display: grid;
  gap: 6px;
  justify-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-publishable strong {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-price strong {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-title strong {
  color: #fb7185;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-invalid-category strong {
  color: #fbbf24;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-subcategory strong {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-publishable {
  border-color: rgba(74, 222, 128, 0.45);
  color: #86efac;
  background: rgba(22, 101, 52, 0.22);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-price {
  border-color: rgba(248, 113, 113, 0.48);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-title {
  border-color: rgba(244, 63, 94, 0.48);
  color: #fecdd3;
  background: rgba(136, 19, 55, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-invalid-category {
  border-color: rgba(251, 191, 36, 0.48);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-subcategory {
  border-color: rgba(251, 146, 60, 0.52);
  color: #fed7aa;
  background: rgba(124, 45, 18, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 980px) {
  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-layout {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-grid {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-crawlers"] .admin-crawler-status {
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}

body[data-layout-page="admin-crawlers"] .admin-crawler-status.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawlers"] .admin-crawlers-actions,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawlers-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-layout-page="admin-crawlers"] .table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
}

body[data-layout-page="admin-crawlers"] .admin-table td,
body[data-layout-page="admin-crawlers"] .admin-table th {
  white-space: nowrap;
}

body[data-layout-page="admin-crawlers"] .admin-table td:first-child {
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-schedule {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.46);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-head {
  width: 100%;
  justify-content: space-between;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-children {
  display: none;
  width: 100%;
  margin-left: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-node.is-expanded .admin-crawler-category-children {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-row-l2 {
  margin-left: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-hint {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects select {
  min-width: 180px;
  height: var(--button-height);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  padding: 4px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-level2-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn.is-active {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn .tag {
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  padding: 1px 6px;
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn .tag-muted {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-check input[type="checkbox"] {
  width: auto;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools input[type="number"] {
  width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-summary {
  margin-top: 10px;
  min-height: 24px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools input,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools select {
  min-width: 140px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card .form-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .form-actions,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .form-message,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .admin-crawler-inline-check,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form label:first-child {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-run-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-run-form > label {
  min-width: 220px;
  margin: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] .table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td,
body[data-layout-page="admin-crawler-tanbaya"] .admin-table th {
  white-space: nowrap;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td:nth-child(2),
body[data-layout-page="admin-crawler-tanbaya"] .admin-table td:nth-child(3) {
  max-width: 300px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td {
  vertical-align: top;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-json {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 12, 24, 0.5);
  padding: 12px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-gallery {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  padding: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions-meta {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message {
  min-height: 18px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-success {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-warning {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  padding: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-image {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.55);
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-empty {
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-image-meta {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-message {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-message.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  width: 84px;
  height: 84px;
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb.is-active {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-json-wrap {
  margin-top: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-json-wrap > summary {
  cursor: pointer;
  color: #e2e8f0;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-section {
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-head-actions {
  justify-content: flex-end;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-sync-table th:last-child,
body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-sync-table td:last-child {
  white-space: nowrap;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-summary-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.4);
  padding: 10px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-success {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-warning {
  color: #fcd34d;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat-wide {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  list-style: none;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > summary::-webkit-details-marker {
  display: none;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible-meta {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > :not(summary) {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible .btn {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-kpi-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -2px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat span {
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat strong {
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar {
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field span {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field select {
  min-width: 180px;
  height: var(--button-height);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  padding: 4px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field-search {
  flex: 1 1 320px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field-search input {
  width: 100%;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-actions .admin-crawler-status {
  min-height: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 12px;
  align-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-empty.is-error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.news-card-media,
.news-rail-featured__media {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.news-card-media {
  aspect-ratio: 16 / 10;
  margin-bottom: 12px;
}

.news-rail-featured__media {
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}

.news-card-media img,
.news-rail-featured__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.news-preview-page {
  min-height: 100vh;
}

.news-preview-shell {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.news-preview-hero {
  margin-bottom: 18px;
  padding: 22px 24px;
}

.news-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.news-preview-head h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
}

.news-preview-head p {
  max-width: 760px;
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 16px;
  line-height: 1.65;
}

.news-preview-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(226, 232, 240, 0.9);
  font-size: 14px;
}

@media (max-width: 900px) {
  .news-preview-shell {
    width: min(100vw - 24px, 100%);
    padding: 20px 0 48px;
  }

  .news-preview-hero {
    padding: 18px;
  }

  .news-preview-head {
    flex-direction: column;
  }

  .news-preview-head h1 {
    font-size: 34px;
  }
}

.page.home-page--demo-v3[data-home-style="abyssal"] :is(.home-mobile-pools, .home-mobile-benefits, .home-mobile-news--lower) {
  display: none;
}

@media (max-width: 820px) {
  body.frontend-theme-default:has(.page.home-page--demo-v3[data-home-style="abyssal"]) {
    overflow-x: clip;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] {
    min-width: 0;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] > * {
    min-width: 0;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-shell {
    gap: 10px;
    min-width: 0;
    overflow: clip;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-shell > * {
    min-width: 0;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-hero-card {
    padding: 12px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-hero-card__banner {
    min-height: 188px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-hero-card__body {
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-featured {
    padding: 12px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] :is(#pool, #steps, #insights) {
    display: grid;
    gap: 0;
    min-width: 0;
    overflow: hidden;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] #pool > :not(.home-mobile-pools),
  .page.home-page--demo-v3[data-home-style="abyssal"] #steps > :not(.home-mobile-benefits),
  .page.home-page--demo-v3[data-home-style="abyssal"] #insights > :not(.home-mobile-news--lower),
  .page.home-page--demo-v3[data-home-style="abyssal"] #faq,
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-cta-shell--abyssal {
    display: none !important;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] :is(.home-mobile-pools, .home-mobile-benefits, .home-mobile-news--lower) {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-section-copy {
    margin: -2px 0 0;
    color: #356b8b;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pools__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(220, 247, 252, 0.2)),
      linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(115, 221, 240, 0.08));
    color: #124b73;
    text-decoration: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.78),
      0 14px 24px rgba(61, 147, 182, 0.1);
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card.is-empty {
    grid-column: 1 / -1;
    min-height: 118px;
    place-content: center;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card.is-empty p {
    margin: 0;
    color: #2f6c8e;
    font-weight: 700;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__media {
    position: relative; /* anchor for sold-out overlay (2026-04-25) */
    min-height: 94px;
    border-radius: 14px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: rgba(91, 191, 219, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  /* 2026-04-25: 已售完印章覆蓋（手機卡片版）。is-sold-out 由 JS 在偵測到
     remaining===0 時掛在 .home-mobile-pool-card 上，順便淡化整張卡。
     overlay 自己帶 border-radius:14px 跟 __media 對齊，避免在 __media
     上加 overflow:hidden（會踩 layer-bleed 三鐵律）。 */
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card.is-sold-out {
    filter: saturate(0.55);
  }
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__overlay {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: rgba(5, 14, 28, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__overlay-stamp {
    width: 86%;
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
    user-select: none;
    pointer-events: none;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__mode,
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__price,
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__cta {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__mode {
    background: rgba(18, 104, 145, 0.08);
    color: #1e648d;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__price {
    background: rgba(255, 255, 255, 0.74);
    color: #0f5b88;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card strong {
    color: #0d4168;
    font-size: 0.86rem;
    line-height: 1.32;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__meta {
    color: #346d8f;
    font-size: 0.7rem;
    line-height: 1.4;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-pool-card__cta {
    justify-self: start;
    background: rgba(14, 64, 100, 0.82);
    color: #effbff;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__grid {
    display: grid;
    gap: 10px;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.44);
    color: #124b73;
    text-decoration: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.76),
      0 12px 22px rgba(61, 147, 182, 0.08);
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__tag,
  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__cta {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__tag {
    background: rgba(18, 104, 145, 0.08);
    color: #1e648d;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__card strong {
    color: #0d4168;
    font-size: 0.92rem;
    line-height: 1.34;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__card p {
    margin: 0;
    color: #346d8f;
    font-size: 0.76rem;
    line-height: 1.48;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-benefits__cta {
    background: rgba(14, 64, 100, 0.82);
    color: #effbff;
  }

  .page.home-page--demo-v3[data-home-style="abyssal"] .home-mobile-news--lower {
    padding-bottom: 2px;
  }
}

/* Store V4 (starkuji main) */
.store-hero-v4 {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, 0.16), transparent 52%),
    radial-gradient(120% 120% at 0% 0%, rgba(249, 115, 22, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(12, 21, 42, 0.9), rgba(8, 14, 30, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.store-layout {
  gap: 24px;
}

.store-category-pane {
  width: 252px;
  min-width: 252px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 14, 30, 0.7);
}

.store-category-pane-title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.store-main {
  min-width: 0;
}

.store-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.store-search,
.store-sort,
.store-category-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-search input,
.store-sort select,
.store-category-select select {
  height: 42px;
}

.store-grid {
  gap: 18px;
}

.store-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.78), rgba(8, 13, 28, 0.92));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.store-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.48);
}

.store-card-thumb {
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.store-card-body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.store-card-category {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.store-card-subtitle {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
}

.store-card-meta-icons {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.store-stat {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(15, 23, 42, 0.55);
}

.store-stat-price {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
}

.store-stat-stock {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.1);
}

.store-order-status {
  font-weight: 700;
}

@media (max-width: 1079px) {
  .store-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Store category group layout */
.store-category-group {
  display: grid;
  gap: 8px;
  position: relative;
}

.store-category-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.store-fashion-parent-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-fashion-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.55);
}

.store-fashion-parent-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-fashion-chevron {
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.store-category-parent.is-expanded .store-fashion-chevron {
  transform: rotate(180deg);
}

.store-category-children {
  display: none;
  gap: 8px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 10px;
  background: rgba(8, 14, 30, 0.88);
}

.store-category-children.is-expanded {
  display: grid;
}

.store-category-child {
  font-size: 13px;
  justify-content: space-between;
}

.admin-fashion-group {
  display: grid;
  gap: 8px;
  flex: 1 1 100%;
}

.admin-fashion-subtabs {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
}

.admin-fashion-subtabs.is-expanded {
  display: flex;
}

.admin-category-tabs .category-tab-parent {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-fashion-parent-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-fashion-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.55);
}

.admin-fashion-parent-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-fashion-chevron {
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.admin-category-tabs .category-tab-parent.is-expanded .admin-fashion-chevron {
  transform: rotate(180deg);
}

.admin-fashion-subtabs .category-tab {
  font-size: 12px;
  padding: 6px 12px;
}

/* =========================
   Frontend Theme Presets V2
   ========================= */
@keyframes theme-page-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes tech-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(51, 209, 255, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(51, 209, 255, 0.26);
  }
}

body.frontend-theme-cute,
body.frontend-theme-tech {
  position: relative;
  /* c159 (2026-05-01): overflow-x: clip 而非 hidden — 避免 iOS Safari
     scroll lock (body 變 scroll container 跟 html 搶 document scroll root)。
     詳見 .claude/skills/ios-safari-overflow-scroll-lock/SKILL.md */
  overflow-x: hidden; /* iOS < 16 fallback */
  overflow-x: clip;   /* iOS 16+, modern */
}

body.frontend-theme-cute::before,
body.frontend-theme-cute::after,
body.frontend-theme-tech::before,
body.frontend-theme-tech::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.frontend-theme-cute {
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Fredoka", "Noto Sans TC", sans-serif;
  --bg: #fff1f7;
  --bg-2: #ffe7f2;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #4f2e45;
  --muted: #8f6880;
  --accent: #ff4d9f;
  --accent-2: #ffb84d;
  --border: rgba(255, 134, 188, 0.3);
  --line: rgba(255, 134, 188, 0.36);
  --theme-motion-page-in: 460ms;
  --theme-motion-hover: 180ms;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 173, 216, 0.7), transparent 45%),
    radial-gradient(circle at 92% 0%, rgba(255, 223, 150, 0.62), transparent 38%),
    linear-gradient(155deg, #fff5fb 0%, #ffeaf5 48%, #fff1f8 100%);
}

body.frontend-theme-cute::before {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 65% 70%, rgba(255, 211, 234, 0.7) 0 2px, transparent 3px) 0 0 / 44px 44px;
  opacity: 0.55;
}

body.frontend-theme-cute::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 40%);
}

body.frontend-theme-tech {
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --bg: #020813;
  --bg-2: #061428;
  --card: rgba(6, 15, 30, 0.88);
  --ink: #e0eeff;
  --muted: #86a0c8;
  --accent: #31d8ff;
  --accent-2: #7f7dff;
  --border: rgba(61, 177, 255, 0.32);
  --line: rgba(61, 177, 255, 0.35);
  --theme-motion-page-in: 340ms;
  --theme-motion-hover: 140ms;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 76, 176, 0.32), transparent 35%),
    radial-gradient(circle at 0 100%, rgba(38, 205, 255, 0.2), transparent 40%),
    linear-gradient(140deg, #01050d 0%, #050f1f 45%, #01060f 100%);
}

body.frontend-theme-tech::before {
  background:
    linear-gradient(rgba(108, 188, 255, 0.1) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(108, 188, 255, 0.08) 1px, transparent 1px) 0 0 / 32px 100%;
  opacity: 0.26;
}

body.frontend-theme-tech::after {
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.04), transparent 52%);
}

body.frontend-theme-cute .bg-orb,
body.frontend-theme-tech .bg-orb {
  display: none;
}

body.frontend-theme-cute .page,
body.frontend-theme-tech .page {
  position: relative;
  z-index: 1;
  animation: theme-page-enter var(--theme-motion-page-in) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

body.frontend-theme-cute h1,
body.frontend-theme-cute h2,
body.frontend-theme-cute h3,
body.frontend-theme-cute .logo,
body.frontend-theme-tech h1,
body.frontend-theme-tech h2,
body.frontend-theme-tech h3,
body.frontend-theme-tech .logo {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

body.frontend-theme-cute .topbar,
body.frontend-theme-tech .topbar {
  backdrop-filter: blur(20px);
  border-width: 1px;
  border-style: solid;
  margin: 10px;
  border-radius: 18px;
  padding: 12px 20px;
}

body.frontend-theme-cute .topbar {
  background: rgba(255, 247, 252, 0.86);
  border-color: rgba(255, 134, 188, 0.35);
  box-shadow: 0 20px 32px rgba(219, 90, 159, 0.18);
}

body.frontend-theme-tech .topbar {
  background: rgba(2, 11, 24, 0.82);
  border-color: rgba(67, 174, 255, 0.4);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.48);
}

body.frontend-theme-cute .nav a,
body.frontend-theme-tech .nav a {
  border-radius: 999px;
  padding: 7px 12px;
  transition: transform var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease, color var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .nav a:hover,
body.frontend-theme-cute .nav a.is-active {
  color: #7a355f;
  background: rgba(255, 189, 221, 0.42);
  transform: translateY(-1px);
}

body.frontend-theme-tech .nav a:hover,
body.frontend-theme-tech .nav a.is-active {
  color: #dff6ff;
  background: rgba(48, 178, 255, 0.16);
  transform: translateY(-1px);
}

body.frontend-theme-cute .section,
body.frontend-theme-tech .section {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
}

body.frontend-theme-cute .section {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 252, 0.74));
  box-shadow: 0 18px 32px rgba(219, 90, 159, 0.14);
}

body.frontend-theme-tech .section {
  background: linear-gradient(160deg, rgba(8, 20, 40, 0.88), rgba(5, 15, 30, 0.78));
  box-shadow: 0 18px 40px rgba(1, 4, 12, 0.62);
}

body.frontend-theme-cute .section::before,
body.frontend-theme-tech .section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

body.frontend-theme-cute .section::before {
  background: radial-gradient(circle at 92% 8%, rgba(255, 193, 225, 0.42), transparent 36%);
}

body.frontend-theme-tech .section::before {
  background: linear-gradient(120deg, transparent 40%, rgba(58, 194, 255, 0.06) 70%, transparent 100%);
}

body.frontend-theme-cute .card,
body.frontend-theme-tech .card,
body.frontend-theme-cute .store-card,
body.frontend-theme-tech .store-card,
body.frontend-theme-cute .detail-card,
body.frontend-theme-tech .detail-card,
body.frontend-theme-cute .market-grid > *,
body.frontend-theme-tech .market-grid > *,
body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-cute .store-success-card,
body.frontend-theme-tech .store-success-card,
body.frontend-theme-cute .store-orders-list > *,
body.frontend-theme-tech .store-orders-list > * {
  border: 1px solid var(--line);
  transition: transform var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, border-color var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .card,
body.frontend-theme-cute .store-card,
body.frontend-theme-cute .detail-card,
body.frontend-theme-cute .market-grid > *,
body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-cute .store-success-card,
body.frontend-theme-cute .store-orders-list > * {
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(229, 105, 162, 0.16);
}

body.frontend-theme-tech .card,
body.frontend-theme-tech .store-card,
body.frontend-theme-tech .detail-card,
body.frontend-theme-tech .market-grid > *,
body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-tech .store-success-card,
body.frontend-theme-tech .store-orders-list > * {
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

body.frontend-theme-cute .store-card:hover,
body.frontend-theme-cute .market-grid > *:hover,
body.frontend-theme-cute .store-orders-list > *:hover,
body.frontend-theme-tech .store-card:hover,
body.frontend-theme-tech .market-grid > *:hover,
body.frontend-theme-tech .store-orders-list > *:hover {
  transform: translateY(-3px);
}

body.frontend-theme-cute .store-card:hover,
body.frontend-theme-cute .market-grid > *:hover,
body.frontend-theme-cute .store-orders-list > *:hover {
  box-shadow: 0 18px 30px rgba(229, 105, 162, 0.24);
}

body.frontend-theme-tech .store-card:hover,
body.frontend-theme-tech .market-grid > *:hover,
body.frontend-theme-tech .store-orders-list > *:hover {
  border-color: rgba(61, 177, 255, 0.62);
  box-shadow: 0 0 22px rgba(49, 216, 255, 0.18);
}

body.frontend-theme-cute .btn,
body.frontend-theme-tech .btn {
  transition: transform var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, filter var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .btn:hover,
body.frontend-theme-tech .btn:hover {
  transform: translateY(-1px);
}

body.frontend-theme-cute .btn.primary {
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(130deg, #ff58a8, #ff77bd 55%, #ffb070);
  box-shadow: 0 14px 28px rgba(255, 88, 168, 0.35);
}

body.frontend-theme-cute .btn.primary:hover {
  filter: brightness(1.04);
}

body.frontend-theme-tech .btn.primary {
  color: #031023;
  border: 1px solid rgba(152, 238, 255, 0.66);
  border-radius: 10px;
  background: linear-gradient(145deg, #39d7ff, #6ca5ff 65%, #9f8dff);
  box-shadow: 0 10px 24px rgba(55, 173, 255, 0.35);
}

body.frontend-theme-tech .btn.primary:hover {
  animation: tech-glow 720ms ease;
}

body.frontend-theme-cute .btn.ghost,
body.frontend-theme-tech .btn.ghost {
  border-width: 1px;
}

body.frontend-theme-cute .btn.ghost {
  border-color: rgba(255, 111, 171, 0.4);
  background: rgba(255, 255, 255, 0.82);
  color: #7a355f;
}

body.frontend-theme-tech .btn.ghost {
  border-color: rgba(61, 177, 255, 0.42);
  background: rgba(10, 26, 48, 0.76);
  color: #d4ecff;
}

body.frontend-theme-cute .input-inline,
body.frontend-theme-cute input[type="text"],
body.frontend-theme-cute input[type="search"],
body.frontend-theme-cute input[type="number"],
body.frontend-theme-cute input[type="email"],
body.frontend-theme-cute input[type="password"],
body.frontend-theme-cute select,
body.frontend-theme-tech .input-inline,
body.frontend-theme-tech input[type="text"],
body.frontend-theme-tech input[type="search"],
body.frontend-theme-tech input[type="number"],
body.frontend-theme-tech input[type="email"],
body.frontend-theme-tech input[type="password"],
body.frontend-theme-tech select {
  border-width: 1px;
  border-style: solid;
  outline: none;
  transition: border-color var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .input-inline,
body.frontend-theme-cute input[type="text"],
body.frontend-theme-cute input[type="search"],
body.frontend-theme-cute input[type="number"],
body.frontend-theme-cute input[type="email"],
body.frontend-theme-cute input[type="password"],
body.frontend-theme-cute select {
  border-color: rgba(255, 134, 188, 0.36);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #4f2e45;
}

body.frontend-theme-tech .input-inline,
body.frontend-theme-tech input[type="text"],
body.frontend-theme-tech input[type="search"],
body.frontend-theme-tech input[type="number"],
body.frontend-theme-tech input[type="email"],
body.frontend-theme-tech input[type="password"],
body.frontend-theme-tech select {
  border-color: rgba(61, 177, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 13, 28, 0.84);
  color: #deedff;
}

body.frontend-theme-cute .input-inline:focus,
body.frontend-theme-cute input:focus,
body.frontend-theme-cute select:focus {
  border-color: rgba(255, 90, 161, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 111, 171, 0.2);
}

body.frontend-theme-tech .input-inline:focus,
body.frontend-theme-tech input:focus,
body.frontend-theme-tech select:focus {
  border-color: rgba(89, 201, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 191, 255, 0.2);
}

body.frontend-theme-cute .store-layout {
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 28px;
}

body.frontend-theme-tech .store-layout {
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 24px;
}

body.frontend-theme-cute .store-category-pane,
body.frontend-theme-tech .store-category-pane {
  top: 96px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

body.frontend-theme-cute .store-category-pane {
  background: rgba(255, 255, 255, 0.84);
}

body.frontend-theme-tech .store-category-pane {
  background: rgba(7, 18, 37, 0.84);
}

body.frontend-theme-cute .store-category-link,
body.frontend-theme-tech .store-category-link {
  min-height: 40px;
}

body.frontend-theme-cute .store-category-link {
  border-radius: 14px;
}

body.frontend-theme-tech .store-category-link {
  border-radius: 8px;
}

body.frontend-theme-cute .store-card {
  animation: cute-float 5s ease-in-out infinite;
}

body.frontend-theme-cute .store-card:nth-child(2n) {
  animation-delay: 0.7s;
}

body.frontend-theme-tech .store-card-thumb,
body.frontend-theme-tech .detail-thumb {
  border: 1px solid rgba(61, 177, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(91, 210, 255, 0.2);
}

body.frontend-theme-cute .detail-hero,
body.frontend-theme-tech .detail-hero {
  gap: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 18px;
}

body.frontend-theme-cute .detail-hero {
  background: rgba(255, 255, 255, 0.84);
}

body.frontend-theme-tech .detail-hero {
  background: rgba(4, 16, 33, 0.8);
}

body.frontend-theme-cute .draw-bar,
body.frontend-theme-tech .draw-bar {
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

body.frontend-theme-cute .draw-bar {
  background: rgba(255, 240, 250, 0.94);
}

body.frontend-theme-tech .draw-bar {
  background: rgba(3, 12, 25, 0.9);
}

body.frontend-theme-cute .market-toolbar,
body.frontend-theme-tech .market-toolbar {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 12px;
}

body.frontend-theme-cute .market-toolbar {
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-tech .market-toolbar {
  background: rgba(6, 18, 35, 0.84);
}

body.frontend-theme-tech .table-wrap,
body.frontend-theme-tech .admin-table {
  border-color: rgba(61, 177, 255, 0.4);
}

body.frontend-theme-cute .auth-page,
body.frontend-theme-tech .auth-page {
  position: relative;
  z-index: 1;
}

body.frontend-theme-cute .auth-card,
body.frontend-theme-tech .auth-card {
  border: 1px solid var(--line);
}

body.frontend-theme-cute .auth-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 249, 0.84));
  border-radius: 28px;
  box-shadow: 0 24px 40px rgba(229, 105, 162, 0.2);
}

body.frontend-theme-tech .auth-card {
  background: linear-gradient(165deg, rgba(6, 16, 31, 0.9), rgba(2, 11, 24, 0.82));
  border-radius: 14px;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.5);
}

body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-cute .store-success-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(255, 242, 249, 0.84));
}

body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-tech .store-success-card {
  background: linear-gradient(165deg, rgba(7, 19, 38, 0.9), rgba(3, 12, 25, 0.82));
}

body.frontend-theme-cute .empty,
body.frontend-theme-tech .empty {
  border-radius: 14px;
  border: 1px dashed var(--line);
}

body.frontend-theme-cute .modal-card,
body.frontend-theme-tech .modal-card {
  border: 1px solid var(--line);
}

body.frontend-theme-cute .modal-card {
  border-radius: 22px;
}

body.frontend-theme-tech .modal-card {
  border-radius: 12px;
}

body.frontend-theme-cute .pagination button,
body.frontend-theme-tech .pagination button {
  transition: transform var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .pagination button:hover,
body.frontend-theme-tech .pagination button:hover {
  transform: translateY(-1px);
}

.frontend-theme-preview {
  min-height: 158px;
}

.frontend-theme-preview .ftp-shell {
  grid-template-rows: auto 1fr;
}

.frontend-theme-preview .ftp-body {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.frontend-theme-preview .ftp-card {
  grid-column: 1 / -1;
}

.frontend-theme-preview[data-theme="cute"] .ftp-card {
  border-radius: 16px;
  box-shadow: 0 12px 20px rgba(228, 103, 159, 0.24);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card {
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(55, 178, 255, 0.28);
}

@media (max-width: 1079px) {
  body.frontend-theme-cute .store-layout,
  body.frontend-theme-tech .store-layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.frontend-theme-cute .page,
  body.frontend-theme-tech .page,
  body.frontend-theme-cute .store-card,
  body.frontend-theme-tech .btn.primary,
  body.frontend-theme-tech .store-card,
  body.frontend-theme-cute .btn,
  body.frontend-theme-tech .btn {
    animation: none !important;
    transition: none !important;
  }
}
/* === Theme V2.1 Bold Overrides (Cute / Tech) === */
@keyframes theme-v21-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes theme-v21-cute-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 106, 177, 0);
  }
  50% {
    box-shadow: 0 14px 28px rgba(255, 106, 177, 0.28);
  }
}

@keyframes theme-v21-tech-scan {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  45% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(115%);
    opacity: 0;
  }
}

/* Home page: structure-level differentiation */
body.frontend-theme-cute .home-page,
body.frontend-theme-tech .home-page {
  display: grid;
  gap: 28px;
}

body.frontend-theme-cute .home-page > .section,
body.frontend-theme-cute .home-page > .cta,
body.frontend-theme-tech .home-page > .section,
body.frontend-theme-tech .home-page > .cta {
  animation: theme-v21-rise 460ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

body.frontend-theme-cute .home-page > .section:nth-child(2),
body.frontend-theme-tech .home-page > .section:nth-child(2) {
  animation-delay: 80ms;
}

body.frontend-theme-cute .home-page > .section:nth-child(3),
body.frontend-theme-tech .home-page > .section:nth-child(3) {
  animation-delay: 140ms;
}

body.frontend-theme-cute .home-conversion {
  border-radius: 34px;
  padding: 26px;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 197, 227, 0.52), transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(255, 236, 247, 0.78));
}

body.frontend-theme-tech .home-conversion {
  border-radius: 14px;
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(7, 24, 49, 0.92), rgba(3, 14, 31, 0.86));
}

body.frontend-theme-tech #pool {
  position: relative;
  overflow: hidden;
}

body.frontend-theme-tech #pool::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(63, 196, 255, 0.24), transparent 70%);
  animation: theme-v21-tech-scan 4.6s linear infinite;
}

/* Store page: non-trivial visual and layout changes */
body.frontend-theme-cute .store-page .store-shell,
body.frontend-theme-tech .store-page .store-shell {
  padding: 18px;
}

body.frontend-theme-cute .store-page .store-layout {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 30px;
}

body.frontend-theme-tech .store-page .store-layout {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 22px;
}

body.frontend-theme-cute .store-page .store-main {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 137, 191, 0.28);
  border-radius: 26px;
  padding: 18px;
}

body.frontend-theme-tech .store-page .store-main {
  background: rgba(4, 18, 36, 0.82);
  border: 1px solid rgba(54, 185, 255, 0.34);
  border-radius: 12px;
  padding: 14px;
}

body.frontend-theme-cute .store-page .store-grid,
body.frontend-theme-tech .store-page .store-grid {
  gap: 18px;
}

body.frontend-theme-cute .store-page .store-card {
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 250, 0.86));
  border: 1px solid rgba(255, 140, 185, 0.32);
  overflow: hidden;
  animation: theme-v21-cute-glow 3.2s ease-in-out infinite;
}

body.frontend-theme-tech .store-page .store-card {
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(8, 24, 50, 0.92), rgba(3, 15, 31, 0.84));
  border: 1px solid rgba(64, 191, 255, 0.42);
  overflow: hidden;
}

body.frontend-theme-tech .store-page .store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(123, 223, 255, 0.14);
}

body.frontend-theme-cute .store-page .store-card-subtitle {
  font-size: 13px;
  color: #905d7e;
}

body.frontend-theme-tech .store-page .store-card-subtitle {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8eb9dc;
}

/* Item page: hero hierarchy changes */
body.frontend-theme-cute .item-page .detail-hero,
body.frontend-theme-tech .item-page .detail-hero {
  align-items: stretch;
}

body.frontend-theme-cute .item-page .detail-hero {
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.2fr) minmax(220px, 0.8fr);
  border-radius: 30px;
  padding: 22px;
}

body.frontend-theme-tech .item-page .detail-hero {
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.3fr) minmax(240px, 0.9fr);
  border-radius: 12px;
  padding: 16px;
}

body.frontend-theme-cute .item-page .detail-main .tag {
  border-radius: 999px;
  background: rgba(255, 111, 171, 0.16);
  color: #7a2e58;
}

body.frontend-theme-tech .item-page .detail-main .tag {
  border-radius: 8px;
  background: rgba(68, 188, 255, 0.14);
  color: #bde9ff;
}

body.frontend-theme-cute .item-page .detail-grid,
body.frontend-theme-tech .item-page .detail-grid {
  margin-top: 20px;
}

/* Market page: stronger command-center style for tech */
body.frontend-theme-cute .market-page .market-toolbar {
  position: sticky;
  top: 90px;
  z-index: 8;
}

body.frontend-theme-tech .market-page .market-toolbar {
  position: sticky;
  top: 84px;
  z-index: 10;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.frontend-theme-cute .market-page .market-grid > * {
  border-radius: 20px;
}

body.frontend-theme-tech .market-page .market-grid > * {
  border-radius: 10px;
  position: relative;
}

body.frontend-theme-tech .market-page .market-grid > *::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(90, 208, 255, 0.22);
  pointer-events: none;
}

/* Login page */
body.frontend-theme-cute .customer-login-page,
body.frontend-theme-tech .customer-login-page {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding: 28px 16px 46px;
}

body.frontend-theme-cute .customer-login-page .auth-card {
  width: min(100%, 960px);
  border-radius: 30px;
  border: 1px solid rgba(255, 137, 191, 0.32);
  background:
    radial-gradient(circle at 95% 12%, rgba(255, 213, 234, 0.66), transparent 34%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 251, 0.86));
}

body.frontend-theme-tech .customer-login-page .auth-card {
  width: min(100%, 980px);
  border-radius: 12px;
  border: 1px solid rgba(64, 187, 255, 0.36);
  background:
    linear-gradient(160deg, rgba(4, 20, 42, 0.94), rgba(2, 11, 24, 0.86));
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.54);
}

body.frontend-theme-tech .customer-login-page .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 32%, rgba(59, 192, 255, 0.08) 50%, transparent 72%);
}

/* Cart / orders / success */
body.frontend-theme-cute .store-cart-page .store-checkout-card,
body.frontend-theme-cute .store-orders-page .store-orders-shell,
body.frontend-theme-cute .store-success-page .store-success-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 140, 185, 0.34);
}

body.frontend-theme-tech .store-cart-page .store-checkout-card,
body.frontend-theme-tech .store-orders-page .store-orders-shell,
body.frontend-theme-tech .store-success-page .store-success-card {
  border-radius: 10px;
  border: 1px solid rgba(60, 184, 255, 0.38);
}

body.frontend-theme-tech .store-success-page .store-success-badge {
  border-radius: 6px;
  background: rgba(53, 181, 255, 0.16);
  color: #d9f3ff;
  border: 1px solid rgba(99, 211, 255, 0.38);
}

/* Admin preview upgraded to real mini-layout */
.frontend-theme-preview {
  min-height: 196px;
}

.frontend-theme-preview .ftp-shell {
  display: grid;
  gap: 10px;
}

.frontend-theme-preview .ftp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.frontend-theme-preview .ftp-topnav {
  display: inline-flex;
  gap: 8px;
  font-size: 10px;
  opacity: 0.9;
}

.frontend-theme-preview .ftp-topnav span {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.frontend-theme-preview .ftp-body {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.frontend-theme-preview .ftp-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
}

.frontend-theme-preview .ftp-chip {
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid currentColor;
  text-align: center;
  font-weight: 700;
}

.frontend-theme-preview .ftp-content {
  display: grid;
  gap: 8px;
}

.frontend-theme-preview .ftp-form {
  display: grid;
  gap: 6px;
}

.frontend-theme-preview .ftp-field,
.frontend-theme-preview .ftp-cta {
  height: 8px;
  border-radius: 999px;
  display: block;
}

.frontend-theme-preview .ftp-field.short {
  width: 72%;
}

.frontend-theme-preview .ftp-cta {
  width: 46%;
}

.frontend-theme-preview .ftp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.frontend-theme-preview .ftp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.frontend-theme-preview .ftp-btn-compact {
  min-width: 24px;
  padding: 0 8px;
}

.frontend-theme-preview[data-theme="cute"] .ftp-shell {
  color: #7a355f;
}

.frontend-theme-preview[data-theme="cute"] .ftp-chip,
.frontend-theme-preview[data-theme="cute"] .ftp-topnav span {
  background: rgba(255, 182, 220, 0.38);
}

.frontend-theme-preview[data-theme="cute"] .ftp-field,
.frontend-theme-preview[data-theme="cute"] .ftp-cta {
  background: linear-gradient(90deg, rgba(255, 130, 186, 0.4), rgba(255, 186, 118, 0.45));
}

.frontend-theme-preview[data-theme="tech"] .ftp-shell {
  color: #bde7ff;
}

.frontend-theme-preview[data-theme="tech"] .ftp-chip,
.frontend-theme-preview[data-theme="tech"] .ftp-topnav span {
  background: rgba(52, 172, 255, 0.2);
}

.frontend-theme-preview[data-theme="tech"] .ftp-field,
.frontend-theme-preview[data-theme="tech"] .ftp-cta {
  background: linear-gradient(90deg, rgba(49, 214, 255, 0.4), rgba(123, 145, 255, 0.45));
}

@media (max-width: 1180px) {
  body.frontend-theme-cute .item-page .detail-hero,
  body.frontend-theme-tech .item-page .detail-hero {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-cute .store-page .store-layout,
  body.frontend-theme-tech .store-page .store-layout {
    grid-template-columns: 1fr;
  }

  .frontend-theme-preview .ftp-body {
    grid-template-columns: 1fr;
  }

  .frontend-theme-preview .ftp-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.frontend-theme-cute .home-page > .section,
  body.frontend-theme-cute .home-page > .cta,
  body.frontend-theme-tech .home-page > .section,
  body.frontend-theme-tech .home-page > .cta,
  body.frontend-theme-cute .store-page .store-card,
  body.frontend-theme-tech #pool::after {
    animation: none !important;
  }
}
/* === End Theme V2.1 Bold Overrides === */

/* === Theme V2.1 Fine Tune Pack === */
body.frontend-theme-cute {
  --surface-soft: rgba(255, 247, 252, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --accent-danger: #ff5d88;
  --accent-success: #34b97f;
}

body.frontend-theme-tech {
  --surface-panel: rgba(6, 20, 40, 0.92);
  --surface-table: rgba(5, 17, 34, 0.9);
  --grid-overlay: rgba(114, 198, 255, 0.08);
  --glow-soft: rgba(49, 216, 255, 0.22);
  --glow-strong: rgba(49, 216, 255, 0.34);
}

body.frontend-theme-cute .topbar .btn.ghost,
body.frontend-theme-cute .nav a {
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 185, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 232, 245, 0.72));
}

body.frontend-theme-tech .topbar .btn.ghost,
body.frontend-theme-tech .nav a {
  border-radius: 8px;
  border: 1px solid rgba(78, 192, 255, 0.44);
  background: linear-gradient(180deg, rgba(9, 27, 53, 0.92), rgba(5, 17, 36, 0.84));
}

body.frontend-theme-tech .nav a.is-active,
body.frontend-theme-tech .topbar .btn.ghost.is-active {
  box-shadow: 0 0 0 1px rgba(133, 223, 255, 0.32), 0 0 18px rgba(54, 188, 255, 0.28);
}

body.frontend-theme-cute .btn.primary {
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(255, 92, 164, 0.26);
}

body.frontend-theme-cute .btn.primary:active {
  transform: translateY(1px) scale(0.99);
}

body.frontend-theme-tech .btn.primary {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(160, 232, 255, 0.35), 0 0 16px rgba(56, 199, 255, 0.32);
}

body.frontend-theme-tech .btn.primary:active {
  transform: translateY(2px);
}

body.frontend-theme-cute .input-inline:focus,
body.frontend-theme-cute input[type="text"]:focus,
body.frontend-theme-cute input[type="search"]:focus,
body.frontend-theme-cute input[type="number"]:focus,
body.frontend-theme-cute input[type="email"]:focus,
body.frontend-theme-cute input[type="password"]:focus,
body.frontend-theme-cute select:focus {
  box-shadow: 0 0 0 4px rgba(255, 125, 183, 0.18);
}

body.frontend-theme-tech .input-inline:focus,
body.frontend-theme-tech input[type="text"]:focus,
body.frontend-theme-tech input[type="search"]:focus,
body.frontend-theme-tech input[type="number"]:focus,
body.frontend-theme-tech input[type="email"]:focus,
body.frontend-theme-tech input[type="password"]:focus,
body.frontend-theme-tech select:focus {
  box-shadow: inset 0 0 0 1px rgba(137, 223, 255, 0.48), 0 0 0 3px rgba(56, 176, 255, 0.2);
}

body.frontend-theme-cute .empty {
  background: linear-gradient(180deg, rgba(255, 247, 252, 0.94), rgba(255, 235, 247, 0.78));
  color: #875676;
}

body.frontend-theme-tech .empty {
  background:
    linear-gradient(180deg, rgba(6, 18, 38, 0.9), rgba(3, 11, 24, 0.82)),
    repeating-linear-gradient(
      90deg,
      transparent 0 12px,
      rgba(93, 192, 255, 0.05) 12px 13px
    );
  color: #9dc2e0;
}

body.frontend-theme-cute .home-page .cta {
  border-radius: 30px;
  border: 1px solid rgba(255, 143, 189, 0.36);
  background: linear-gradient(140deg, rgba(255, 254, 255, 0.92), rgba(255, 236, 249, 0.82));
}

body.frontend-theme-tech .home-page .cta {
  border-radius: 12px;
  border: 1px solid rgba(66, 190, 255, 0.42);
  background: linear-gradient(140deg, rgba(7, 24, 50, 0.92), rgba(3, 12, 27, 0.84));
  box-shadow: 0 0 22px rgba(53, 185, 255, 0.2);
}

body.frontend-theme-cute .store-page .store-category-pane {
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  border: 1px solid rgba(255, 140, 185, 0.32);
}

body.frontend-theme-tech .store-page .store-category-pane {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 24, 50, 0.9), rgba(5, 16, 33, 0.84));
  border: 1px solid rgba(64, 187, 255, 0.38);
}

body.frontend-theme-cute .store-page .store-category-link {
  border-radius: 16px;
  margin-bottom: 8px;
}

body.frontend-theme-tech .store-page .store-category-link {
  border-radius: 8px;
  margin-bottom: 6px;
}

body.frontend-theme-cute .item-page .detail-side {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 250, 0.84));
  border: 1px solid rgba(255, 140, 185, 0.28);
  border-radius: 20px;
}

body.frontend-theme-tech .item-page .detail-side {
  background: linear-gradient(170deg, rgba(7, 23, 48, 0.9), rgba(3, 14, 28, 0.84));
  border: 1px solid rgba(62, 183, 255, 0.36);
  border-radius: 10px;
}

body.frontend-theme-cute .market-page .table-wrap .admin-table,
body.frontend-theme-cute .market-page .market-grid > * {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 250, 0.86));
}

body.frontend-theme-tech .market-page .table-wrap .admin-table,
body.frontend-theme-tech .market-page .market-grid > * {
  background: linear-gradient(180deg, rgba(6, 20, 42, 0.94), rgba(3, 13, 28, 0.86));
}

body.frontend-theme-tech .market-page .table-wrap .admin-table tbody tr:hover {
  background: rgba(60, 194, 255, 0.08);
}

body.frontend-theme-cute .store-cart-page .store-checkout-card,
body.frontend-theme-cute .store-orders-page .store-orders-shell,
body.frontend-theme-cute .store-success-page .store-success-card {
  box-shadow: 0 16px 34px rgba(233, 104, 162, 0.18);
}

body.frontend-theme-tech .store-cart-page .store-checkout-card,
body.frontend-theme-tech .store-orders-page .store-orders-shell,
body.frontend-theme-tech .store-success-page .store-success-card {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.52);
}

body.frontend-theme-cute .store-success-page .store-success-badge {
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 107, 171, 0.14);
  color: #8a2f61;
  border: 1px solid rgba(255, 130, 185, 0.36);
}

@media (max-width: 768px) {
  body.frontend-theme-cute .home-page,
  body.frontend-theme-tech .home-page {
    gap: 18px;
  }

  body.frontend-theme-cute .home-conversion,
  body.frontend-theme-tech .home-conversion,
  body.frontend-theme-cute .home-page .cta,
  body.frontend-theme-tech .home-page .cta {
    border-radius: 18px;
    padding: 16px;
  }

  body.frontend-theme-cute .store-page .store-main,
  body.frontend-theme-tech .store-page .store-main {
    padding: 12px;
  }
}
/* === End Theme V2.1 Fine Tune Pack === */

/* === Theme Boards 08 / 23 / 24 === */
@keyframes board23-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

body.frontend-theme-board08,
body.frontend-theme-board23,
body.frontend-theme-board24 {
  position: relative;
  /* c159: overflow-x: clip 避 iOS Safari scroll lock — 詳見
     .claude/skills/ios-safari-overflow-scroll-lock/SKILL.md */
  overflow-x: hidden; /* iOS < 16 fallback */
  overflow-x: clip;   /* iOS 16+ */
}

body.frontend-theme-board08::before,
body.frontend-theme-board08::after,
body.frontend-theme-board23::before,
body.frontend-theme-board23::after,
body.frontend-theme-board24::before,
body.frontend-theme-board24::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.frontend-theme-board08::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px) 0 0 / 42px 42px,
    radial-gradient(circle at 72% 68%, rgba(255, 214, 235, 0.75) 0 2px, transparent 3px) 0 0 / 52px 52px;
  opacity: 0.55;
}

body.frontend-theme-board08::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 46%);
}

body.frontend-theme-board23::before {
  background:
    linear-gradient(rgba(104, 113, 255, 0.12) 1px, transparent 1px) 0 0 / 100% 30px,
    linear-gradient(90deg, rgba(255, 138, 216, 0.1) 1px, transparent 1px) 0 0 / 30px 100%;
  opacity: 0.38;
}

body.frontend-theme-board23::after {
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 216, 107, 0.18), transparent 16%),
    radial-gradient(circle at 84% 18%, rgba(106, 116, 255, 0.16), transparent 18%);
}

body.frontend-theme-board24::before {
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px) 0 0 / 120px 120px,
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.78) 0 1px, transparent 2px) 0 0 / 160px 160px,
    radial-gradient(circle at 46% 72%, rgba(255, 255, 255, 0.68) 0 1px, transparent 2px) 0 0 / 180px 180px;
  opacity: 0.7;
}

body.frontend-theme-board24::after {
  background:
    radial-gradient(circle at top, rgba(185, 166, 255, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
}

body.frontend-theme-board08 .bg-orb,
body.frontend-theme-board23 .bg-orb,
body.frontend-theme-board24 .bg-orb {
  display: none;
}

body.frontend-theme-board08 .page,
body.frontend-theme-board23 .page,
body.frontend-theme-board24 .page {
  position: relative;
  z-index: 1;
  animation: theme-page-enter var(--theme-motion-page-in, 420ms) cubic-bezier(0.2, 0.7, 0.2, 1)
    both;
}

body.frontend-theme-board08 h1,
body.frontend-theme-board08 h2,
body.frontend-theme-board08 h3,
body.frontend-theme-board08 .logo,
body.frontend-theme-board23 h1,
body.frontend-theme-board23 h2,
body.frontend-theme-board23 h3,
body.frontend-theme-board23 .logo,
body.frontend-theme-board24 h1,
body.frontend-theme-board24 h2,
body.frontend-theme-board24 h3,
body.frontend-theme-board24 .logo {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

body.frontend-theme-board08 .topbar,
body.frontend-theme-board23 .topbar,
body.frontend-theme-board24 .topbar {
  backdrop-filter: blur(18px);
  margin: 10px;
  padding: 12px 20px;
  border: 1px solid var(--border);
}

body.frontend-theme-board08 .topbar {
  border-radius: 24px;
  box-shadow: 0 20px 32px rgba(255, 139, 194, 0.14);
}

body.frontend-theme-board23 .topbar {
  border-radius: 20px;
  box-shadow: 0 18px 30px rgba(106, 116, 255, 0.16);
}

body.frontend-theme-board24 .topbar {
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(7, 8, 22, 0.34);
}

body.frontend-theme-board08 .topbar .btn.ghost,
body.frontend-theme-board08 .nav a {
  border-radius: 999px;
  border: 1px solid rgba(255, 162, 205, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 238, 247, 0.84));
}

body.frontend-theme-board23 .topbar .btn.ghost,
body.frontend-theme-board23 .nav a {
  border-radius: 14px;
  border: 1px solid rgba(106, 116, 255, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 238, 255, 0.82));
}

body.frontend-theme-board24 .topbar .btn.ghost,
body.frontend-theme-board24 .nav a {
  border-radius: 999px;
  border: 1px solid rgba(201, 188, 235, 0.28);
  background: linear-gradient(180deg, rgba(49, 40, 102, 0.9), rgba(28, 23, 61, 0.86));
}

body.frontend-theme-board23 .nav a.is-active,
body.frontend-theme-board23 .topbar .btn.ghost.is-active {
  box-shadow: 0 0 0 1px rgba(106, 116, 255, 0.26), 0 12px 24px rgba(106, 116, 255, 0.16);
}

body.frontend-theme-board08 .section,
body.frontend-theme-board08 .card,
body.frontend-theme-board08 .store-card,
body.frontend-theme-board08 .detail-card,
body.frontend-theme-board08 .market-grid > *,
body.frontend-theme-board08 .store-checkout-card,
body.frontend-theme-board08 .store-success-card,
body.frontend-theme-board08 .store-orders-list > *,
body.frontend-theme-board23 .section,
body.frontend-theme-board23 .card,
body.frontend-theme-board23 .store-card,
body.frontend-theme-board23 .detail-card,
body.frontend-theme-board23 .market-grid > *,
body.frontend-theme-board23 .store-checkout-card,
body.frontend-theme-board23 .store-success-card,
body.frontend-theme-board23 .store-orders-list > *,
body.frontend-theme-board24 .section,
body.frontend-theme-board24 .card,
body.frontend-theme-board24 .store-card,
body.frontend-theme-board24 .detail-card,
body.frontend-theme-board24 .market-grid > *,
body.frontend-theme-board24 .store-checkout-card,
body.frontend-theme-board24 .store-success-card,
body.frontend-theme-board24 .store-orders-list > * {
  border: 1px solid var(--border);
  background: var(--card);
}

body.frontend-theme-board08 .section,
body.frontend-theme-board08 .card,
body.frontend-theme-board08 .store-card,
body.frontend-theme-board08 .detail-card,
body.frontend-theme-board08 .market-grid > *,
body.frontend-theme-board08 .store-checkout-card,
body.frontend-theme-board08 .store-success-card,
body.frontend-theme-board08 .store-orders-list > * {
  border-radius: 26px;
  box-shadow: 0 18px 34px rgba(255, 139, 194, 0.12);
}

body.frontend-theme-board23 .section,
body.frontend-theme-board23 .card,
body.frontend-theme-board23 .store-card,
body.frontend-theme-board23 .detail-card,
body.frontend-theme-board23 .market-grid > *,
body.frontend-theme-board23 .store-checkout-card,
body.frontend-theme-board23 .store-success-card,
body.frontend-theme-board23 .store-orders-list > * {
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(106, 116, 255, 0.12);
}

body.frontend-theme-board24 .section,
body.frontend-theme-board24 .card,
body.frontend-theme-board24 .store-card,
body.frontend-theme-board24 .detail-card,
body.frontend-theme-board24 .market-grid > *,
body.frontend-theme-board24 .store-checkout-card,
body.frontend-theme-board24 .store-success-card,
body.frontend-theme-board24 .store-orders-list > * {
  border-radius: 28px;
  box-shadow: 0 20px 42px rgba(4, 6, 18, 0.34);
}

body.frontend-theme-board08 .store-card:hover,
body.frontend-theme-board08 .market-grid > *:hover,
body.frontend-theme-board08 .store-orders-list > *:hover,
body.frontend-theme-board23 .store-card:hover,
body.frontend-theme-board23 .market-grid > *:hover,
body.frontend-theme-board23 .store-orders-list > *:hover,
body.frontend-theme-board24 .store-card:hover,
body.frontend-theme-board24 .market-grid > *:hover,
body.frontend-theme-board24 .store-orders-list > *:hover {
  transform: translateY(-3px);
}

body.frontend-theme-board08 .btn,
body.frontend-theme-board23 .btn,
body.frontend-theme-board24 .btn {
  transition: transform var(--theme-motion-hover, 170ms) ease,
    box-shadow var(--theme-motion-hover, 170ms) ease;
}

body.frontend-theme-board08 .btn:hover,
body.frontend-theme-board23 .btn:hover,
body.frontend-theme-board24 .btn:hover {
  transform: translateY(-1px);
}

body.frontend-theme-board08 .input-inline,
body.frontend-theme-board08 input[type="text"],
body.frontend-theme-board08 input[type="search"],
body.frontend-theme-board08 input[type="number"],
body.frontend-theme-board08 input[type="email"],
body.frontend-theme-board08 input[type="password"],
body.frontend-theme-board08 select,
body.frontend-theme-board23 .input-inline,
body.frontend-theme-board23 input[type="text"],
body.frontend-theme-board23 input[type="search"],
body.frontend-theme-board23 input[type="number"],
body.frontend-theme-board23 input[type="email"],
body.frontend-theme-board23 input[type="password"],
body.frontend-theme-board23 select,
body.frontend-theme-board24 .input-inline,
body.frontend-theme-board24 input[type="text"],
body.frontend-theme-board24 input[type="search"],
body.frontend-theme-board24 input[type="number"],
body.frontend-theme-board24 input[type="email"],
body.frontend-theme-board24 input[type="password"],
body.frontend-theme-board24 select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-board24 .input-inline,
body.frontend-theme-board24 input[type="text"],
body.frontend-theme-board24 input[type="search"],
body.frontend-theme-board24 input[type="number"],
body.frontend-theme-board24 input[type="email"],
body.frontend-theme-board24 input[type="password"],
body.frontend-theme-board24 select {
  background: rgba(39, 32, 83, 0.78);
  color: #f6f1ff;
}

body.frontend-theme-board08 .home-page > .section,
body.frontend-theme-board08 .home-page > .cta {
  border-radius: 28px;
}

body.frontend-theme-board08 .home-conversion {
  background: linear-gradient(135deg, rgba(255, 139, 194, 0.14), rgba(139, 203, 255, 0.16));
}

body.frontend-theme-board23 .home-page > .section,
body.frontend-theme-board23 .home-page > .cta {
  border-radius: 24px;
}

body.frontend-theme-board23 .home-conversion {
  background: linear-gradient(135deg, rgba(106, 116, 255, 0.14), rgba(255, 138, 216, 0.16));
}

body.frontend-theme-board24 .home-page > .section,
body.frontend-theme-board24 .home-page > .cta {
  border-radius: 30px;
}

body.frontend-theme-board24 .home-conversion {
  background: linear-gradient(135deg, rgba(185, 166, 255, 0.14), rgba(125, 231, 255, 0.16));
}

body.frontend-theme-board23 .home-page .cta {
  animation: board23-float 4.5s ease-in-out infinite;
}

body.frontend-theme-board08 .store-page .store-layout,
body.frontend-theme-board23 .store-page .store-layout,
body.frontend-theme-board24 .store-page .store-layout {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}

body.frontend-theme-board08 .store-page .store-main,
body.frontend-theme-board23 .store-page .store-main,
body.frontend-theme-board24 .store-page .store-main {
  padding: 18px;
  border-radius: 24px;
}

body.frontend-theme-board08 .store-page .store-main {
  background: rgba(255, 255, 255, 0.54);
}

body.frontend-theme-board23 .store-page .store-main {
  background: rgba(255, 255, 255, 0.44);
}

body.frontend-theme-board24 .store-page .store-main {
  background: rgba(22, 19, 52, 0.54);
}

body.frontend-theme-board08 .store-page .store-card-subtitle {
  color: #8e7c96;
}

body.frontend-theme-board23 .store-page .store-card {
  overflow: hidden;
}

body.frontend-theme-board23 .store-page .store-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ffd86b, #6a74ff, #ff8ad8);
  opacity: 0.85;
}

body.frontend-theme-board24 .store-page .store-card,
body.frontend-theme-board24 .item-page .detail-hero,
body.frontend-theme-board24 .item-page .detail-side {
  backdrop-filter: blur(18px);
}

body.frontend-theme-board08 .item-page .detail-hero,
body.frontend-theme-board08 .item-page .detail-side {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 250, 0.84));
  border: 1px solid rgba(255, 162, 205, 0.24);
  border-radius: 24px;
}

body.frontend-theme-board23 .item-page .detail-hero,
body.frontend-theme-board23 .item-page .detail-side {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(239, 235, 255, 0.8));
  border: 1px solid rgba(106, 116, 255, 0.24);
  border-radius: 22px;
}

body.frontend-theme-board24 .item-page .detail-hero,
body.frontend-theme-board24 .item-page .detail-side {
  background: linear-gradient(170deg, rgba(37, 31, 83, 0.92), rgba(23, 19, 55, 0.82));
  border: 1px solid rgba(201, 188, 235, 0.2);
  border-radius: 28px;
}

body.frontend-theme-board08 .item-page .detail-main .tag,
body.frontend-theme-board23 .item-page .detail-main .tag,
body.frontend-theme-board24 .item-page .detail-main .tag {
  border-radius: 999px;
}

body.frontend-theme-board08 .market-page .market-toolbar,
body.frontend-theme-board23 .market-page .market-toolbar,
body.frontend-theme-board24 .market-page .market-toolbar {
  border-radius: 22px;
  border: 1px solid var(--border);
}

body.frontend-theme-board08 .market-page .market-toolbar {
  background: rgba(255, 255, 255, 0.68);
}

body.frontend-theme-board23 .market-page .market-toolbar {
  background: rgba(255, 255, 255, 0.58);
}

body.frontend-theme-board24 .market-page .market-toolbar {
  background: rgba(31, 27, 70, 0.72);
}

body.frontend-theme-board08 .market-page .market-grid > *,
body.frontend-theme-board23 .market-page .market-grid > *,
body.frontend-theme-board24 .market-page .market-grid > * {
  overflow: hidden;
}

body.frontend-theme-board08 .customer-login-page .auth-card,
body.frontend-theme-board08 .store-cart-page .store-checkout-card,
body.frontend-theme-board08 .store-orders-page .store-orders-shell,
body.frontend-theme-board08 .store-success-page .store-success-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 250, 0.88));
}

body.frontend-theme-board23 .customer-login-page .auth-card,
body.frontend-theme-board23 .store-cart-page .store-checkout-card,
body.frontend-theme-board23 .store-orders-page .store-orders-shell,
body.frontend-theme-board23 .store-success-page .store-success-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 236, 255, 0.88));
}

body.frontend-theme-board24 .customer-login-page .auth-card,
body.frontend-theme-board24 .store-cart-page .store-checkout-card,
body.frontend-theme-board24 .store-orders-page .store-orders-shell,
body.frontend-theme-board24 .store-success-page .store-success-card {
  background: linear-gradient(180deg, rgba(32, 27, 72, 0.94), rgba(20, 16, 47, 0.9));
}

.frontend-theme-preview[data-theme="board08"] .ftp-shell {
  color: #7a4863;
}

.frontend-theme-preview[data-theme="board08"] .ftp-chip,
.frontend-theme-preview[data-theme="board08"] .ftp-topnav span {
  background: rgba(255, 139, 194, 0.22);
}

.frontend-theme-preview[data-theme="board08"] .ftp-field,
.frontend-theme-preview[data-theme="board08"] .ftp-cta {
  background: linear-gradient(90deg, rgba(255, 139, 194, 0.42), rgba(139, 203, 255, 0.4));
}

.frontend-theme-preview[data-theme="board23"] .ftp-shell {
  color: #53609a;
}

.frontend-theme-preview[data-theme="board23"] .ftp-chip,
.frontend-theme-preview[data-theme="board23"] .ftp-topnav span {
  background: rgba(106, 116, 255, 0.18);
}

.frontend-theme-preview[data-theme="board23"] .ftp-field,
.frontend-theme-preview[data-theme="board23"] .ftp-cta {
  background: linear-gradient(90deg, rgba(106, 116, 255, 0.42), rgba(255, 138, 216, 0.4));
}

.frontend-theme-preview[data-theme="board24"] .ftp-shell {
  color: #dfd6fb;
}

.frontend-theme-preview[data-theme="board24"] .ftp-chip,
.frontend-theme-preview[data-theme="board24"] .ftp-topnav span {
  background: rgba(185, 166, 255, 0.18);
}

.frontend-theme-preview[data-theme="board24"] .ftp-field,
.frontend-theme-preview[data-theme="board24"] .ftp-cta {
  background: linear-gradient(90deg, rgba(185, 166, 255, 0.42), rgba(125, 231, 255, 0.38));
}

.frontend-theme-preview[data-theme="board08"] .ftp-btn-primary {
  color: #fff9fc;
  border-color: rgba(255, 255, 255, 0.54);
  background: linear-gradient(135deg, #ff8fc8, #ffb4d5 52%, #8bcbff);
  box-shadow: 0 10px 18px rgba(255, 139, 194, 0.22);
}

.frontend-theme-preview[data-theme="board08"] .ftp-btn-ghost,
.frontend-theme-preview[data-theme="board08"] .ftp-btn-compact {
  color: #7e4367;
  border-color: rgba(255, 162, 205, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 248, 0.88));
  box-shadow: 0 8px 14px rgba(255, 184, 215, 0.16);
}

.frontend-theme-preview[data-theme="board23"] .ftp-btn-primary {
  color: #fcfbff;
  border-width: 2px;
  border-color: rgba(39, 49, 101, 0.88);
  background: linear-gradient(180deg, #8d94ff, #6a74ff 56%, #5963f0);
  box-shadow:
    0 4px 0 rgba(55, 64, 143, 0.85),
    0 10px 18px rgba(83, 91, 198, 0.2);
}

.frontend-theme-preview[data-theme="board23"] .ftp-btn-ghost,
.frontend-theme-preview[data-theme="board23"] .ftp-btn-compact {
  color: #364285;
  border-radius: 12px;
  border-color: rgba(106, 116, 255, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 238, 255, 0.84));
  box-shadow:
    0 3px 0 rgba(106, 116, 255, 0.18),
    0 8px 14px rgba(106, 116, 255, 0.12);
}

.frontend-theme-preview[data-theme="board24"] .ftp-btn-primary {
  color: #211c49;
  border-color: rgba(255, 255, 255, 0.54);
  background: linear-gradient(135deg, rgba(247, 241, 255, 0.98), rgba(211, 229, 255, 0.92) 48%, rgba(125, 231, 255, 0.92));
  box-shadow: 0 10px 20px rgba(125, 231, 255, 0.14);
}

.frontend-theme-preview[data-theme="board24"] .ftp-btn-ghost,
.frontend-theme-preview[data-theme="board24"] .ftp-btn-compact {
  color: #eee8ff;
  border-color: rgba(201, 188, 235, 0.3);
  background: linear-gradient(180deg, rgba(55, 45, 115, 0.88), rgba(32, 27, 72, 0.92));
  box-shadow: 0 8px 16px rgba(11, 14, 34, 0.18);
}

/* === Theme Boards Button Signature Pack === */
body.frontend-theme-board08 .btn,
body.frontend-theme-board08 .draw-option,
body.frontend-theme-board08 .store-category-link,
body.frontend-theme-board08 .mobile-tabbar a,
body.frontend-theme-board23 .btn,
body.frontend-theme-board23 .draw-option,
body.frontend-theme-board23 .store-category-link,
body.frontend-theme-board23 .mobile-tabbar a,
body.frontend-theme-board24 .btn,
body.frontend-theme-board24 .draw-option,
body.frontend-theme-board24 .store-category-link,
body.frontend-theme-board24 .mobile-tabbar a {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body.frontend-theme-board08 .draw-options,
body.frontend-theme-board23 .draw-options,
body.frontend-theme-board24 .draw-options {
  padding: 6px;
  backdrop-filter: blur(14px);
}

body.frontend-theme-board08 .draw-option,
body.frontend-theme-board08 .store-category-link,
body.frontend-theme-board08 .mobile-tabbar a {
  border-color: var(--public-btn-chip-border);
  background: var(--public-btn-chip-bg);
  color: var(--public-btn-chip-color);
  box-shadow: var(--public-btn-chip-shadow);
}

body.frontend-theme-board08 .btn.primary,
body.frontend-theme-board08 .draw-option.active,
body.frontend-theme-board08 .store-category-link.active,
body.frontend-theme-board08 .mobile-tabbar a.is-active {
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 16px 28px rgba(255, 139, 194, 0.24);
}

body.frontend-theme-board08 .btn.primary::before,
body.frontend-theme-board08 .draw-option.active::before,
body.frontend-theme-board08 .store-category-link.active::before,
body.frontend-theme-board08 .mobile-tabbar a.is-active::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 58%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
  opacity: 0.84;
  pointer-events: none;
}

body.frontend-theme-board08 .btn.ghost,
body.frontend-theme-board08 .topbar .btn.ghost,
body.frontend-theme-board08 .nav a {
  color: #7e4367;
  box-shadow: 0 10px 18px rgba(255, 184, 215, 0.16);
}

body.frontend-theme-board08 .btn.btn-compact,
body.frontend-theme-board08 .btn.ghost.btn-compact {
  min-width: 36px;
  padding-inline: 12px;
}

body.frontend-theme-board08 .draw-options {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 162, 205, 0.26);
}

body.frontend-theme-board08 .draw-bar,
body.frontend-theme-board08 .inventory-auto-dock {
  background: linear-gradient(135deg, rgba(255, 249, 253, 0.88), rgba(246, 232, 255, 0.84));
  border-color: rgba(255, 162, 205, 0.24);
  box-shadow: 0 18px 32px rgba(255, 184, 215, 0.16);
}

body.frontend-theme-board08 .btn:hover,
body.frontend-theme-board08 .draw-option:hover,
body.frontend-theme-board08 .store-category-link:hover,
body.frontend-theme-board08 .mobile-tabbar a:hover {
  transform: translateY(-2px) scale(1.01);
}

body.frontend-theme-board08 .btn:active,
body.frontend-theme-board08 .draw-option:active,
body.frontend-theme-board08 .store-category-link:active,
body.frontend-theme-board08 .mobile-tabbar a:active {
  transform: translateY(1px) scale(0.985);
}

body.frontend-theme-board23 .draw-option,
body.frontend-theme-board23 .store-category-link,
body.frontend-theme-board23 .mobile-tabbar a {
  border-width: 2px;
  border-color: rgba(106, 116, 255, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 238, 255, 0.84));
  color: #364285;
  box-shadow:
    0 4px 0 rgba(106, 116, 255, 0.18),
    0 10px 18px rgba(106, 116, 255, 0.12);
}

body.frontend-theme-board23 .btn.primary,
body.frontend-theme-board23 .draw-option.active,
body.frontend-theme-board23 .store-category-link.active,
body.frontend-theme-board23 .mobile-tabbar a.is-active {
  border-width: 2px;
  border-color: rgba(39, 49, 101, 0.88);
  text-shadow: 0 1px 0 rgba(33, 38, 87, 0.42);
  box-shadow:
    0 5px 0 rgba(55, 64, 143, 0.9),
    0 16px 26px rgba(83, 91, 198, 0.24);
}

body.frontend-theme-board23 .btn.primary::before,
body.frontend-theme-board23 .draw-option.active::before,
body.frontend-theme-board23 .store-category-link.active::before,
body.frontend-theme-board23 .mobile-tabbar a.is-active::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0));
  pointer-events: none;
}

body.frontend-theme-board23 .btn.ghost,
body.frontend-theme-board23 .topbar .btn.ghost,
body.frontend-theme-board23 .nav a {
  border-width: 2px;
  box-shadow:
    0 4px 0 rgba(106, 116, 255, 0.18),
    0 12px 18px rgba(106, 116, 255, 0.12);
}

body.frontend-theme-board23 .btn.btn-compact,
body.frontend-theme-board23 .btn.ghost.btn-compact {
  min-width: 34px;
  padding-inline: 10px;
}

body.frontend-theme-board23 .draw-options {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 234, 255, 0.58));
  border-color: rgba(106, 116, 255, 0.22);
}

body.frontend-theme-board23 .draw-bar,
body.frontend-theme-board23 .inventory-auto-dock {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 234, 255, 0.78));
  border-color: rgba(106, 116, 255, 0.24);
  box-shadow: 0 18px 30px rgba(106, 116, 255, 0.12);
}

body.frontend-theme-board23 .btn:hover,
body.frontend-theme-board23 .draw-option:hover,
body.frontend-theme-board23 .store-category-link:hover,
body.frontend-theme-board23 .mobile-tabbar a:hover {
  transform: translateY(-1px);
}

body.frontend-theme-board23 .btn:active,
body.frontend-theme-board23 .draw-option:active,
body.frontend-theme-board23 .store-category-link:active,
body.frontend-theme-board23 .mobile-tabbar a:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 rgba(55, 64, 143, 0.72),
    0 8px 14px rgba(83, 91, 198, 0.14);
}

body.frontend-theme-board24 .draw-option,
body.frontend-theme-board24 .store-category-link,
body.frontend-theme-board24 .mobile-tabbar a {
  border-color: rgba(201, 188, 235, 0.22);
  background: rgba(40, 32, 87, 0.82);
  color: #ede7ff;
  box-shadow: 0 12px 22px rgba(9, 11, 28, 0.18);
  backdrop-filter: blur(10px);
}

body.frontend-theme-board24 .btn.primary,
body.frontend-theme-board24 .draw-option.active,
body.frontend-theme-board24 .store-category-link.active,
body.frontend-theme-board24 .mobile-tabbar a.is-active {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 18px 32px rgba(125, 231, 255, 0.14);
}

body.frontend-theme-board24 .btn.primary::before,
body.frontend-theme-board24 .draw-option.active::before,
body.frontend-theme-board24 .store-category-link.active::before,
body.frontend-theme-board24 .mobile-tabbar a.is-active::before {
  content: "";
  position: absolute;
  inset: -12px auto auto 14%;
  width: 72%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 58%);
  pointer-events: none;
}

body.frontend-theme-board24 .btn.ghost,
body.frontend-theme-board24 .topbar .btn.ghost,
body.frontend-theme-board24 .nav a {
  box-shadow: 0 12px 24px rgba(11, 14, 34, 0.22);
  backdrop-filter: blur(10px);
}

body.frontend-theme-board24 .btn.btn-compact,
body.frontend-theme-board24 .btn.ghost.btn-compact {
  min-width: 36px;
  padding-inline: 12px;
}

body.frontend-theme-board24 .draw-options {
  background: rgba(31, 27, 70, 0.72);
  border-color: rgba(201, 188, 235, 0.2);
}

body.frontend-theme-board24 .draw-bar,
body.frontend-theme-board24 .inventory-auto-dock {
  background: linear-gradient(180deg, rgba(32, 27, 72, 0.94), rgba(20, 16, 47, 0.9));
  border-color: rgba(201, 188, 235, 0.2);
  box-shadow: 0 20px 36px rgba(8, 10, 24, 0.34);
  backdrop-filter: blur(16px);
}

body.frontend-theme-board24 .btn:hover,
body.frontend-theme-board24 .draw-option:hover,
body.frontend-theme-board24 .store-category-link:hover,
body.frontend-theme-board24 .mobile-tabbar a:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 16px 28px rgba(125, 231, 255, 0.12);
}

body.frontend-theme-board24 .btn:active,
body.frontend-theme-board24 .draw-option:active,
body.frontend-theme-board24 .store-category-link:active,
body.frontend-theme-board24 .mobile-tabbar a:active {
  transform: translateY(1px) scale(0.992);
}

body.frontend-theme-board08 .btn:focus-visible,
body.frontend-theme-board08 .draw-option:focus-visible,
body.frontend-theme-board08 .store-category-link:focus-visible,
body.frontend-theme-board08 .mobile-tabbar a:focus-visible,
body.frontend-theme-board23 .btn:focus-visible,
body.frontend-theme-board23 .draw-option:focus-visible,
body.frontend-theme-board23 .store-category-link:focus-visible,
body.frontend-theme-board23 .mobile-tabbar a:focus-visible,
body.frontend-theme-board24 .btn:focus-visible,
body.frontend-theme-board24 .draw-option:focus-visible,
body.frontend-theme-board24 .store-category-link:focus-visible,
body.frontend-theme-board24 .mobile-tabbar a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px var(--public-btn-focus-ring),
    var(--public-btn-chip-shadow);
}

body.frontend-theme-board08 .store-category-link.active span,
body.frontend-theme-board23 .store-category-link.active span,
body.frontend-theme-board24 .store-category-link.active span {
  color: inherit;
  opacity: 0.86;
}

body.frontend-theme-board08 .btn:disabled,
body.frontend-theme-board08 .draw-option:disabled,
body.frontend-theme-board23 .btn:disabled,
body.frontend-theme-board23 .draw-option:disabled,
body.frontend-theme-board24 .btn:disabled,
body.frontend-theme-board24 .draw-option:disabled {
  filter: saturate(0.76);
  box-shadow: none;
}

@media (max-width: 1180px) {
  body.frontend-theme-board08 .item-page .detail-hero,
  body.frontend-theme-board23 .item-page .detail-hero,
  body.frontend-theme-board24 .item-page .detail-hero {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-board08 .store-page .store-layout,
  body.frontend-theme-board23 .store-page .store-layout,
  body.frontend-theme-board24 .store-page .store-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-board08 .home-page,
  body.frontend-theme-board23 .home-page,
  body.frontend-theme-board24 .home-page {
    gap: 18px;
  }

  body.frontend-theme-board08 .home-conversion,
  body.frontend-theme-board08 .home-page .cta,
  body.frontend-theme-board23 .home-conversion,
  body.frontend-theme-board23 .home-page .cta,
  body.frontend-theme-board24 .home-conversion,
  body.frontend-theme-board24 .home-page .cta {
    padding: 16px;
  }

  body.frontend-theme-board08 .store-page .store-main,
  body.frontend-theme-board23 .store-page .store-main,
  body.frontend-theme-board24 .store-page .store-main {
    padding: 12px;
  }
}
/* === End Theme Boards 08 / 23 / 24 === */

/* === Cosmic Neon Default Theme === */
body.frontend-theme-default {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -12%, rgba(0, 212, 255, 0.035), transparent 32%),
    linear-gradient(180deg, #10111f 0%, #141628 48%, #0f1020 100%);
}

body.frontend-theme-default::before,
body.frontend-theme-default::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.frontend-theme-default::before {
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.14) 0%, transparent 100%),
    radial-gradient(1px 1px at 28% 74%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 64% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 82% 72%, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  opacity: 0.24;
}

body.frontend-theme-default::after {
  background: linear-gradient(180deg, rgba(10, 12, 22, 0) 0%, rgba(10, 12, 22, 0.08) 60%, rgba(10, 12, 22, 0.22) 100%);
}

body.frontend-theme-default .bg-orb {
  display: none;
}

body.frontend-theme-default .bg-orb-1 {
  width: 460px;
  height: 460px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.18) 0%, rgba(0, 255, 136, 0.06) 42%, transparent 72%);
}

body.frontend-theme-default .bg-orb-2 {
  width: 520px;
  height: 520px;
  right: -120px;
  bottom: -200px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.16) 0%, rgba(0, 212, 255, 0.05) 42%, transparent 74%);
}

body.frontend-theme-default .topbar {
  position: sticky;
  top: 0;
  width: 100%;
  margin: 0;
  padding: 14px max(16px, calc((100vw - 1280px) / 2 + 16px));
  border-radius: 0;
  border-style: solid;
  border-width: 0 0 1px;
  border-color: rgba(124, 132, 160, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 20, 35, 0.72), rgba(19, 20, 35, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 20px rgba(2, 8, 23, 0.08);
  backdrop-filter: blur(14px) saturate(1.01);
}

body.frontend-theme-default .topbar .logo,
body.frontend-theme-default .topbar .brand-link {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.22em;
  color: #f8fbff;
  text-transform: uppercase;
}

body.frontend-theme-default .nav {
  gap: 12px;
  align-items: center;
}

body.frontend-theme-default .nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(231, 241, 255, 0.68);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.frontend-theme-default .nav a:hover,
body.frontend-theme-default .nav a.is-active {
  color: #f8fbff;
  background: rgba(29, 32, 50, 0.82);
  box-shadow: inset 0 0 0 1px rgba(124, 132, 160, 0.12);
  transform: translateY(-1px);
}

body.frontend-theme-default .topbar-actions .btn.ghost,
body.frontend-theme-default .topbar .btn.ghost {
  background: rgba(10, 17, 31, 0.84);
  border-color: rgba(118, 148, 193, 0.18);
}

body.frontend-theme-default .topbar-actions .btn.ghost.is-active {
  color: #f8fbff;
  background: rgba(12, 24, 36, 0.92);
  border-color: rgba(0, 212, 255, 0.34);
  box-shadow: var(--cosmic-glow-blue);
}

body.frontend-theme-default .page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 1280px);
  margin: 20px auto 80px;
  display: grid;
  gap: 18px;
}

body.frontend-theme-default .page.home-page {
  width: min(calc(100% - 32px), 1280px);
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 72px;
  padding-left: 0;
  padding-right: 0;
}

body.frontend-theme-default .page.store-page--fusion {
  width: min(calc(100% - 32px), 1280px);
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 72px;
  padding-left: 0;
  padding-right: 0;
}

body.frontend-theme-default .section,
body.frontend-theme-default .banner,
body.frontend-theme-default .cta,
body.frontend-theme-default .store-hero,
body.frontend-theme-default .detail-card,
body.frontend-theme-default .auth-card,
body.frontend-theme-default .store-checkout-card,
body.frontend-theme-default .store-orders-shell,
body.frontend-theme-default .store-success-card,
body.frontend-theme-default .store-category-pane,
body.frontend-theme-default .store-main,
body.frontend-theme-default .draw-bar,
body.frontend-theme-default .inventory-auto-dock,
body.frontend-theme-default .modal-card,
body.frontend-theme-default .news-rail-card,
body.frontend-theme-default .market-group,
body.frontend-theme-default .market-depth,
body.frontend-theme-default .market-trades {
  border: 1px solid rgba(124, 132, 160, 0.1);
  background: linear-gradient(180deg, rgba(26, 28, 44, 0.76), rgba(22, 24, 38, 0.7));
  box-shadow: var(--cosmic-panel-shadow);
}

body.frontend-theme-default .section,
body.frontend-theme-default .cta,
body.frontend-theme-default .store-main,
body.frontend-theme-default .detail-card,
body.frontend-theme-default .auth-card,
body.frontend-theme-default .store-checkout-card,
body.frontend-theme-default .store-orders-shell,
body.frontend-theme-default .store-success-card {
  border-radius: 20px;
}

body.frontend-theme-default .section {
  padding: 20px;
}

body.frontend-theme-default .section-head {
  align-items: end;
  margin-bottom: 20px;
}

body.frontend-theme-default .section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 0.04em;
  color: #f4fbff;
  text-transform: uppercase;
}

body.frontend-theme-default .section-head p,
body.frontend-theme-default .form-hint,
body.frontend-theme-default .empty,
body.frontend-theme-default .detail-desc,
body.frontend-theme-default .detail-tags,
body.frontend-theme-default .market-depth-last,
body.frontend-theme-default .market-trades-hint {
  color: rgba(153, 174, 202, 0.9);
}

body.frontend-theme-default .banner.carousel {
  min-height: 420px;
  padding: 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 15% 18%, rgba(0, 255, 136, 0.05), transparent 22%),
    radial-gradient(circle at 84% 18%, rgba(0, 212, 255, 0.06), transparent 24%),
    linear-gradient(135deg, rgba(25, 28, 44, 0.98), rgba(20, 22, 37, 0.92));
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.16);
}

body.frontend-theme-default .carousel-track,
body.frontend-theme-default #promoTrack {
  min-height: 404px;
  border-radius: 16px;
}

body.frontend-theme-default .carousel-control {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(118, 148, 193, 0.16);
  background: rgba(8, 14, 27, 0.78);
  color: #f4fbff;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.24);
}

body.frontend-theme-default .carousel-dots button,
body.frontend-theme-default .carousel-dot {
  background: rgba(255, 255, 255, 0.2);
}

body.frontend-theme-default .carousel-dots .is-active,
body.frontend-theme-default .carousel-dot.is-active {
  background: linear-gradient(135deg, #00ff88, #00d4ff);
  box-shadow: var(--cosmic-glow-green);
}

body.frontend-theme-default .home-conversion {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.frontend-theme-default .home-conversion-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 14px;
}

body.frontend-theme-default .home-conversion-primary,
body.frontend-theme-default .home-conversion-card {
  border: 1px solid rgba(124, 132, 160, 0.1);
  background: linear-gradient(180deg, rgba(26, 28, 44, 0.82), rgba(22, 24, 38, 0.72));
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.14);
}

body.frontend-theme-default .home-conversion-primary {
  border-radius: 20px;
  padding: 16px;
  overflow: hidden;
}

body.frontend-theme-default .home-conversion-primary-media,
body.frontend-theme-default .home-conversion-card-thumb {
  border-radius: 14px;
  border: 1px solid rgba(124, 132, 160, 0.1);
  overflow: hidden;
}

body.frontend-theme-default .home-conversion-primary h3,
body.frontend-theme-default .home-conversion-card-meta strong {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  color: #f4fbff;
}

body.frontend-theme-default .home-conversion-label,
body.frontend-theme-default .banner-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(23, 26, 41, 0.7);
  border: 1px solid rgba(124, 132, 160, 0.12);
  color: rgba(236, 245, 255, 0.9);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.frontend-theme-default .home-conversion-card {
  border-radius: 16px;
  padding: 10px 12px;
}

body.frontend-theme-default .home-conversion-card-cta {
  color: #00ff88;
  letter-spacing: 0.08em;
}

body.frontend-theme-default .category-tabs {
  gap: 10px;
  flex-wrap: wrap;
}

body.frontend-theme-default .category-tab {
  background: rgba(23, 26, 41, 0.72);
  border: 1px solid rgba(124, 132, 160, 0.12);
  color: rgba(231, 241, 255, 0.72);
  border-radius: 999px;
  padding: 9px 13px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: none;
}

body.frontend-theme-default .category-tab.active,
body.frontend-theme-default .category-tab:hover {
  color: #07121d;
  border-color: rgba(167, 255, 224, 0.32);
  background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  box-shadow: 0 8px 18px rgba(0, 255, 136, 0.1);
}

body.frontend-theme-default .category-tab__icon,
body.frontend-theme-default .chip-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

body.frontend-theme-default .category-tab__count {
  background: rgba(5, 12, 24, 0.24);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

body.frontend-theme-default .category-tab.active .category-tab__count,
body.frontend-theme-default .category-tab:hover .category-tab__count {
  background: rgba(7, 18, 29, 0.16);
  border-color: rgba(7, 18, 29, 0.18);
}

body.frontend-theme-default .pool-filter-stack {
  gap: 8px;
}

body.frontend-theme-default .card-grid {
  gap: 14px;
}

body.frontend-theme-default .home-page .section {
  padding: 16px;
  border-radius: 18px;
}

body.frontend-theme-default .home-page .section-head {
  margin-bottom: 16px;
}

body.frontend-theme-default .home-page .section-head h2 {
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 0.03em;
}

body.frontend-theme-default .home-page .section-head p {
  max-width: 560px;
}

body.frontend-theme-default .home-page .pool-filter-stack {
  gap: 8px;
  margin-bottom: 6px;
}

body.frontend-theme-default .home-page .category-tabs {
  gap: 8px;
  padding-bottom: 2px;
}

body.frontend-theme-default .home-page .category-tab {
  padding: 8px 12px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: none;
}

body.frontend-theme-default .home-page .category-tab.active,
body.frontend-theme-default .home-page .category-tab:hover {
  box-shadow: 0 12px 22px rgba(0, 255, 136, 0.14);
}

body.frontend-theme-default .home-page .category-tab__content,
body.frontend-theme-default .home-page .category-tab__body,
body.frontend-theme-default .home-page .chip-label-wrap {
  gap: 6px;
}

body.frontend-theme-default .home-page .category-tab__icon,
body.frontend-theme-default .home-page .chip-icon {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.88rem;
}

body.frontend-theme-default .home-page .category-tab__count {
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
}

body.frontend-theme-default .home-page .filters {
  gap: 10px;
  margin-top: 4px;
  align-items: center;
}

body.frontend-theme-default .home-page .search input {
  min-width: min(360px, 100%);
  padding: 11px 14px;
  border-radius: 14px;
}

body.frontend-theme-default .home-page .sort {
  gap: 6px;
}

body.frontend-theme-default .home-page .sort select {
  height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
}

body.frontend-theme-default .home-page #cardGrid {
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.frontend-theme-default .home-page .pool-card {
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(2, 8, 23, 0.14);
}

body.frontend-theme-default .home-page .pool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(2, 8, 23, 0.18);
}

body.frontend-theme-default .home-page .pool-card-top {
  gap: 4px;
  padding-top: 10px;
  padding-bottom: 8px;
}

body.frontend-theme-default .home-page .pool-card-top,
body.frontend-theme-default .home-page .pool-card-bottom {
  padding-left: 14px;
  padding-right: 14px;
}

body.frontend-theme-default .home-page .pool-card-image {
  margin: 0 14px;
  min-height: 180px;
  border-radius: 12px;
}

body.frontend-theme-default .home-page .pool-card-bottom {
  gap: 7px;
  padding-top: 10px;
  padding-bottom: 14px;
}

body.frontend-theme-default .home-page .pool-name {
  font-size: 15px;
  line-height: 1.45;
}

body.frontend-theme-default .home-page .card-tag {
  padding: 4px 8px;
  font-size: 10px;
}

body.frontend-theme-default .home-page .progress {
  gap: 8px;
  font-size: 11px;
}

body.frontend-theme-default .home-page .pool-draw-options {
  gap: 4px;
  padding: 3px;
}

body.frontend-theme-default .home-page .pool-draw-options .draw-option {
  padding: 7px 12px;
  font-size: 11px;
}

body.frontend-theme-default .pool-card,
body.frontend-theme-default .store-card,
body.frontend-theme-default .market-grid > * {
  border: 1px solid rgba(124, 132, 160, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 28, 44, 0.84), rgba(22, 24, 38, 0.76));
  box-shadow: 0 12px 26px rgba(2, 8, 23, 0.16);
}

body.frontend-theme-default .pool-card:hover,
body.frontend-theme-default .store-card:hover,
body.frontend-theme-default .market-grid > *:hover,
body.frontend-theme-default .store-orders-list > *:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 132, 160, 0.14);
  box-shadow: 0 16px 30px rgba(2, 8, 23, 0.18);
}

body.frontend-theme-default .pool-card-top,
body.frontend-theme-default .pool-card-bottom,
body.frontend-theme-default .store-card-body {
  padding-left: 18px;
  padding-right: 18px;
}

body.frontend-theme-default .pool-card-image,
body.frontend-theme-default .store-card-thumb {
  border-radius: 14px;
  overflow: hidden;
  margin: 0 18px;
  border: 1px solid rgba(124, 132, 160, 0.08);
}

body.frontend-theme-default .card-tag,
body.frontend-theme-default .tag,
body.frontend-theme-default .footer-legal-pill,
body.frontend-theme-default .market-price-badge,
body.frontend-theme-default .market-floor-badge,
body.frontend-theme-default .store-stat {
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.78);
  border-color: rgba(118, 148, 193, 0.18);
  color: rgba(231, 241, 255, 0.86);
}

body.frontend-theme-default .btn,
body.frontend-theme-default .draw-option,
body.frontend-theme-default .store-category-link,
body.frontend-theme-default .mobile-tabbar a {
  backdrop-filter: blur(10px);
}

body.frontend-theme-default .btn:hover,
body.frontend-theme-default .draw-option:hover,
body.frontend-theme-default .store-category-link:hover,
body.frontend-theme-default .mobile-tabbar a:hover {
  transform: translateY(-2px);
}

body.frontend-theme-default .btn.primary,
body.frontend-theme-default .draw-option.active,
body.frontend-theme-default .store-category-link.active,
body.frontend-theme-default .mobile-tabbar a.is-active {
  box-shadow: var(--public-btn-primary-shadow), var(--cosmic-glow-green);
}

body.frontend-theme-default .btn.ghost,
body.frontend-theme-default .store-category-link,
body.frontend-theme-default .draw-option:not(.active),
body.frontend-theme-default .mobile-tabbar a:not(.is-active) {
  background: rgba(10, 17, 31, 0.78);
}

body.frontend-theme-default .btn:focus-visible,
body.frontend-theme-default .draw-option:focus-visible,
body.frontend-theme-default .store-category-link:focus-visible,
body.frontend-theme-default .mobile-tabbar a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.14), var(--cosmic-glow-green);
}

body.frontend-theme-default .input-inline,
body.frontend-theme-default input[type="text"],
body.frontend-theme-default input[type="search"],
body.frontend-theme-default input[type="number"],
body.frontend-theme-default input[type="email"],
body.frontend-theme-default input[type="password"],
body.frontend-theme-default input[type="date"],
body.frontend-theme-default select,
body.frontend-theme-default textarea {
  border-radius: 16px;
  border: 1px solid rgba(118, 148, 193, 0.18);
  background: rgba(10, 17, 31, 0.82);
  color: #edf6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.frontend-theme-default .input-inline:focus,
body.frontend-theme-default input:focus,
body.frontend-theme-default select:focus,
body.frontend-theme-default textarea:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.08);
}

body.frontend-theme-default .market-page .section,
body.frontend-theme-default .item-page .section,
body.frontend-theme-default .store-page .section,
body.frontend-theme-default .customer-login-page .auth-card,
body.frontend-theme-default .inventory-page .section,
body.frontend-theme-default .news-page .section {
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.88), rgba(9, 15, 28, 0.72));
}

body.frontend-theme-default .market-toolbar,
body.frontend-theme-default .store-toolbar {
  padding: 12px;
  border-radius: 16px;
  background: rgba(24, 27, 42, 0.64);
  border: 1px solid rgba(124, 132, 160, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .store-page--fusion .store-hero-panel,
body.frontend-theme-default .store-page--fusion .store-shell-v2 {
  width: 100%;
  margin: 0;
}

body.frontend-theme-default .store-page--fusion .store-hero-panel {
  padding: 18px 20px;
  border-radius: 18px;
  border-color: rgba(124, 132, 160, 0.1);
  background:
    radial-gradient(circle at top left, rgba(78, 255, 195, 0.05), transparent 28%),
    radial-gradient(circle at bottom right, rgba(57, 189, 255, 0.05), transparent 30%),
    linear-gradient(180deg, rgba(26, 28, 44, 0.88), rgba(22, 24, 38, 0.92));
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.14);
}

.auth-social-section {
  display: grid;
  gap: 14px;
  margin-bottom: 4px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 34%),
    rgba(8, 14, 27, 0.56);
}

.auth-social-section.is-hidden,
.auth-tabs.is-hidden {
  display: none;
}

.social-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.social-login-btn:hover {
  transform: translateY(-1px);
}

.social-login-btn:active {
  transform: translateY(0);
}

.social-login-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.social-login-btn.is-hidden {
  display: none;
}

.social-login-btn--line {
  background: #06c755;
  box-shadow: 0 10px 24px rgba(6, 199, 85, 0.28);
}

.social-login-btn--line:hover {
  background: #05b64d;
  box-shadow: 0 12px 28px rgba(6, 199, 85, 0.32);
}

.social-login-btn--facebook {
  background: #1877f2;
  box-shadow: 0 10px 24px rgba(24, 119, 242, 0.28);
}

.social-login-btn--facebook:hover {
  background: #166fe0;
  box-shadow: 0 12px 28px rgba(24, 119, 242, 0.32);
}

.social-login-btn__icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.social-login-btn--line .social-login-btn__icon {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='currentColor'><path d='M24 4C12.95 4 4 11.36 4 20.44c0 8.13 7.04 14.94 16.57 16.22.65.14 1.53.43 1.75 1 .2.51.13 1.32.06 1.84l-.28 1.7c-.09.5-.4 1.96 1.7 1.07 2.1-.9 11.33-6.68 15.46-11.44h-.01C41.8 27.87 44 24.4 44 20.44 44 11.36 35.05 4 24 4z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='currentColor'><path d='M24 4C12.95 4 4 11.36 4 20.44c0 8.13 7.04 14.94 16.57 16.22.65.14 1.53.43 1.75 1 .2.51.13 1.32.06 1.84l-.28 1.7c-.09.5-.4 1.96 1.7 1.07 2.1-.9 11.33-6.68 15.46-11.44h-.01C41.8 27.87 44 24.4 44 20.44 44 11.36 35.05 4 24 4z'/></svg>");
}

.social-login-btn--facebook .social-login-btn__icon {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M22 12a10 10 0 1 0-11.56 9.88v-6.99H7.9V12h2.54V9.8c0-2.5 1.49-3.89 3.77-3.89 1.09 0 2.24.2 2.24.2v2.46H15.2c-1.24 0-1.63.77-1.63 1.56V12h2.77l-.44 2.89h-2.33v6.99A10 10 0 0 0 22 12z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M22 12a10 10 0 1 0-11.56 9.88v-6.99H7.9V12h2.54V9.8c0-2.5 1.49-3.89 3.77-3.89 1.09 0 2.24.2 2.24.2v2.46H15.2c-1.24 0-1.63.77-1.63 1.56V12h2.77l-.44 2.89h-2.33v6.99A10 10 0 0 0 22 12z'/></svg>");
}

.auth-social-section__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.google-auth-mount {
  min-height: 44px;
  display: flex;
  justify-content: center;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  transform: translateY(-50%);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(8, 14, 27, 0.88);
}

body.frontend-theme-default .auth-social-section {
  border-color: rgba(118, 148, 193, 0.14);
  background:
    radial-gradient(circle at top right, rgba(0, 212, 255, 0.1), transparent 38%),
    radial-gradient(circle at bottom left, rgba(0, 255, 136, 0.08), transparent 34%),
    rgba(8, 14, 27, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .google-auth-mount > div {
  width: 100% !important;
  display: flex !important;
  justify-content: center;
}

body.frontend-theme-default .google-auth-mount iframe {
  width: min(100%, 340px) !important;
}

.google-auth-mount > div,
.google-auth-mount iframe {
  max-width: 100% !important;
}

.auth-tabs {
  /* v55gd: 改 flex 自適應 N tabs（之前寫死 2 col，3 個 tab 第三個會 wrap）。
   * 影響 customer-login (2 tab: 登入/註冊) + my-coupons (3 tab: 可使用/已使用/已過期) */
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 14, 27, 0.55);
}
.auth-tabs > .auth-tab {
  flex: 1 1 0;
  min-width: 0;
}

.auth-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-tab:hover {
  color: var(--ink, #f8fafc);
}

.auth-tab.is-active {
  color: #0f172a;
  background: linear-gradient(135deg, rgba(78, 255, 195, 0.95), rgba(56, 189, 248, 0.95));
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
}

.auth-tab:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
}

.password-field > input {
  flex: 1;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.85);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
  color: var(--ink, #f8fafc);
  background: rgba(148, 163, 184, 0.14);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 1px;
}

.password-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/><circle cx='12' cy='12' r='3'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/><circle cx='12' cy='12' r='3'/></svg>");
}

.password-toggle.is-active::before {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/><line x1='1' y1='1' x2='23' y2='23'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/><line x1='1' y1='1' x2='23' y2='23'/></svg>");
}

body.frontend-theme-default .store-page--fusion .store-hero-copy {
  gap: 14px;
}

body.frontend-theme-default .store-page--fusion .store-hero-copy h1 {
  font-size: clamp(28px, 3.3vw, 42px);
  letter-spacing: -0.035em;
}

body.frontend-theme-default .store-page--fusion .store-hero-desc {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.75;
}

body.frontend-theme-default .store-page--fusion .store-layout-v2 {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

body.frontend-theme-default .store-page--fusion .store-aside {
  top: 86px;
}

body.frontend-theme-default .store-page--fusion .store-catalog-panel {
  border-radius: 16px;
  border-color: rgba(124, 132, 160, 0.1);
  background: linear-gradient(180deg, rgba(26, 28, 44, 0.8), rgba(22, 24, 38, 0.86));
  box-shadow: 0 8px 20px rgba(2, 8, 23, 0.14);
}

body.frontend-theme-default .store-page--fusion .store-panel-head {
  padding: 16px 16px 0;
}

body.frontend-theme-default .store-page--fusion .store-category-list {
  gap: 7px;
  padding: 10px 10px 12px;
}

body.frontend-theme-default .store-page--fusion .store-category-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border-color: rgba(124, 132, 160, 0.12);
  background: rgba(24, 27, 42, 0.66);
}

body.frontend-theme-default .store-page--fusion .store-category-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 132, 160, 0.16);
  background: rgba(28, 31, 48, 0.8);
}

body.frontend-theme-default .store-page--fusion .store-category-btn.is-active {
  border-color: rgba(92, 230, 193, 0.26);
  background: linear-gradient(180deg, rgba(24, 43, 49, 0.86), rgba(19, 33, 38, 0.92));
  box-shadow: 0 8px 16px rgba(4, 12, 26, 0.12);
}

body.frontend-theme-default .store-page--fusion .store-category-btn__label {
  font-size: 13px;
}

body.frontend-theme-default .store-page--fusion .store-category-btn__main {
  gap: 9px;
}

body.frontend-theme-default .store-page--fusion .store-category-btn__icon {
  width: 1.25rem;
  font-size: 0.96rem;
  color: rgba(145, 255, 221, 0.96);
}

body.frontend-theme-default .store-page--fusion .store-category-btn__meta {
  min-width: 26px;
  padding: 3px 7px;
  font-size: 11px;
}

body.frontend-theme-default .store-page--fusion .store-toolbar-v2 {
  gap: 10px;
  padding: 12px;
}

body.frontend-theme-default .store-page--fusion .store-search-field {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
}

body.frontend-theme-default .store-page--fusion .store-toolbar-v2__actions {
  gap: 12px;
}

body.frontend-theme-default .store-page--fusion .store-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2 {
  border-radius: 12px;
  border-color: rgba(124, 132, 160, 0.1);
  box-shadow: 0 8px 18px rgba(2, 8, 23, 0.14);
}

body.frontend-theme-default .store-page--fusion .store-card-v2:hover {
  box-shadow: 0 12px 22px rgba(2, 8, 23, 0.16);
}

body.frontend-theme-default .store-page--fusion .store-card-v2__media {
  min-height: 220px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__body {
  gap: 10px;
  padding: 11px;
}

body.page-composer-preview-mode {
  /* c159: overflow-x: clip 避 iOS Safari scroll lock — 詳見
     .claude/skills/ios-safari-overflow-scroll-lock/SKILL.md
     (admin preview mode 通常桌機看，但保險起見也修) */
  overflow-x: hidden; /* iOS < 16 fallback */
  overflow-x: clip;   /* iOS 16+ */
}

body.page-composer-preview-mode .page-composer-selected-node {
  outline: 2px solid rgba(211, 233, 122, 0.92);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(211, 233, 122, 0.12);
}

body.page-composer-preview-mode header.topbar.topbar--demo-v3.page-composer-selected-node {
  outline-offset: -2px;
}

body.page-composer-preview-mode .page.home-page .page-composer-stage-active {
  min-height: max(var(--composer-stage-min, 0px), 0px);
}

body.frontend-theme-default .store-page--fusion .store-card-v2__headline h3 {
  font-size: 16px;
  line-height: 1.4;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__subtitle,
body.frontend-theme-default .store-page--fusion .store-card-v2__summary {
  font-size: 12px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__summary {
  line-height: 1.65;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__tags {
  gap: 6px;
}

body.frontend-theme-default .store-page--fusion .store-chip,
body.frontend-theme-default .store-page--fusion .store-badge {
  min-height: 26px;
  padding: 0 9px;
  font-size: 10px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__badges {
  top: 12px;
  left: 12px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__price {
  right: 12px;
  bottom: 12px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

body.frontend-theme-default .store-page--fusion .store-stock {
  gap: 6px;
}

body.frontend-theme-default .store-page--fusion .store-stock__meta {
  font-size: 11px;
}

body.frontend-theme-default .store-page--fusion .store-card-v2__actions,
body.frontend-theme-default .store-page--fusion .store-card-v2__list-meta {
  gap: 10px;
}

body.frontend-theme-default .market-checkbox {
  background: rgba(10, 17, 31, 0.8);
  border-color: rgba(118, 148, 193, 0.18);
  color: rgba(231, 241, 255, 0.74);
}

body.frontend-theme-default .market-group-summary {
  gap: 16px;
  padding: 16px;
}

body.frontend-theme-default .market-group-body {
  padding: 0 16px 16px;
}

body.frontend-theme-default .detail {
  padding-top: 8px;
}

body.frontend-theme-default .detail-hero {
  gap: 18px;
  padding: 24px;
  border-radius: 30px;
  border: 1px solid rgba(118, 148, 193, 0.14);
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 255, 136, 0.12), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(0, 212, 255, 0.14), transparent 24%),
    linear-gradient(160deg, rgba(9, 16, 31, 0.96), rgba(12, 19, 36, 0.82));
  box-shadow: 0 28px 68px rgba(2, 8, 23, 0.36);
}

body.frontend-theme-default .detail-thumb {
  min-height: 320px;
  border-radius: 26px;
  border: 1px solid rgba(118, 148, 193, 0.12);
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 212, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(14, 22, 41, 0.95), rgba(10, 16, 28, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .detail-main h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.frontend-theme-default .detail-grid {
  gap: 18px;
}

body.frontend-theme-default .draw-bar {
  position: sticky;
  bottom: 18px;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(118, 148, 193, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 17, 31, 0.94), rgba(10, 17, 31, 0.86));
  backdrop-filter: blur(16px) saturate(1.06);
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.38);
}

body.frontend-theme-default .draw-summary {
  gap: 12px;
}

body.frontend-theme-default .draw-summary > div {
  min-width: 116px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(118, 148, 193, 0.14);
  background: rgba(13, 20, 39, 0.76);
}

body.frontend-theme-default .draw-summary span {
  color: rgba(153, 174, 202, 0.82);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.frontend-theme-default .draw-summary strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 20px;
  color: #f4fbff;
}

body.frontend-theme-default .draw-options {
  gap: 10px;
}

body.frontend-theme-default .play-history-card,
body.frontend-theme-default .detail-card,
body.frontend-theme-default .news-rail-card,
body.frontend-theme-default .news-card,
body.frontend-theme-default .news-grid > * {
  border-radius: 24px;
}

body.frontend-theme-default .modal-card {
  border-radius: 28px;
  border: 1px solid rgba(118, 148, 193, 0.16);
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.97), rgba(9, 15, 28, 0.88));
  box-shadow: 0 30px 90px rgba(2, 8, 23, 0.45);
}

body.frontend-theme-default .draw-overlay-card {
  border-radius: 30px;
  border: 1px solid rgba(118, 148, 193, 0.16);
  background: rgba(9, 15, 28, 0.82);
}

body.frontend-theme-default .footer,
body.frontend-theme-default .footer.footer-legal {
  width: min(calc(100% - 32px), 1320px);
  margin: 0 auto 34px;
  border-radius: 24px;
  border: 1px solid rgba(118, 148, 193, 0.14);
  background:
    linear-gradient(180deg, rgba(9, 15, 28, 0.88), rgba(8, 14, 27, 0.74));
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.34);
}

body.frontend-theme-default .footer-legal-shell {
  background: transparent;
}

body.frontend-theme-default .mobile-tabbar {
  border-color: rgba(118, 148, 193, 0.18);
  background: rgba(10, 17, 31, 0.92);
}

@media (max-width: 1180px) {
  body.frontend-theme-default .page,
  body.frontend-theme-default .footer {
    width: min(calc(100% - 24px), 1200px);
  }

  body.frontend-theme-default .topbar {
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }

  body.frontend-theme-default .detail-hero,
  body.frontend-theme-default .store-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1360px) {
  body.frontend-theme-default .home-page #cardGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default .topbar {
    top: 0;
    padding: 12px 16px;
    border-radius: 0;
  }

  body.frontend-theme-default .page {
    width: min(calc(100% - 20px), 100%);
    margin-top: 14px;
    gap: 16px;
  }

  body.frontend-theme-default .page.home-page {
    padding-top: 18px;
    padding-bottom: 56px;
  }

  body.frontend-theme-default .section,
  body.frontend-theme-default .cta,
  body.frontend-theme-default .store-main,
  body.frontend-theme-default .auth-card,
  body.frontend-theme-default .store-checkout-card,
  body.frontend-theme-default .store-orders-shell,
  body.frontend-theme-default .store-success-card {
    padding: 18px;
    border-radius: 22px;
  }

  body.frontend-theme-default .banner.carousel {
    min-height: 340px;
    padding: 12px;
    border-radius: 24px;
  }

  body.frontend-theme-default .home-conversion-primary,
  body.frontend-theme-default .pool-card,
  body.frontend-theme-default .store-card,
  body.frontend-theme-default .market-grid > *,
  body.frontend-theme-default .detail-hero,
  body.frontend-theme-default .modal-card {
    border-radius: 22px;
  }

  body.frontend-theme-default .draw-bar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 20px;
    padding: 14px;
  }
}

body.frontend-theme-default:has(.page.home-page),
body.frontend-theme-default:has(.page.store-page--fusion) {
  --bg: #111221;
  --bg-2: #171827;
  --card: rgba(26, 26, 46, 0.76);
  --line: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --muted: #a0a6bf;
  --text-muted: var(--muted);
  --public-btn-ghost-bg: rgba(20, 20, 40, 0.62);
  --public-btn-ghost-border: rgba(255, 255, 255, 0.08);
  --public-btn-ghost-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  --public-btn-chip-bg: rgba(24, 24, 42, 0.72);
  --public-btn-chip-border: rgba(255, 255, 255, 0.08);
  --public-btn-chip-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  --public-btn-chip-active-shadow: 0 8px 14px rgba(0, 255, 136, 0.08);
  --cosmic-surface: rgba(22, 22, 38, 0.72);
  --cosmic-surface-strong: rgba(20, 20, 40, 0.84);
  --cosmic-line: rgba(255, 255, 255, 0.08);
  --cosmic-glow-green: 0 0 8px rgba(0, 255, 136, 0.08), 0 0 14px rgba(0, 255, 136, 0.03);
  --cosmic-glow-blue: 0 0 8px rgba(0, 212, 255, 0.08), 0 0 14px rgba(0, 212, 255, 0.03);
  --cosmic-panel-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  background:
    radial-gradient(circle at top center, rgba(99, 79, 188, 0.08) 0%, transparent 28%),
    linear-gradient(180deg, #10111f 0%, #141526 50%, #0f1020 100%);
}

body.frontend-theme-default:has(.page.home-page)::before,
body.frontend-theme-default:has(.page.store-page--fusion)::before {
  background-image:
    radial-gradient(1px 1px at 14% 24%, rgba(255, 255, 255, 0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 32% 68%, rgba(255, 255, 255, 0.06) 0%, transparent 100%),
    radial-gradient(1px 1px at 62% 18%, rgba(255, 255, 255, 0.05) 0%, transparent 100%),
    radial-gradient(1px 1px at 84% 74%, rgba(255, 255, 255, 0.07) 0%, transparent 100%);
  opacity: 0.12;
}

body.frontend-theme-default:has(.page.home-page)::after,
body.frontend-theme-default:has(.page.store-page--fusion)::after {
  background: linear-gradient(180deg, rgba(9, 10, 20, 0) 0%, rgba(9, 10, 20, 0.08) 100%);
}

body.frontend-theme-default:has(.page.home-page) .bg-orb,
body.frontend-theme-default:has(.page.store-page--fusion) .bg-orb {
  display: none;
}

body.frontend-theme-default:has(.page.home-page) .topbar,
body.frontend-theme-default:has(.page.store-page--fusion) .topbar {
  padding: 14px max(16px, calc((100vw - 1280px) / 2 + 32px));
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(20, 20, 40, 0.78), rgba(20, 20, 40, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(1.02);
}

body.frontend-theme-default:has(.page.home-page) .page,
body.frontend-theme-default:has(.page.store-page--fusion) .page {
  width: min(100%, 1280px);
  margin: 16px auto 72px;
  gap: 16px;
  padding-left: clamp(16px, 2vw, 32px);
  padding-right: clamp(16px, 2vw, 32px);
}

body.frontend-theme-default:has(.page.home-page) .page.home-page,
body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion {
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 64px;
}

body.frontend-theme-default:has(.page.home-page) .footer,
body.frontend-theme-default:has(.page.store-page--fusion) .footer,
body.frontend-theme-default:has(.page.home-page) .footer.footer-legal,
body.frontend-theme-default:has(.page.store-page--fusion) .footer.footer-legal {
  width: min(100%, 1280px);
  padding-left: clamp(16px, 2vw, 32px);
  padding-right: clamp(16px, 2vw, 32px);
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(20, 20, 40, 0.78), rgba(17, 18, 31, 0.72));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default:has(.page.home-page) .page.home-page .section:not(.home-conversion),
body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .section,
body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .store-main {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.74), rgba(20, 20, 40, 0.68));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.home-page) .page.home-page .section:not(.home-conversion),
body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .section {
  padding: 18px;
}

body.frontend-theme-default:has(.page.home-page) .page.home-page .section-head,
body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .section-head {
  margin-bottom: 16px;
}

body.frontend-theme-default:has(.page.home-page) .banner.carousel {
  min-height: 400px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.96), rgba(20, 20, 40, 0.88));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.home-page) .carousel-track,
body.frontend-theme-default:has(.page.home-page) #promoTrack {
  border-radius: 14px;
}

body.frontend-theme-default:has(.page.home-page) .carousel-control {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 40, 0.76);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-primary,
body.frontend-theme-default:has(.page.home-page) .home-conversion-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.78), rgba(20, 20, 40, 0.7));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-primary {
  border-radius: 16px;
  padding: 14px;
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-primary-media,
body.frontend-theme-default:has(.page.home-page) .home-conversion-card-thumb {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-label,
body.frontend-theme-default:has(.page.home-page) .banner-pill {
  padding: 7px 12px;
  background: rgba(24, 24, 42, 0.68);
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default:has(.page.home-page) .home-conversion-card {
  border-radius: 14px;
}

body.frontend-theme-default:has(.page.home-page) .category-tab {
  background: rgba(24, 24, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default:has(.page.home-page) .category-tab.active,
body.frontend-theme-default:has(.page.home-page) .category-tab:hover {
  box-shadow: 0 6px 14px rgba(0, 255, 136, 0.08);
}

body.frontend-theme-default:has(.page.home-page) .home-page .section {
  padding: 14px;
  border-radius: 16px;
}

body.frontend-theme-default:has(.page.home-page) .home-page .filters {
  gap: 8px;
}

body.frontend-theme-default:has(.page.home-page) .home-page .search input,
body.frontend-theme-default:has(.page.home-page) .home-page .sort select {
  border-radius: 12px;
}

body.frontend-theme-default:has(.page.home-page) .home-page .search input {
  padding: 10px 13px;
}

body.frontend-theme-default:has(.page.home-page) .home-page #cardGrid {
  gap: 12px;
}

body.frontend-theme-default:has(.page.home-page) .home-page .pool-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.78), rgba(20, 20, 40, 0.72));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.home-page) .home-page .pool-card:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default:has(.page.home-page) .home-page .pool-card-image {
  margin: 0 12px;
  border-color: rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-hero-panel {
  padding: 16px 18px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.82), rgba(20, 20, 40, 0.84));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-layout-v2 {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-catalog-panel {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.76), rgba(20, 20, 40, 0.7));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-panel-head {
  padding: 14px 14px 0;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-category-list {
  padding: 10px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-category-btn {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 42, 0.68);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-category-btn.is-active {
  background: linear-gradient(180deg, rgba(24, 43, 49, 0.82), rgba(19, 33, 38, 0.88));
  box-shadow: 0 6px 14px rgba(4, 12, 26, 0.1);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-toolbar-v2 {
  padding: 10px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-search-field {
  min-height: 46px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-products-grid {
  gap: 12px;
  padding: 10px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-card-v2 {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.78), rgba(20, 20, 40, 0.72));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-card-v2:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-card-v2__media {
  min-height: 216px;
}

body.frontend-theme-default:has(.page.store-page--fusion) .store-page--fusion .store-card-v2__body {
  padding: 10px;
}

@media (max-width: 1180px) {
  body.frontend-theme-default:has(.page.home-page) .page,
  body.frontend-theme-default:has(.page.store-page--fusion) .page,
  body.frontend-theme-default:has(.page.home-page) .footer,
  body.frontend-theme-default:has(.page.store-page--fusion) .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  body.frontend-theme-default:has(.page.home-page) .topbar,
  body.frontend-theme-default:has(.page.store-page--fusion) .topbar {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default:has(.page.home-page) .topbar,
  body.frontend-theme-default:has(.page.store-page--fusion) .topbar {
    padding: 12px 16px;
  }

  body.frontend-theme-default:has(.page.home-page) .page,
  body.frontend-theme-default:has(.page.store-page--fusion) .page,
  body.frontend-theme-default:has(.page.home-page) .footer,
  body.frontend-theme-default:has(.page.store-page--fusion) .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.frontend-theme-default:has(.page.home-page) .page.home-page,
  body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion {
    padding-top: 18px;
    padding-bottom: 56px;
  }

  body.frontend-theme-default:has(.page.home-page) .page.home-page .section:not(.home-conversion),
  body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .section,
  body.frontend-theme-default:has(.page.store-page--fusion) .page.store-page--fusion .store-main {
    border-radius: 18px;
    padding: 16px;
  }

  body.frontend-theme-default:has(.page.home-page) .banner.carousel {
    min-height: 340px;
    border-radius: 18px;
  }
}
/* === End Cosmic Neon Default Theme === */

/* H5 galaxy bottom navigation shared by public pages.
 * Do not restore .mobile-tabbar__fallback or text-glyph icon rules here.
 */
body.frontend-theme-default .mobile-tabbar {
  left: 0;
  right: 0;
  bottom: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  height: calc(66px + env(safe-area-inset-bottom));
  min-height: calc(66px + env(safe-area-inset-bottom));
  padding: 5px 0 env(safe-area-inset-bottom);
  border: 0;
  border-top: 1px solid rgba(196, 176, 255, 0.42);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(35, 19, 85, 0.9), rgba(10, 5, 32, 0.98));
  box-shadow: 0 -10px 28px rgba(32, 8, 60, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
  z-index: 80;
}

body.frontend-theme-default .mobile-tabbar::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 155, 231, 0.72),
    rgba(138, 229, 255, 0.62),
    transparent
  );
  pointer-events: none;
}

body.frontend-theme-default .mobile-tabbar a,
body.frontend-theme-default .mobile-tabbar a:not(.is-active),
body.frontend-theme-default .mobile-tabbar a.is-active {
  min-height: 58px;
  gap: 3px;
  padding: 4px 2px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(246, 242, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  transform: none;
}

body.frontend-theme-default .mobile-tabbar a:hover,
body.frontend-theme-default .mobile-tabbar a:active {
  transform: none;
}

body.frontend-theme-default .mobile-tabbar a.is-active {
  color: #ff9be7;
  text-shadow:
    0 0 10px rgba(255, 155, 231, 0.58),
    0 1px 2px rgba(0, 0, 0, 0.68);
}

body.frontend-theme-default .mobile-tabbar__icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  font-size: 17px;
  line-height: 1;
}

body.frontend-theme-default .mobile-tabbar__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(1px) scale(0.96);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  filter:
    drop-shadow(0 0 6px rgba(255, 213, 110, 0.2))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

body.frontend-theme-default .mobile-tabbar__icon[data-loaded="1"] img {
  opacity: 1;
  transform: none;
}

body.frontend-theme-default .mobile-tabbar a.is-active .mobile-tabbar__icon img {
  filter:
    drop-shadow(0 0 14px rgba(255, 155, 231, 0.72))
    drop-shadow(0 0 10px rgba(138, 229, 255, 0.4))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

body.frontend-theme-default .mobile-tabbar__label {
  line-height: 1.1;
}
/* === Starkuji Demo Structure V1 === */
body.frontend-theme-default:has(.page.home-page--demo),
body.frontend-theme-default:has(.page.store-page--demo) {
  --bg: #10111f;
  --bg-2: #15172a;
  --card: rgba(21, 22, 38, 0.78);
  --border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --muted: #a7adc5;
  --text-muted: var(--muted);
  --layout-max-width: 1280px;
  --layout-padding: 32px;
  background:
    linear-gradient(180deg, #10111f 0%, #141526 52%, #0f1020 100%);
}

body.frontend-theme-default:has(.page.home-page--demo)::before,
body.frontend-theme-default:has(.page.store-page--demo)::before {
  opacity: 0.08;
  background-image:
    radial-gradient(1px 1px at 12% 16%, rgba(255, 255, 255, 0.18) 0%, transparent 100%),
    radial-gradient(1px 1px at 44% 74%, rgba(255, 255, 255, 0.12) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 22%, rgba(255, 255, 255, 0.14) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 68%, rgba(255, 255, 255, 0.16) 0%, transparent 100%);
}

body.frontend-theme-default:has(.page.home-page--demo)::after,
body.frontend-theme-default:has(.page.store-page--demo)::after {
  background: linear-gradient(180deg, rgba(16, 17, 31, 0) 0%, rgba(16, 17, 31, 0.14) 100%);
}

body.frontend-theme-default .topbar.topbar--demo,
body.frontend-theme-default:has(.page.home-page) .topbar.topbar--demo,
body.frontend-theme-default:has(.page.store-page--fusion) .topbar.topbar--demo {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  margin: 0;
  /* A11y + size fix: padding forced to 0 overrides the :has(.page.home-page) rule
   * that was inflating the topbar to 93px. Shell height drops 64 -> 56. */
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(18, 19, 35, 0.84), rgba(18, 19, 35, 0.58));
  backdrop-filter: blur(16px) saturate(1.04);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.frontend-theme-default .topbar.topbar--demo .topbar-shell,
body.frontend-theme-default:has(.page.home-page) .topbar.topbar--demo .topbar-shell,
body.frontend-theme-default:has(.page.store-page--fusion) .topbar.topbar--demo .topbar-shell {
  width: min(100%, 1280px);
  height: 56px;
  margin: 0 auto;
  padding: 0 32px;
  /* 3-column grid keeps the nav dead-centered regardless of logo/actions
   * widths. Auto middle column = nav takes exactly its pill width, two
   * equal 1fr flanks hold the logo (left) and actions (right). */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-shell > .brand-link {
  justify-self: start;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-shell > .nav--demo {
  justify-self: center;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-shell > .topbar-actions {
  justify-self: end;
  margin-left: 0;
}

/* Same grid for legacy pages that still have the unmigrated <header class="topbar">
 * structure (no .topbar-shell wrapper, direct flex children). */
body.frontend-theme-default header.topbar:not(.topbar--demo) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .brand-link {
  justify-self: start;
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .nav {
  justify-self: center;
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .topbar-actions {
  justify-self: end;
}

/* Legacy <nav class="nav"> (no --demo) should also look like a pill group
 * so it matches the demo/v3 topbar on other pages. */
body.frontend-theme-default header.topbar:not(.topbar--demo) > .nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .nav a {
  padding: 8px 18px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.2s ease;
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

/* 2026-04-26: 手機把 topbar 壓成 2 欄 single row，避免 3-fr-grid 把 actions
   壓成 94px 寬+垂直 wrap（199px 高吃 32% 螢幕）。Actions 改 nowrap +
   horizontal-scroll fallback；按鈕字級縮小到 12px，padding 6×10。 */
@media (max-width: 600px) {
  body.frontend-theme-default header.topbar:not(.topbar--demo) {
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-top, 0px));
  }

  body.frontend-theme-default header.topbar:not(.topbar--demo) > .topbar-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    width: auto;
    justify-content: flex-end;
    gap: 6px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  body.frontend-theme-default header.topbar:not(.topbar--demo) > .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  body.frontend-theme-default header.topbar:not(.topbar--demo) > .topbar-actions .btn {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
    min-height: 36px;
    line-height: 1;
  }

  body.frontend-theme-default header.topbar:not(.topbar--demo) > .topbar-actions .site-music-toggle {
    width: 36px;
    height: 36px;
  }

  body.frontend-theme-default header.topbar:not(.topbar--demo) > .brand-link .brand-link__image {
    height: 32px;
    max-width: 38vw;
  }
}

body.frontend-theme-default header.topbar:not(.topbar--demo) > .nav a.is-active {
  color: #0f172a;
  background: linear-gradient(135deg, #4effc3, #38bdf8);
  box-shadow: 0 6px 18px rgba(78, 255, 195, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: none;
}

body.frontend-theme-default .topbar.topbar--demo .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
}

body.frontend-theme-default .topbar.topbar--demo .brand-link__wordmark {
  color: #00ff88;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body.frontend-theme-default .topbar.topbar--demo .brand-link__suffix {
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

body.frontend-theme-default .topbar.topbar--demo .nav--demo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.frontend-theme-default .topbar.topbar--demo .nav--demo a {
  position: relative;
  padding: 8px 18px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.2s ease;
}

body.frontend-theme-default .topbar.topbar--demo .nav--demo a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default .topbar.topbar--demo .nav--demo a.is-active {
  color: #0f172a;
  background: linear-gradient(135deg, #4effc3, #38bdf8);
  box-shadow: 0 6px 18px rgba(78, 255, 195, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: none;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-cta {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00ff88, #38bdf8);
  color: #0f172a;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 26px rgba(0, 255, 136, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.frontend-theme-default .topbar.topbar--demo .topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 255, 136, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  filter: brightness(1.05);
}

body.frontend-theme-default .topbar.topbar--demo .topbar-cta:active {
  transform: translateY(0);
}

body.frontend-theme-default .topbar.topbar--demo .customer-entry,
body.frontend-theme-default .topbar.topbar--demo .topbar-user {
  min-height: 42px;
  min-width: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease;
}

body.frontend-theme-default .topbar.topbar--demo .customer-entry:hover,
body.frontend-theme-default .topbar.topbar--demo .topbar-user:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

body.frontend-theme-default .topbar.topbar--demo .topbar-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

body.frontend-theme-default .page.home-page--demo,
body.frontend-theme-default .page.store-page--demo,
body.frontend-theme-default .footer.footer--demo-shell {
  width: min(100%, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

body.frontend-theme-default .page.home-page--demo,
body.frontend-theme-default .page.store-page--demo {
  margin-bottom: 72px;
  padding-top: 96px;
  padding-bottom: 0;
  display: grid;
  gap: 28px;
}

body.frontend-theme-default .footer.footer--demo-shell {
  margin-top: 0;
  margin-bottom: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(20, 20, 40, 0.72), rgba(17, 18, 31, 0.7));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default .home-hero-shell,
body.frontend-theme-default .home-featured-shell,
body.frontend-theme-default .home-pools-shell,
body.frontend-theme-default .home-support-panel,
body.frontend-theme-default .home-cta-shell,
body.frontend-theme-default .home-news-shell,
body.frontend-theme-default .store-hero-panel--demo,
body.frontend-theme-default .store-shell-v2--demo,
body.frontend-theme-default .store-page--demo .store-catalog-panel {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.76), rgba(20, 20, 40, 0.68));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default .home-hero-shell,
body.frontend-theme-default .home-featured-shell,
body.frontend-theme-default .home-pools-shell,
body.frontend-theme-default .home-support-panel,
body.frontend-theme-default .home-news-shell,
body.frontend-theme-default .store-hero-panel--demo,
body.frontend-theme-default .store-shell-v2--demo {
  padding: 18px;
}

body.frontend-theme-default .home-shell-head,
body.frontend-theme-default .store-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

body.frontend-theme-default .home-shell-head--split {
  align-items: center;
}

body.frontend-theme-default .home-shell-head__copy,
body.frontend-theme-default .store-panel-head > div {
  display: grid;
  gap: 6px;
}

body.frontend-theme-default .home-shell-kicker,
body.frontend-theme-default .store-section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.78);
}

body.frontend-theme-default .home-shell-head h2,
body.frontend-theme-default .store-panel-head h2,
body.frontend-theme-default .store-hero-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
  color: #ffffff;
}

body.frontend-theme-default .home-shell-head p,
body.frontend-theme-default .store-hero-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.56);
}

body.frontend-theme-default .home-hero-shell {
  padding: 0;
  overflow: hidden;
}

body.frontend-theme-default .home-page--demo .banner.carousel {
  min-height: 520px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #111221;
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .carousel-track,
body.frontend-theme-default .home-page--demo #promoTrack {
  border-radius: 20px;
}

body.frontend-theme-default .home-page--demo .carousel-control {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 18, 31, 0.58);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .carousel-control:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

body.frontend-theme-default .home-featured-shell {
  display: grid;
  gap: 18px;
}

body.frontend-theme-default .home-page--demo .home-conversion-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 14px;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary,
body.frontend-theme-default .home-page--demo .home-conversion-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 19, 34, 0.78);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.frontend-theme-default .home-page--demo .home-conversion-primary {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
}

body.frontend-theme-default .home-page--demo .home-conversion-label {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 136, 0.24);
  background: rgba(0, 255, 136, 0.08);
  color: rgba(0, 255, 136, 0.92);
}

body.frontend-theme-default .home-page--demo .home-conversion-low-stock {
  position: absolute;
  top: 16px;
  left: 122px;
  z-index: 2;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary-media {
  min-height: 320px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background-color: rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .home-page--demo .home-conversion-primary h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: #ffffff;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.56);
}

body.frontend-theme-default .home-page--demo .home-conversion-primary .btn {
  justify-self: start;
}

body.frontend-theme-default .home-page--demo .home-conversion-cards {
  display: grid;
  gap: 12px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card-thumb {
  min-height: 88px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default .home-page--demo .home-conversion-card-meta {
  display: grid;
  gap: 6px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card-meta strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
}

body.frontend-theme-default .home-page--demo .home-conversion-card-meta span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.08);
  color: rgba(0, 255, 136, 0.92);
  font-size: 12px;
  font-weight: 700;
}

body.frontend-theme-default .home-pools-shell {
  display: grid;
  gap: 18px;
}

body.frontend-theme-default .home-pools-controls {
  display: grid;
  gap: 12px;
}

body.frontend-theme-default .home-page--demo .pool-filter-stack {
  gap: 10px;
}

body.frontend-theme-default .home-page--demo .category-tabs {
  gap: 10px;
}

body.frontend-theme-default .home-page--demo .category-tab {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .category-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 255, 136, 0.08);
}

body.frontend-theme-default .home-page--demo .filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

body.frontend-theme-default .home-page--demo .search input,
body.frontend-theme-default .home-page--demo .sort select {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo #cardGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.frontend-theme-default .home-page--demo .pool-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(18, 19, 34, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default .home-page--demo .pool-card:hover {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

body.frontend-theme-default .home-page--demo .pool-card-top,
body.frontend-theme-default .home-page--demo .pool-card-bottom {
  padding: 14px;
}

body.frontend-theme-default .home-page--demo .pool-card-image {
  margin: 0 14px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default .home-page--demo .pool-name {
  font-size: 15px;
  line-height: 1.45;
}

body.frontend-theme-default .home-page--demo .draw-options {
  gap: 8px;
}

body.frontend-theme-default .home-page--demo .draw-option {
  min-height: 38px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .draw-option.active {
  border-color: rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.08);
  color: rgba(0, 255, 136, 0.92);
}

body.frontend-theme-default .home-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.frontend-theme-default .home-support-panel {
  display: grid;
  gap: 18px;
}

body.frontend-theme-default .home-cta-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
}

body.frontend-theme-default .home-cta-shell h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  color: #ffffff;
}

body.frontend-theme-default .home-cta-shell p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.56);
}

body.frontend-theme-default .home-news-shell {
  display: grid;
  gap: 18px;
}

body.frontend-theme-default .home-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

body.frontend-theme-default .news-rail-card,
body.frontend-theme-default .news-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 19, 34, 0.72);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo .store-hero-panel--demo {
  padding: 20px 22px;
}

body.frontend-theme-default .store-hero-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.frontend-theme-default .store-hero-heading__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.16);
  font-size: 18px;
}

body.frontend-theme-default .store-page--demo .store-hero-desc {
  max-width: 620px;
}

body.frontend-theme-default .store-page--demo .store-layout-v2 {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.frontend-theme-default .store-page--demo .store-aside {
  top: 92px;
}

body.frontend-theme-default .store-page--demo .store-catalog-panel {
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default .store-page--demo .store-panel-head {
  padding: 16px 16px 0;
}

body.frontend-theme-default .store-page--demo .store-category-list {
  padding: 12px;
  gap: 8px;
}

body.frontend-theme-default .store-page--demo .store-category-btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo .store-category-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

body.frontend-theme-default .store-page--demo .store-category-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo .store-toolbar-v2 {
  gap: 12px;
  padding: 16px;
}

body.frontend-theme-default .store-page--demo .store-search-field {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .store-page--demo .store-sort-control {
  gap: 8px;
}

body.frontend-theme-default .store-page--demo .store-sort-control .input-inline {
  min-height: 40px;
  border-radius: 12px;
}

body.frontend-theme-default .store-page--demo .store-view-btn {
  min-width: 58px;
  min-height: 40px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .store-page--demo .store-view-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

body.frontend-theme-default .store-page--demo .store-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

body.frontend-theme-default .store-page--demo .store-card-v2 {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(18, 19, 34, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

body.frontend-theme-default .store-page--demo .store-card-v2:hover {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.16);
}

body.frontend-theme-default .store-page--demo .store-card-v2__media {
  min-height: 240px;
}

body.frontend-theme-default .store-page--demo .store-card-v2__body {
  gap: 12px;
  padding: 12px;
}

body.frontend-theme-default .store-page--demo .store-card-v2__headline h3 {
  font-size: 15px;
}

body.frontend-theme-default .store-page--demo .store-card-v2__subtitle,
body.frontend-theme-default .store-page--demo .store-card-v2__summary,
body.frontend-theme-default .store-page--demo .store-stock__meta,
body.frontend-theme-default .store-page--demo .store-results-meta {
  color: rgba(255, 255, 255, 0.54);
}

body.frontend-theme-default .store-page--demo .store-card-v2__price {
  min-height: 32px;
  padding: 0 11px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 16, 28, 0.72);
}

body.frontend-theme-default .store-page--demo .store-chip,
body.frontend-theme-default .store-page--demo .store-badge {
  min-height: 26px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1180px) {
  body.frontend-theme-default .topbar.topbar--demo .topbar-shell,
  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  body.frontend-theme-default .home-page--demo #cardGrid,
  body.frontend-theme-default .store-page--demo .store-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.frontend-theme-default .topbar.topbar--demo .nav--demo {
    display: none;
  }

  body.frontend-theme-default .home-page--demo .home-conversion-grid,
  body.frontend-theme-default .home-support-grid,
  body.frontend-theme-default .home-news-layout,
  body.frontend-theme-default .store-page--demo .store-layout-v2 {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .store-page--demo .store-aside {
    display: none;
  }

  body.frontend-theme-default .store-page--demo .store-mobile-filter-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default .topbar.topbar--demo .topbar-shell,
  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.frontend-theme-default .topbar.topbar--demo .topbar-shell {
    gap: 12px;
  }

  body.frontend-theme-default .topbar.topbar--demo .customer-entry {
    display: none;
  }

  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo {
    padding-top: 88px;
    gap: 20px;
  }

  body.frontend-theme-default .home-hero-shell,
  body.frontend-theme-default .home-featured-shell,
  body.frontend-theme-default .home-pools-shell,
  body.frontend-theme-default .home-support-panel,
  body.frontend-theme-default .home-cta-shell,
  body.frontend-theme-default .home-news-shell,
  body.frontend-theme-default .store-hero-panel--demo,
  body.frontend-theme-default .store-shell-v2--demo {
    padding: 16px;
    border-radius: 18px;
  }

  body.frontend-theme-default .home-page--demo .banner.carousel {
    min-height: 360px;
  }

  body.frontend-theme-default .home-page--demo #cardGrid,
  body.frontend-theme-default .store-page--demo .store-products-grid {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .home-page--demo .filters {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .home-page--demo .home-conversion-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  body.frontend-theme-default .home-page--demo .home-conversion-card-cta {
    grid-column: 1 / -1;
    justify-self: start;
  }

  body.frontend-theme-default .home-cta-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* === Starkuji Demo Structure V2 === */
body.frontend-theme-default:has(.page.home-page--demo),
body.frontend-theme-default:has(.page.store-page--demo) {
  --layout-max-width: 1280px;
  --layout-padding: 32px;
  --bg: #0a0a1a;
  --bg-2: #0c0c1f;
  --card: rgba(26, 26, 46, 0.7);
  --border: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --muted: rgba(255, 255, 255, 0.56);
  background-color: #0a0a1a;
  background-image: linear-gradient(180deg, #0a0a1a 0%, #0c0c1f 55%, #090916 100%);
}

body.frontend-theme-default:has(.page.home-page--demo)::before,
body.frontend-theme-default:has(.page.store-page--demo)::before {
  opacity: 0.2;
  background-image:
    radial-gradient(1px 1px at 12% 16%, rgba(255, 255, 255, 0.34) 0%, transparent 100%),
    radial-gradient(1px 1px at 26% 78%, rgba(255, 255, 255, 0.26) 0%, transparent 100%),
    radial-gradient(1px 1px at 44% 74%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 58% 22%, rgba(255, 255, 255, 0.26) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 22%, rgba(255, 255, 255, 0.24) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 68%, rgba(255, 255, 255, 0.28) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 82% 12%, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
}

body.frontend-theme-default:has(.page.home-page--demo)::after,
body.frontend-theme-default:has(.page.store-page--demo)::after {
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 255, 136, 0.05), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(0, 212, 255, 0.05), transparent 32%),
    radial-gradient(circle at 8% 62%, rgba(107, 33, 168, 0.07), transparent 28%);
  opacity: 1;
}

/* Note: primary .topbar.topbar--demo + .nav--demo / .topbar-cta styling
 * lives above (around line ~4307). Duplicate overrides that used to be here
 * were removed so the modern pill-nav + gradient CTA rules can win. */

body.frontend-theme-default .page.home-page--demo,
body.frontend-theme-default .page.store-page--demo,
body.frontend-theme-default .footer.footer--demo-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

body.frontend-theme-default .page.home-page--demo,
body.frontend-theme-default .page.store-page--demo {
  padding-top: 96px;
  padding-bottom: 64px;
  gap: 32px;
}

body.frontend-theme-default .page.home-page--demo > *,
body.frontend-theme-default .page.store-page--demo > * {
  width: 100%;
}

body.frontend-theme-default .home-hero-shell,
body.frontend-theme-default .home-featured-shell,
body.frontend-theme-default .home-pools-shell,
body.frontend-theme-default .home-news-shell,
body.frontend-theme-default .store-shell-v2--demo,
body.frontend-theme-default .store-hero-panel--demo {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .banner.carousel,
body.frontend-theme-default .home-page--demo .home-conversion-primary,
body.frontend-theme-default .home-page--demo .home-conversion-card,
body.frontend-theme-default .home-page--demo .home-support-panel,
body.frontend-theme-default .home-page--demo .home-cta-shell,
body.frontend-theme-default .home-page--demo .news-rail-card,
body.frontend-theme-default .home-page--demo .news-card,
body.frontend-theme-default .store-page--demo .store-catalog-panel,
body.frontend-theme-default .store-page--demo .store-card-v2 {
  background: rgba(26, 26, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body.frontend-theme-default .home-page--demo .banner.carousel {
  min-height: 420px;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
}

body.frontend-theme-default .home-page--demo .carousel-track,
body.frontend-theme-default .home-page--demo #promoTrack {
  border-radius: 24px;
}

body.frontend-theme-default .home-page--demo .carousel-control {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 40, 0.6);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .home-shell-head {
  margin-bottom: 24px;
}

body.frontend-theme-default .home-page--demo .home-shell-kicker,
body.frontend-theme-default .store-page--demo .store-section-label {
  color: rgba(255, 255, 255, 0.34);
  letter-spacing: 0.14em;
}

body.frontend-theme-default .home-page--demo .home-conversion-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 24px;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary,
body.frontend-theme-default .home-page--demo .home-conversion-card {
  border-radius: 24px;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary {
  padding: 24px;
}

body.frontend-theme-default .home-page--demo .home-conversion-primary-media {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .home-page--demo .home-conversion-cards {
  gap: 16px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card {
  gap: 16px;
  padding: 16px;
}

body.frontend-theme-default .home-page--demo .home-conversion-card-thumb {
  border-radius: 14px;
}

body.frontend-theme-default .home-page--demo .home-pools-controls {
  margin-bottom: 16px;
}

body.frontend-theme-default .home-page--demo .pool-filter-stack {
  gap: 12px;
}

body.frontend-theme-default .home-page--demo .category-tabs {
  gap: 10px;
}

body.frontend-theme-default .home-page--demo .category-tab {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo .category-tab.active {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.24);
  color: rgba(255, 255, 255, 0.96);
}

body.frontend-theme-default .home-page--demo .filters {
  gap: 12px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(26, 26, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.frontend-theme-default .home-page--demo .search input,
body.frontend-theme-default .home-page--demo .sort select {
  min-height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default .home-page--demo #cardGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.frontend-theme-default .home-page--demo .pool-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(26, 26, 46, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

body.frontend-theme-default .home-page--demo .pool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

body.frontend-theme-default .home-page--demo .pool-card-image {
  margin: 0 16px;
  border-color: rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .home-page--demo .home-support-grid {
  gap: 24px;
}

body.frontend-theme-default .home-page--demo .home-support-panel,
body.frontend-theme-default .home-page--demo .home-cta-shell {
  border-radius: 24px;
  padding: 28px;
}

body.frontend-theme-default .home-page--demo .home-news-layout {
  gap: 24px;
}

body.frontend-theme-default .home-page--demo .news-rail-card,
body.frontend-theme-default .home-page--demo .news-card {
  border-radius: 20px;
}

body.frontend-theme-default .store-page--demo .store-hero-panel--demo {
  padding: 0 0 8px;
}

body.frontend-theme-default .store-page--demo .store-hero-grid {
  display: block;
}

body.frontend-theme-default .store-page--demo .store-hero-copy {
  max-width: 760px;
}

body.frontend-theme-default .store-page--demo .store-hero-desc {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.56);
}

body.frontend-theme-default .store-page--demo .store-layout-v2 {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

body.frontend-theme-default .store-page--demo .store-aside {
  top: 92px;
}

body.frontend-theme-default .store-page--demo .store-catalog-panel {
  border-radius: 24px;
}

body.frontend-theme-default .store-page--demo .store-panel-head {
  padding: 20px 20px 0;
}

body.frontend-theme-default .store-page--demo .store-category-list {
  padding: 16px;
  gap: 8px;
}

body.frontend-theme-default .store-page--demo .store-category-btn {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo .store-category-btn:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

body.frontend-theme-default .store-page--demo .store-category-btn.is-active {
  border-color: rgba(0, 255, 136, 0.2);
  background: rgba(0, 255, 136, 0.1);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo .store-toolbar-v2 {
  gap: 16px;
  padding: 20px;
}

body.frontend-theme-default .store-page--demo .store-search-field {
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default .store-page--demo .store-sort-control .input-inline {
  min-height: 42px;
  border-radius: 12px;
}

body.frontend-theme-default .store-page--demo .store-view-btn {
  min-width: 58px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body.frontend-theme-default .store-page--demo .store-view-btn.is-active {
  border-color: rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.1);
}

body.frontend-theme-default .store-page--demo .store-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
}

body.frontend-theme-default .store-page--demo .store-card-v2 {
  border-radius: 20px;
}

body.frontend-theme-default .store-page--demo .store-card-v2:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

body.frontend-theme-default .store-page--demo .store-card-v2__media {
  min-height: 228px;
}

body.frontend-theme-default .store-page--demo .store-card-v2__body {
  gap: 12px;
  padding: 14px;
}

body.frontend-theme-default .store-page--demo .store-card-v2__price {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 26, 0.58);
}

body.frontend-theme-default .store-page--demo .store-chip,
body.frontend-theme-default .store-page--demo .store-badge {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1180px) {
  body.frontend-theme-default .topbar.topbar--demo .topbar-shell,
  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  body.frontend-theme-default .home-page--demo #cardGrid,
  body.frontend-theme-default .store-page--demo .store-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.frontend-theme-default .topbar.topbar--demo .nav--demo {
    display: none;
  }

  body.frontend-theme-default .home-page--demo .home-conversion-grid,
  body.frontend-theme-default .home-page--demo .home-support-grid,
  body.frontend-theme-default .home-page--demo .home-news-layout,
  body.frontend-theme-default .store-page--demo .store-layout-v2 {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .store-page--demo .store-aside {
    display: none;
  }

  body.frontend-theme-default .store-page--demo .store-mobile-filter-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default .topbar.topbar--demo .topbar-shell,
  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.frontend-theme-default .page.home-page--demo,
  body.frontend-theme-default .page.store-page--demo {
    padding-top: 88px;
    gap: 24px;
  }

  body.frontend-theme-default .home-page--demo .banner.carousel,
  body.frontend-theme-default .home-page--demo .home-conversion-primary,
  body.frontend-theme-default .home-page--demo .home-conversion-card,
  body.frontend-theme-default .home-page--demo .home-support-panel,
  body.frontend-theme-default .home-page--demo .home-cta-shell,
  body.frontend-theme-default .home-page--demo .news-rail-card,
  body.frontend-theme-default .store-page--demo .store-catalog-panel,
  body.frontend-theme-default .store-page--demo .store-card-v2 {
    border-radius: 18px;
  }

  body.frontend-theme-default .home-page--demo .banner.carousel {
    min-height: 360px;
  }

  body.frontend-theme-default .home-page--demo #cardGrid,
  body.frontend-theme-default .store-page--demo .store-products-grid {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .home-page--demo .filters {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  body.frontend-theme-default .home-page--demo .home-conversion-primary,
  body.frontend-theme-default .home-page--demo .home-support-panel,
  body.frontend-theme-default .home-page--demo .home-cta-shell {
    padding: 20px;
  }

  body.frontend-theme-default .store-page--demo .store-toolbar-v2,
  body.frontend-theme-default .store-page--demo .store-products-grid {
    padding: 16px;
  }
}

/* === Starkuji Demo Structure V3 === */
body.frontend-theme-default:has(.page.home-page--demo-v3),
body.frontend-theme-default:has(.page.store-page--demo-v3) {
  --layout-max-width: 1280px;
  --layout-padding: 32px;
  --bg: #090916;
  --bg-2: #0d0d1f;
  --card: rgba(24, 26, 44, 0.58);
  --border: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.06);
  --muted: rgba(255, 255, 255, 0.56);
  background-color: #090916;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(0, 255, 136, 0.05), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(0, 212, 255, 0.045), transparent 24%),
    radial-gradient(circle at 6% 56%, rgba(107, 33, 168, 0.075), transparent 28%),
    linear-gradient(180deg, #090916 0%, #090a18 52%, #080914 100%);
}

body.frontend-theme-default:has(.page.home-page--demo-v3)::before,
body.frontend-theme-default:has(.page.store-page--demo-v3)::before {
  opacity: 0.26;
  background-image:
    radial-gradient(1px 1px at 12% 16%, rgba(255, 255, 255, 0.34) 0%, transparent 100%),
    radial-gradient(1px 1px at 26% 78%, rgba(255, 255, 255, 0.24) 0%, transparent 100%),
    radial-gradient(1px 1px at 44% 74%, rgba(255, 255, 255, 0.18) 0%, transparent 100%),
    radial-gradient(1px 1px at 58% 22%, rgba(255, 255, 255, 0.24) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 22%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 68%, rgba(255, 255, 255, 0.26) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 82% 12%, rgba(255, 255, 255, 0.16) 0%, transparent 100%);
}

body.frontend-theme-default:has(.page.home-page--demo-v3)::after,
body.frontend-theme-default:has(.page.store-page--demo-v3)::after {
  opacity: 0.65;
  background:
    radial-gradient(circle at 16% 8%, rgba(0, 255, 136, 0.04), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(0, 212, 255, 0.045), transparent 22%),
    radial-gradient(circle at 0% 60%, rgba(107, 33, 168, 0.06), transparent 20%);
}

body.frontend-theme-default .topbar.topbar--demo-v3 {
  background: rgba(12, 13, 28, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.frontend-theme-default .topbar.topbar--demo-v3 .topbar-shell,
body.frontend-theme-default .page.store-page--demo-v3,
body.frontend-theme-default .footer.footer--demo-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

body.frontend-theme-default .page.home-page--demo-v3 {
  width: min(100%, calc(100vw - 48px));
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

body.frontend-theme-default .topbar.topbar--demo-v3 .topbar-shell {
  height: 64px;
  gap: 24px;
}

body.frontend-theme-default .topbar.topbar--demo-v3 .brand-link {
  gap: 6px;
}

body.frontend-theme-default .topbar.topbar--demo-v3 .brand-link__wordmark {
  font-size: 1.02rem;
  letter-spacing: 0.14em;
}

body.frontend-theme-default .topbar.topbar--demo-v3 .brand-link__suffix {
  font-size: 0.72rem;
  opacity: 0.56;
}

/* Legacy .topbar--demo-v3 nav/CTA overrides removed on 2026-04-16 —
 * the pill-nav + gradient active + round CTA design now lives solely under
 * .topbar.topbar--demo (above, ~line 4358). Keeping a minimal rule so v3
 * nav still center-aligns. */
body.frontend-theme-default .topbar.topbar--demo-v3 .nav--demo {
  margin: 0 auto;
}

body.frontend-theme-default .page.home-page--demo-v3,
body.frontend-theme-default .page.store-page--demo-v3 {
  padding-top: 84px;
  padding-bottom: 72px;
  gap: 24px;
}

body.frontend-theme-default .page.home-page--demo-v3 > *,
body.frontend-theme-default .page.store-page--demo-v3 > * {
  width: 100%;
}

body.frontend-theme-default .home-page--demo-v3 .home-section-head,
body.frontend-theme-default .store-page--demo-v3 .store-panel-head,
body.frontend-theme-default .store-page--demo-v3 .store-hero-heading {
  margin-bottom: 0;
}

body.frontend-theme-default .home-page--demo-v3 .home-section-label,
body.frontend-theme-default .store-page--demo-v3 .store-section-label {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.frontend-theme-default .home-page--demo-v3 .home-section-title,
body.frontend-theme-default .store-page--demo-v3 .store-hero-copy h1 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

body.frontend-theme-default .home-page--demo-v3 .home-section-desc,
body.frontend-theme-default .store-page--demo-v3 .store-hero-desc {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.56);
}

body.frontend-theme-default .home-page--demo-v3 .home-hero-shell,
body.frontend-theme-default .home-page--demo-v3 .home-featured-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-pools-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-news-shell--demo-v3,
body.frontend-theme-default .store-page--demo-v3 .store-hero-panel--demo-v3,
body.frontend-theme-default .store-page--demo-v3 .store-shell-v2--demo-v3 {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo-v3 .banner.carousel,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-card,
body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .news-rail-card,
body.frontend-theme-default .home-page--demo-v3 .news-card,
body.frontend-theme-default .store-page--demo-v3 .store-catalog-panel,
body.frontend-theme-default .store-page--demo-v3 .store-card-v2 {
  background: rgba(24, 26, 44, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.frontend-theme-default .home-page--demo-v3 .home-hero-shell {
  padding-top: 4px;
}

body.frontend-theme-default .home-page--demo-v3 .banner.carousel {
  min-height: 360px;
  border-radius: 20px;
  overflow: hidden;
}

body.frontend-theme-default .home-page--demo-v3 .carousel-track,
body.frontend-theme-default .home-page--demo-v3 #promoTrack,
body.frontend-theme-default .home-page--demo-v3 .carousel-hero-link,
body.frontend-theme-default .home-page--demo-v3 .carousel-hero-media {
  border-radius: 20px;
}

body.frontend-theme-default .home-page--demo-v3 .carousel-hero-link::before {
  background:
    linear-gradient(180deg, rgba(9, 9, 22, 0.04) 0%, rgba(9, 9, 22, 0.2) 48%, rgba(9, 9, 22, 0.78) 100%),
    linear-gradient(90deg, rgba(9, 9, 22, 0.68) 0%, rgba(9, 9, 22, 0.08) 48%, rgba(9, 9, 22, 0.24) 100%);
}

body.frontend-theme-default .home-page--demo-v3 .carousel-control {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 28, 0.56);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo-v3 .carousel-hero-badge {
  left: 24px;
  bottom: 20px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 13, 24, 0.74);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(312px, 0.95fr);
  gap: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-card {
  border-radius: 20px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary {
  padding: 20px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary-media {
  min-height: 220px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.05);
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary h3 {
  font-size: clamp(1.35rem, 1.9vw, 1.75rem);
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-card {
  gap: 14px;
  padding: 14px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-card-thumb {
  border-radius: 14px;
}

body.frontend-theme-default .home-page--demo-v3 .home-section-head--pools {
  margin-bottom: 16px;
}

body.frontend-theme-default .home-page--demo-v3 .home-pools-controls--demo-v3 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-filter-stack {
  gap: 8px;
}

body.frontend-theme-default .home-page--demo-v3 .category-tabs {
  gap: 8px;
}

body.frontend-theme-default .home-page--demo-v3 .category-tab {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  background: rgba(24, 26, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo-v3 .category-tab.active {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.22);
  color: rgba(255, 255, 255, 0.96);
}

body.frontend-theme-default .home-page--demo-v3 .filters {
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(23, 25, 41, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo-v3 .search input,
body.frontend-theme-default .home-page--demo-v3 .sort select {
  min-height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default .home-page--demo-v3 #cardGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(24, 26, 42, 0.56);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.frontend-theme-default .home-page--demo-v3 .pool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

body.frontend-theme-default .home-page--demo-v3 .pool-card-top,
body.frontend-theme-default .home-page--demo-v3 .pool-card-bottom {
  padding-left: 14px;
  padding-right: 14px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-card-image {
  margin: 0 14px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.05);
}

body.frontend-theme-default .home-page--demo-v3 .draw-option {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
}

body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3 {
  border-radius: 18px;
  padding: 22px 24px;
}

body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3 {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .home-news-layout {
  gap: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .news-rail-card,
body.frontend-theme-default .home-page--demo-v3 .news-card {
  border-radius: 18px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-panel--demo-v3 {
  padding: 4px 0 2px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-grid {
  display: block;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-copy {
  max-width: 760px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-heading__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 32% 32%, rgba(0, 255, 136, 0.32), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-actions {
  margin-top: 16px;
  gap: 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-layout-v2 {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.frontend-theme-default .store-page--demo-v3 .store-aside {
  top: 88px;
  position: sticky;
}

body.frontend-theme-default .store-page--demo-v3 .store-catalog-panel {
  border-radius: 18px;
}

body.frontend-theme-default .store-page--demo-v3 .store-panel-head {
  padding: 16px 16px 0;
}

body.frontend-theme-default .store-page--demo-v3 .store-category-list {
  padding: 12px;
  gap: 8px;
}

body.frontend-theme-default .store-page--demo-v3 .store-category-btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

body.frontend-theme-default .store-page--demo-v3 .store-category-btn:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

body.frontend-theme-default .store-page--demo-v3 .store-category-btn.is-active {
  border-color: rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.08);
}

body.frontend-theme-default .store-page--demo-v3 .store-toolbar-v2 {
  gap: 12px;
  padding: 14px 16px;
}

/* v62 polish — inherit pill shape from base (20-store.css); keep
 * demo-v3's softer surface tint but override br back to 999 so the
 * pill survives. */
body.frontend-theme-default .store-page--demo-v3 .store-search-field {
  min-height: 48px;
  border-radius: 999px;
  background: rgba(6, 11, 24, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default .store-page--demo-v3 .store-sort-control .input-inline {
  min-height: 34px;
  border-radius: 999px;
}

body.frontend-theme-default .store-page--demo-v3 .store-view-btn {
  min-width: 58px;
  min-height: 34px;
  border-radius: 999px;
  border: 0;
  background: transparent;
}

body.frontend-theme-default .store-page--demo-v3 .store-view-btn.is-active {
  border-color: transparent;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.28) 0%,
    rgba(34, 211, 238, 0.14) 100%
  );
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(34, 211, 238, 0.35);
}

body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2 {
  border-radius: 18px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__media {
  min-height: 196px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__body {
  gap: 10px;
  padding: 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__price {
  min-height: 30px;
  padding: 0 10px;
  background: rgba(10, 10, 24, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.frontend-theme-default .store-page--demo-v3 .store-chip,
body.frontend-theme-default .store-page--demo-v3 .store-badge {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1180px) {
  body.frontend-theme-default .topbar.topbar--demo-v3 .topbar-shell,
  body.frontend-theme-default .page.home-page--demo-v3,
  body.frontend-theme-default .page.store-page--demo-v3,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  body.frontend-theme-default .home-page--demo-v3 #cardGrid,
  body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.frontend-theme-default .topbar.topbar--demo-v3 .nav--demo {
    display: none;
  }

  body.frontend-theme-default .home-page--demo-v3 .home-conversion-grid,
  body.frontend-theme-default .home-page--demo-v3 .home-news-layout,
  body.frontend-theme-default .store-page--demo-v3 .store-layout-v2 {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3 {
    align-items: flex-start;
    flex-direction: column;
  }

  body.frontend-theme-default .store-page--demo-v3 .store-aside {
    display: none;
  }

  body.frontend-theme-default .store-page--demo-v3 .store-mobile-filter-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  body.frontend-theme-default .topbar.topbar--demo-v3 .topbar-shell,
  body.frontend-theme-default .page.home-page--demo-v3,
  body.frontend-theme-default .page.store-page--demo-v3,
  body.frontend-theme-default .footer.footer--demo-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.frontend-theme-default .page.home-page--demo-v3,
  body.frontend-theme-default .page.store-page--demo-v3 {
    padding-top: 80px;
    gap: 20px;
  }

  body.frontend-theme-default .home-page--demo-v3 .banner.carousel {
    min-height: 300px;
  }

  body.frontend-theme-default .home-page--demo-v3 #cardGrid,
  body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .home-page--demo-v3 .filters {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary,
  body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
  body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3 {
    padding: 18px;
  }

  body.frontend-theme-default .store-page--demo-v3 .store-toolbar-v2,
  body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
    padding: 14px;
  }
}

/* === Starkuji Demo Structure V4 === */
body.frontend-theme-default:has(.page.home-page--demo-v3),
body.frontend-theme-default:has(.page.store-page--demo-v3) {
  --layout-max-width: 1280px;
  --layout-padding: 32px;
  --bg: #0a0a1a;
  --bg-2: #111125;
  --card: rgba(26, 26, 46, 0.7);
  --border: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.06);
  --muted: rgba(255, 255, 255, 0.58);
  background-color: #0a0a1a;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(0, 255, 136, 0.03), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(0, 212, 255, 0.03), transparent 24%),
    radial-gradient(circle at 0% 60%, rgba(107, 33, 168, 0.04), transparent 20%),
    linear-gradient(180deg, #0a0a1a 0%, #0c0c1d 52%, #090915 100%);
}

body.frontend-theme-default:has(.page.home-page--demo-v3)::before,
body.frontend-theme-default:has(.page.store-page--demo-v3)::before {
  opacity: 0.18;
}

body.frontend-theme-default:has(.page.home-page--demo-v3)::after,
body.frontend-theme-default:has(.page.store-page--demo-v3)::after {
  opacity: 0.42;
  background:
    radial-gradient(circle at 16% 10%, rgba(0, 255, 136, 0.028), transparent 22%),
    radial-gradient(circle at 84% 18%, rgba(0, 212, 255, 0.03), transparent 22%),
    radial-gradient(circle at 0% 60%, rgba(107, 33, 168, 0.035), transparent 18%);
}

body.frontend-theme-default .topbar.topbar--demo-v3 {
  background: rgba(20, 20, 40, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.frontend-theme-default .topbar.topbar--demo-v3 .topbar-shell {
  width: min(100%, 1280px);
  height: 64px;
  gap: 18px;
}

/* Second legacy block removed on 2026-04-16 — design unified under
 * .topbar.topbar--demo above. */

body.frontend-theme-default .page.home-page--demo-v3 {
  width: min(100%, calc(100vw - 48px));
  padding-top: 80px;
  padding-bottom: 56px;
  gap: 18px;
}

body.frontend-theme-default .page.store-page--demo-v3 {
  width: min(100%, 1280px);
  padding-top: 80px;
  padding-bottom: 56px;
  gap: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .home-hero-shell,
body.frontend-theme-default .home-page--demo-v3 .home-featured-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-pools-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-news-shell--demo-v3,
body.frontend-theme-default .store-page--demo-v3 .store-hero-panel--demo-v3,
body.frontend-theme-default .store-page--demo-v3 .store-shell-v2--demo-v3 {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.frontend-theme-default .home-page--demo-v3 .banner.carousel,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-card,
body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .news-rail-card,
body.frontend-theme-default .home-page--demo-v3 .news-card,
body.frontend-theme-default .store-page--demo-v3 .store-catalog-panel,
body.frontend-theme-default .store-page--demo-v3 .store-card-v2 {
  background: rgba(26, 26, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.frontend-theme-default .home-page--demo-v3 .banner.carousel {
  min-height: 248px;
  border-radius: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .carousel-track,
body.frontend-theme-default .home-page--demo-v3 #promoTrack,
body.frontend-theme-default .home-page--demo-v3 .carousel-hero-link,
body.frontend-theme-default .home-page--demo-v3 .carousel-hero-media {
  border-radius: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary,
body.frontend-theme-default .home-page--demo-v3 .home-conversion-card,
body.frontend-theme-default .home-page--demo-v3 .home-support-panel--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .home-cta-shell--demo-v3,
body.frontend-theme-default .home-page--demo-v3 .news-rail-card,
body.frontend-theme-default .home-page--demo-v3 .news-card {
  border-radius: 16px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary {
  padding: 16px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-card {
  padding: 11px;
}

body.frontend-theme-default .home-page--demo-v3 .home-conversion-primary h3 {
  font-size: clamp(1.24rem, 1.7vw, 1.6rem);
}

body.frontend-theme-default .home-page--demo-v3 .home-section-head--pools {
  margin-bottom: 10px;
}

body.frontend-theme-default .home-page--demo-v3 .home-pools-controls--demo-v3 {
  gap: 10px;
  margin-bottom: 14px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-filter-stack,
body.frontend-theme-default .home-page--demo-v3 .category-tabs {
  gap: 10px;
}

body.frontend-theme-default .home-page--demo-v3 .category-tab {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .home-page--demo-v3 .filters {
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(26, 26, 46, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .home-page--demo-v3 #cardGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-card {
  border-radius: 16px;
  background: rgba(26, 26, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

body.frontend-theme-default .home-page--demo-v3 .pool-card-top,
body.frontend-theme-default .home-page--demo-v3 .pool-card-bottom {
  padding-left: 12px;
  padding-right: 12px;
}

body.frontend-theme-default .home-page--demo-v3 .pool-card-image {
  margin: 0 12px;
  border-radius: 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-panel--demo-v3 {
  padding: 0;
  width: 100%;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-copy {
  max-width: 720px;
}

body.frontend-theme-default .store-page--demo-v3 .store-hero-grid {
  display: block;
  padding: 0;
}

body.frontend-theme-default .store-page--demo-v3 .store-layout-v2 {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

body.frontend-theme-default .store-page--demo-v3 .store-shell-v2--demo-v3 {
  width: 100%;
}

body.frontend-theme-default .store-page--demo-v3 .store-catalog-panel {
  border-radius: 16px;
}

body.frontend-theme-default .store-page--demo-v3 .store-panel-head {
  padding: 14px 14px 0;
}

body.frontend-theme-default .store-page--demo-v3 .store-category-list {
  padding: 10px;
  gap: 8px;
}

body.frontend-theme-default .store-page--demo-v3 .store-category-btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .store-page--demo-v3 .store-toolbar-v2 {
  gap: 12px;
  padding: 10px 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-search-field,
body.frontend-theme-default .store-page--demo-v3 .store-sort-control .input-inline,
body.frontend-theme-default .store-page--demo-v3 .store-view-btn {
  border-radius: 999px;
}

body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 12px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2 {
  border-radius: 16px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__media {
  min-height: 188px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__body {
  gap: 8px;
  padding: 10px;
}

body.frontend-theme-default .store-page--demo-v3 .store-card-v2__price {
  min-height: 28px;
  padding: 0 9px;
}

@media (max-width: 1180px) {
  body.frontend-theme-default .home-page--demo-v3 #cardGrid,
  body.frontend-theme-default .store-page--demo-v3 .store-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.frontend-theme-default .home-page--demo-v3 .home-conversion-grid,
  body.frontend-theme-default .home-page--demo-v3 .home-news-layout,
  body.frontend-theme-default .store-page--demo-v3 .store-layout-v2 {
    grid-template-columns: 1fr;
  }
}

body.frontend-theme-default .page.home-page.page-composer-home {
  --composer-home-max-width: 1280px;
  --composer-home-padding-desktop: 32px;
  --composer-home-padding-tablet: 24px;
  --composer-home-padding-mobile: 16px;
  --composer-home-section-gap: 24px;
  --composer-home-overlay-opacity: 0.16;
  --composer-home-surface-intensity: 0.84;
  --composer-home-accent-color: #d3e97a;
  --composer-home-accent-glow: rgba(163, 230, 53, 0.18);
  --composer-home-accent-glow-soft: rgba(163, 230, 53, 0.12);
  --composer-home-border-glow: rgba(163, 230, 53, 0.18);
  --composer-home-text-glow: rgba(248, 250, 252, 0.08);
  --composer-home-glow-x: 50%;
  --composer-home-glow-y: 8%;
  --composer-home-shell-radius: 26px;
  --composer-home-topbar-height: 64px;
  --composer-home-topbar-blur: 18px;
  --composer-home-topbar-gap: 28px;
  --composer-home-hero-shell-max-width: 1240px;
  --composer-home-featured-card-columns: 1;
  --composer-home-news-rail-columns: 1;
  --composer-home-cta-shell-max-width: 1280px;
  position: relative;
  isolation: isolate;
}

body.frontend-theme-default .page.home-page.page-composer-home::before,
body.frontend-theme-default .page.home-page.page-composer-home::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

body.frontend-theme-default .page.home-page.page-composer-home::before {
  inset: -36px -48px auto;
  height: 520px;
  opacity: 0.96;
  background:
    radial-gradient(circle at var(--composer-home-glow-x) var(--composer-home-glow-y), var(--composer-home-accent-glow) 0%, transparent 56%),
    radial-gradient(circle at 82% 18%, var(--composer-home-accent-glow-soft) 0%, transparent 30%);
  filter: saturate(118%);
}

body.frontend-theme-default .page.home-page.page-composer-home::after {
  inset: 0;
  opacity: 0.22;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(circle at 18% 18%, var(--composer-home-text-glow) 0%, transparent 28%);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-canvas-tone="deep"]::before {
  inset: -54px -56px auto;
  height: 620px;
  background:
    radial-gradient(circle at 18% 4%, var(--composer-home-accent-glow) 0%, transparent 52%),
    radial-gradient(circle at 78% 14%, var(--composer-home-accent-glow-soft) 0%, transparent 28%);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-canvas-tone="spotlight"]::before {
  inset: -24px -64px auto;
  height: 500px;
  background:
    radial-gradient(circle at 50% 10%, var(--composer-home-accent-glow) 0%, transparent 48%),
    radial-gradient(circle at 16% 28%, var(--composer-home-accent-glow-soft) 0%, transparent 24%);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-canvas-tone="tinted"]::before {
  inset: -18px -40px auto;
  height: 420px;
  background:
    radial-gradient(circle at 56% 8%, var(--composer-home-accent-glow-soft) 0%, transparent 42%),
    radial-gradient(circle at 20% 22%, var(--composer-home-text-glow) 0%, transparent 22%);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-hero-frame="editorial-panel"]::before {
  filter: saturate(1.04) contrast(1.02);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-hero-frame="kinetic-stage"]::before {
  filter: saturate(1.18) contrast(1.08);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-hero-frame="calm-focus"]::before {
  filter: saturate(0.96) blur(2px);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-surface-tone="framed"]::after {
  opacity: 0.32;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 20%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-surface-tone="spotlight"]::after {
  opacity: 0.28;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-surface-tone="soft"]::after {
  opacity: 0.16;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 20%),
    radial-gradient(circle at 82% 18%, var(--composer-home-text-glow) 0%, transparent 24%);
}

body.frontend-theme-default .page.home-page.page-composer-home > * {
  position: relative;
  z-index: 1;
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar {
  background: var(--composer-topbar-background) !important;
  border-bottom-color: var(--composer-topbar-border-color) !important;
  box-shadow: var(--composer-topbar-shadow) !important;
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar .topbar-shell {
  min-height: var(--composer-topbar-height);
  gap: var(--composer-topbar-gap);
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar[data-composer-topbar-emphasis="quiet"] {
  box-shadow:
    var(--composer-topbar-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar[data-composer-topbar-emphasis="balanced"] {
  box-shadow:
    var(--composer-topbar-shadow),
    0 14px 38px rgba(2, 6, 23, 0.18) !important;
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar[data-composer-topbar-emphasis="strong"] {
  box-shadow:
    var(--composer-topbar-shadow),
    0 18px 46px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar[data-composer-topbar-emphasis="strong"] .topbar-cta {
  box-shadow: 0 18px 40px var(--composer-topbar-accent-glow);
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar[data-composer-topbar-emphasis="quiet"] .topbar-cta {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar .nav--demo a:hover,
body.frontend-theme-default .topbar.topbar--demo-v3.page-composer-topbar .nav--demo a.is-active {
  text-shadow: 0 0 16px var(--composer-topbar-text-glow);
}

body.frontend-theme-default .page.home-page.page-composer-home
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights) {
  width: min(100%, var(--composer-home-max-width));
  margin-inline: auto;
}

body.frontend-theme-default .page.home-page.page-composer-home
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights):not(
    :first-child
  ) {
  margin-top: var(--composer-home-section-gap);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section {
  box-shadow: var(--composer-section-shadow) !important;
  border-width: var(--composer-section-border-width) !important;
  border-style: var(--composer-section-border-style) !important;
  border-color: var(--composer-section-border-color) !important;
  border-radius: var(--composer-section-radius) !important;
  background: var(--composer-section-surface-color) !important;
  color: var(--composer-section-text-color);
  position: relative;
  isolation: isolate;
  overflow: clip;
  backdrop-filter: blur(calc(var(--composer-home-topbar-blur) * 0.35));
  -webkit-backdrop-filter: blur(calc(var(--composer-home-topbar-blur) * 0.35));
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section::before,
body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section::before {
  background:
    linear-gradient(180deg, var(--composer-section-sheen), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 38%);
  opacity: 0.84;
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section::after {
  box-shadow: inset 0 0 0 1px var(--composer-section-border-glow);
  opacity: 0.72;
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section > * {
  position: relative;
  z-index: 1;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell.page-composer-home-section {
  width: min(100%, var(--composer-home-hero-shell-max-width));
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-surface="framed"] {
  padding-top: calc(var(--composer-section-padding-top) + 8px) !important;
  padding-bottom: calc(var(--composer-section-padding-bottom) + 8px) !important;
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-surface="framed"]::after {
  box-shadow:
    inset 0 0 0 1px var(--composer-section-border-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-surface="spotlight"]::after {
  box-shadow:
    inset 0 0 0 1px var(--composer-section-border-glow),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-surface="glass"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(135deg, var(--composer-section-sheen), transparent 42%);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-stage-active,
body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-stage {
  position: relative;
}

body.frontend-theme-default
  .page.home-page.page-composer-home
  .page-composer-stage-active
  .page-composer-element-active {
  position: absolute;
  max-width: 100%;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell.page-composer-home-section .banner.carousel {
  min-height: clamp(320px, calc(var(--composer-section-min-height) * 0.82), 560px);
  border-radius: max(18px, calc(var(--composer-section-radius) - 8px));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 72px rgba(2, 6, 23, 0.28);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="editorial-panel"] {
  width: min(100%, calc(var(--composer-home-hero-shell-max-width) - 10px));
  padding-top: calc(var(--composer-section-padding-top) + 18px) !important;
  padding-bottom: calc(var(--composer-section-padding-bottom) + 14px) !important;
  box-shadow:
    0 34px 88px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="editorial-panel"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), transparent 22%),
    radial-gradient(circle at 14% 16%, var(--composer-home-accent-glow-soft) 0%, transparent 34%);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="editorial-panel"] .banner.carousel {
  min-height: clamp(430px, calc(var(--composer-section-min-height) * 0.92), 660px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 88px rgba(2, 6, 23, 0.32);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="editorial-panel"] .carousel-control {
  bottom: 22px;
  top: auto;
  background: rgba(6, 13, 26, 0.78);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="editorial-panel"] .carousel-hero-badge {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  background: rgba(6, 13, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="kinetic-stage"] .banner.carousel {
  min-height: clamp(404px, calc(var(--composer-section-min-height) * 0.88), 600px);
  border-radius: max(14px, calc(var(--composer-section-radius) - 14px));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 36px 94px rgba(2, 6, 23, 0.38);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="kinetic-stage"] {
  width: min(100%, calc(var(--composer-home-hero-shell-max-width) + 8px));
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="kinetic-stage"]::before {
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.04), transparent 26%),
    radial-gradient(circle at 82% 18%, var(--composer-home-accent-glow) 0%, transparent 28%);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="kinetic-stage"] .carousel-control {
  top: 20px;
  bottom: auto;
  background: rgba(11, 15, 27, 0.82);
  border-color: var(--composer-home-border-glow);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="kinetic-stage"] .carousel-hero-badge {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.28);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] {
  width: min(100%, var(--composer-home-hero-shell-max-width));
  box-shadow:
    0 22px 60px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"]::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    radial-gradient(circle at 24% 16%, var(--composer-home-accent-glow-soft) 0%, transparent 26%);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] .banner.carousel {
  min-height: clamp(340px, calc(var(--composer-section-min-height) * 0.78), 500px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 48px rgba(2, 6, 23, 0.2);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] .carousel-control {
  top: auto;
  bottom: 18px;
  background: rgba(8, 12, 24, 0.58);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] .carousel-hero-badge {
  background: rgba(8, 18, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.frontend-theme-default .page.home-page.page-composer-home .carousel-hero-badge {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.22);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="editorial-rail"] .home-conversion-grid,
body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="editorial-rail"] .home-news-layout {
  gap: max(24px, var(--composer-section-gap));
  grid-template-columns: minmax(0, 1.14fr) minmax(308px, 0.86fr);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="market-grid"] .home-conversion-grid,
body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="market-grid"] .home-news-layout {
  gap: 12px;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="quiet-list"] .home-conversion-grid,
body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-variant="quiet-list"] .home-news-layout {
  gap: max(22px, var(--composer-section-gap));
  grid-template-columns: minmax(0, 1.18fr) minmax(272px, 0.82fr);
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion .home-conversion-cards,
body.frontend-theme-default .page.home-page.page-composer-home #insights .home-news-secondary {
  display: grid;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-primary,
body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-variant="editorial-rail"] .home-news-main {
  padding: 24px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-primary {
  min-height: clamp(460px, calc(var(--composer-section-min-height) * 1.02), 620px);
  align-content: end;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-primary-media {
  min-height: 260px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-cards {
  grid-template-columns: 1fr;
  gap: 14px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-card,
body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="quiet-list"] .home-conversion-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 132px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-card-thumb,
body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="quiet-list"] .home-conversion-card-thumb {
  min-height: 96px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="market-grid"] .home-conversion-primary {
  padding: 20px 20px 18px;
  min-height: clamp(420px, calc(var(--composer-section-min-height) * 0.94), 560px);
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="market-grid"] .home-conversion-primary-media {
  min-height: 220px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="market-grid"] .home-conversion-cards {
  grid-template-columns: repeat(var(--composer-home-featured-card-columns), minmax(0, 1fr));
  gap: 12px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="market-grid"] .home-conversion-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="quiet-list"] .home-conversion-primary {
  padding: 26px;
  min-height: clamp(400px, calc(var(--composer-section-min-height) * 0.9), 540px);
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="quiet-list"] .home-conversion-primary-media {
  min-height: 232px;
}

body.frontend-theme-default .page.home-page.page-composer-home #homeConversion[data-composer-variant="quiet-list"] .home-conversion-cards {
  grid-template-columns: 1fr;
  gap: 18px;
}

body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-variant="editorial-rail"] .home-news-secondary {
  grid-template-columns: 1fr;
  gap: 18px;
}

body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-variant="market-grid"] .home-news-secondary {
  grid-template-columns: repeat(var(--composer-home-news-rail-columns), minmax(0, 1fr));
  gap: 12px;
}

body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-variant="quiet-list"] .home-news-secondary {
  grid-template-columns: 1fr;
  gap: 20px;
}

body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-variant="market-grid"] .news-rail-card {
  min-height: 100%;
}

body.frontend-theme-default .page.home-page.page-composer-home
  #pool.page-composer-home-section[data-composer-variant="editorial-rail"]
  #cardGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.frontend-theme-default .page.home-page.page-composer-home
  #pool.page-composer-home-section[data-composer-variant="market-grid"]
  #cardGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.frontend-theme-default .page.home-page.page-composer-home
  #pool.page-composer-home-section[data-composer-variant="quiet-list"]
  #cardGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-conversion-primary,
body.frontend-theme-default .page.home-page.page-composer-home .home-conversion-card,
body.frontend-theme-default .page.home-page.page-composer-home .pool-card,
body.frontend-theme-default .page.home-page.page-composer-home .news-card,
body.frontend-theme-default .page.home-page.page-composer-home .news-rail-card {
  border-radius: max(14px, calc(var(--composer-home-shell-radius) - 8px));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 44px rgba(2, 6, 23, 0.22);
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-surface-tone="framed"]
  :is(.home-conversion-primary, .home-conversion-card, .pool-card, .news-card, .news-rail-card) {
  border-radius: max(16px, calc(var(--composer-home-shell-radius) - 4px));
}

body.frontend-theme-default .page.home-page.page-composer-home[data-composer-surface-tone="spotlight"]
  :is(.home-conversion-primary, .home-conversion-card, .pool-card, .news-card, .news-rail-card) {
  border-radius: max(14px, calc(var(--composer-home-shell-radius) - 10px));
}

body.frontend-theme-default .page.home-page.page-composer-home .steps {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

body.frontend-theme-default .page.home-page.page-composer-home .steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: max(14px, calc(var(--composer-section-radius) - 12px));
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

body.frontend-theme-default .page.home-page.page-composer-home #steps[data-composer-variant="timeline"] .steps li,
body.frontend-theme-default .page.home-page.page-composer-home #faq[data-composer-variant="timeline"] .faq details {
  border-style: dashed;
}

body.frontend-theme-default .page.home-page.page-composer-home #faq .faq {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

body.frontend-theme-default .page.home-page.page-composer-home #faq .faq details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: max(14px, calc(var(--composer-section-radius) - 12px));
  background: rgba(255, 255, 255, 0.025);
  padding: 2px 16px 14px;
}

body.frontend-theme-default .page.home-page.page-composer-home #faq[data-composer-variant="accordion-emphasis"] .faq details {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(2, 6, 23, 0.16);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell.page-composer-home-section {
  display: flex;
  width: min(100%, var(--composer-home-cta-shell-max-width));
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell.page-composer-home-section > div {
  flex: 1;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="split-banner"] {
  align-items: center;
  justify-content: space-between;
  gap: max(22px, var(--composer-section-gap));
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="split-banner"] > div {
  max-width: 560px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="split-banner"] .btn {
  min-width: 220px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="center-stack"] {
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: max(18px, var(--composer-section-gap));
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="center-stack"] > div {
  max-width: 680px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="center-stack"] .btn {
  min-width: 220px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="spotlight-strip"] {
  align-items: flex-end;
  justify-content: space-between;
  gap: max(20px, var(--composer-section-gap));
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="spotlight-strip"] > div {
  max-width: 620px;
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-variant="spotlight-strip"] .btn {
  transform: translateY(-6px);
}

body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell[data-composer-action-tone="strong"] .btn,
body.frontend-theme-default .page.home-page.page-composer-home #insights[data-composer-action-tone="strong"] .btn {
  box-shadow: 0 18px 40px var(--composer-home-accent-glow);
}

body.frontend-theme-default .page.home-page.page-composer-home .page-composer-home-section[data-composer-header="centered"]
  :is(.home-section-label, .home-section-title, .home-section-desc) {
  text-align: center;
}

@media (max-width: 980px) {
  body.frontend-theme-default .page.home-page.page-composer-home
    > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights) {
    width: calc(100% - (var(--composer-home-padding-tablet) * 2));
  }

  body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] {
    width: calc(100% - (var(--composer-home-padding-tablet) * 2));
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    :is(.page-composer-home-section[data-composer-variant="editorial-rail"], .page-composer-home-section[data-composer-variant="market-grid"], .page-composer-home-section[data-composer-variant="quiet-list"])
    :is(.home-conversion-grid, .home-news-layout) {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #homeConversion[data-composer-variant="market-grid"] .home-conversion-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #insights[data-composer-variant="market-grid"] .home-news-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    .home-cta-shell[data-composer-variant="split-banner"],
  body.frontend-theme-default .page.home-page.page-composer-home
    .home-cta-shell[data-composer-variant="spotlight-strip"] {
    align-items: flex-start;
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="market-grid"]
    #cardGrid,
  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="editorial-rail"]
    #cardGrid,
  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="quiet-list"]
    #cardGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.frontend-theme-default .page.home-page.page-composer-home
    > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights) {
    width: calc(100% - (var(--composer-home-padding-mobile) * 2));
  }

  body.frontend-theme-default .page.home-page.page-composer-home .home-hero-shell[data-composer-variant="calm-focus"] {
    width: calc(100% - (var(--composer-home-padding-mobile) * 2));
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #homeConversion[data-composer-variant="market-grid"] .home-conversion-cards,
  body.frontend-theme-default .page.home-page.page-composer-home
    #insights[data-composer-variant="market-grid"] .home-news-secondary {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #homeConversion[data-composer-variant="editorial-rail"] .home-conversion-card,
  body.frontend-theme-default .page.home-page.page-composer-home
    #homeConversion[data-composer-variant="quiet-list"] .home-conversion-card {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="market-grid"]
    #cardGrid,
  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="editorial-rail"]
    #cardGrid,
  body.frontend-theme-default .page.home-page.page-composer-home
    #pool.page-composer-home-section[data-composer-variant="quiet-list"]
    #cardGrid {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-default .page.home-page.page-composer-home .home-cta-shell.page-composer-home-section {
    flex-direction: column;
    align-items: flex-start;
  }

  body.frontend-theme-default .page.home-page.page-composer-home
    .home-cta-shell[data-composer-variant="center-stack"] {
    align-items: center;
  }

  body.frontend-theme-default .page.home-page.page-composer-home .steps li {
    grid-template-columns: 1fr;
  }
}

body.frontend-theme-default .page.home-page.page-composer-home {
  --composer-motion-page-duration: 620ms;
  --composer-motion-page-distance: 26px;
  --composer-motion-page-stagger: 78ms;
  --composer-motion-page-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --composer-motion-hero-duration: 680ms;
  --composer-motion-hero-lift: 18px;
  --composer-motion-hero-badge-float: 10px;
  --composer-motion-hero-scale: 1.018;
  --composer-motion-sections-duration: 540ms;
  --composer-motion-sections-distance: 20px;
  --composer-motion-sections-stagger: 66ms;
  --composer-motion-cards-duration: 460ms;
  --composer-motion-cards-distance: 18px;
  --composer-motion-cards-hover-lift: 8px;
  --composer-motion-cards-hover-scale: 1.014;
  --composer-motion-cards-hover-glow: 0.24;
  --composer-motion-buttons-hover-lift: 2px;
  --composer-motion-buttons-hover-scale: 1.024;
  --composer-motion-buttons-press-scale: 0.985;
  --composer-motion-buttons-glow: 0.2;
  --composer-motion-carousel-duration: 540ms;
  --composer-motion-carousel-parallax: 12px;
  --composer-motion-carousel-control-scale: 1.06;
  --composer-motion-carousel-fade-opacity: 0.14;
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active {
  will-change: transform, opacity;
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights),
body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  :is(.page-composer-home-section, .banner.carousel, .home-conversion-primary, .home-conversion-card, .pool-card, .home-support-panel--demo-v3, .home-cta-shell--demo-v3, .news-card, .news-rail-card, .btn) {
  transition:
    transform var(--composer-motion-cards-duration) var(--composer-motion-page-ease),
    box-shadow var(--composer-motion-cards-duration) var(--composer-motion-page-ease),
    opacity var(--composer-motion-cards-duration) var(--composer-motion-page-ease),
    background-color var(--composer-motion-cards-duration) var(--composer-motion-page-ease),
    border-color var(--composer-motion-cards-duration) var(--composer-motion-page-ease);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights) {
  animation: composer-home-section-reveal var(--composer-motion-page-duration)
    var(--composer-motion-page-ease) both;
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights):nth-child(2) {
  animation-delay: var(--composer-motion-page-stagger);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights):nth-child(3) {
  animation-delay: calc(var(--composer-motion-page-stagger) * 2);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  > :is(.home-hero-shell, #homeConversion, #pool, #steps, #faq, .home-cta-shell, #insights):nth-child(4) {
  animation-delay: calc(var(--composer-motion-page-stagger) * 3);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  .home-hero-shell {
  animation-name: composer-home-hero-enter;
  animation-duration: var(--composer-motion-hero-duration);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  :is(.page-composer-home-section, .home-conversion-primary, .home-conversion-card, .pool-card, .home-support-panel--demo-v3, .home-cta-shell--demo-v3, .news-card, .news-rail-card) {
  animation: composer-home-card-enter var(--composer-motion-cards-duration)
    var(--composer-motion-page-ease) both;
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active.page-composer-motion-enter
  :is(.home-conversion-card, .pool-card, .news-card, .news-rail-card) {
  animation-delay: var(--composer-motion-sections-stagger);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  .carousel-hero-badge.page-composer-motion-enter {
  animation: composer-home-badge-float var(--composer-motion-hero-duration)
    var(--composer-motion-page-ease) both;
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  .banner.carousel {
  transition-duration: var(--composer-motion-carousel-duration);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  :is(.carousel-track, #promoTrack, .carousel-hero-link, .carousel-hero-media) {
  transition-duration: var(--composer-motion-carousel-duration);
  transition-timing-function: var(--composer-motion-page-ease);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  .carousel-hero-link::before {
  opacity: var(--composer-motion-carousel-fade-opacity);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  .carousel-control:hover {
  transform: scale(var(--composer-motion-carousel-control-scale));
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  :is(.page-composer-home-section, .home-conversion-primary, .home-conversion-card, .pool-card, .home-support-panel--demo-v3, .home-cta-shell--demo-v3, .news-card, .news-rail-card):hover {
  transform:
    translateY(calc(var(--composer-motion-cards-hover-lift) * -1))
    scale(var(--composer-motion-cards-hover-scale));
  box-shadow: 0 22px 52px rgba(2, 6, 23, calc(0.36 + var(--composer-motion-cards-hover-glow)));
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  :is(.btn, .topbar-cta):hover {
  transform:
    translateY(calc(var(--composer-motion-buttons-hover-lift) * -1))
    scale(var(--composer-motion-buttons-hover-scale));
  box-shadow: 0 16px 36px var(--composer-home-accent-glow);
}

body.frontend-theme-default .page.home-page.page-composer-home.page-composer-motion-active
  :is(.btn, .topbar-cta):active {
  transform: scale(var(--composer-motion-buttons-press-scale));
}

@keyframes composer-home-section-reveal {
  from {
    opacity: 0;
    transform: translateY(var(--composer-motion-page-distance));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes composer-home-hero-enter {
  from {
    opacity: 0;
    transform: translateY(var(--composer-motion-hero-lift)) scale(var(--composer-motion-hero-scale));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes composer-home-card-enter {
  from {
    opacity: 0;
    transform: translateY(var(--composer-motion-cards-distance)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes composer-home-badge-float {
  from {
    opacity: 0;
    transform: translateY(calc(var(--composer-motion-hero-badge-float) * -1));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =====================================================================
 * topbar v35 — desktop search bar + music toggle (2026-05-02)
 * 桌機 + 手機統一 topbar：[LOGO] [search] [nav] [music] [bell] [avatar]
 * ===================================================================== */
body.frontend-theme-default .topbar.topbar--v35 .topbar-shell {
  display: flex !important;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
body.frontend-theme-default .topbar.topbar--v35 .topbar-shell > .brand-link {
  flex: 0 0 auto;
}
body.frontend-theme-default .topbar.topbar--v35 .topbar-shell > .nav--demo {
  flex: 0 0 auto;
}
body.frontend-theme-default .topbar.topbar--v35 .topbar-shell > .topbar-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar.topbar--v35 .topbar-search--v35 {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 6px 0 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.32);
  gap: 10px;
  min-width: 0;
}
.topbar.topbar--v35 .topbar-search--v35:focus-within {
  border-color: rgba(103, 232, 249, 0.7);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.18);
}
/* v35c: 14px icon 太小 + 太淡 → 看起來像污點。放大成 18px 加亮 cyan stroke */
.topbar.topbar--v35 .topbar-search__icon {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  color: #67e8f9;
  stroke: #67e8f9;
  filter: drop-shadow(0 0 4px rgba(103, 232, 249, 0.45));
}
.topbar.topbar--v35 .topbar-search__input {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f0fdff;
  font-size: 14px;
  font-family: inherit;
  height: 100%;
  padding: 0;
}
.topbar.topbar--v35 .topbar-search__input::placeholder {
  color: rgba(165, 243, 252, 0.55);
}
.topbar.topbar--v35 .topbar-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.topbar.topbar--v35 .topbar-search__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(8, 18, 42, 0.96);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 14px;
  padding: 6px;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: 0 18px 38px rgba(2, 8, 18, 0.7);
}
.topbar.topbar--v35 .topbar-search__dropdown[hidden] { display: none; }

/* desktop dropdown row (uses the same dp-search__row class so site-topbar.js
 * markup works on both surfaces, but scoped under topbar-search--v35) */
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #e0f7fa;
  font-size: 13px;
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row:hover,
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row:focus-visible {
  background: rgba(103, 232, 249, 0.12);
  outline: none;
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row img {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex: 0 0 auto;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(103, 232, 249, 0.18);
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row-name {
  flex: 1 1 0; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__row-meta {
  flex: 0 0 auto; font-size: 11px; color: rgba(165, 243, 252, 0.65);
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__empty,
.topbar.topbar--v35 .topbar-search--v35 .dp-search__error {
  padding: 14px 12px; text-align: center;
  color: rgba(165, 243, 252, 0.7); font-size: 13px;
}
.topbar.topbar--v35 .topbar-search--v35 .dp-search__error { color: #fda4af; }

/* music + bell shared icon button */
.topbar.topbar--v35 .topbar-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.32);
  color: rgba(207, 250, 254, 0.85);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
  padding: 0;
}
.topbar.topbar--v35 .topbar-icon:active { transform: scale(0.93); }
.topbar.topbar--v35 .topbar-icon:hover { background: rgba(15, 23, 42, 0.78); }
.topbar.topbar--v35 .topbar-icon__svg svg {
  display: block;
  filter: drop-shadow(0 0 4px rgba(103, 232, 249, 0.5));
}
.topbar.topbar--v35 .topbar-icon--music[data-music-state="on"] {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.32), rgba(15, 23, 42, 0.6));
  border-color: rgba(103, 232, 249, 0.65);
  color: #67e8f9;
}
.topbar.topbar--v35 .topbar-icon--music[data-music-state="on"] .topbar-icon__svg svg {
  filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.85));
}

/* responsive: < 760px hide nav links so topbar fits search + actions */
@media (max-width: 760px) {
  body.frontend-theme-default .topbar.topbar--v35 .topbar-shell > .nav--demo {
    display: none;
  }
}
@media (max-width: 540px) {
  /* very small screens (e.g. responsive desktop dev mode) — hide search,
   * keep logo + actions only — mobile users land on /m/ instead anyway */
  .topbar.topbar--v35 .topbar-search--v35 { display: none; }
}

/* =====================================================================
 * v35f Hero overlay frame — 跨裝置自動包住 Hero 的特效層
 * 用途：admin 上傳 Lottie JSON / WebM alpha / SVG / PNG 動畫外框
 * 永遠跟著 Hero 容器大小，pointer-events: none 不擋點擊
 * ===================================================================== */
.home-hero-catalog__banner {
  position: relative;
}
.home-hero-catalog .hero-frame-overlay {
  position: absolute;
  inset: -2px; /* 微微外擴讓邊框光暈不被 overflow:hidden 切到 */
  pointer-events: none;
  z-index: 5;
  border-radius: 20px;
  overflow: visible;
}
.home-hero-catalog .hero-frame-overlay > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.home-hero-catalog .hero-frame-overlay video,
.home-hero-catalog .hero-frame-overlay img,
.home-hero-catalog .hero-frame-overlay svg {
  object-fit: fill;
  display: block;
}
/* ===================================================================
 * 40c-item-public-redesign.css
 * ONEREWARD · 一般賞（item.html pool detail）mobile-first redesign
 *
 * All rules are scoped under `body.item-page` so admin pool admin
 * pages are not affected. Loaded AFTER 40b-shared-components.css and
 * 80e-theme-default-cosmic.css so it wins specificity on overrides
 * via matching selector weight (body.item-page → 0,1,0,1).
 *
 * Philosophy:
 *  1. Mobile-first — base rules target <= 480px, progressively
 *     enhance up via min-width queries.
 *  2. One hand thumb-zone — primary CTA (立即抽) stays within the
 *     bottom 40 % of viewport, always visible.
 *  3. Rarity is a VISUAL language — tier cards use a colored spine
 *     + subtle glow. Glow follows gacha-card-glow rule: blur ≤ 20px,
 *     spread ≤ 2px, inset ring, no outer halo.
 *  4. 1.5× tap-target — every interactive chip / button ≥ 44px.
 *  5. Content-first — the draw-bar never obscures last tier row
 *     (bottom padding on main absorbs the sticky bar height).
 * ================================================================= */

/* ---------- design tokens local to public item page -------------- */
body.item-page {
  --ir-rarity-a: #f0c24c;         /* 金 */
  --ir-rarity-a-glow: 0 0 0 1.5px rgba(240, 194, 76, 0.55) inset, 0 0 18px -4px rgba(240, 194, 76, 0.55);
  --ir-rarity-b: #c084fc;         /* 紫 */
  --ir-rarity-b-glow: 0 0 0 1.5px rgba(192, 132, 252, 0.5) inset, 0 0 18px -4px rgba(192, 132, 252, 0.5);
  --ir-rarity-c: #60a5fa;         /* 藍 */
  --ir-rarity-c-glow: 0 0 0 1.5px rgba(96, 165, 250, 0.45) inset, 0 0 16px -4px rgba(96, 165, 250, 0.45);
  --ir-rarity-d: #22d3ee;         /* 青 */
  --ir-rarity-d-glow: 0 0 0 1.5px rgba(34, 211, 238, 0.4) inset, 0 0 14px -4px rgba(34, 211, 238, 0.4);
  --ir-rarity-default: #94a3b8;   /* 普通灰 */
  --ir-rarity-default-glow: 0 0 0 1px rgba(148, 163, 184, 0.28) inset;

  --ir-surface: linear-gradient(165deg, rgba(14, 22, 41, 0.92), rgba(9, 15, 28, 0.88));
  --ir-surface-soft: rgba(15, 23, 42, 0.62);
  --ir-border: rgba(118, 148, 193, 0.16);
  --ir-border-soft: rgba(118, 148, 193, 0.08);
  --ir-ink: #f4fbff;
  --ir-muted: rgba(205, 215, 235, 0.72);
  --ir-dim: rgba(148, 163, 184, 0.58);

  --ir-radius-lg: 22px;
  --ir-radius-md: 16px;
  --ir-radius-sm: 12px;

  --ir-gap: 14px;
  --ir-gap-lg: 20px;
}

/* v55al: legacy bottom draw-bar fully hidden — v55 picker flow now
   owns the entire draw lifecycle. The bar's "立即抽 / 自動重抽 /
   抽 1/10/100 次 / 剩餘 / 金額" UI duplicated what's already in the
   排隊閘門 + 籤單選擇 modal, so removing it cleans up the page. JS
   references still resolve (element exists, just display:none) so no
   runtime errors. */
body.item-page #drawBar {
  display: none !important;
}
/* No more bottom padding reserved for the bar. */
body.item-page.has-draw-bar .page {
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 721px) {
  body.item-page.has-draw-bar .page {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* =============================================================
 * HERO — stacked on mobile, 3-col on desktop
 * detail-hero  ::= detail-thumb + detail-main + detail-side
 * ============================================================= */

body.item-page .detail {
  gap: 18px;
}

body.item-page .detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: var(--ir-radius-lg);
  border: 1px solid var(--ir-border);
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.1), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(0, 255, 136, 0.08), transparent 30%),
    var(--ir-surface);
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.32);
  align-items: stretch;
}

/* thumbnail — aspect-controlled on mobile, fixed on desktop */
body.item-page .detail-thumb {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
  max-height: 240px;
  border-radius: var(--ir-radius-md);
  border: 1px solid var(--ir-border);
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 212, 255, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(14, 22, 41, 0.95), rgba(10, 16, 28, 0.9));
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.5);
}

body.item-page .detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero carousel — 2026-04-26: rewritten from cross-fade to swipe-peek.
   Each slide is 80% of detail-thumb width with 10% peek of neighbours on
   each side. Native scroll-snap handles drag/swipe; JS adds dots, active
   tracking, and 4.2s auto-rotate that stops on first user interaction.
   When .hero-carousel is inside .detail-thumb, we still need to force
   the thumb to keep its aspect-ratio box (default justify-self:start +
   no intrinsic content = collapses to 0). */
body.item-page .detail-thumb:has(.hero-carousel) {
  display: block;
  width: 100%;
  height: auto; /* carousel slides drive height (3/4 aspect) — base
                    .detail-thumb { height: 320px } would clip taller slides */
  justify-self: stretch;
  overflow: visible; /* let neighbouring slides peek out of the rounded frame */
  background: transparent; /* base .detail-thumb has a solid gradient bg
                              that competes with the slide cards */
  /* NOTE: max-height for desktop is set in the desktop @media block
     below (line ~896) where the desktop layout overrides take effect. */
}
body.item-page .hero-carousel {
  position: relative;
  width: 100%;
  /* let height come from content (slides) — height:100% with parent
     height:auto becomes 0 in some browsers and was clipping the track. */
}
body.item-page .hero-carousel--swipe {
  /* flex column so each child (track, dots) takes its own natural size.
     grid-template-rows:1fr auto collapsed track to 0 when carousel had
     no explicit height. */
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* v21-stagedeck: own perspective for the floor pseudo-element
     (rotateX needs perspective on parent). Track keeps its separate
     1400px perspective for slide depth — they don't conflict because
     each transform reads its nearest perspective ancestor. */
  position: relative;
  perspective: 800px;
  perspective-origin: 50% 0%;
  /* Side ambient lights — bioluminescent jellyfish / hanging lantern
     suggestion without needing actual asset images. Cyan left,
     soft purple right (matches our cosmic theme tokens). Positioned
     well behind the slides so they read as atmospheric depth, not
     UI elements. */
  background:
    radial-gradient(ellipse 28% 70% at 6% 50%,
      rgba(56, 189, 248, 0.22) 0%,
      rgba(56, 189, 248, 0.08) 35%,
      transparent 65%),
    radial-gradient(ellipse 28% 70% at 94% 48%,
      rgba(168, 85, 247, 0.20) 0%,
      rgba(168, 85, 247, 0.07) 35%,
      transparent 65%);
}

/* v22-stagecontained: 3D perspective floor stays inside the detail-thumb
   rounded frame. v21 used left:-8% right:-8% bottom:-2% which made the
   grid bleed past the rounded rectangle on three sides — looked like
   the stage was "leaking out" of the box. v22 anchors floor inset 2%
   from edges with bottom:8% (above the dots row), and switches the
   mask from linear (top fade only) to radial (fades at ALL edges) so
   floor visually melts into the carousel without hard rectangle sides. */
body.item-page .hero-carousel--swipe::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0%;     /* v33: was 8% — sit at very bottom of carousel */
  height: 25%;    /* v33: was 50% — half the previous height so floor
                     is a thin perspective strip at the bottom, NOT a
                     wide deck that bleeds into the active frame's
                     bottom corner area */
  pointer-events: none;
  z-index: 0;
  transform-origin: 50% 100%;
  transform: rotateX(58deg);
  background:
    /* longitudinal lines (vanishing toward center) */
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 59px,
      rgba(56, 189, 248, 0.16) 60px,
      transparent 61px),
    /* latitudinal lines (parallel to viewer) */
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 47px,
      rgba(56, 189, 248, 0.10) 48px,
      transparent 49px),
    /* central glow accentuating the active card's "podium" position */
    radial-gradient(ellipse at 50% 0%,
      rgba(56, 189, 248, 0.18) 0%,
      transparent 55%);
  /* Radial mask = floor is visible in a centered ellipse, fades to
     transparent on ALL edges. No more hard rectangle sides bleeding
     past the carousel frame. */
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%,
    rgba(0, 0, 0, 0.95) 30%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 90%);
  mask-image: radial-gradient(ellipse at 50% 100%,
    rgba(0, 0, 0, 0.95) 30%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 90%);
  opacity: 0.5;  /* v33: was 0.85 — subtler so it doesn't compete with
                    the active frame's cyan ring at the bottom */
}

/* Track — 2026-04-27 (v19-stagepop): rewrote the depth treatment to mimic
   cc1kuji's "stage with spotlight" feel. Three core moves they nail and
   v18 missed:
     1. Strong size contrast (1.6x active : inactive, not 1.21x)
     2. Active slide LIFTS UP out of the row (translateY -10%)
     3. Spotlight glow under the active slide (radial pseudo-element)
   We extend their approach with a cyan rim glow + soft floor reflection
   that fits the deep-ocean theme — keeps brand identity while matching
   the dramatic depth cue. */
body.item-page .hero-carousel__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible; /* v19: let active slide overflow upward (translateY)
                          without being clipped */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 38px 10% 48px; /* extra top/bottom padding for lift + spotlight */
  scroll-padding-left: 10%;
  scroll-padding-right: 10%;
  overscroll-behavior-x: contain;
  cursor: grab;
  perspective: 1400px;
  perspective-origin: 50% 60%; /* slight bottom bias = "looking down at
                                   stage" feel like cc1kuji */
  position: relative;
  /* IMPORTANT: do NOT add scroll-behavior:smooth here. With
     scroll-snap-type:x mandatory, smooth + programmatic scrollLeft
     interacts pathologically. */
}
/* v33-cleancorners: bump padding-bottom so the slide (incl. its
   cyan-ring box-shadow) renders fully WITHIN the track box. Without
   this, slide bottom extends ~70px past trackBottom and gets clipped
   by track's `overflow-x: auto` (which CSS spec forces overflow-y to
   also be auto-equivalent). Result: bottom 2 corners of the active
   frame were getting cut/blurred — user reported "frame should have
   all 4 corners visible". */
body.item-page .hero-carousel__track { padding-bottom: 80px; }
body.item-page .hero-carousel__track::-webkit-scrollbar { display: none; }
body.item-page .hero-carousel__track:active { cursor: grabbing; }

/* Stage spotlight — radial glow under center where active slide sits.
   Gives the "dramatic lighting" cue that cc1kuji's triangular podium
   does, but with our brand palette (cosmic cyan). Pinned to the track
   so it stays under the active card regardless of scroll position
   (active is always at center via scroll-snap). */
body.item-page .hero-carousel--swipe::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0%;     /* v33: was 4% — sit at very bottom so spotlight glow
                     stays well below the active frame instead of
                     blending with frame's bottom corners */
  width: 60%;
  height: 18%;    /* v33: was 32% — shrink so spotlight is a thin band
                     at the floor, not a wide halo around the frame */
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center,
      rgba(56, 189, 248, 0.32) 0%,
      rgba(56, 189, 248, 0.12) 35%,
      transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}
  /* v25-square: user picked TEST_C from the live A/B/C/D iteration —
     square (1:1) frame with 78% flex-basis. Wider, less-tall frame
     puts the figure with visible padding above + below, doesn't try
     to fill the frame edge-to-edge. Active footprint: 68% W × 60% H
     of detail-thumb. Generous room below for the floor decoration to
     read as a real "stage" instead of a thin strip. */
body.item-page .hero-carousel__slide {
  flex: 0 0 78%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  align-self: center;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.12), transparent 70%),
    rgba(8, 14, 27, 0.5);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  /* v19: ease-out-back for snappy "pop forward" on activation, slightly
     longer than v18 (0.55s → 0.65s) to give the bigger size jump room
     to breathe without feeling jarring. */
  transition:
    transform 0.65s cubic-bezier(0.34, 1.45, 0.5, 1),
    filter 0.55s ease,
    box-shadow 0.55s ease;
  /* v20-stagepoptuned: pull back the contrast a touch — v19's 1.59x
     ratio matched cc1kuji's drama but cc1kuji shows 7 cards in a row
     so each peek stays legible; we only show 1 active + 2 peeks at
     80% width each, so 0.74 inactive shrinks the peeks to ~59% of
     viewport which crushes them. 0.84 keeps peeks readable while
     still giving a strong size jump. translateY+translateZ unchanged
     in spirit, just gentler magnitudes so peek cards aren't visually
     erased. */
  /* v29-nudgedown: gentle +10% Y shift -- pushes the whole carousel
     row down a notch from the carousel natural center toward the
     detail-thumb visual center. Goldilocks between v26/v28 (no
     shift -- frame too high) and v27 (+28% -- frame collided with
     thumbnails). Verified via live injection: figure stays clear of
     thumbnails, no image clipping. */
  transform: translateZ(-70px) translateY(10%) scale(0.82);
  filter: brightness(0.5) saturate(0.65);
  will-change: transform, filter;
  z-index: 1;
}

/* Active slide — v29: same +10% nudge as inactive so they share Y
   baseline. Active scale 1.05 keeps the centerpiece feel. */
body.item-page .hero-carousel__slide.is-active,
body.item-page .hero-carousel__slide:focus-within {
  transform: translateZ(45px) translateY(10%) scale(1.05);
  filter: brightness(1.06) saturate(1.08);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 16px 34px rgba(56, 189, 248, 0.32),
    0 0 0 1px rgba(56, 189, 248, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  z-index: 3;
}

body.item-page .hero-carousel__slide img {
  width: 100%;
  height: 100%;
  /* contain (not cover) preserves the whole figure — many product images
     come on transparent / matte backgrounds and would lose limbs / heads
     to cover-cropping. The slide's gradient fill substitutes the visible
     "background" so transparent image areas still read as a card. */
  object-fit: contain;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  padding: 6px;
}

/* Dots — bottom indicator row */
body.item-page .hero-carousel__dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 4px 0 2px;
  pointer-events: auto;
}
body.item-page .hero-carousel__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(148, 163, 184, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}
body.item-page .hero-carousel__dot.is-active {
  background: var(--cosmic-cyan, #38bdf8);
  width: 22px; /* active dot grows into a pill — modern carousel pattern */
}
body.item-page .hero-carousel__dot:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

/* Bigger hero on mobile — let the slide's 4/5 aspect-ratio drive the
   thumb height instead of forcing min-height (which was stretching the
   slide flat and showing transparent gaps). */
@media (max-width: 720px) {
  body.item-page .detail-thumb:has(.hero-carousel--swipe) {
    height: auto;
    min-height: 0;
  }
  body.item-page .hero-carousel__slide {
    border-radius: 16px;
  }
  /* v21-stagedeck: tone down the stage decorations on mobile so they
     don't clutter the small viewport. Side glows shrink + fade, floor
     grid hides entirely (too busy on phone screens). Spotlight stays. */
  body.item-page .hero-carousel--swipe {
    background:
      radial-gradient(ellipse 35% 60% at 5% 50%,
        rgba(56, 189, 248, 0.14) 0%,
        transparent 60%),
      radial-gradient(ellipse 35% 60% at 95% 50%,
        rgba(168, 85, 247, 0.12) 0%,
        transparent 60%);
  }
  body.item-page .hero-carousel--swipe::after {
    display: none;
  }
}

/* v45: 抽獎排隊閘門（queue gate）— 在 tier-stock-grid 下方，提供
   「排隊→倒數 5 分鐘抽獎窗口」的 UX 來避免多人 race condition。
   排隊人數即時 polling、按下後 button 切換為計時狀態。 */
body.item-page .detail-side__queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg,
    rgba(34, 211, 238, 0.10),
    rgba(168, 85, 247, 0.06) 60%,
    rgba(9, 15, 28, 0.6));
  border: 1px solid rgba(34, 211, 238, 0.24);
  margin-top: 4px;
}
body.item-page .detail-side__queue-info {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(190, 205, 230, 0.78);
}
body.item-page .detail-side__queue-info-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.85);
  text-transform: uppercase;
}
body.item-page .detail-side__queue-info-count {
  font-family: var(--font-display, inherit);
  font-size: 22px;
  font-weight: 900;
  color: #67e8f9;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
}
body.item-page .detail-side__queue-info-unit {
  font-size: 12px;
  font-weight: 600;
  color: rgba(190, 205, 230, 0.78);
}

/* v50: queue card UX overhaul — 4-zone layout (header → presence → CTA →
   hint). State-driven color schemes: idle=cyan, active=green, blocked=red.
   The progress ring around the avatar replaces the legacy in-button bar. */

/* Header — title + state pill */
body.item-page .detail-side__queue-head {
  display: flex;
  align-items: center;
  /* v55fb (2026-04-30) design audit fix #5: gap 8 → 12 對齊 presence/waitlist */
  gap: 12px;
  margin-bottom: 2px;
}
body.item-page .detail-side__queue-head-icon {
  font-size: 16px;
  line-height: 1;
  /* v55fb design audit fix #2: 拿掉 drop-shadow — cosmic PNG 自帶光暈，
     疊加 cyan drop-shadow 變雙重光暈糊感 */
  transition: filter 0.3s ease;
}
body.item-page .detail-side__queue-head-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #cffafe;
  flex: 1;
}
body.item-page .detail-side__queue-head-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  background: rgba(34, 211, 238, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.4);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* v55fc (2026-04-30): 復原 v55fa gold pill 高亮（user 要求）。
   為了避免跟 queue-pill[tone="warning"] (amber) 撞色，price pill 改用
   --ir-rarity-a (#f0c24c) 比 warning 的 #fcd34d 更深更橙。同時加 glow
   shadow 讓 price 比 warning 更有「premium 高亮」立體感。 */
body.item-page .detail-side__queue-head-price {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(240, 194, 76, 0.92);
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(240, 194, 76, 0.22), rgba(240, 194, 76, 0.08));
  border: 1px solid rgba(240, 194, 76, 0.5);
  box-shadow: 0 0 12px -2px rgba(240, 194, 76, 0.35);
  white-space: nowrap;
}
body.item-page .detail-side__queue-head-price strong {
  color: #ffd95a;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(255, 217, 90, 0.5);
  margin-left: 4px;
}
body.item-page .detail-side__queue-head-pill[data-pill-tone="success"] {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.5);
  animation: queuePillPulse 2.4s ease-in-out infinite;
}
body.item-page .detail-side__queue-head-pill[data-pill-tone="danger"] {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
}
body.item-page .detail-side__queue-head-pill[data-pill-tone="warning"] {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.5);
}
@keyframes queuePillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50%      { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* Presence section — avatar with progress ring + name + countdown */
body.item-page .detail-side__queue-presence {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    rgba(34, 211, 238, 0.10),
    rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.22);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
  animation: queuePresenceIn 0.35s ease-out both;
}
body.item-page .detail-side__queue-presence[hidden] {
  display: none;
}
@keyframes queuePresenceIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] {
  background: linear-gradient(135deg,
    rgba(248, 113, 113, 0.10),
    rgba(244, 63, 94, 0.06));
  border-color: rgba(248, 113, 113, 0.30);
}
body.item-page .detail-side__queue-presence-ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.item-page .detail-side__queue-presence-ring {
  position: absolute;
  inset: 0;
  width: 56px;
  height: 56px;
  transform: rotate(-90deg); /* start ring from 12 o'clock */
}
body.item-page .detail-side__queue-presence-ring .ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 3;
}
body.item-page .detail-side__queue-presence-ring .ring-progress {
  fill: none;
  stroke: #4ade80;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 169.65; /* 2π·27 */
  stroke-dashoffset: 169.65; /* JS animates from 0 → circumference */
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 4px currentColor);
  color: #4ade80;
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] .detail-side__queue-presence-ring .ring-progress {
  stroke: #f87171;
  color: #f87171;
}
body.item-page .detail-side__queue-presence-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(168, 85, 247, 0.4));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] .detail-side__queue-presence-avatar {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.4), rgba(244, 63, 94, 0.5));
}
body.item-page .detail-side__queue-presence-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.item-page .detail-side__queue-presence-avatar-fallback {
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
}
body.item-page .detail-side__queue-presence-status-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid rgba(15, 23, 42, 0.95);
  z-index: 3;
  box-shadow: 0 0 8px #4ade80;
  animation: queueDotBlink 1.4s ease-in-out infinite;
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] .detail-side__queue-presence-status-dot {
  background: #f87171;
  box-shadow: 0 0 8px #f87171;
}
@keyframes queueDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
body.item-page .detail-side__queue-presence-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
body.item-page .detail-side__queue-presence-name {
  font-size: 14px;
  font-weight: 800;
  color: #ecfeff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] .detail-side__queue-presence-name {
  color: #fee2e2;
}
body.item-page .detail-side__queue-presence-countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #67e8f9;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
body.item-page .detail-side__queue-presence[data-queue-holder-state="blocked"] .detail-side__queue-presence-countdown {
  color: #fca5a5;
}
body.item-page .detail-side__queue-presence-countdown-icon {
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
}

/* "Now your turn!" flash — fires on blocked → idle transition. */
body.item-page .detail-side__queue.is-your-turn-flash {
  animation: queueYourTurnFlash 1.6s ease-out;
}
@keyframes queueYourTurnFlash {
  0% {
    box-shadow:
      0 0 0 0 rgba(74, 222, 128, 0.7),
      inset 0 0 0 0 rgba(74, 222, 128, 0.4);
  }
  35% {
    box-shadow:
      0 0 0 8px rgba(74, 222, 128, 0),
      inset 0 0 32px 8px rgba(74, 222, 128, 0.35);
  }
  100% {
    box-shadow: none;
  }
}

/* Card root takes a state attribute so children can react. */
body.item-page .detail-side__queue[data-queue-card-state="active"] {
  border-color: rgba(74, 222, 128, 0.32);
  background: linear-gradient(180deg,
    rgba(74, 222, 128, 0.10),
    rgba(34, 211, 238, 0.06) 60%,
    rgba(9, 15, 28, 0.6));
}
body.item-page .detail-side__queue[data-queue-card-state="active"] .detail-side__queue-head-icon {
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.7));
}
body.item-page .detail-side__queue[data-queue-card-state="blocked"] {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(180deg,
    rgba(248, 113, 113, 0.08),
    rgba(244, 63, 94, 0.04) 60%,
    rgba(9, 15, 28, 0.6));
}
body.item-page .detail-side__queue[data-queue-card-state="expired"] {
  border-color: rgba(251, 191, 36, 0.32);
}

body.item-page .detail-side__queue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px !important;
  min-height: 48px;
  font-size: 15px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(34, 211, 238, 0.30),
    0 4px 12px rgba(168, 85, 247, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.5, 1),
              filter 0.18s ease, box-shadow 0.18s ease;
}

/* v55bi: 取消排隊按鈕 — 灰色（不誤導視覺優先度） */
body.item-page .detail-side__queue-btn.is-cancel {
  background: linear-gradient(135deg, #475569, #334155) !important;
  box-shadow: 0 6px 18px rgba(71, 85, 105, 0.35) !important;
}
body.item-page .detail-side__queue-btn.is-cancel:hover:not(:disabled) {
  background: linear-gradient(135deg, #64748b, #475569) !important;
}

/* v55bi: 停止抽獎按鈕 — 紅色 */
/* v55fb design audit fix #4: 觸控區 40 → 44px 合 iOS/Android guideline */
body.item-page .detail-side__queue-stop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px !important;
  min-height: 44px;
  margin-top: 8px;
  font-size: 13px !important;
  font-weight: 700;
  border-radius: 999px;
  border: 1.5px solid rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.15));
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}
/* v55bp: hidden attribute fix — display:inline-flex 會 override [hidden] 的 display:none，必須顯式宣告 */
body.item-page .detail-side__queue-stop-btn[hidden] {
  display: none !important;
}
body.item-page .detail-side__queue-stop-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.32), rgba(220, 38, 38, 0.28));
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.85);
}
body.item-page .detail-side__queue-stop-icon {
  font-size: 14px;
  line-height: 1;
}

/* v55bi: 等候列表頭像列 — 點擊開 modal */
body.item-page .detail-side__queue-waitlist {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.18);
  cursor: pointer;
  font-size: 12px;
  color: #cbd5e1;
  transition: all 0.18s ease;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
body.item-page .detail-side__queue-waitlist:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.7);
}
body.item-page .detail-side__queue-waitlist-label {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #7dd3fc;
}
body.item-page .detail-side__queue-waitlist-avatars {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: -6px;
}
body.item-page .detail-side__queue-waitlist-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(15, 23, 42, 0.95);
  margin-left: -6px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
}
body.item-page .detail-side__queue-waitlist-avatar:first-child { margin-left: 0; }
body.item-page .detail-side__queue-waitlist-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body.item-page .detail-side__queue-waitlist-avatar--more {
  background: rgba(168, 85, 247, 0.4);
  font-size: 9.5px;
  letter-spacing: 0;
}
body.item-page .detail-side__queue-waitlist-count {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--ir-muted, rgba(226, 232, 240, 0.6));
}
body.item-page .detail-side__queue-waitlist-count strong {
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 800;
  margin: 0 2px;
}

/* v55bi: 等候列表 modal — 完整名單 */
body.item-page .modal.smooth-modal #queueWaitlistModal,
.modal.smooth-modal #queueWaitlistModal { /* in case body class missing */ }
body .queue-waitlist-card {
  max-width: 480px;
  width: 92vw;
}
body .queue-waitlist-list {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
body .queue-waitlist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
body .queue-waitlist-row__pos {
  flex: 0 0 auto;
  width: 32px;
  text-align: center;
  font-weight: 800;
  color: #7dd3fc;
  font-size: 13px;
}
body .queue-waitlist-row__avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
}
body .queue-waitlist-row__avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body .queue-waitlist-row__name {
  flex: 1 1 auto;
  font-weight: 700;
  color: #f1f5f9;
  font-size: 13px;
}

/* v55bi: 跨池衝突 modal */
body .queue-conflict-card {
  max-width: 420px;
  width: 92vw;
}
body .queue-conflict-message {
  font-size: 14px;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 12px 0 4px;
}
body .queue-conflict-message strong {
  color: #fde68a;
  font-weight: 800;
}

/* v55bi: 隱藏舊的 poolPlayHistorySection（已被 記錄 tab 取代） */
body.item-page #poolPlayHistorySection {
  display: none !important;
}
body.item-page .detail-side__queue-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 18px 36px rgba(34, 211, 238, 0.40),
    0 6px 16px rgba(168, 85, 247, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
body.item-page .detail-side__queue-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
/* v50: button is now action-only (countdown lives in the ring/chip).
   active = bright cyan/green CTA "立即抽獎"
   blocked = subdued slate "請稍候" (disabled + locked icon)
   expired = warm amber "重新排隊" (call back) */
body.item-page .detail-side__queue-btn[data-queue-state="active"] {
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 0.85),
    rgba(20, 184, 166, 0.85)) !important;
  color: #042f2e !important;
  box-shadow:
    0 12px 28px rgba(34, 197, 94, 0.34),
    0 4px 12px rgba(20, 184, 166, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
  text-shadow: none !important;
  animation: queueActiveCtaPulse 2.6s ease-in-out infinite;
}
@keyframes queueActiveCtaPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1px); filter: brightness(1.05); }
}
body.item-page .detail-side__queue-btn[data-queue-state="expired"] {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.65), rgba(244, 114, 182, 0.55)) !important;
  color: #1c1917 !important;
}
/* v55co: blocked 狀態 = 「別人在抽，你可以加入排隊」— 應該看起來 actionable
 * 不是 disabled。之前用 slate gray + cursor:not-allowed 讓用戶以為按鈕壞掉，
 * 實際上 v55bp 起這顆按鈕是可點的（功能 = 加入 waitlist）。
 *
 * 改成 amber/orange CTA 色 + pointer cursor + hover 可亮起，傳達「點我可加入」。
 */
body.item-page .detail-side__queue-btn[data-queue-state="blocked"] {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.7), rgba(234, 88, 12, 0.85)) !important;
  color: #fff !important;
  cursor: pointer !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 237, 213, 0.35),
    0 4px 12px rgba(234, 88, 12, 0.3) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.18s ease;
}
body.item-page .detail-side__queue-btn[data-queue-state="blocked"]:hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.85), rgba(234, 88, 12, 1)) !important;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 237, 213, 0.5),
    0 6px 16px rgba(234, 88, 12, 0.45) !important;
}
body.item-page .detail-side__queue-btn[data-queue-state="blocked"]:active {
  transform: translateY(0);
  filter: brightness(0.95);
}
body.item-page .detail-side__queue-btn[data-queue-state="blocked"] .detail-side__queue-btn-icon {
  animation: queueBlockedIconBounce 2.4s ease-in-out infinite;
}
@keyframes queueBlockedIconBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2px) scale(1.06); }
}
body.item-page .detail-side__queue-btn-icon {
  font-size: 18px;
  line-height: 1;
  position: relative;
  z-index: 2;
}
body.item-page .detail-side__queue-btn-text {
  font-family: var(--font-display, inherit);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 2;
}
body.item-page .detail-side__queue-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(148, 163, 184, 0.72);
}
body.item-page .detail-side__queue-hint strong {
  color: #67e8f9;
  font-weight: 700;
}

/* v50: queue card mobile sizing — narrower padding + smaller avatar */
@media (max-width: 720px) {
  body.item-page .detail-side__queue {
    padding: 12px 12px 10px;
  }
  body.item-page .detail-side__queue-head-title {
    font-size: 12px;
  }
  body.item-page .detail-side__queue-presence {
    gap: 10px;
    padding: 8px 10px;
  }
  body.item-page .detail-side__queue-presence-ring-wrap,
  body.item-page .detail-side__queue-presence-ring {
    width: 48px;
    height: 48px;
  }
  body.item-page .detail-side__queue-presence-avatar {
    width: 38px;
    height: 38px;
  }
  body.item-page .detail-side__queue-presence-avatar-fallback {
    font-size: 19px;
  }
  body.item-page .detail-side__queue-presence-name {
    font-size: 13px;
  }
  body.item-page .detail-side__queue-presence-countdown {
    font-size: 11px;
  }
  body.item-page .detail-side__queue-btn {
    padding: 11px 18px !important;
    min-height: 44px;
    font-size: 14px !important;
  }
}

/* v50: respect prefers-reduced-motion — kill the pill pulse, ring
   transitions, presence in/out animation, and CTA bob. */
@media (prefers-reduced-motion: reduce) {
  body.item-page .detail-side__queue-head-pill[data-pill-tone="success"],
  body.item-page .detail-side__queue-presence,
  body.item-page .detail-side__queue-presence-status-dot,
  body.item-page .detail-side__queue-btn[data-queue-state="active"],
  body.item-page .detail-side__queue.is-your-turn-flash {
    animation: none !important;
  }
  body.item-page .detail-side__queue-presence-ring .ring-progress {
    transition: none !important;
  }
}

/* ============================================================
   v52: 籤單選擇 modal (一翻賞)
   Replaces v51 cc1kuji-catalog stage. User picks ticket numbers
   (multi-select) from a 60-cell grid; revealed cards show their
   tier label, available cards show just the number.
   ============================================================ */

.draw-pick-modal.is-visible {
  align-items: stretch;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  z-index: 4500;
}
.draw-pick-modal .draw-pick-card {
  position: relative;
  max-width: min(1240px, 96vw);
  width: 96vw;
  max-height: 96vh;
  margin: 2vh auto;
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #1e293b;
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}

/* c120 (2026-04-30): 手機 picker card 全螢幕 — 不要 margin 留白讓 backdrop
   blur 透出後面頁面（user 報「下半部模糊像頁面被透出」）。card 直接撐滿。 */
@media (max-width: 719px) {
  .draw-pick-modal .draw-pick-card {
    max-width: 100vw;
    width: 100vw;
    max-height: 100svh;
    margin: 0 auto;
    padding: 16px 12px;
    border-radius: 0;
    box-shadow: none;
  }
  /* 同時把 modal backdrop 改成 100% 不透明 — 萬一 card 沒填滿也不會透出 */
  .draw-pick-modal.is-visible {
    background: rgba(8, 12, 24, 1);
  }
}

.draw-pick__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.18s ease, transform 0.18s ease;
}
.draw-pick__close:hover {
  background: rgba(15, 23, 42, 0.12);
  transform: scale(1.05);
}

.draw-pick__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 4px 56px 16px 4px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.draw-pick__head-banner {
  margin: 0;
  font-size: 13px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.draw-pick__head-banner-icon { font-size: 14px; }

/* v55 — provably-fair banner inside the ticket-pick modal. Customers
   can copy the commitment + distribution hashes before drawing and
   verify post-reveal that we never tampered with the pool. */
.draw-pick__fairness {
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.02));
  font-size: 12px;
  color: #1e293b;
}
.draw-pick__fairness[open] {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.04));
}
.draw-pick__fairness-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  user-select: none;
}
.draw-pick__fairness-summary::-webkit-details-marker { display: none; }
.draw-pick__fairness-icon { font-size: 14px; }
.draw-pick__fairness-label {
  font-weight: 600;
  color: #4338ca;
}
.draw-pick__fairness-state {
  margin-left: auto;
  font-size: 11px;
  color: #64748b;
}
.draw-pick__fairness-body {
  padding: 0 12px 10px;
  border-top: 1px solid rgba(99, 102, 241, 0.12);
}
.draw-pick__fairness-explain {
  margin: 8px 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: #475569;
}
.draw-pick__fairness-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 10px;
  margin: 6px 0;
}
.draw-pick__fairness-grid dt {
  font-size: 11px;
  color: #64748b;
  align-self: center;
}
.draw-pick__fairness-grid dd {
  margin: 0;
  font-size: 11.5px;
  word-break: break-all;
}
.draw-pick__fairness-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: text;
}
.draw-pick__fairness-link {
  margin: 8px 0 0;
  font-size: 11.5px;
}
.draw-pick__fairness-link a {
  color: #4338ca;
  text-decoration: none;
}
.draw-pick__fairness-link a:hover { text-decoration: underline; }
.draw-pick__head-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.draw-pick__head-countdown-value {
  font-family: var(--font-display, "Impact", sans-serif);
  font-size: 32px;
  font-weight: 900;
  color: #a855f7;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(168, 85, 247, 0.25);
  line-height: 1;
  position: relative;
  padding-left: 24px;
}
.draw-pick__head-countdown-value::before {
  content: "⏳";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
}
.draw-pick__head-countdown[data-tone="warning"] .draw-pick__head-countdown-value {
  color: #f59e0b;
  text-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}
.draw-pick__head-countdown[data-tone="danger"] .draw-pick__head-countdown-value {
  color: #ef4444;
  text-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
  animation: drawPickCountdownDanger 1s ease-in-out infinite;
}
@keyframes drawPickCountdownDanger {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.draw-pick__head-countdown-hint {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.draw-pick__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;        /* v55ae: never wrap — keeps grid height stable */
  gap: 8px;
  padding: 10px 4px 12px;
}
.draw-pick__toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.05);
  color: #7c3aed;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.draw-pick__toolbar-btn::before {
  content: "○";
  font-size: 16px;
  line-height: 1;
}
.draw-pick__toolbar-btn:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.6);
}
.draw-pick__toolbar-summary {
  font-size: 13px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.draw-pick__toolbar-summary strong {
  color: #1e293b;
  font-weight: 800;
}
/* v54v: 已抽 count chip — sits next to the selection counter to show how
   many tickets across the whole pool have been drawn already.
   v55ae: ALWAYS reserve layout space so the grid below doesn't jump
   when the chip appears (poll updates drawnCount 0 → N+ → chip becomes
   visible). Reserve a min-width too so digit-width changes don't
   cause horizontal shift. */
.draw-pick__toolbar-drawn {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.18);
  min-width: 78px;            /* enough for "已抽 1000" */
  text-align: center;
  flex-shrink: 0;
}
/* v55ae: visibility:hidden keeps the chip's box reserved so toolbar
   height stays constant. Was display:none which removed the box and
   re-flowed the grid (the "縮小空間" the user reported). */
.draw-pick__toolbar-drawn[hidden] {
  visibility: hidden;
  display: inline-block !important; /* override the [hidden] UA rule */
}
.draw-pick__toolbar-drawn strong {
  color: #dc2626;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* v54s: compact pagination — chip-style page numbers */
.draw-pick__pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 4px;
  margin: 4px 4px 0;
  border-top: 1px dashed rgba(168, 85, 247, 0.16);
  font-variant-numeric: tabular-nums;
}
.draw-pick__pagination[hidden] { display: none; }
.draw-pick__pagination-row {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.draw-pick__pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 2px 0;
  scroll-behavior: smooth;
}
.draw-pick__pagination-pages::-webkit-scrollbar { height: 4px; }
.draw-pick__pagination-pages::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 2px;
}
.draw-pick__pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.draw-pick__pagination-btn:hover:not(:disabled):not(.is-active) {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #6d28d9;
  transform: translateY(-1px);
}
.draw-pick__pagination-btn.is-active {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-color: #6d28d9;
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(124, 58, 237, 0.45);
  cursor: default;
}
.draw-pick__pagination-btn--nav {
  font-size: 16px;
  font-weight: 900;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}
.draw-pick__pagination-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
.draw-pick__pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.draw-pick__pagination-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.04em;
}
.draw-pick__pagination-meta strong {
  color: #7c3aed;
  font-weight: 800;
}
.draw-pick__pagination-meta-sep { opacity: 0.5; }

/* v54s: 已抽 stamp + grayscale on revealed cards */
/* v55q: revealed cards now show the tier FRONT image (set via JS swap of
   src + class). Keep a subtle dim so the available cards still pop more
   visually than already-drawn ones. */
.draw-pick__card.is-revealed .draw-pick__card-image {
  filter: brightness(0.92);
  opacity: 0.92;
}
.draw-pick__card-drawn-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  z-index: 4;
  /* v55q: shrunk so it doesn't smother the prize front image showing
     underneath. Was 13px / 2-8px padding / 2px border. */
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #dc2626;
  background: rgba(255, 255, 255, 0.86);
  padding: 1px 5px;
  border: 1.5px solid #dc2626;
  border-radius: 3px;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  /* Keep the stamp anchored over the IMAGE (top 5/3 part of the cell),
     not over the number row below. With the column flex layout the
     image is the first child filling its 5:3 box; the stamp's parent
     is the button, so position absolute relative to that — but only
     the top-portion looks right. Use top: 35% to land mid-image. */
  top: 35%;
}
.draw-pick__card.is-revealed .draw-pick__card-number {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: rgba(220, 38, 38, 0.4);
}

.draw-pick__grid {
  display: grid;
  /* v52e: scratch-off (刮刮樂) layout — short horizontal cells in a
     dense grid. 12-col desktop with cells ~80×48 (5:3 wide ratio). */
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 4px 12px;
  align-content: start;
}
.draw-pick__grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #94a3b8;
  padding: 40px 0;
}

.draw-pick__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* v52e: scratch-off (刮刮樂) cell — short horizontal rectangle.
     5:3 wide ratio with min-height for readability on small viewports. */
  aspect-ratio: 5 / 3;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-family: var(--font-display, inherit);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  overflow: hidden;
}
.draw-pick__card:disabled { cursor: default; }
.draw-pick__card-number {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
}
.draw-pick__card.is-available {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.draw-pick__card.is-available:hover {
  background: #ede9fe;
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}
.draw-pick__card.is-selected {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-color: #6d28d9;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}
.draw-pick__card.is-selected .draw-pick__card-number {
  color: rgba(255, 255, 255, 0.85);
}
.draw-pick__card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}
/* c106 (2026-04-30): 真正修「自動縮排」bug。User 抱怨 drawn cards 比
   undrawn 細小 + 「擋到其他人」(下方 row 被向上拉吃進 drawn cell 的空)。

   ROOT CAUSE: undrawn 用 --back image 走 `.has-back-image .card-image--back
   { position: relative; aspect-ratio: 5/3; height: auto; flex-shrink: 0 }`
   rule 在 flex flow 內把 cell 撐到 image 5:3 高度。Drawn 用 --front image
   只 match 底層 `.card-image { position: absolute; inset: 0 }` → 整個
   OUT OF FLOW → flex column cell collapse 只剩 number text 高度 → 視覺上
   drawn cards「縮」一截，下方 row 上拉填空 → 看起來「擋到其他人」。

   修法: --front image 也走 in-flow with aspect-ratio 5:3，跟 --back 同款
   layout，cell 不會 collapse。grayscale + brightness for grey effect。
   stamp 完全不動 (native position:absolute centered)。
   不用 background 因為 .has-back-image 已經 transparent + image fills cell。 */
.draw-pick__card.has-back-image .draw-pick__card-image--front {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(15, 23, 42, 0.18);
  display: block;
  flex-shrink: 0;
  z-index: 1;
}
.draw-pick__card.is-revealed {
  cursor: default;
}
.draw-pick__card.is-revealed .draw-pick__card-image {
  filter: grayscale(0.85) brightness(0.7);
  opacity: 0.6;
}
.draw-pick__card.is-revealed .draw-pick__card-number {
  opacity: 0.5;
}

/* v52a: when revealed card has an image (LAST/S/A/B), the image fills
   the card body and the tier label sits centered on top with a subtle
   shadow for readability. Number stays in the corner. */
.draw-pick__card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Image is 2:3 portrait; cell is 5:3 wide. Center the medallion
     vertically and let the frame ornaments crop top/bottom — keeps the
     gold seal motif visible across all cells (scratch-off vibe). */
  object-position: center;
  border-radius: 5px;
  z-index: 1;
  pointer-events: none;
}
.draw-pick__card.has-image {
  padding: 0;
  background: transparent;
  border-color: rgba(15, 23, 42, 0.12);
}
.draw-pick__card.has-image .draw-pick__card-number {
  z-index: 3;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  background: rgba(0, 0, 0, 0.32);
  padding: 1px 5px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.draw-pick__card.has-image .draw-pick__card-tier-label {
  z-index: 3;
  position: relative;
  -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* v52b: unrevealed cards use shared yifan.card-back image as backdrop.
   Number overlays on top with dark backdrop chip for legibility. */
.draw-pick__card.has-back-image {
  padding: 0;
  background: transparent;
  border-color: rgba(15, 23, 42, 0.18);
}
/* v52b/v54m: hover lifts the image (number stays put below) */
.draw-pick__card.has-back-image:hover .draw-pick__card-image--back {
  opacity: 1;
  transform: scale(1.04);
}
/* v54m: number is OUTSIDE the card now — sits below as plain text in
   its own row, with the card image as a self-contained 5:3 rectangle
   above it. The cell loses its uniform 5:3 aspect-ratio (overridden by
   the column-layout below) and instead sizes to image-height + number-
   row-height. */
.draw-pick__card.has-back-image {
  /* Override the parent's flex-row centering — we want a column with
     the image up top and the number below it, completely separate */
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  border: 0;
  /* drop the cell-level aspect-ratio — the image itself owns 5:3 now */
  aspect-ratio: auto;
  min-height: 0;
  gap: 4px;
}
.draw-pick__card.has-back-image .draw-pick__card-image--back {
  /* image is its own 5:3 rectangle with rounded corners + border. The
     selected/hover states styled BELOW target this element directly. */
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(15, 23, 42, 0.18);
  display: block;
  flex-shrink: 0;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.draw-pick__card.has-back-image .draw-pick__card-number {
  /* plain text label below the card — no chip, no overlay */
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  transform: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  z-index: auto;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  letter-spacing: 0.04em;
  min-width: 0;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
/* v54m: selected state — purple highlight on the IMAGE (not the cell)
   since the cell is now just a transparent column with image + text. */
.draw-pick__card.has-back-image.is-selected {
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: translateY(-2px);
}
.draw-pick__card.has-back-image.is-selected .draw-pick__card-image--back {
  border: 2.5px solid #7c3aed;
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.4),
    0 6px 16px rgba(168, 85, 247, 0.5);
}
/* v54m: selected number sits below the highlighted image — accent color
   (matches purple ring) but stays plain text, no chip background. */
.draw-pick__card.has-back-image.is-selected .draw-pick__card-number {
  color: #7c3aed;
  font-weight: 800;
}
.draw-pick__card.has-back-image.is-selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  background: #7c3aed;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.6);
}

.draw-pick__card-tier-label {
  font-family: var(--font-display, "Impact", sans-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.5px rgba(15, 23, 42, 0.15);
}
.draw-pick__card[data-tier="LAST"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #f472b6, #c084fc, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.draw-pick__card[data-tier="S"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="A"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #facc15, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.draw-pick__card[data-tier="B"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.draw-pick__card[data-tier="C"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.draw-pick__card[data-tier="D"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #f97316, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.draw-pick__card[data-tier="E"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="F"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="G"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="H"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="I"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="J"] .draw-pick__card-tier-label,
.draw-pick__card[data-tier="K"] .draw-pick__card-tier-label {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.draw-pick__foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 4px 4px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.draw-pick__foot-shortcuts {
  display: inline-flex;
  flex-wrap: wrap;             /* v55ak: allow hint text to wrap below */
  align-items: center;
  gap: 8px;
}
.draw-pick__foot-shortcut {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.04);
  color: #7c3aed;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.draw-pick__foot-shortcut:hover {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.6);
}
/* v55ak: 全選 variant — emphasised border + cyan accent so it visually
   pops between the qty shortcuts. */
.draw-pick__foot-shortcut--all {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(56, 189, 248, 0.08);
  color: #0284c7;
}
.draw-pick__foot-shortcut--all:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(125, 211, 252, 0.85);
}

/* ─────────────────────────────────────────────────────────────────────────
 * c170 (2026-05-01): Arcade-style mechanical push buttons for pickModal
 * footer. Replaces 5 flat text buttons (drawPickQty1/5/10/100/All) with 4
 * gpt-image-2 generated cylindrical chrome+LED buttons (X1/X10/X100/自選).
 *
 * Reference: user-provided 「街機機械風格 GACHA SYSTEM UI CONCEPT STYLE 04」
 *
 * Press animation 用純 CSS（不用 PRESSED state 圖）：
 *   - hover  → brightness + warm drop-shadow（LED 變亮）
 *   - active → translateY(3px) + scale(0.97) + brightness 暗一點（按下去）
 *   - is-selected → 強烈 drop-shadow（當 count 匹配 qty 時）
 * ───────────────────────────────────────────────────────────────────────── */

.draw-pick__foot-shortcuts--arcade {
  gap: 10px;
  align-items: flex-end;
}

.arcade-btn {
  /* Reset .draw-pick__foot-shortcut pill styling — image button has no chrome */
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: inherit !important;
  border-radius: 0 !important;
  /* Sizing: image-driven, but cap min/max so button doesn't blow up */
  width: clamp(80px, 14vw, 120px);
  height: clamp(80px, 14vw, 120px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Smooth press: tight 80ms cubic-bezier-out for the down stroke */
  transition: transform 90ms cubic-bezier(0.4, 0, 0.6, 1),
              filter 130ms ease-out;
  -webkit-tap-highlight-color: transparent;
  /* Stop iOS Safari from giving the button a translucent grey overlay on tap */
  user-select: none;
}

.arcade-btn__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  /* Slight idle drop-shadow gives the button presence on dark backdrop */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: filter 130ms ease-out;
}

/* Hover: LED ring brightens + warm halo glow per variant */
.arcade-btn:hover .arcade-btn__img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 12px var(--arcade-glow, rgba(56, 189, 248, 0.55)));
}

/* Active (mouse down) — physical press: button moves down, looks darker */
.arcade-btn:active {
  transform: translateY(3px) scale(0.97);
}

.arcade-btn:active .arcade-btn__img {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)) brightness(0.85);
}

/* Selected state — when this qty matches the current selection count.
   JS toggles .is-selected on the matching button. Strong glow signals
   "this is what I picked". */
.arcade-btn.is-selected .arcade-btn__img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 16px var(--arcade-glow, rgba(56, 189, 248, 0.75)))
          brightness(1.12);
}

/* Per-variant glow color — used by drop-shadow var() */
.arcade-btn--x1     { --arcade-glow: rgba(96, 165, 250, 0.6); }    /* electric blue */
.arcade-btn--x10    { --arcade-glow: rgba(251, 191, 36, 0.65); }   /* warm gold */
.arcade-btn--x100   { --arcade-glow: rgba(192, 132, 252, 0.65); }  /* purple */
.arcade-btn--custom { --arcade-glow: rgba(34, 211, 238, 0.65); }   /* cyan */

/* Mobile: shrink ~12% so 4 buttons fit on narrow viewports */
@media (max-width: 480px) {
  .arcade-btn {
    width: clamp(64px, 18vw, 92px);
    height: clamp(64px, 18vw, 92px);
  }
  .draw-pick__foot-shortcuts--arcade {
    gap: 6px;
    justify-content: space-around;
    width: 100%;
  }
}

/* Reduced motion — kill the press transform jiggle, keep filter feedback */
@media (prefers-reduced-motion: reduce) {
  .arcade-btn,
  .arcade-btn__img {
    transition: filter 130ms ease-out;
  }
  .arcade-btn:active {
    transform: none;
  }
}
/* v55ak: hint text next to the qty shortcuts explaining the
   multi-draw → single scratch card behaviour. */
.draw-pick__foot-hint {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}
.draw-pick__foot-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}
.draw-pick__foot-total-label {
  font-size: 13px;
  color: #64748b;
}
.draw-pick__foot-total-value {
  font-family: var(--font-display, inherit);
  font-size: 22px;
  font-weight: 900;
  color: #f59e0b;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  position: relative;
}
.draw-pick__foot-total-value::before {
  content: "●";
  display: inline-block;
  margin-right: 4px;
  font-size: 14px;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}
.draw-pick__foot-buy {
  padding: 12px 32px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.draw-pick__foot-buy:disabled {
  background: #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
  opacity: 0.7;
}
.draw-pick__foot-buy:not(:disabled):hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}
.draw-pick__foot-buy.is-active {
  animation: drawPickBuyPulse 2.4s ease-in-out infinite;
}
@keyframes drawPickBuyPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1px); filter: brightness(1.06); }
}
.draw-pick__foot-buy-icon {
  font-size: 16px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .draw-pick-modal .draw-pick-card {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: 16px 14px 12px;
  }
  .draw-pick__head {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 4px 40px 12px 0;
  }
  .draw-pick__head-banner {
    justify-content: center;
    font-size: 12px;
  }
  .draw-pick__head-countdown-value { font-size: 26px; }
  .draw-pick__grid {
    /* v52e: scratch-off cells on mobile — 6-col, smaller cells */
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }
  .draw-pick__card {
    font-size: 14px;
    min-height: 38px;
  }
  .draw-pick__card-tier-label { font-size: 14px; }
  .draw-pick__foot {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "shortcuts shortcuts"
      "total buy";
    gap: 10px;
  }
  .draw-pick__foot-shortcuts {
    grid-area: shortcuts;
    justify-content: center;
    flex-wrap: wrap;
  }
  .draw-pick__foot-total {
    grid-area: total;
    justify-content: flex-start;
  }
  .draw-pick__foot-buy {
    grid-area: buy;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .draw-pick__head-countdown[data-tone="danger"] .draw-pick__head-countdown-value,
  .draw-pick__foot-buy.is-active {
    animation: none !important;
  }
}

/* v44: 即時中獎橫向 marquee — cc1kuji 風格。Pulse + label 固定在左，
   右側橫向無限滾動 winner chips。Track 內含 2 份相同 group，CSS
   animation 平移 -50% 達成無縫 loop。Hover 時整條 track 暫停。 */
body.item-page .item-winners-marquee {
  display: flex;
  align-items: stretch;
  margin: 18px auto 0;
  max-width: 100%;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(13, 20, 39, 0.78), rgba(9, 15, 28, 0.62));
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(1, 8, 18, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: hidden;
  position: relative;
}

body.item-page .item-winners-marquee__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 16px;
  border-right: 1px solid rgba(119, 194, 226, 0.18);
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.10), rgba(0, 212, 255, 0.02));
  z-index: 2;
}
body.item-page .item-winners-marquee__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
  animation: itemWinnersMarqueePulse 1.6s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes itemWinnersMarqueePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}
body.item-page .item-winners-marquee__title {
  font-size: 13px;
  font-weight: 800;
  color: #f5fcff;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

body.item-page .item-winners-marquee__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  padding: 0 12px;
  /* mask edges so chips fade in/out at the boundaries instead of
     hard-cutting against the head separator and right edge */
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0,
    rgba(0,0,0,1) 24px,
    rgba(0,0,0,1) calc(100% - 36px),
    transparent 100%);
  mask-image: linear-gradient(90deg,
    transparent 0,
    rgba(0,0,0,1) 24px,
    rgba(0,0,0,1) calc(100% - 36px),
    transparent 100%);
}

body.item-page .item-winners-marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  height: 100%;
  align-items: center;
  animation: itemWinnersMarqueeScroll 60s linear infinite;
  /* gpu-accelerated transform */
  will-change: transform;
}
body.item-page .item-winners-marquee:hover .item-winners-marquee__track {
  animation-play-state: paused;
}
@keyframes itemWinnersMarqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

body.item-page .item-winners-marquee__group {
  display: flex;
  gap: 12px;
  padding-right: 12px;
  flex: 0 0 auto;
}

body.item-page .item-winners-marquee__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(13, 20, 39, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
  height: 44px;
  max-width: 280px;
}
body.item-page .item-winners-marquee__chip-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
body.item-page .item-winners-marquee__chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(190, 205, 230, 0.78);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
body.item-page .item-winners-marquee__chip-user {
  color: #00d4ff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
body.item-page .item-winners-marquee__chip-got {
  color: rgba(148, 163, 184, 0.7);
  font-weight: 500;
}
body.item-page .item-winners-marquee__chip-item {
  color: #ffffff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

@media (max-width: 720px) {
  body.item-page .item-winners-marquee {
    height: 56px;
  }
  body.item-page .item-winners-marquee__head {
    padding: 0 12px;
  }
  body.item-page .item-winners-marquee__title {
    font-size: 12px;
  }
  body.item-page .item-winners-marquee__chip {
    height: 40px;
    padding: 4px 10px 4px 4px;
  }
  body.item-page .item-winners-marquee__chip-thumb {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.item-page .item-winners-marquee__track {
    animation: none;
  }
  body.item-page .item-winners-marquee__pulse {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.item-page .hero-carousel__slide,
  body.item-page .hero-carousel__dot {
    transition: none;
  }
  /* Reduced motion: drop the lift + 3D push, but keep the size contrast
     since that's what carries the active/inactive distinction visually.
     No spotlight pulse either — static glow only. */
  body.item-page .hero-carousel__slide {
    transform: scale(0.84);
    filter: brightness(0.6) saturate(0.7);
  }
  body.item-page .hero-carousel__slide.is-active,
  body.item-page .hero-carousel__slide:focus-within {
    transform: scale(1.05);
    filter: none;
  }
}

/* main column — title, tags, progress, primary CTA */
body.item-page .detail-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body.item-page .detail-main .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

body.item-page .detail-main h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 5.2vw, 38px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ir-ink);
  text-shadow: 0 2px 18px rgba(2, 8, 23, 0.35);
}

body.item-page .detail-tags {
  margin: 0;
  font-size: 13px;
  color: var(--ir-muted);
}

body.item-page .detail-tags:empty {
  display: none;
}

body.item-page .progress {
  gap: 10px;
  font-size: 12px;
}
/* v35-decisionpanel: progress label now has count + percentage in
   one line. Was just "94% 剩餘" — now "935/1000 籤  ·  94% 剩餘". */
body.item-page .progress-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
}
body.item-page .progress-meta__count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #a7f3d0;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
body.item-page .progress-meta__count em {
  font-style: normal;
  font-weight: 400;
  color: rgba(148, 163, 184, 0.7);
}
body.item-page .progress-meta__pct {
  font-style: normal;
  color: var(--ir-muted);
  letter-spacing: 0.06em;
}

/* hero primary action (立即抽) — hidden on mobile because the
   sticky draw-bar already provides a one-tap CTA in the thumb-zone;
   duplicate would steal attention. Re-show on desktop. */
body.item-page .detail-actions {
  display: none;
}

@media (min-width: 921px) {
  body.item-page .detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
  }
}

/* v39-ctapolish: hero CTA leveled up.
   - chest icon (inline SVG) for visual affordance
   - bigger hit area (min-height 56, padding 14×26)
   - idle gentle pulse (2.4s breathing) to draw attention
   - count chip: number is large + bold, "箱" is small subscript-like
   - shadow stack: cyan halo + purple under-glow + inner highlight
   - hover: lift + brighter glow + arrow slides
   - press: spring-back with quick scale */
@keyframes heroCtaIdlePulse {
  0%, 100% {
    box-shadow:
      0 14px 32px rgba(34, 211, 238, 0.28),
      0 4px 12px rgba(168, 85, 247, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  50% {
    box-shadow:
      0 18px 42px rgba(34, 211, 238, 0.42),
      0 6px 18px rgba(168, 85, 247, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
}
body.item-page .detail-actions__hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px !important;
  font-size: 16px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  min-height: 56px;
  position: relative;
  overflow: hidden;
  animation: heroCtaIdlePulse 2.4s ease-in-out infinite;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.5, 1),
              filter 0.18s ease;
}
/* sheen wipe — subtle white gradient sweeps L→R every 3s */
body.item-page .detail-actions__hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 60%,
    transparent 100%);
  background-size: 250% 100%;
  background-position: 200% 0;
  animation: heroCtaSheen 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroCtaSheen {
  0%, 60% { background-position: 200% 0; }
  100% { background-position: -50% 0; }
}
body.item-page .detail-actions__hero-cta:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.08) saturate(1.1);
  animation-play-state: paused;
  box-shadow:
    0 22px 48px rgba(34, 211, 238, 0.45),
    0 8px 22px rgba(168, 85, 247, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}
body.item-page .detail-actions__hero-cta:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
body.item-page .detail-actions__hero-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}
body.item-page .detail-actions__hero-cta-icon {
  /* v42-biggerchest: 28 → 40px so the gpt-image-2 painterly chest
     reads as a real subject (not a tiny accent). Margin compensated
     so the larger image doesn't shove arrow off the pill. drop-shadow
     stays for "lifted" feel against the gradient pill. */
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  margin: -8px 0; /* let chest extend beyond pill height visually */
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
body.item-page .detail-actions__hero-cta-text {
  font-family: var(--font-display, inherit);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}
body.item-page .detail-actions__hero-cta-count {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 11px 4px 12px;
  border-radius: 999px;
  background: rgba(8, 14, 27, 0.55);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
body.item-page .detail-actions__hero-cta-count strong {
  font-family: var(--font-display, inherit);
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}
body.item-page .detail-actions__hero-cta-arrow {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.5, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}
body.item-page .detail-actions__hero-cta:hover .detail-actions__hero-cta-arrow {
  transform: translate(4px, -1px);
}
@media (prefers-reduced-motion: reduce) {
  body.item-page .detail-actions__hero-cta {
    animation: none;
  }
  body.item-page .detail-actions__hero-cta::before {
    animation: none;
    display: none;
  }
}

/* sidebar — v2: price/status header + compact tier-stock mini-grid
   inspired by cc1kuji.com — shows all tiers' remaining inventory in one
   dense grid so users see the entire pool state at a glance. */
body.item-page .detail-side {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--ir-radius-md);
  border: 1px solid var(--ir-border-soft);
  background: rgba(9, 15, 28, 0.56);
}

/* v34-uxpolish: head is now just a status indicator (price was removed
   to dedupe with upper meta block). Show as inline badge with colored
   dot instead of the old 2-col kv grid.
   v38c: parent .detail-side is display:grid with default align-items
   stretch — was stretching this head row to ~109px tall, leaving a
   big "ghost" outline around the small status pill. align-self:start
   collapses head to its natural content height.
   v41-currentbox: now also contains the「目前所在第 N 箱」chip
   alongside the status, so use flex gap for spacing + wrap on small
   widths. */
body.item-page .detail-side__head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  align-self: start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}
body.item-page .detail-side__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(13, 20, 39, 0.8);
  border: 1px solid var(--ir-border-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}
body.item-page .detail-side__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
body.item-page .detail-side__status--active .detail-side__status-dot {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.55);
}
body.item-page .detail-side__status--active .detail-side__status-label {
  color: #6ee7b7;
}
body.item-page .detail-side__status--inactive .detail-side__status-dot {
  background: #94a3b8;
}
body.item-page .detail-side__status--inactive .detail-side__status-label {
  color: #cbd5e1;
}

/* v55cr: pending auto-reset 警告 — 紅色 banner 嵌在 status pill 右邊 */
body.item-page .detail-side__status {
  flex-wrap: wrap;
}
body.item-page .detail-side__reset-warn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-left: 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.28));
  border: 1px solid rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  letter-spacing: 0;
  animation: resetWarnPulse 2.4s ease-in-out infinite;
}
body.item-page .detail-side__reset-warn-icon {
  font-size: 14px;
  line-height: 1;
}
body.item-page .detail-side__reset-warn-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  line-height: 1.3;
}
body.item-page .detail-side__reset-warn-title {
  color: #fecaca;
  font-weight: 700;
  letter-spacing: 0.04em;
}
body.item-page .detail-side__reset-warn-eta {
  color: #fef3c7;
  font-size: 10px;
  letter-spacing: 0.02em;
}
@keyframes resetWarnPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.25); }
  50%      { box-shadow: 0 0 18px rgba(239, 68, 68, 0.5); }
}

/* v41-currentbox: 「目前所在第 N 箱」 chip — sits next to status pill
   so users instantly know which box they're viewing without having
   to open the picker. cyan accent = treasure / box-related. */
body.item-page .detail-side__current-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.10) 80%);
  border: 1px solid rgba(34, 211, 238, 0.32);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(190, 205, 230, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
body.item-page .detail-side__current-box-icon {
  /* v42-biggerchest: bump from 22 → 32px to match the new bigger CTA
     chest sizing. Chip auto-adjusts via flex. */
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin: -4px 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* c169q yifan-child-pools — REVERT c169p .is-real-image rule.
   user 要求「目前所在」icon 還原成寶箱風格，保持跟 picker grid 一致。
   不再需要 product-image 風格 override。 */
body.item-page .detail-side__current-box-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  color: rgba(190, 205, 230, 0.78);
}
body.item-page .detail-side__current-box-text strong {
  font-family: var(--font-display, inherit);
  font-size: 13px;
  font-weight: 800;
  color: #67e8f9;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

body.item-page .detail-side .detail-side__kv {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--ir-radius-sm);
  background: rgba(13, 20, 39, 0.68);
  border: 1px solid var(--ir-border-soft);
  min-width: 0;
  text-align: left;
}

body.item-page .detail-side .detail-side__kv--full {
  grid-column: 1 / -1;
}

body.item-page .detail-side span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(190, 205, 230, 0.78);
  line-height: 1.2;
}

body.item-page .detail-side strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: 0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ==================== tier-stock mini-grid ==================== */
body.item-page .tier-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-radius: var(--ir-radius-sm);
  background: rgba(13, 20, 39, 0.78);
  border: 1px solid var(--ir-border-soft);
}

body.item-page .tier-stock-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px 7px;
  border-radius: 8px;
  background: rgba(9, 15, 28, 0.6);
  border: 1px solid rgba(118, 148, 193, 0.1);
  /* v55ak: bumped from 11px so the count "1/2" is easier to read */
  font-size: 13px;
  line-height: 1.25;
  min-width: 0;
  transition: border-color 0.15s ease;
  /* v35-decisionpanel: position relative for hover popover */
  position: relative;
  cursor: help;
}
body.item-page .tier-stock-cell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
body.item-page .tier-stock-cell__prob {
  /* v55ak: bumped from 10px to match the larger count */
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ir-dim);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  align-self: flex-end;
}
/* hover popover with prize names */
body.item-page .tier-stock-cell__hover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  z-index: 50;
  min-width: 200px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 27, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
body.item-page .tier-stock-cell:hover .tier-stock-cell__hover,
body.item-page .tier-stock-cell:focus-visible .tier-stock-cell__hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body.item-page .tier-stock-cell__hover-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #67e8f9;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
body.item-page .tier-stock-cell__prize-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
body.item-page .tier-stock-cell__prize-list li {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
  padding-left: 10px;
  position: relative;
}
body.item-page .tier-stock-cell__prize-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: rgba(148, 163, 184, 0.6);
}
body.item-page .tier-stock-cell__prize-more {
  color: rgba(148, 163, 184, 0.7) !important;
  font-style: italic;
}

body.item-page .tier-stock-cell:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

/* v34-uxpolish: color-code each tier so users can scan inventory by
   rarity at a glance. Keeps the same compact layout but tints the
   label, count, and border per tier letter. cc1kuji-style accent. */
body.item-page .tier-stock-cell--last {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--last .tier-stock-cell__label { color: #fbbf24; }
body.item-page .tier-stock-cell--last .tier-stock-cell__count { color: #fbbf24; }

body.item-page .tier-stock-cell--s {
  border-color: rgba(244, 114, 182, 0.35);
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--s .tier-stock-cell__label { color: #f472b6; }
body.item-page .tier-stock-cell--s .tier-stock-cell__count { color: #f9a8d4; }

body.item-page .tier-stock-cell--a {
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--a .tier-stock-cell__label { color: #a78bfa; }
body.item-page .tier-stock-cell--a .tier-stock-cell__count { color: #c4b5fd; }

body.item-page .tier-stock-cell--b {
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--b .tier-stock-cell__label { color: #60a5fa; }
body.item-page .tier-stock-cell--b .tier-stock-cell__count { color: #93c5fd; }

body.item-page .tier-stock-cell--c {
  border-color: rgba(94, 234, 212, 0.35);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--c .tier-stock-cell__label { color: #5eead4; }
body.item-page .tier-stock-cell--c .tier-stock-cell__count { color: #99f6e4; }

body.item-page .tier-stock-cell--d {
  border-color: rgba(134, 239, 172, 0.35);
  background: linear-gradient(135deg, rgba(134, 239, 172, 0.10), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--d .tier-stock-cell__label { color: #86efac; }
body.item-page .tier-stock-cell--d .tier-stock-cell__count { color: #bbf7d0; }

/* E-L: progressive desaturation for lower tiers */
body.item-page .tier-stock-cell--e,
body.item-page .tier-stock-cell--f,
body.item-page .tier-stock-cell--g,
body.item-page .tier-stock-cell--h,
body.item-page .tier-stock-cell--i,
body.item-page .tier-stock-cell--j,
body.item-page .tier-stock-cell--k,
body.item-page .tier-stock-cell--l {
  border-color: rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.06), rgba(9, 15, 28, 0.6) 70%);
}
body.item-page .tier-stock-cell--e .tier-stock-cell__label,
body.item-page .tier-stock-cell--f .tier-stock-cell__label,
body.item-page .tier-stock-cell--g .tier-stock-cell__label,
body.item-page .tier-stock-cell--h .tier-stock-cell__label,
body.item-page .tier-stock-cell--i .tier-stock-cell__label,
body.item-page .tier-stock-cell--j .tier-stock-cell__label,
body.item-page .tier-stock-cell--k .tier-stock-cell__label,
body.item-page .tier-stock-cell--l .tier-stock-cell__label { color: #cbd5e1; }

/* 普通 / 一般 / unnamed → neutral grey */
body.item-page .tier-stock-cell--n {
  border-color: rgba(148, 163, 184, 0.20);
}
body.item-page .tier-stock-cell--n .tier-stock-cell__label { color: #94a3b8; }
body.item-page .tier-stock-cell--n .tier-stock-cell__count { color: #cbd5e1; }

body.item-page .tier-stock-cell.is-empty {
  opacity: 0.42;
}

body.item-page .tier-stock-cell.is-empty .tier-stock-cell__count {
  color: var(--ir-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.4);
}

body.item-page .tier-stock-cell__label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

body.item-page .tier-stock-cell__count {
  font-size: 12px;
  font-weight: 700;
  color: #7dd3fc;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.item-page .tier-stock-cell__count em {
  font-style: normal;
  font-weight: 500;
  color: var(--ir-dim);
}

body.item-page .detail-side__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--ir-radius-sm);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(0, 255, 136, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.18);
}

body.item-page .detail-side__footer span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ir-dim);
}

body.item-page .detail-side__footer strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: #a7f3d0;
  letter-spacing: 0.02em;
}

/* on very narrow phones, tier-stock cells drop to 2-col */
@media (max-width: 420px) {
  body.item-page .tier-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Tablet (≥ 640px) ------------------------------------- */
@media (min-width: 640px) {
  body.item-page .detail-hero {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "side  side";
    gap: 20px;
    padding: 20px;
  }

  body.item-page .detail-thumb {
    grid-area: thumb;
    aspect-ratio: 1 / 1;
    max-height: 260px;
  }

  body.item-page .detail-main {
    grid-area: main;
    align-content: start;
  }

  body.item-page .detail-side {
    grid-area: side;
    /* stay single-column so head / tier-stock / footer stack vertically */
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Desktop (≥ 1000px) ----------------------------------- */
/* 2026-04-27: 桌面版電商級 layout — hero 圖大幅放大，資訊欄整合，
   排除原本 1024px 居中只用 40% viewport 的浪費。 */
@media (min-width: 1000px) {
  body.item-page {
    --layout-max-width: 1600px; /* was inherited 1280, page now uses ~1500 of 2560+ desktop */
  }
  /* 80e-theme-default-cosmic.css line 115 hard-codes
     body.frontend-theme-default .page { width: min(calc(100% - 32px), 1280px) }
     which beat our --layout-max-width var. Override with a more specific
     selector that resolves the var so item page can grow to 1600. */
  body.item-page.frontend-theme-default .page {
    width: min(calc(100% - 32px), var(--layout-max-width));
  }

  body.item-page .detail-hero {
    /* 2-col layout: 左 hero 圖 ~560px / 右 整合資訊欄。原本 3-col
       (thumb 300 / main 1fr / side 300) 把資訊切成兩半，桌面浪費。 */
    grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "thumb side";
    grid-template-rows: auto 1fr;
    gap: 28px;
    padding: 24px;
    align-items: start;
  }

  body.item-page .detail-thumb {
    grid-area: thumb;
    aspect-ratio: 1 / 1;
    max-height: 560px;
    max-width: 560px;
    width: 100%;
    justify-self: start;
    align-self: start;
  }

  body.item-page .detail-main {
    grid-area: main;
    gap: 14px;
  }

  body.item-page .detail-main h1 {
    font-size: 32px; /* bump from default for desktop hero impact */
    line-height: 1.2;
  }

  body.item-page .detail-side {
    grid-area: side;
    padding: 18px;
    gap: 14px;
    /* v38e: align-self:start (was stretch) so the card shrinks to its
       actual content height instead of stretching to match the hero
       carousel column. Empty space at the bottom of the card was
       reading as "broken layout" — better to have an asymmetric column
       than a card with visible empty bottom inside its rounded frame. */
    align-self: start;
    background: linear-gradient(180deg, rgba(13, 20, 39, 0.72), rgba(9, 15, 28, 0.62));
    border-radius: var(--ir-radius-lg);
    border: 1px solid var(--ir-border);
    align-content: start;
  }

  /* desktop info column gets enough room for 3-col tier stats grid */
  body.item-page .detail-side .tier-stock-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* desktop dedupe: detailActions (under title) already has the primary
     「選擇箱池」 CTA. The .detail-box-card inside .detail-side is mobile-
     helpful but creates a duplicate button on desktop. Collapse it to
     0px so users see no empty card frame, but the picker (which uses
     position:fixed when opened) still works. v38-revertshrink: bumped
     specificity by adding .item-page--has-box-series so this beats the
     line ~3210 base rule (specificity tie was source-order losing). */
  body.item-page.item-page--has-box-series .detail-side .detail-box-card {
    /* display:contents removes the box from rendering entirely (no bg,
       border, padding, margin, gap, no height) — but children still
       render in the parent's flow as if directly there. When picker
       is hidden it's display:none (no space). When picker opens it's
       position:fixed so escapes parent flow regardless. */
    display: contents !important;
  }
  body.item-page.item-page--has-box-series .detail-side .detail-box-card .detail-box-card__hint,
  body.item-page.item-page--has-box-series .detail-side .detail-box-card .inventory-box-controls {
    display: none;
  }
  /* IMPORTANT: do NOT hide .inventory-box-picker — when user clicks
     the hero CTA, JS removes [hidden] and the picker opens as a
     position:fixed full-screen modal. Hiding it here would break it. */
  body.item-page.item-page--has-box-series .detail-side .detail-box-card .detail-box-card__head {
    /* v35-decisionpanel: the count "共 N 箱" is now embedded in the
       hero CTA button above (.detail-actions__hero-cta-count), so this
       row is fully redundant on desktop. Hide it entirely. */
    display: none;
  }

  /* desktop draw-bar inline (not floating) — sits below hero, full hero
     width. Sticky-fixed bar at bottom-of-screen is mobile thumb-zone
     pattern; on desktop it floats awkwardly above content.
     Specificity bumped via .frontend-theme-default to beat the original
     position:fixed rule that appears later in the file.
     IMPORTANT: .draw-bar is a sibling of <main> directly under <body>, so
     when we drop position:fixed it would otherwise stretch full viewport.
     Constrain width to layout-max-width and center with margin auto. */
  body.item-page.frontend-theme-default .draw-bar {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: min(calc(100% - 32px), var(--layout-max-width));
    margin: 0 auto 24px;
    box-shadow:
      0 14px 40px rgba(2, 8, 23, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    /* override mobile/tablet grid: options=auto (chips intrinsic width),
       submit=1fr (primary CTA stretches to fill leftover, visually
       dominant), auto1=auto. Mobile @640px gave options the 1fr which
       left ~1000px empty space between chips and submit on desktop.
       Also collapse to single-row layout so 自動重抽 sits next to 立即抽
       horizontally instead of wrapping to row 2. */
    grid-template-columns: auto auto minmax(220px, 1fr) auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "summary options submit auto1 auto2"
      "summary message message message message";
  }
  body.item-page.frontend-theme-default .draw-bar #drawSubmit {
    width: 100%;
    max-width: none;
    min-width: 240px;
  }
  body.item-page.frontend-theme-default .draw-bar #autoDrawOpen,
  body.item-page.frontend-theme-default .draw-bar #autoFlipOpen {
    width: auto;
    min-width: 120px;
  }
  body.item-page.frontend-theme-default .page {
    padding-bottom: var(--layout-padding);
  }

  /* 2026-04-27 P0-1: detail-main metadata 區塊 — 桌面版 hero 右上的
     .detail-main 在桌機只有「標題 + 進度 + 按鈕 = 176px 高」，比左欄 thumb
     640px 整整少 460px。塞滿 stat pills + tag chips + 描述文字，視覺重量
     才平衡。塊上限 ~360px (含 gap)，配合 detail-side 的 row 2 才不會擠。 */
  body.item-page .detail-main__meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 4px 0 4px;
  }

  body.item-page .detail-main__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  body.item-page .detail-main__pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(118, 148, 193, 0.32);
    background: rgba(118, 148, 193, 0.08);
    color: var(--ir-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.5;
  }

  /* v36-policybadges: cc1kuji-style policy chips. Sit between progress
     bar and stats grid. Subdued tone (not as bright as tag pills) to
     read as "informational disclaimer" rather than "marketing". */
  body.item-page .detail-main__policies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
  }
  body.item-page .detail-main__policy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 6px;
    background: rgba(13, 20, 39, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(190, 205, 230, 0.82);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.4;
  }
  body.item-page .detail-main__policy-icon {
    font-size: 13px;
    line-height: 1;
    color: rgba(148, 163, 184, 0.78);
  }

  body.item-page .detail-main__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--ir-radius-sm);
    border: 1px solid rgba(118, 148, 193, 0.18);
    background: rgba(7, 12, 24, 0.5);
  }

  body.item-page .detail-main__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    min-width: 0;
  }

  body.item-page .detail-main__stat dt {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ir-muted);
    text-transform: uppercase;
    margin: 0;
  }

  body.item-page .detail-main__stat dd {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ir-ink);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* v35-decisionpanel: gold accent for the 單抽 price stat — this is
     the user's spend-decision input and should be the most visually
     dominant stat in the grid. */
  body.item-page .detail-main__stat--gold {
    grid-column: span 1;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 146, 60, 0.10) 60%, transparent);
    border: 1px solid rgba(251, 191, 36, 0.32);
  }
  body.item-page .detail-main__stat--gold dt {
    color: rgba(251, 191, 36, 0.8);
  }
  body.item-page .detail-main__stat--gold dd {
    color: #fcd34d;
    font-size: 18px;
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.32);
  }

  body.item-page .detail-main__desc {
    margin: 0;
    color: var(--ir-muted);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 2026-04-27 P0-2: hero thumbnail strip — 桌機 hover-capable 用戶
     傾向點縮圖切換主圖（mobile 是 swipe）。strip 只在桌機顯示，每張縮圖
     64×64，整排在 hero-carousel 下方。aspect-ratio 1/1 在 detail-thumb 上
     會卡住高度，drop 掉讓 thumb 可以容納 carousel + strip。
     Specificity bump: :has(.hero-carousel) matches the line ~122 base rule
     so we win via source order (this block comes later in cascade).
     v30-shrink (2026-04-27): max-height changed from `none` to `600px`
     so detail-thumb stops stretching to 716px (which placed visual
     center at y=587, well below the active frame's y=506). With
     max-height 600, detail-thumb center moves up to y=529, frame
     offset only -22px (essentially centered). The thumb-strip
     overflows below the rounded-rect (overflow:visible) reading as
     a separate band below the stage -- like cc1kuji's layout. */
  body.item-page .detail-thumb:has(.hero-carousel) {
    aspect-ratio: auto;
    /* v38-revertshrink: REMOVED max-height: 600px (was v32 attempt to
       center the active frame). It was making the thumbnail strip
       overflow OUTSIDE detail-thumb's box and visually overlap the
       「中獎獎品列表」 heading in the next section. Trade-off:
       active frame is again in the upper portion of detail-thumb,
       but no more strip overlap — that's the worse problem to have. */
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
    /* v32-noborder: kill the rounded-rect border + inset shadow when
       carousel is inside. */
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  body.item-page .detail-thumb .hero-carousel {
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    width: 100%;
  }
  body.item-page .hero-thumb-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 0 0 auto;
  }
  body.item-page .hero-thumb-strip__item {
    appearance: none;
    border: 2px solid rgba(118, 148, 193, 0.22);
    background: rgba(7, 12, 24, 0.55);
    border-radius: 8px;
    padding: 0;
    width: 64px;
    height: 64px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  }
  body.item-page .hero-thumb-strip__item:hover {
    border-color: rgba(0, 212, 255, 0.55);
    transform: translateY(-1px);
  }
  body.item-page .hero-thumb-strip__item.is-active {
    border-color: #00d4ff;
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.45),
      0 6px 14px -6px rgba(0, 212, 255, 0.55);
  }
  body.item-page .hero-thumb-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
  }
  /* desktop strip is a replacement, not a supplement — hide tiny dots */
  body.item-page .hero-carousel__dots {
    display: none;
  }
}

/* ---------- Wide desktop (≥ 1280px) ------------------------------ */
@media (min-width: 1280px) {
  body.item-page .detail-hero {
    /* even more breathing room on wide displays */
    grid-template-columns: minmax(540px, 640px) minmax(0, 1fr);
    gap: 36px;
    padding: 32px;
  }

  body.item-page .detail-thumb {
    /* drop max-height — the @1000 block dropped aspect-ratio and added
       a thumbnail strip below the carousel, so detail-thumb is now
       intrinsic-height (carousel 640 + strip ~80 + gap). The .hero-carousel
       child still gets aspect-ratio:1/1 so the main image stays square. */
    max-height: none;
    max-width: 640px;
  }
  body.item-page .detail-thumb .hero-carousel {
    max-height: 640px;
    max-width: 640px;
  }

  body.item-page .detail-main h1 {
    font-size: 38px;
  }
}

/* 覆寫 cosmic theme 舊的 grid-template-columns: 1fr (≤1180px)
   因為新設計在 640px+ 就要 2-col，不等到 1180px */
@media (max-width: 1180px) and (min-width: 640px) {
  body.frontend-theme-default.item-page .detail-hero {
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  }
}

/* =============================================================
 * DETAIL GRID — tier breakdown + description
 * ============================================================= */

body.item-page .detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

@media (min-width: 900px) {
  body.item-page .detail-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
  }
}

body.item-page .detail-card {
  padding: 16px;
  border-radius: var(--ir-radius-lg);
  border: 1px solid var(--ir-border);
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.88), rgba(9, 15, 28, 0.78));
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.22);
}

@media (min-width: 640px) {
  body.item-page .detail-card {
    padding: 22px;
  }
}

body.item-page .detail-card > h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ir-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

body.item-page .detail-card > h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00d4ff, #00ff88);
  box-shadow: 0 0 10px -2px rgba(0, 212, 255, 0.45);
}

body.item-page .detail-desc {
  margin: 0;
  color: var(--ir-muted);
  line-height: 1.75;
  font-size: 14px;
  white-space: pre-wrap;
}

/* =============================================================
 * TIER CARDS — rarity-colored spine + prize grid
 * Markup shape (rendered by item.js):
 *   .tier-card
 *     .tier-head  → <strong>{levelName}</strong> <span>{count/prob}</span>
 *     .tier-prizes
 *       .prize-card
 *         <img class="prize-preview-trigger" />
 *         .prize-card-body
 *           .prize-name
 *           .prize-price
 *           .prize-probability
 *           .prize-count
 * ============================================================= */

/* tier-cards live inside .tier-list (wrapped by renderPrizesPanel) —
   multi-column on wide screens so pools with single-prize tiers don't
   waste space with full-width stacks. */
body.item-page .tier-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 720px) {
  body.item-page .tier-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1100px) {
  body.item-page .tier-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  body.item-page .tier-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* When tier-list gets denser (narrower tier-card), compress tier-card
   internals so the prize image stays dominant. */
@media (min-width: 1100px) {
  body.item-page .tier-card {
    padding: 8px 8px 8px 12px;
  }
  body.item-page .tier-card .tier-head {
    margin-bottom: 6px;
    gap: 6px;
  }
  body.item-page .tier-card .tier-head strong {
    font-size: 13px;
  }
  body.item-page .tier-card .tier-head span {
    font-size: 10px;
    padding: 2px 6px;
  }
  body.item-page .tier-card .tier-prizes {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

body.item-page .tier-card {
  position: relative;
  padding: 10px 10px 10px 14px;
  border-radius: var(--ir-radius-md);
  border: 1px solid var(--ir-border);
  background: var(--ir-surface-soft);
  overflow: hidden;
  isolation: isolate;
}

/* colored rarity spine — LEFT edge, 4px wide, full-height */
body.item-page .tier-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ir-rarity-default);
  box-shadow: var(--ir-rarity-default-glow);
  z-index: 1;
}

/* Rarity classes — item.js computes rank by sorting tiers by probability
   ascending (rarest first), then applies .is-rarity-a/b/c/d accordingly.
   So the gold spine ALWAYS marks the admin-configured rarest tier,
   regardless of display order. */
body.item-page .tier-card.is-rarity-a::before { background: var(--ir-rarity-a); box-shadow: var(--ir-rarity-a-glow); }
body.item-page .tier-card.is-rarity-b::before { background: var(--ir-rarity-b); box-shadow: var(--ir-rarity-b-glow); }
body.item-page .tier-card.is-rarity-c::before { background: var(--ir-rarity-c); box-shadow: var(--ir-rarity-c-glow); }
body.item-page .tier-card.is-rarity-d::before { background: var(--ir-rarity-d); box-shadow: var(--ir-rarity-d-glow); }
/* ranks 4+ keep --ir-rarity-default (neutral grey) */

/* Tier name itself also takes rarity color + glow — matches cc1kuji's
   vibrant colored tier labels. Default stays white for ranks 4+. */
body.item-page .tier-card.is-rarity-a .tier-head strong {
  color: var(--ir-rarity-a);
  text-shadow: 0 0 12px rgba(240, 194, 76, 0.45);
}
body.item-page .tier-card.is-rarity-b .tier-head strong {
  color: var(--ir-rarity-b);
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.42);
}
body.item-page .tier-card.is-rarity-c .tier-head strong {
  color: var(--ir-rarity-c);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.38);
}
body.item-page .tier-card.is-rarity-d .tier-head strong {
  color: var(--ir-rarity-d);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

/* Sold-out tier — matches cc1kuji's 「終了」grey stamp treatment.
   Prize images go greyscale + dim, and a 已抽完 badge overlays each prize. */
body.item-page .tier-card.is-sold-out {
  position: relative;
}
body.item-page .tier-card.is-sold-out .tier-head strong {
  color: var(--ir-dim);
  text-shadow: none;
}
body.item-page .tier-card.is-sold-out .prize-card {
  position: relative;
  opacity: 0.52;
}
body.item-page .tier-card.is-sold-out .prize-card img {
  filter: grayscale(100%) brightness(0.6);
  animation: none;
}
body.item-page .tier-card.is-sold-out .prize-card::after {
  content: "已抽完";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 4px 14px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.92);
  border: 2px solid rgba(239, 68, 68, 0.88);
  color: #fca5a5;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}
body.item-page .tier-card.is-sold-out::before {
  /* dim the rarity spine too */
  opacity: 0.4;
}

/* tier head: strong (label) + span (count or probability) */
body.item-page .tier-card .tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

body.item-page .tier-card .tier-head strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ir-ink);
}

body.item-page .tier-card .tier-head span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 15, 28, 0.6);
  border: 1px solid var(--ir-border-soft);
  color: var(--ir-muted);
  white-space: nowrap;
}

/* prize grid — inside each tier-card. Tier-list is now multi-col at
   720/1100 px, so prize-grid inside must use fewer cols to fit. */
body.item-page .tier-card .tier-prizes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 520px) {
  body.item-page .tier-card .tier-prizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (min-width: 720px) {
  /* tier-list now 2-col, so each card's inner grid stays 2-col */
  body.item-page .tier-card .tier-prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  /* tier-list 3-col, inner prize-grid 2-col keeps prize image visible */
  body.item-page .tier-card .tier-prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* individual prize card — compact, image dominant */
body.item-page .prize-card {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: var(--ir-radius-sm);
  border: 1px solid var(--ir-border-soft);
  background: rgba(9, 15, 28, 0.66);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

body.item-page .prize-card:hover {
  transform: translateY(-2px);
  border-color: rgba(118, 148, 193, 0.32);
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.32);
}

body.item-page .prize-card img,
body.item-page .prize-card .prize-preview-trigger {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 58%, rgba(34, 211, 238, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(9, 15, 28, 0.52));
  cursor: zoom-in;
  display: block;
  animation: prize-float 4s ease-in-out infinite;
  will-change: transform;
}

/* gentle breathing float — staggered across tier-card position so not all
   images bob in sync. 4s cycle, ±5px Y, ±1deg rotation. */
@keyframes prize-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(0.6deg); }
}

body.item-page .tier-card:nth-of-type(2n) .prize-card img {
  animation-delay: -1.2s;
}
body.item-page .tier-card:nth-of-type(3n) .prize-card img {
  animation-delay: -2.4s;
}
body.item-page .tier-card:nth-of-type(5n) .prize-card img {
  animation-delay: -0.8s;
}

/* hover overrides the float for a cleaner zoom-in affordance */
body.item-page .prize-card:hover img,
body.item-page .prize-card:hover .prize-preview-trigger {
  animation-play-state: paused;
  transform: translateY(-6px) scale(1.04);
  transition: transform 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  body.item-page .prize-card img,
  body.item-page .prize-card .prize-preview-trigger {
    animation: none;
  }
}

body.item-page .prize-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 2px 2px 4px;
}

body.item-page .prize-card .prize-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ir-ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 0;
}

body.item-page .prize-card .prize-price {
  font-size: 10px;
  font-weight: 600;
  color: #ffd97a;
  letter-spacing: 0.02em;
}

body.item-page .prize-card .prize-probability,
body.item-page .prize-card .prize-count {
  font-size: 10px;
  color: var(--ir-dim);
  letter-spacing: 0.01em;
}

body.item-page .prize-card .prize-probability {
  color: #7dd3fc;
}

/* v55av: 單一獎品 tier — 滿寬 + 橫式排（避免「右側空很大」） */
body.item-page .tier-card .prize-card:only-child {
  grid-column: 1 / -1; /* span 全 grid */
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
}

body.item-page .tier-card .prize-card:only-child img,
body.item-page .tier-card .prize-card:only-child .prize-preview-trigger {
  width: 130px;
  height: 130px;
  max-height: 130px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0;
}

body.item-page .tier-card .prize-card:only-child .prize-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  text-align: left;
  align-self: center;
  min-width: 0;
}

body.item-page .tier-card .prize-card:only-child .prize-name {
  font-size: 14px;
  -webkit-line-clamp: 3;
  font-weight: 700;
}

body.item-page .tier-card .prize-card:only-child .prize-price,
body.item-page .tier-card .prize-card:only-child .prize-probability,
body.item-page .tier-card .prize-card:only-child .prize-count {
  font-size: 11.5px;
}

@media (max-width: 480px) {
  body.item-page .tier-card .prize-card:only-child {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 8px;
  }
  body.item-page .tier-card .prize-card:only-child img,
  body.item-page .tier-card .prize-card:only-child .prize-preview-trigger {
    width: 96px;
    height: 96px;
    max-height: 96px;
  }
  body.item-page .tier-card .prize-card:only-child .prize-name {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
}

/* =============================================================
 * TABS (pool-tabs / detail-tabs) — re-style on public item page
 * so they match cosmic theme (not the admin orange gradient).
 * ============================================================= */

body.item-page .detail-grid.is-tabbed {
  padding: 0;
  overflow: hidden;
  border-radius: var(--ir-radius-lg);
  border: 1px solid var(--ir-border);
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.88), rgba(9, 15, 28, 0.78));
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.22);
}

body.item-page .pool-tabs.detail-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 12px 0;
  margin: 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ir-border-soft);
}

body.item-page .pool-tab.detail-tab {
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: var(--ir-muted);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 40px;
}

body.item-page .pool-tab.detail-tab:hover {
  color: var(--ir-ink);
  background: rgba(34, 211, 238, 0.06);
  transform: none;
}

body.item-page .pool-tab.detail-tab.is-active {
  color: var(--ir-ink);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.12), rgba(0, 255, 136, 0.06));
  border-color: var(--ir-border-soft);
  border-bottom-color: transparent;
  box-shadow: 0 -2px 0 #22d3ee inset;
}

body.item-page .pool-panels.detail-panels {
  padding: 14px;
}

@media (min-width: 640px) {
  body.item-page .pool-panels.detail-panels {
    padding: 18px;
  }
}

body.item-page .pool-panel.detail-panel {
  display: none;
}

body.item-page .pool-panel.detail-panel.is-active {
  display: block;
}

body.item-page .pool-panel.detail-panel p {
  margin: 0;
  color: var(--ir-muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

/* when tabbed, detail-grid should be single-column (tabs stack, no side-by-side description) */
body.item-page .detail-grid.is-tabbed {
  grid-template-columns: minmax(0, 1fr);
}

/* =============================================================
 * DRAW BAR — sticky at bottom on mobile, compact on desktop
 * Markup shape:
 *   .draw-bar
 *     .draw-summary   → 剩餘 / 金額 (2 chips)
 *     .draw-options   → pill group (1抽 / 10抽 / N抽)
 *     #drawSubmit      → 立即抽 (primary)
 *     #autoDrawOpen    → 自動重抽 (ghost)
 *     #autoFlipOpen    → 自動翻牌 (ghost, conditional)
 *     #drawMessage     → feedback
 * ============================================================= */

body.item-page .draw-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px;
  border: 1px solid rgba(118, 148, 193, 0.18);
  background: linear-gradient(180deg, rgba(10, 17, 31, 0.96), rgba(10, 17, 31, 0.88));
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 22px 52px rgba(2, 8, 23, 0.45);
}

body.item-page .draw-bar[hidden] {
  display: none !important;
}

/* summary (剩餘 / 金額) — inline chip row */
body.item-page .draw-bar .draw-summary {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body.item-page .draw-bar .draw-summary::-webkit-scrollbar { display: none; }

body.item-page .draw-bar .draw-summary > div {
  flex: 1 1 0;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(13, 20, 39, 0.76);
  border: 1px solid var(--ir-border-soft);
  display: grid;
  gap: 2px;
}

body.item-page .draw-bar .draw-summary span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ir-dim);
  line-height: 1.2;
}

body.item-page .draw-bar .draw-summary strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ir-ink);
  line-height: 1.25;
}

/* draw options — horizontally scrollable pill group on mobile */
body.item-page .draw-bar .draw-options {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px;
  max-width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--ir-border-soft);
}

body.item-page .draw-bar .draw-options::-webkit-scrollbar { display: none; }

body.item-page .draw-bar .draw-option {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* 2026-04-26: 箱池系列 sticky 「進入箱池 / 選擇箱池」CTA。重用 .draw-bar
   的 fixed bottom + blur backdrop，內容只是單顆 primary 按鈕，無 draw
   summary / draw options / auto buttons。 */
body.item-page .draw-bar.draw-bar--box-entry {
  padding: 14px;
}
body.item-page .draw-bar.draw-bar--box-entry > .btn.primary {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 16px;
  box-shadow: 0 12px 28px -6px rgba(56, 189, 248, 0.4);
}

/* primary CTA — full width on mobile, large tap target */
body.item-page .draw-bar #drawSubmit {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 16px;
  box-shadow: 0 12px 28px -6px rgba(0, 255, 136, 0.45);
}

/* 2026-04-26: 售完狀態 — 灰底紅字，不要綠色光暈，顯著區隔可抽狀態。
   .draw-submit--sold-out 由 setDrawButtonsDisabled 在 isCurrentPoolSoldOut()
   為 true 時掛上。 */
body.item-page .draw-bar #drawSubmit.draw-submit--sold-out {
  background: rgba(60, 64, 80, 0.85);
  color: #ff7878;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.92;
}
body.item-page .draw-bar #drawSubmit.draw-submit--sold-out:hover {
  transform: none;
}

/* ghost auto-buttons — full-width row, 2-col on mobile */
body.item-page .draw-bar #autoDrawOpen,
body.item-page .draw-bar #autoFlipOpen {
  min-height: 44px;
  font-size: 13px;
  border-radius: 14px;
}

body.item-page .draw-bar:has(#autoFlipOpen:not([style*="display: none"])) #autoDrawOpen,
body.item-page .draw-bar:has(#autoFlipOpen:not([style*="display: none"])) #autoFlipOpen {
  /* when both are visible, stack them side-by-side */
}

/* wrap ghost buttons into their own row using order + grid-auto-flow */
body.item-page .draw-bar #autoDrawOpen {
  order: 5;
}
body.item-page .draw-bar #autoFlipOpen {
  order: 6;
}

body.item-page .draw-bar #drawMessage {
  order: 7;
  margin: 0;
  font-size: 12px;
  color: #93c5fd;
  min-height: 16px;
}

body.item-page .draw-bar #drawMessage:empty {
  display: none;
}

/* ---------- Tablet (≥ 640px) – draw-bar horizontal layout ------- */
@media (min-width: 640px) {
  body.item-page .draw-bar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "summary  options  submit  submit"
      "summary  message  auto1   auto2";
    gap: 10px 14px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  body.item-page .draw-bar .draw-summary {
    grid-area: summary;
    flex-direction: column;
    gap: 6px;
    overflow: visible;
    min-width: 160px;
  }

  body.item-page .draw-bar .draw-summary > div {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }

  body.item-page .draw-bar .draw-options {
    grid-area: options;
    align-self: center;
  }

  body.item-page .draw-bar #drawSubmit {
    grid-area: submit;
    width: auto;
    min-width: 180px;
  }

  body.item-page .draw-bar #autoDrawOpen {
    grid-area: auto1;
    order: 0;
  }
  body.item-page .draw-bar #autoFlipOpen {
    grid-area: auto2;
    order: 0;
  }

  body.item-page .draw-bar #drawMessage {
    grid-area: message;
    order: 0;
    align-self: center;
  }
}

/* ---------- Desktop (≥ 1000px) – centered, capped width --------- */
@media (min-width: 1000px) {
  body.item-page .draw-bar {
    left: max(18px, calc((100vw - 1240px) / 2 + 18px));
    right: max(18px, calc((100vw - 1240px) / 2 + 18px));
    bottom: 22px;
    padding: 16px 20px;
    border-radius: 24px;
  }
}

/* =============================================================
 * Play history card — compact on mobile
 * ============================================================= */

body.item-page .play-history-section {
  margin-top: 18px;
}

body.item-page .play-history-section[hidden],
body.item-page.item-page--mode-pending .play-history-section {
  display: none !important;
}

body.item-page .play-history-card {
  padding: 16px;
}

body.item-page .play-history-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

body.item-page .play-history-head .tag {
  width: fit-content;
}

body.item-page .play-history-head h3 {
  margin: 0;
  font-size: 16px;
}

body.item-page .play-history-head .form-hint {
  margin: 0;
  font-size: 12px;
}

body.item-page .play-history-list {
  display: grid;
  gap: 8px;
}

body.item-page .play-history-meta {
  font-size: 12px;
  color: var(--ir-dim);
  margin: 0;
}

/* play-history row — compact horizontal layout with 3 cols:
   [thumb] [account/prize body] [date side-meta]. Prevents giant 900px
   R2 images from blowing up the page. */
body.item-page .play-history-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--ir-radius-sm);
  border: 1px solid var(--ir-border-soft);
  background: rgba(9, 15, 28, 0.62);
}

body.item-page .play-history-side {
  display: grid;
  gap: 2px;
  text-align: right;
  min-width: 0;
  flex-shrink: 0;
}

body.item-page .play-history-side span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ir-dim);
}

body.item-page .play-history-side strong {
  font-size: 11px;
  color: var(--ir-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* narrow phones: side-meta drops below body so row stays readable */
@media (max-width: 520px) {
  body.item-page .play-history-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  body.item-page .play-history-side {
    display: none; /* already shown in .play-history-time */
  }
}

body.item-page .play-history-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  flex-shrink: 0;
}

body.item-page .play-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.item-page .play-history-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.item-page .play-history-account {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

body.item-page .play-history-account strong {
  font-size: 13px;
  color: var(--ir-ink);
  font-weight: 700;
}

body.item-page .play-history-time {
  font-size: 11px;
  color: var(--ir-dim);
  font-variant-numeric: tabular-nums;
}

body.item-page .play-history-tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.item-page .play-history-prize {
  font-size: 12px;
  color: var(--ir-muted);
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Round D: horizontal scrolling recent-winners strip (cc1kuji-style)
   Each row becomes a fixed-width 190px pill-card with thumb on left,
   member + prize name right-stacked. User swipes/scrolls horizontally.
   min-width: 0 + max-width: 100% are CRITICAL to prevent the flex children
   from blowing out the container width (bug: without this, 20 × 190px
   children pushed .detail-hero to 4027px wide). */
@media (min-width: 640px) {
  body.item-page .play-history-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    padding: 4px 2px 10px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(118, 148, 193, 0.25) transparent;
  }

  /* parent must also clamp — prevents flex contents from hydraulically
     expanding the card column. */
  body.item-page .play-history-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body.item-page .play-history-list::-webkit-scrollbar {
    height: 6px;
  }
  body.item-page .play-history-list::-webkit-scrollbar-thumb {
    background: rgba(118, 148, 193, 0.25);
    border-radius: 3px;
  }

  body.item-page .play-history-row {
    flex: 0 0 auto;
    width: 190px;
    grid-template-columns: 48px minmax(0, 1fr);
    scroll-snap-align: start;
    padding: 10px;
  }

  body.item-page .play-history-row .play-history-side {
    /* side (抽中紀錄 + 日期) drops because strip is narrow */
    display: none;
  }

  body.item-page .play-history-thumb,
  body.item-page .play-history-thumb img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  body.item-page .play-history-account strong {
    font-size: 12px;
  }

  body.item-page .play-history-time {
    font-size: 10px;
  }
}

/* =============================================================
 * Small helpers: empty state, loader, tag cosmetics
 * ============================================================= */

body.item-page .detail-mode-loader {
  padding: 40px 20px;
  text-align: center;
  color: var(--ir-muted);
  display: grid;
  place-items: center;
  gap: 14px;
}

/* critical: HTML `hidden` attribute must override display:grid
   otherwise loader stays visible after setItemModePending(false) */
body.item-page .detail-mode-loader[hidden] {
  display: none !important;
}

body.item-page .detail-mode-loader__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(34, 211, 238, 0.2);
  border-top-color: #22d3ee;
  animation: ir-spin 0.9s linear infinite;
}

@keyframes ir-spin {
  to { transform: rotate(360deg); }
}

/* Initial item load skeleton.
   Keep the first viewport stable while item.js decides between the
   probability detail view and the inventory board view. */
body.item-page.item-page--mode-pending .detail {
  min-height: min(860px, calc(100svh - 96px));
}

body.item-page.item-page--mode-pending .detail-hero,
body.item-page.item-page--mode-pending .detail-grid {
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding-block: 0;
  border-width: 0;
}

body.item-page.item-page--mode-pending .detail-mode-loader {
  min-height: min(720px, calc(100svh - 144px));
  border-radius: var(--ir-radius-lg);
  border: 1px solid var(--ir-border);
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08), rgba(34, 211, 238, 0.12), rgba(148, 163, 184, 0.08)),
    var(--ir-surface);
  background-size: 220% 100%, auto;
  animation: item-load-skeleton 1.4s ease-in-out infinite;
}

@keyframes item-load-skeleton {
  0% { background-position: 220% 0, 0 0; }
  100% { background-position: -220% 0, 0 0; }
}

body.item-page .form-hint {
  color: var(--ir-dim);
  font-size: 12px;
  line-height: 1.6;
}

/* =============================================================
 * Reduced motion
 * ============================================================= */
@media (prefers-reduced-motion: reduce) {
  body.item-page .prize-card {
    transition: none;
  }
  body.item-page .prize-card:hover {
    transform: none;
  }
  body.item-page .detail-mode-loader__dot {
    animation-duration: 2.4s;
  }
  body.item-page.item-page--mode-pending .detail-mode-loader {
    animation: none;
  }
}

/* =============================================================
 * Inventory public item polish — /item?id=7 and other 一翻賞 pools
 * Scoped here so admin inventory management pages keep their own layout.
 * ============================================================= */

body.item-page.inventory-mode {
  --inventory-panel-bg: linear-gradient(165deg, rgba(10, 18, 38, 0.94), rgba(15, 22, 50, 0.9));
  --inventory-panel-border: rgba(147, 197, 253, 0.18);
  --inventory-accent: #67e8f9;
  --inventory-accent-strong: #f0abfc;
}

body.item-page.inventory-mode .page {
  width: min(100%, 1280px);
  max-width: min(1280px, calc(100vw - 32px));
  padding-top: clamp(22px, 4vw, 52px);
}

body.item-page.inventory-mode .inventory-experience {
  gap: clamp(16px, 2vw, 24px);
}

body.item-page.inventory-mode .inventory-overview {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(16px, 2vw, 22px);
}

body.item-page.inventory-mode .inventory-overview-main {
  gap: 14px;
}

body.item-page.inventory-mode .inventory-hero-card,
body.item-page.inventory-mode .inventory-prizes-card,
body.item-page.inventory-mode .inventory-live-section,
body.item-page.inventory-mode .inventory-events-section {
  border-radius: 24px;
  border-color: var(--inventory-panel-border);
  background: var(--inventory-panel-bg);
  box-shadow:
    0 22px 54px rgba(3, 7, 18, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.item-page.inventory-mode .inventory-hero-card,
body.item-page.inventory-mode .inventory-prizes-card,
body.item-page.inventory-mode .inventory-live-section {
  animation: item-inventory-rise 360ms ease-out both;
}

body.item-page.inventory-mode .inventory-hero-card {
  padding: clamp(18px, 2.1vw, 28px);
  min-height: 100%;
  overflow: hidden;
}

body.item-page.inventory-mode .inventory-hero-head {
  align-items: start;
}

body.item-page.inventory-mode .inventory-hero-head > div:first-child {
  min-width: 0;
}

body.item-page.inventory-mode #inventoryTitle {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: 0;
  color: #f8fbff;
}

body.item-page.inventory-mode .inventory-subtitle {
  margin-top: 18px;
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(226, 232, 240, 0.78);
}

body.item-page.inventory-mode .inventory-price-wrap {
  min-width: max-content;
}

body.item-page.inventory-mode .inventory-price {
  font-size: clamp(34px, 4.2vw, 46px);
  color: #f8fbff;
  text-shadow: 0 0 22px rgba(103, 232, 249, 0.12);
}

body.item-page.inventory-mode .inventory-hero-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.item-page.inventory-mode .inventory-hero-meta > div,
body.item-page.inventory-mode .inventory-info-card {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(9, 17, 36, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.item-page.inventory-mode .inventory-hero-meta span {
  color: rgba(203, 213, 225, 0.72);
}

body.item-page.inventory-mode .inventory-hero-meta strong {
  font-size: clamp(18px, 2vw, 22px);
  color: #f8fbff;
}

body.item-page.inventory-mode .inventory-detail-stack[hidden] {
  display: none !important;
}

body.item-page.inventory-mode .inventory-prizes-card {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

body.item-page.inventory-mode .inventory-prizes-head {
  display: grid;
  gap: 8px;
}

body.item-page.inventory-mode .inventory-prizes-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #f8fbff;
}

body.item-page.inventory-mode .inventory-prizes-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.55;
}

body.item-page.inventory-mode #inventoryPrizesPanel {
  max-height: min(calc(100svh - 260px), 560px);
  overflow: auto;
  padding: 0 4px 2px 0;
}

body.item-page.inventory-mode .inventory-prizes-card .tier-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.item-page.inventory-mode .inventory-prizes-card .tier-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at 0 0, rgba(103, 232, 249, 0.1), transparent 38%),
    rgba(8, 16, 34, 0.74);
}

body.item-page.inventory-mode .inventory-prizes-card .tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.item-page.inventory-mode .inventory-prizes-card .tier-head strong {
  font-size: 16px;
  color: #f8fbff;
}

body.item-page.inventory-mode .inventory-prizes-card .tier-head span {
  color: rgba(226, 232, 240, 0.72);
  font-variant-numeric: tabular-nums;
}

body.item-page.inventory-mode .inventory-prizes-card .tier-prizes {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 8px;
}

body.item-page.inventory-mode .inventory-prizes-card .prize-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.58);
}

body.item-page.inventory-mode .inventory-prizes-card .prize-card img,
body.item-page.inventory-mode .inventory-prizes-card .prize-preview-trigger {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 12px;
  object-fit: cover;
}

body.item-page.inventory-mode .inventory-prizes-card .prize-card-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.item-page.inventory-mode .inventory-prizes-card .prize-name {
  color: #f8fbff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

body.item-page.inventory-mode .inventory-prizes-card .prize-price,
body.item-page.inventory-mode .inventory-prizes-card .prize-count {
  color: rgba(226, 232, 240, 0.68);
  font-size: 12px;
}

body.item-page.inventory-mode .inventory-live-section {
  padding: clamp(16px, 2vw, 22px);
}

body.item-page.inventory-mode .inventory-live-head {
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.item-page.inventory-mode .inventory-live-head h3,
body.item-page.inventory-mode .inventory-events-section h3 {
  font-size: clamp(18px, 1.8vw, 24px);
  color: #f8fbff;
}

body.item-page.inventory-mode .inventory-board-grid {
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}

body.item-page.inventory-mode .inventory-slot {
  min-height: 148px;
  border-radius: 18px;
  padding: 8px 8px 10px;
}

body.item-page.inventory-mode .inventory-slot-face {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  min-height: 84px;
}

body.item-page.inventory-mode .inventory-slot-label,
body.item-page.inventory-mode .inventory-slot-prize {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.item-page.inventory-mode .inventory-auto-dock {
  border-radius: 20px;
  border-color: rgba(103, 232, 249, 0.28);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(240, 171, 252, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(11, 18, 38, 0.95), rgba(7, 13, 28, 0.96));
}

@keyframes item-inventory-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  body.item-page.inventory-mode .page {
    max-width: 100%;
    padding: 14px 12px calc(174px + env(safe-area-inset-bottom));
  }

  body.item-page.inventory-mode .topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
  }

  body.item-page.inventory-mode .brand-link__image {
    width: auto;
    max-width: 158px;
    height: 42px;
    object-fit: contain;
  }

  body.item-page.inventory-mode .topbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
  }

  body.item-page.inventory-mode .topbar-actions .btn {
    min-height: 38px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }

  body.item-page.inventory-mode .topbar-actions a[href="/news"] {
    display: none;
  }

  body.item-page.inventory-mode #customerLoginLink {
    min-width: 40px;
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  body.item-page.inventory-mode #customerLoginLink::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
  }

  body.item-page.inventory-mode .inventory-overview {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.item-page.inventory-mode .inventory-hero-card {
    padding: 18px;
    border-radius: 22px;
  }

  body.item-page.inventory-mode .inventory-hero-head {
    gap: 14px;
  }

  body.item-page.inventory-mode #inventoryTitle {
    margin-top: 18px;
    font-size: clamp(38px, 13vw, 52px);
  }

  body.item-page.inventory-mode .inventory-subtitle {
    margin-top: 14px;
  }

  body.item-page.inventory-mode .inventory-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: left;
  }

  body.item-page.inventory-mode .inventory-price {
    font-size: 42px;
  }

  body.item-page.inventory-mode .inventory-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.item-page.inventory-mode .inventory-hero-meta > div {
    padding: 9px;
  }

  body.item-page.inventory-mode .inventory-hero-meta span {
    font-size: 11px;
  }

  body.item-page.inventory-mode .inventory-hero-meta strong {
    font-size: 16px;
    line-height: 1.2;
  }

  body.item-page.inventory-mode .inventory-prizes-card {
    position: static;
    padding: 14px;
  }

  body.item-page.inventory-mode #inventoryPrizesPanel {
    max-height: none;
    overflow: visible;
  }

  body.item-page.inventory-mode .inventory-live-head {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  body.item-page.inventory-mode .inventory-board-progress {
    width: 100%;
    justify-items: stretch;
  }

  body.item-page.inventory-mode .inventory-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.item-page.inventory-mode .inventory-slot {
    min-height: 126px;
    border-radius: 16px;
  }

  body.item-page.inventory-mode .inventory-slot-face {
    min-height: 70px;
  }

  body.item-page.inventory-mode .inventory-auto-dock {
    left: 12px;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: auto;
    padding: 10px;
  }

  body.item-page.inventory-mode .inventory-auto-dock__status {
    font-size: 12px;
  }

  body.item-page.inventory-mode .inventory-auto-dock__actions {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 8px;
  }

  body.item-page.inventory-mode .inventory-auto-dock__actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  body.item-page.inventory-mode .page {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.item-page.inventory-mode .brand-link__image {
    max-width: 136px;
    height: 38px;
  }

  body.item-page.inventory-mode .topbar-actions .btn {
    padding-inline: 10px;
  }

  body.item-page.inventory-mode .inventory-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body.item-page.inventory-mode .inventory-hero-meta > div {
    padding: 8px 7px;
  }

  body.item-page.inventory-mode .inventory-hero-meta span {
    font-size: 10px;
    line-height: 1.2;
  }

  body.item-page.inventory-mode .inventory-hero-meta strong {
    font-size: 14px;
  }

  body.item-page.inventory-mode .inventory-prizes-card .prize-card {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  body.item-page.inventory-mode .inventory-prizes-card .prize-card img,
  body.item-page.inventory-mode .inventory-prizes-card .prize-preview-trigger {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }

  body.item-page.inventory-mode .inventory-slot {
    min-height: 118px;
  }

  body.item-page.inventory-mode .inventory-slot-face {
    min-height: 62px;
  }
}

@media (max-width: 860px) {
  body.item-page.inventory-mode .topbar {
    min-height: 64px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 8px 12px !important;
  }

  body.item-page.inventory-mode .topbar-actions {
    width: auto !important;
    max-width: calc(100% - 146px) !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }

  /* H5 item banner must stay compact: do not let the hero become a tall promo block. */
  body.item-page.inventory-mode .inventory-hero-card {
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  body.item-page.inventory-mode .inventory-hero-head {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  body.item-page.inventory-mode .inventory-hero-head > div:first-child {
    min-width: 0;
  }

  body.item-page.inventory-mode .inventory-hero-card .tag {
    width: fit-content;
    min-height: 0;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.1;
  }

  body.item-page.inventory-mode #inventoryTitle {
    margin-top: 9px;
    font-size: clamp(34px, 10.5vw, 42px);
    line-height: 0.94;
  }

  body.item-page.inventory-mode .inventory-subtitle {
    display: none;
  }

  body.item-page.inventory-mode .inventory-price-wrap {
    flex: 0 0 auto;
    padding-top: 24px;
  }

  body.item-page.inventory-mode .inventory-price {
    font-size: clamp(30px, 8.8vw, 36px);
    line-height: 1;
  }

  body.item-page.inventory-mode .inventory-hero-meta {
    gap: 6px;
  }

  body.item-page.inventory-mode .inventory-hero-meta > div {
    min-height: 46px;
    gap: 4px;
    padding: 7px 6px;
  }

  body.item-page.inventory-mode .inventory-hero-meta span {
    font-size: 10px;
  }

  body.item-page.inventory-mode .inventory-hero-meta strong {
    font-size: 14px;
    line-height: 1.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.item-page.inventory-mode .inventory-hero-card,
  body.item-page.inventory-mode .inventory-prizes-card,
  body.item-page.inventory-mode .inventory-live-section {
    animation: none;
  }
}

/* 一番賞選籤：公開頁新介面。舊一翻賞底部導覽不可回歸到商品詳情頁。 */
body.item-page.inventory-mode .mobile-tabbar {
  display: none !important;
}

body.item-page.inventory-mode.has-mobile-tabbar {
  padding-bottom: 0 !important;
}

body.item-page.inventory-mode .inventory-experience--kuji {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

body.item-page.inventory-mode .inventory-experience--kuji .inventory-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

body.item-page.inventory-mode .inventory-visual-card {
  position: relative;
  min-height: clamp(360px, 54vw, 650px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 18%, rgba(244, 205, 117, 0.2), transparent 34%),
    linear-gradient(145deg, #111827 0%, #261522 48%, #0b1223 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body.item-page.inventory-mode .inventory-visual-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 20, 0.72));
  pointer-events: none;
}

body.item-page.inventory-mode .inventory-visual-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  display: block;
}

body.item-page.inventory-mode .inventory-visual-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(34px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: 0;
}

body.item-page.inventory-mode .inventory-action-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

body.item-page.inventory-mode .inventory-box-card,
body.item-page.inventory-mode .inventory-action-dock,
body.item-page.inventory-mode .inventory-feed-strip,
body.item-page.inventory-mode .inventory-detail-stack,
body.item-page.inventory-mode .inventory-ticket-section {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(10, 17, 32, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

body.item-page.inventory-mode .inventory-box-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

body.item-page.inventory-mode .inventory-box-head,
body.item-page.inventory-mode .inventory-feed-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.item-page.inventory-mode .inventory-box-head strong {
  color: #fff7dc;
  font-size: 18px;
}

body.item-page.inventory-mode .inventory-box-head span {
  color: #f0c66f;
  font-weight: 800;
}

body.item-page.inventory-mode .inventory-box-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 252px;
  overflow: auto;
  padding-right: 2px;
}

body.item-page.inventory-mode .inventory-box-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.84);
}

body.item-page.inventory-mode .inventory-box-tier-row strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

body.item-page.inventory-mode .inventory-box-tier-row.is-empty {
  opacity: 0.55;
}

body.item-page.inventory-mode .inventory-box-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.item-page.inventory-mode .inventory-box-card {
  position: relative;
}

body.item-page.inventory-mode .inventory-box-picker[hidden] {
  display: none !important;
}

body.item-page.inventory-mode .inventory-box-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(240, 198, 111, 0.2);
  border-radius: 14px;
  background: rgba(5, 10, 20, 0.86);
}

body.item-page.inventory-mode .inventory-box-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.item-page.inventory-mode .inventory-box-picker__head strong {
  color: #fff7dc;
  font-size: 15px;
  font-weight: 900;
}

body.item-page.inventory-mode .inventory-box-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

body.item-page.inventory-mode .inventory-box-option {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

body.item-page.inventory-mode .inventory-box-option:hover {
  border-color: rgba(240, 198, 111, 0.48);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body.item-page.inventory-mode .inventory-box-option.is-current {
  border-color: rgba(240, 198, 111, 0.78);
  background: rgba(240, 198, 111, 0.12);
  box-shadow: inset 0 0 0 1px rgba(240, 198, 111, 0.22);
}

body.item-page.inventory-mode .inventory-box-option__head,
body.item-page.inventory-mode .inventory-box-option__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.item-page.inventory-mode .inventory-box-option__head strong {
  color: #fff7dc;
  font-size: 15px;
  font-weight: 900;
}

body.item-page.inventory-mode .inventory-box-option__head span,
body.item-page.inventory-mode .inventory-box-option__meta span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

body.item-page.inventory-mode .inventory-box-option__meta em {
  color: #f0c66f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

body.item-page.inventory-mode .inventory-box-option__tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.item-page.inventory-mode .inventory-box-option__tier {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tier-color, rgba(255, 255, 255, 0.78));
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body.item-page.inventory-mode .inventory-box-option__tier[data-tier-effect="rainbow"] {
  background-image: linear-gradient(90deg, #ef4444 0%, #f59e0b 22%, #22c55e 48%, #3b82f6 74%, #a855f7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

body.item-page.inventory-mode .inventory-box-option__tier.is-empty {
  opacity: 0.48;
}

body.item-page.inventory-mode .inventory-box-controls .btn,
body.item-page.inventory-mode .inventory-primary-pick,
body.item-page.inventory-mode .inventory-queue-refresh {
  min-height: 44px;
  white-space: nowrap;
}

body.item-page.item-page--has-box-series .detail-box-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(10, 17, 32, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

body.item-page.item-page--has-box-series .detail-box-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.item-page.item-page--has-box-series .detail-box-card__head span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

body.item-page.item-page--has-box-series .detail-box-card__head strong {
  color: #fff7dc;
  font-size: 18px;
  font-weight: 900;
}

body.item-page.item-page--has-box-series .detail-box-card__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.6;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-controls {
  grid-template-columns: minmax(0, 1fr);
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker[hidden] {
  display: none !important;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(240, 198, 111, 0.2);
  border-radius: 14px;
  background: rgba(5, 10, 20, 0.86);
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker__head strong {
  color: #fff7dc;
  font-size: 15px;
  font-weight: 900;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker__grid {
  display: grid;
  /* v37-boxgrid5col: 10 boxes were laying out as 4-4-2 (3 rows). User
     wanted 5-5 (2 rows) — fixed 5-column grid. minmax(0, 1fr) lets
     each cell shrink to fit container; cells are slightly smaller
     than v36's 220px minimum but still readable. Mobile @media falls
     back below. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker__grid {
    /* mobile: 2 cols (10 boxes = 5 rows of 2) — readable on small phones */
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 721px) and (max-width: 1024px) {
  body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker__grid {
    /* tablet: 4 cols (10 boxes = 4-4-2) — middle ground */
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option:hover {
  border-color: rgba(240, 198, 111, 0.48);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__head,
body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__head strong {
  color: #fff7dc;
  font-size: 15px;
  font-weight: 900;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__head span,
body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__meta span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__tier {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tier-color, rgba(255, 255, 255, 0.78));
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__tier[data-tier-effect="rainbow"] {
  background-image: linear-gradient(90deg, #ef4444 0%, #f59e0b 22%, #22c55e 48%, #3b82f6 74%, #a855f7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-option__tier.is-empty {
  opacity: 0.48;
}

body.item-page.inventory-mode .inventory-action-dock {
  display: grid;
  gap: 10px;
  padding: 12px;
}

body.item-page.inventory-mode .inventory-action-dock .inventory-auto-dock {
  display: grid !important;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.item-page.inventory-mode .inventory-queue-note,
body.item-page.inventory-mode .inventory-auto-dock__status {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

body.item-page.inventory-mode .inventory-feed-strip {
  min-height: 54px;
  padding: 10px 14px;
  overflow: hidden;
}

body.item-page.inventory-mode .inventory-feed-strip > span {
  flex: 0 0 auto;
  color: #f0c66f;
  font-weight: 900;
}

body.item-page.inventory-mode .inventory-feed-track {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body.item-page.inventory-mode .inventory-feed-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

body.item-page.inventory-mode .inventory-feed-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.item-page.inventory-mode .inventory-detail-stack {
  padding: 12px;
}

body.item-page.inventory-mode .inventory-panels {
  margin-top: 12px;
}

body.item-page.inventory-mode .inventory-panel-head {
  margin-bottom: 12px;
}

body.item-page.inventory-mode .inventory-panel-head h3 {
  margin: 0 0 4px;
  color: #fff;
}

body.item-page.inventory-mode .inventory-panel-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

body.item-page.inventory-mode .inventory-leader-row,
body.item-page.inventory-mode .inventory-record-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto minmax(90px, auto);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.item-page.inventory-mode .inventory-leader-row:last-child,
body.item-page.inventory-mode .inventory-record-row:last-child {
  border-bottom: 0;
}

body.item-page.inventory-mode .inventory-ticket-section {
  padding: 12px;
}

body.item-page.inventory-mode .inventory-experience--kuji .inventory-live-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.item-page.inventory-mode .inventory-slot.is-queue-locked {
  cursor: pointer;
}

body.item-page.inventory-mode .inventory-slot.is-queue-locked .inventory-slot-face {
  filter: saturate(0.72) brightness(0.72);
}

body.item-page.inventory-mode .inventory-slot.is-queue-locked .inventory-slot-label {
  color: #f0c66f;
}

body.item-page.inventory-mode .inventory-floating-rail {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  gap: 8px;
}

body.item-page.inventory-mode .inventory-floating-rail button {
  min-width: 54px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 13, 26, 0.9);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

@media (max-width: 900px) {
  body.item-page.inventory-mode .inventory-experience--kuji {
    gap: 12px;
  }

  body.item-page.inventory-mode .inventory-experience--kuji .inventory-stage {
    grid-template-columns: 1fr;
  }

  body.item-page.inventory-mode .inventory-visual-card {
    min-height: clamp(190px, 54vw, 260px);
    border-radius: 18px;
  }

  body.item-page.inventory-mode .inventory-action-card {
    gap: 10px;
  }

  body.item-page.inventory-mode .inventory-box-tier-grid {
    max-height: 220px;
  }

  body.item-page.inventory-mode .inventory-box-picker__grid {
    grid-template-columns: 1fr;
    max-height: 260px;
  }

  body.item-page.inventory-mode .inventory-leader-row,
  body.item-page.inventory-mode .inventory-record-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  body.item-page.inventory-mode .inventory-leader-row small,
  body.item-page.inventory-mode .inventory-record-row small {
    grid-column: 2 / -1;
  }
}

@media (max-width: 520px) {
  body.item-page.inventory-mode .inventory-box-card,
  body.item-page.inventory-mode .inventory-detail-stack,
  body.item-page.inventory-mode .inventory-ticket-section {
    border-radius: 14px;
    padding: 10px;
  }

  body.item-page.inventory-mode .inventory-box-tier-grid {
    grid-template-columns: 1fr;
    max-height: 300px;
  }

  body.item-page.inventory-mode .inventory-box-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.item-page.inventory-mode .inventory-box-controls .btn {
    padding-inline: 7px;
    font-size: 12px;
  }

  body.item-page.inventory-mode .inventory-feed-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  body.item-page.inventory-mode .inventory-feed-track {
    width: 100%;
  }

  body.item-page.inventory-mode .inventory-floating-rail {
    right: 10px;
    bottom: 10px;
  }

  body.item-page.inventory-mode .inventory-floating-rail button {
    min-width: 48px;
    min-height: 38px;
    font-size: 12px;
  }
}

/* 2026-04-24: source-pool box picker → fullscreen modal overlay matching the
   admin "箱池管理" modal style (dark gradient + chest cards + per-tone accent). */
body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  margin: 0;
  padding: 24px clamp(16px, 4vw, 56px) 32px;
  background: radial-gradient(circle at center, rgba(9, 13, 23, 0.78), rgba(3, 7, 18, 0.94));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  border-radius: 0;
  overflow: auto;
  animation: sourceBoxModalAppear 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sourceBoxModalAppear {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) .inventory-box-picker__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1280px;
  width: 100%;
  padding: 0 4px 14px;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.45));
  border-bottom: 1px solid rgba(102, 124, 164, 0.22);
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) .inventory-box-picker__head strong {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  color: #edf6ff;
  letter-spacing: 0.02em;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) #detailSourceBoxClose {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: rgba(18, 24, 45, 0.85);
  border: 1px solid rgba(102, 124, 164, 0.32);
  color: #edf6ff;
  font-weight: 700;
  font-size: 13px;
  transition: background 120ms ease, transform 120ms ease;
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) #detailSourceBoxClose:hover {
  background: rgba(40, 52, 82, 0.95);
  transform: scale(1.04);
}

body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) .inventory-box-picker__grid {
  display: grid;
  /* v37-boxgrid5col: explicit 5 cols (was auto-fit minmax(272px) = 4 cols
     at 1280px container). 10 boxes now lay out as 5-5 (2 rows) instead
     of 4-4-2 (3 rows). Cell width ~240-256px depending on container. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1280px;
  width: 100%;
  margin: 16px auto 0;
  padding: 4px;
  align-items: stretch;
  align-self: start;
  max-height: none;
  overflow: visible;
}

/* Chest-card overrides — matches admin .box-pool-modal .box-pool-card. */
body.item-page.item-page--has-box-series .source-pool-box-option {
  --box-accent: #7d52db;
  --box-accent-soft: rgba(125, 82, 219, 0.16);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background:
    radial-gradient(140% 100% at 50% -10%, var(--box-accent-soft), transparent 60%),
    linear-gradient(180deg, rgba(20, 28, 50, 0.86), rgba(12, 17, 32, 0.92));
  border: 1px solid rgba(102, 124, 164, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  color: #edf6ff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body.item-page.item-page--has-box-series .source-pool-box-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--box-accent) 50%, rgba(102, 124, 164, 0.32) 50%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

body.item-page.item-page--has-box-series .source-pool-box-option::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--box-accent), color-mix(in srgb, var(--box-accent) 45%, transparent));
}

body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="royal-arcane"]    { --box-accent: #8e59f4; --box-accent-soft: rgba(142, 89, 244, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="ocean-navigator"] { --box-accent: #2788dd; --box-accent-soft: rgba(39, 136, 221, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="forest-druid"]    { --box-accent: #389861; --box-accent-soft: rgba(56, 152, 97, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="inferno-forge"]   { --box-accent: #d96729; --box-accent-soft: rgba(217, 103, 41, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="moon-relic"]      { --box-accent: #8aa0d6; --box-accent-soft: rgba(138, 160, 214, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="shadow-obsidian"] { --box-accent: #66527e; --box-accent-soft: rgba(102, 82, 126, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="sakura-festival"] { --box-accent: #eb7ea9; --box-accent-soft: rgba(235, 126, 169, 0.16); }
body.item-page.item-page--has-box-series .source-pool-box-option[data-tone="frost-crystal"]   { --box-accent: #58bfd7; --box-accent-soft: rgba(88, 191, 215, 0.16); }

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--box-accent) 22%, rgba(18, 24, 45, 0.78) 78%);
  border: 1px solid color-mix(in srgb, var(--box-accent) 48%, rgba(102, 124, 164, 0.32) 52%);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #edf6ff;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__serial {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #99aeca;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(18, 24, 45, 0.8);
  border: 1px solid rgba(102, 124, 164, 0.3);
  color: #c6d4ea;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__status.is-active {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.42);
  background: rgba(0, 255, 136, 0.12);
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__status.is-inactive {
  color: #8ea0bf;
  border-color: rgba(142, 160, 191, 0.38);
  background: rgba(142, 160, 191, 0.1);
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__art {
  width: 100%;
  height: 120px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__art-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background:
    radial-gradient(80% 80% at 50% 40%, var(--box-accent-soft), transparent 70%),
    rgba(8, 12, 22, 0.6);
  border: 1px solid color-mix(in srgb, var(--box-accent) 30%, rgba(102, 124, 164, 0.3) 70%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__art-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--box-accent) 30%, transparent), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__art-image {
  position: relative;
  z-index: 1;
  max-width: 78%;
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tiers {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(102, 124, 164, 0.22);
  font-size: 13.5px;
  font-weight: 700;
  color: #c6d4ea;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier:last-child {
  border-bottom: 0;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier-name {
  color: var(--box-tier-color, #c6d4ea);
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier-value {
  color: #edf6ff;
  white-space: nowrap;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier-value strong {
  font-size: 16px;
  margin-right: 2px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier--empty {
  opacity: 0.45;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__tier--muted .box-pool-card__tier-name {
  color: #7e8ba5;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__footerline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(102, 124, 164, 0.2);
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(18, 24, 45, 0.85);
  border: 1px solid rgba(102, 124, 164, 0.28);
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__summary-label {
  color: #99aeca;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__summary-value {
  color: #edf6ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__summary-value strong {
  color: #edf6ff;
  font-size: 18px;
}

body.item-page.item-page--has-box-series .source-pool-box-option .box-pool-card__cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--box-accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

body.item-page.item-page--has-box-series .source-pool-box-option.is-sold-out {
  opacity: 0.55;
  cursor: not-allowed;
}

body.item-page.item-page--has-box-series .source-pool-box-option.is-sold-out::before {
  background: linear-gradient(90deg, #6b7280, transparent);
}

@media (max-width: 720px) {
  body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) {
    padding: 16px;
  }
  body.item-page.item-page--has-box-series .detail-box-card .inventory-box-picker:not([hidden]) .inventory-box-picker__grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
 * 2026-04-27 — desktop optimization continuation (P0-1 ~ P0-4)
 * =============================================================
 * Mobile defaults: hide desktop-only elements so they don't appear
 * before the @media (min-width: 1000px) override applies them. */

/* P0-1 / P0-2 mobile-only: hide the desktop-augmentation blocks.
   Wrapped in @media so they don't fight the @media(min-width:1000px) rules
   that turn them on — both have the same specificity (0,2,1) and the
   desktop block lives earlier in this file, so an unwrapped mobile rule
   would beat it via source order on every viewport. */
@media (max-width: 999px) {
  /* meta block — right-column .detail-side already shows the same fields
     more compactly on narrow screens; stacking them again doubles scroll. */
  body.item-page .detail-main__meta {
    display: none;
  }
  /* thumb strip — mobile users swipe the carousel; the strip just steals
     scroll real estate without adding a usable affordance. */
  body.item-page .hero-thumb-strip {
    display: none;
  }
}

/* P0-3: 普通賞 (or any >=50% probability tier) takes the full grid row
   on tier-list at multi-col breakpoints so it doesn't leave 4 empty
   slots. Single-column at narrow widths is unaffected. */
@media (min-width: 720px) {
  body.item-page .tier-list .tier-card.is-rarity-common {
    grid-column: 1 / -1;
  }
}

/* P0-4: 中獎獎品列表 section heading. Sits ABOVE the existing tab strip
   (賞品一覽 / 商品說明 / 新手教學) — gives the section a proper visual
   anchor on desktop so users don't mistake the tab chips for navigation
   to another page. Subtitle exposes per-tier probability in a single
   skim-friendly line. */
body.item-page .section-prizes-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 0 4px;
}

body.item-page .section-prizes-heading__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ir-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

body.item-page .section-prizes-heading__title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00d4ff, #00ff88);
  box-shadow: 0 0 10px -2px rgba(0, 212, 255, 0.45);
}

body.item-page .section-prizes-heading__summary {
  margin: 0;
  color: var(--ir-muted);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  /* indent so it visually anchors under the title text, past the rule */
  padding-left: 14px;
}

@media (min-width: 1000px) {
  body.item-page .section-prizes-heading {
    margin: 6px 0 18px;
  }
  body.item-page .section-prizes-heading__title {
    font-size: 26px;
  }
  body.item-page .section-prizes-heading__summary {
    font-size: 14px;
  }
}

/* =============================================================
 * 2026-04-27 — P1 batch (breadcrumb / title-row icon / drawBar joint)
 * ============================================================= */

/* P1-5: breadcrumb — desktop only, mobile users get the title h1 + back-button
   in the topbar instead. Hidden by default; the @media(min-width:1000px)
   block flips display:flex on. */
body.item-page .pool-breadcrumb {
  display: none;
}

@media (min-width: 1000px) {
  body.item-page .pool-breadcrumb {
    display: block;
    margin: 0 0 16px;
    padding: 0 4px;
  }
  body.item-page .pool-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    font-size: 13px;
    line-height: 1.6;
  }
  body.item-page .pool-breadcrumb__item {
    display: inline-flex;
    align-items: center;
  }
  body.item-page .pool-breadcrumb__sep {
    margin: 0 8px;
    color: rgba(148, 163, 184, 0.55);
    font-size: 14px;
    line-height: 1;
    user-select: none;
  }
  body.item-page .pool-breadcrumb__link {
    color: var(--ir-muted);
    text-decoration: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 0 -6px;
    transition: color 160ms ease, background 160ms ease;
  }
  body.item-page .pool-breadcrumb__link:hover {
    color: var(--ir-ink);
    background: rgba(118, 148, 193, 0.1);
  }
  body.item-page .pool-breadcrumb__current {
    color: var(--ir-ink);
    font-weight: 600;
    /* clamp so a long pool name doesn't push the breadcrumb to two rows
       on tighter desktop widths */
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* P1-7: title-row layout — h1 + watchlist icon-button on the same flex row.
   On mobile the icon collapses next to the (smaller) title; on desktop it
   floats to the right end so the title can grow as wide as the column. */
body.item-page .detail-main__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
body.item-page .detail-main__title-row h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
body.item-page .detail-main__title-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* P1-6: draw-bar visual joint — the floating-card look wastes the 80px gap
   between .page bottom and drawBar top, making drawBar feel orphaned. On
   desktop, slide drawBar up so it shares vertical alignment with .page and
   reads as "page footer CTA" rather than a separate widget. */
@media (min-width: 1000px) {
  body.item-page main.page {
    margin-bottom: 0;
    padding-bottom: 16px;
  }
  body.item-page.frontend-theme-default .draw-bar {
    margin-top: 0;
  }
}

/* =============================================================
 * 2026-04-27 — P2 batch (drawTotal weight, witness wall, related pools)
 * ============================================================= */

/* P2-10: drawTotal — 切 chip 是用戶決策關鍵 ($350 → $3,500 → $35,000)，
   原本字級 14px 跟剩餘庫存等價，現在拉大到 22-26px、用 accent 色，並在
   值改變時做 brief flash (0.5s pop). */
body.item-page .draw-bar #drawTotal {
  font-size: 22px;
  font-weight: 800;
  color: #00d4ff;
  letter-spacing: 0.01em;
  transition: color 200ms ease;
  display: inline-block;
}

@media (min-width: 1000px) {
  body.item-page .draw-bar #drawTotal {
    font-size: 28px;
  }
}

@keyframes draw-total-flash {
  0% {
    transform: scale(1);
    color: #00d4ff;
    text-shadow: 0 0 0 transparent;
  }
  35% {
    transform: scale(1.18);
    color: #00ffd9;
    text-shadow: 0 0 18px rgba(0, 255, 217, 0.55);
  }
  100% {
    transform: scale(1);
    color: #00d4ff;
    text-shadow: 0 0 0 transparent;
  }
}

body.item-page .draw-bar #drawTotal.is-flash {
  animation: draw-total-flash 460ms ease-out;
}

/* P2-8: witness wall — give rare wins (S / LAST / A) a glow border + warmer
   bg so the wall reads as「快看！剛剛有人抽中 S 賞！」instead of a flat list. */
body.item-page .play-history-row {
  position: relative;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
body.item-page .play-history-row.is-rarity-last,
body.item-page .play-history-row.is-rarity-s {
  border: 1px solid rgba(255, 211, 87, 0.5);
  background: linear-gradient(135deg, rgba(255, 211, 87, 0.08), rgba(255, 191, 0, 0.04));
  box-shadow:
    0 0 0 1px rgba(255, 211, 87, 0.18),
    0 12px 28px -12px rgba(255, 191, 0, 0.45);
}
body.item-page .play-history-row.is-rarity-a {
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.08), rgba(168, 85, 247, 0.04));
  box-shadow:
    0 0 0 1px rgba(192, 132, 252, 0.16),
    0 10px 24px -12px rgba(168, 85, 247, 0.4);
}
body.item-page .play-history-row.is-rarity-b {
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(14, 165, 233, 0.03));
}
/* tier badge color follows rarity */
body.item-page .play-history-row.is-rarity-last .play-history-tier,
body.item-page .play-history-row.is-rarity-s .play-history-tier {
  background: linear-gradient(135deg, #ffd357, #ffb000);
  color: #1f1300;
  border-color: transparent;
}
body.item-page .play-history-row.is-rarity-a .play-history-tier {
  background: rgba(192, 132, 252, 0.22);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.55);
}

/* P2-9: 相關卡池推薦 — desktop 4-col grid, mobile horizontal scroll. */
body.item-page .related-pools-section {
  margin-top: 24px;
}
body.item-page .related-pools-card {
  padding: 18px;
}
body.item-page .related-pools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
}
body.item-page .related-pools-head h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ir-ink);
}
body.item-page .related-pools-head .form-hint {
  margin: 0;
}

body.item-page .related-pools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  body.item-page .related-pools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  body.item-page .related-pools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1280px) {
  body.item-page .related-pools-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body.item-page .related-pool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--ir-radius-md);
  border: 1px solid var(--ir-border);
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.7), rgba(9, 15, 28, 0.55));
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  min-width: 0;
}

body.item-page .related-pool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 14px 28px -16px rgba(0, 212, 255, 0.45);
}

body.item-page .related-pool-card__thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--ir-radius-sm);
  overflow: hidden;
  background: rgba(7, 12, 24, 0.75);
  display: grid;
  place-items: center;
  color: rgba(148, 163, 184, 0.5);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 10px;
}

body.item-page .related-pool-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body.item-page .related-pool-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.item-page .related-pool-card__cat {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ir-muted);
  text-transform: uppercase;
}

body.item-page .related-pool-card__name {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ir-ink);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

body.item-page .related-pool-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--ir-muted);
}

body.item-page .related-pool-card__price {
  color: #00d4ff;
  font-weight: 700;
  font-size: 13px;
}

body.item-page .related-pool-card__remain {
  white-space: nowrap;
  font-size: 11px;
}

/* ============================================================
 * v55am — 卡池資訊頁籤（圖鑒 / 榜單 / 記錄）+ 排行榜列表
 * ============================================================ */

/* v55ba: 強制 display: block 推翻 generic .pool-tabs { display: flex } 規則
   （原 generic rule 是給 detail-tabs 用的，但 selector 沒帶 body.item-page，
   結果連我新加的 <section class="pool-tabs" id="poolInfoTabs"> 都吃到 →
   nav 跟 panels 變成左右 flex item，panels 被擠到右邊只剩 435px 寬）*/
body.item-page .pool-tabs {
  display: block !important;
  margin: 16px 0 12px;
  padding: 0;
  background: transparent;
}

/* 另外強制 panels 滿寬，避免被 inline 鏈條繼承 */
body.item-page #poolInfoTabs .pool-tabs__panels {
  display: block !important;
  width: 100% !important;
}

body.item-page #poolInfoTabs .pool-tabs__panel {
  display: block;
  width: 100% !important;
}

body.item-page #poolInfoTabs .pool-tabs__panel[hidden] {
  display: none !important;
}

/* v55ar: tab nav 置中（width:fit-content + margin auto），不再 stretch 滿寬 */
body.item-page .pool-tabs__nav {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35));
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: 0 6px 24px -16px rgba(56, 189, 248, 0.4);
  margin: 0 auto 14px;
  width: fit-content;
  max-width: 100%;
  justify-content: center;
}

/* wrap container 讓 inline-flex 真的能 center（detail section 是 block） */
body.item-page .pool-tabs {
  text-align: center;
}

body.item-page .pool-tabs__panels {
  text-align: left;
}

body.item-page .pool-tabs__tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ir-muted, rgba(226, 232, 240, 0.7));
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  font-family: inherit;
  min-width: 92px;
}

body.item-page .pool-tabs__tab:hover:not(.is-active) {
  background: rgba(56, 189, 248, 0.08);
  color: #e2e8f0;
}

body.item-page .pool-tabs__tab.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.22));
  color: #f1f5f9;
  box-shadow:
    0 2px 8px -2px rgba(56, 189, 248, 0.4),
    inset 0 0 0 1px rgba(56, 189, 248, 0.4);
}

body.item-page .pool-tabs__tab-icon {
  font-size: 15px;
  line-height: 1;
}

body.item-page .pool-tabs__tab-label {
  letter-spacing: 1px;
}

body.item-page .pool-tabs__panel[hidden] {
  display: none !important;
}

body.item-page .pool-tabs__panel {
  animation: poolTabFadeIn 0.22s ease both;
}

body.item-page .pool-tabs__panel-inner {
  padding: 14px 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.3));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

@keyframes poolTabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 榜單兩個大格子（v55bb：恢復左右並排，桌機用，mobile stack）── */
/* desktop 2-col 左右並排（像 cc1kuji 範例），mobile <=720px 自動單欄 */

body.item-page .pool-board__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 720px) {
  body.item-page .pool-board__cards {
    grid-template-columns: 1fr;
  }
}

body.item-page .pool-board__card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35));
  border: 1px solid rgba(56, 189, 248, 0.16);
  overflow: hidden;
  /* v55bc: 不管有沒有玩家，框固定大一點點，視覺不會塌掉 */
  min-height: 420px;
}

@media (max-width: 720px) {
  body.item-page .pool-board__card {
    min-height: 320px;
  }
}

body.item-page .pool-board__card-head {
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

body.item-page .pool-board__card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #f1f5f9;
  font-family: var(--font-display, inherit);
  display: flex;
  align-items: center;
  gap: 6px;
}

body.item-page .pool-board__card-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #38bdf8, #a855f7);
}

body.item-page .pool-board__card .pool-board__list {
  padding: 10px 12px 12px;
  min-height: 360px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* v55bc: 空狀態 / 載入狀態置中於框內，不要靠頂貼著 */
body.item-page .pool-board__card .pool-board__list[data-state="empty"],
body.item-page .pool-board__card .pool-board__list[data-state="loading"],
body.item-page .pool-board__card .pool-board__list[data-state="error"] {
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  body.item-page .pool-board__card .pool-board__list {
    min-height: 260px;
  }
}

/* v55av: 兩張卡始終上下排（base 已是 1fr），不再需要 720px breakpoint */

/* ── 排行榜列表 ── */

body.item-page .pool-board__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

body.item-page .pool-board__hint {
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

body.item-page .pool-board-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: transparent;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.12s ease;
}

body.item-page .pool-board-row:last-child {
  border-bottom: 0;
}

body.item-page .pool-board-row:hover {
  background: rgba(56, 189, 248, 0.05);
}

body.item-page .pool-board-row[data-rank="1"] {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(15, 23, 42, 0.5));
  border-color: rgba(250, 204, 21, 0.45);
}

body.item-page .pool-board-row[data-rank="2"] {
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.16), rgba(15, 23, 42, 0.5));
  border-color: rgba(203, 213, 225, 0.4);
}

body.item-page .pool-board-row[data-rank="3"] {
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.16), rgba(15, 23, 42, 0.5));
  border-color: rgba(251, 146, 60, 0.4);
}

body.item-page .pool-board-row__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  color: #f1f5f9;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: var(--font-display, inherit);
}

body.item-page .pool-board-row[data-rank="1"] .pool-board-row__rank {
  background: linear-gradient(135deg, #facc15, #fde68a);
  color: #422006;
  border-color: transparent;
  text-shadow: none;
}

body.item-page .pool-board-row[data-rank="2"] .pool-board-row__rank {
  background: linear-gradient(135deg, #cbd5e1, #f1f5f9);
  color: #1e293b;
  border-color: transparent;
}

body.item-page .pool-board-row[data-rank="3"] .pool-board-row__rank {
  background: linear-gradient(135deg, #fb923c, #fed7aa);
  color: #431407;
  border-color: transparent;
}

body.item-page .pool-board-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.item-page .pool-board-row__name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display, inherit);
}

body.item-page .pool-board-row__tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

body.item-page .pool-board-row__tier {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
}

body.item-page .pool-board-row__tier-name {
  letter-spacing: 0.5px;
}

body.item-page .pool-board-row__tier-count {
  opacity: 0.85;
  font-weight: 600;
}

/* v55ao: 名字+chip+avatar 同一行 */
body.item-page .pool-board-row__name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body.item-page .pool-board-row__avatar {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
}

/* v55bd: avatar 是真實圖片時用 <img> 撐滿圓形容器 */
body.item-page .pool-board-row__avatar--img {
  background: rgba(15, 23, 42, 0.6) !important;
  text-shadow: none;
}

body.item-page .pool-board-row__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* v55bd: 太強啦徽章 — 金/橘漸層 + 火焰 emoji，告訴用戶 ≤10 抽就中稀有 */
body.item-page .pool-board-row__breakthrough {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(249, 115, 22, 0.16));
  border: 1px solid rgba(250, 204, 21, 0.42);
  font-size: 11.5px;
  color: #fde68a;
  text-shadow: 0 1px 2px rgba(180, 83, 9, 0.4);
  box-shadow: 0 2px 8px -2px rgba(250, 204, 21, 0.3);
  align-self: flex-start;
}

body.item-page .pool-board-row__breakthrough-flame {
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(249, 115, 22, 0.5));
}

body.item-page .pool-board-row__breakthrough-text {
  font-weight: 600;
  letter-spacing: 0.3px;
}

body.item-page .pool-board-row__breakthrough-text b {
  color: #fff;
  font-weight: 800;
  margin: 0 1px;
}

body.item-page .pool-board-row__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* v55aq: 歐皇分專用 chip — 金色突顯排名依據 */
body.item-page .pool-board-row__chip--lucky {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(245, 158, 11, 0.18));
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.45);
  text-shadow: 0 1px 2px rgba(180, 83, 9, 0.4);
}

/* v55aq: 歐皇卡的次要 chip（購X次）視覺降階 */
body.item-page .pool-board-row__chip--secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
  font-weight: 600;
}

body.item-page .pool-board__empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--ir-muted, rgba(226, 232, 240, 0.5));
  font-size: 13px;
}

/* ── v55ao: 記錄 panel 表格化 ── */
body.item-page .pool-record-mount {
  display: block;
}

body.item-page .pool-record__table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.3));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

body.item-page .pool-record__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #e2e8f0;
}

body.item-page .pool-record__table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ir-muted, rgba(226, 232, 240, 0.6));
  background: rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

body.item-page .pool-record__table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}

body.item-page .pool-record__table tbody tr:last-child td {
  border-bottom: 0;
}

body.item-page .pool-record__table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

body.item-page .pool-record__cell--seq {
  width: 60px;
  font-weight: 700;
  color: var(--ir-muted, rgba(226, 232, 240, 0.65));
  font-family: var(--font-display, inherit);
}

body.item-page .pool-record__cell--account {
  white-space: nowrap;
}

body.item-page td.pool-record__cell--account {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.item-page .pool-record__avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

body.item-page .pool-record__account-name {
  font-weight: 700;
  color: #f1f5f9;
}

body.item-page .pool-record__cell--time {
  font-family: var(--font-display, inherit);
  color: var(--ir-muted, rgba(226, 232, 240, 0.65));
  font-size: 12.5px;
  white-space: nowrap;
}

body.item-page .pool-record__cell--tier {
  white-space: nowrap;
}

body.item-page .pool-record__tier {
  font-style: italic;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
}

body.item-page .pool-record__tier.is-tier-last  { color: #f97316; }
body.item-page .pool-record__tier.is-tier-s     { color: #facc15; }
body.item-page .pool-record__tier.is-tier-a     { color: #fde047; }
body.item-page .pool-record__tier.is-tier-b     { color: #c084fc; }
body.item-page .pool-record__tier.is-tier-c     { color: #60a5fa; }
body.item-page .pool-record__tier.is-tier-d     { color: #5eead4; }
body.item-page .pool-record__tier.is-tier-e     { color: #94a3b8; }
body.item-page .pool-record__tier.is-tier-common { color: #4ade80; }

/* v55be: rank-based 著色（用 admin 設的 sort_order 決定，admin reorder 顏色跟著變） */
body.item-page .pool-record__tier.is-tier-rank-0      { color: #facc15; } /* 最稀有 — 金 */
body.item-page .pool-record__tier.is-tier-rank-1      { color: #fde047; } /* 次稀有 — 黃 */
body.item-page .pool-record__tier.is-tier-rank-2      { color: #c084fc; } /* 第 3 稀有 — 紫 */
body.item-page .pool-record__tier.is-tier-rank-3      { color: #60a5fa; } /* 第 4 稀有 — 藍 */
body.item-page .pool-record__tier.is-tier-rank-4      { color: #5eead4; } /* 第 5 稀有 — 青 */
body.item-page .pool-record__tier.is-tier-rank-common { color: #4ade80; } /* 普通/其他 — 綠 */

/* v55be: avatar 真實圖片時撐滿圓形容器 */
body.item-page .pool-record__avatar--img {
  background: rgba(15, 23, 42, 0.6) !important;
  text-shadow: none;
  overflow: hidden;
  padding: 0;
}

body.item-page .pool-record__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.item-page .pool-record__cell--prize {
  color: #cbd5e1;
  font-size: 12.5px;
}

body.item-page .pool-record__empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--ir-muted, rgba(226, 232, 240, 0.5));
  font-size: 13px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.3));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  margin: 0;
}

/* v55bf: 紀錄表分頁控制（取代 v55at 的「載入更多」） */
body.item-page .pool-record__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
}

body.item-page .pool-record__page-btn,
body.item-page .pool-record__page-nav {
  min-width: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-display, inherit);
}

body.item-page .pool-record__page-btn:hover:not(:disabled):not(.is-active),
body.item-page .pool-record__page-nav:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.55);
  color: #f1f5f9;
  transform: translateY(-1px);
}

body.item-page .pool-record__page-btn.is-active {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 2px 8px -2px rgba(56, 189, 248, 0.5);
  cursor: default;
}

body.item-page .pool-record__page-btn:disabled,
body.item-page .pool-record__page-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.item-page .pool-record__page-nav {
  font-size: 12px;
  letter-spacing: 0.5px;
}

body.item-page .pool-record__page-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--ir-muted, rgba(226, 232, 240, 0.5));
  font-weight: 700;
  user-select: none;
}

@media (max-width: 480px) {
  body.item-page .pool-record__page-btn,
  body.item-page .pool-record__page-nav {
    min-width: 32px;
    padding: 5px 8px;
    font-size: 11.5px;
  }
}

@media (max-width: 720px) {
  body.item-page .pool-record__table thead th,
  body.item-page .pool-record__table tbody td {
    padding: 10px 8px;
    font-size: 12px;
  }
  body.item-page .pool-record__cell--seq { width: 36px; }
  body.item-page .pool-record__avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  body.item-page .pool-record__tier {
    font-size: 13px;
  }
}

/* ─────────────────────────────────────────────
   v55ap 優化：
   1. card hint subtitle
   2. 賞級顏色化 tier chip
   3. 記錄筆數 meta chip
   4. sticky thead + 內陰影漸隱
   5. rank 1 微金色脈動
   ───────────────────────────────────────────── */

body.item-page .pool-board__card-hint {
  margin: 4px 0 0 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ir-muted, rgba(226, 232, 240, 0.55));
  letter-spacing: 0.4px;
}

/* 賞級顏色化 tier chip — 對應 record table 顏色 */
body.item-page .pool-board-row__tier.is-tier-s {
  background: rgba(250, 204, 21, 0.16);
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.42);
}
body.item-page .pool-board-row__tier.is-tier-a {
  background: rgba(253, 224, 71, 0.14);
  color: #fef08a;
  border-color: rgba(253, 224, 71, 0.4);
}
body.item-page .pool-board-row__tier.is-tier-b {
  background: rgba(192, 132, 252, 0.16);
  color: #ddd6fe;
  border-color: rgba(192, 132, 252, 0.4);
}
body.item-page .pool-board-row__tier.is-tier-c {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.4);
}
body.item-page .pool-board-row__tier.is-tier-d {
  background: rgba(94, 234, 212, 0.14);
  color: #99f6e4;
  border-color: rgba(94, 234, 212, 0.36);
}
body.item-page .pool-board-row__tier.is-tier-e {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.34);
}
body.item-page .pool-board-row__tier.is-tier-last {
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  border-color: rgba(249, 115, 22, 0.4);
}
body.item-page .pool-board-row__tier.is-tier-common {
  background: rgba(74, 222, 128, 0.12);
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.32);
}

/* 記錄筆數 meta chip */
body.item-page .pool-record__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 8px;
}

body.item-page .pool-record__count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: var(--font-display, inherit);
}

/* sticky thead — 長表滾動時表頭不消失 */
body.item-page .pool-record__table-wrap {
  max-height: 540px;
  overflow-y: auto;
}

body.item-page .pool-record__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.82));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  body.item-page .pool-record__table-wrap {
    max-height: 460px;
  }
}

/* rank 1 微金色脈動 — 不誇張、不分散注意 */
@keyframes poolBoardRank1Pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 0 12px rgba(250, 204, 21, 0.12); }
  50%      { box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.55), 0 0 18px rgba(250, 204, 21, 0.25); }
}

body.item-page .pool-board-row[data-rank="1"] {
  position: relative;
  animation: poolBoardRank1Pulse 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  body.item-page .pool-board-row[data-rank="1"] {
    animation: none;
  }
}

/* ── 獎品 panel — 沿用 tier-list 樣式（v55an 改名 圖鑒→獎品） ── */

body.item-page .pool-catalog-mount {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.item-page .pool-catalog-mount .tier-list {
  margin: 0;
}

body.item-page .pool-catalog__prizes:empty {
  display: none;
}

body.item-page .pool-catalog__desc,
body.item-page .pool-catalog__guide {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body.item-page .pool-catalog__desc[hidden],
body.item-page .pool-catalog__guide[hidden] {
  display: none !important;
}

body.item-page .pool-catalog__sub-title {
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
  margin: 0 0 8px;
  letter-spacing: 1.5px;
  font-family: var(--font-display, inherit);
  display: flex;
  align-items: center;
  gap: 6px;
}

body.item-page .pool-catalog__sub-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #38bdf8, #a855f7);
}

body.item-page .pool-catalog__desc-body p,
body.item-page .pool-catalog__guide-body p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
}

body.item-page .pool-catalog__desc-body p:last-child,
body.item-page .pool-catalog__guide-body p:last-child {
  margin-bottom: 0;
}

/* ── 記錄 panel — 沿用 play-history 樣式 ── */

body.item-page .pool-record-mount {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.item-page .pool-record-mount .play-history-list {
  margin: 0;
}

@media (max-width: 480px) {
  body.item-page .pool-tabs__tab {
    font-size: 12px;
    padding: 8px 12px;
    min-width: 72px;
  }
  body.item-page .pool-tabs__tab-icon {
    font-size: 14px;
  }
  body.item-page .pool-tabs__panel-inner {
    padding: 12px 10px 14px;
  }
  body.item-page .pool-board-row {
    grid-template-columns: 32px 1fr;
    padding: 8px 10px;
    gap: 8px;
  }
  body.item-page .pool-board-row__rank {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  body.item-page .pool-board-row__name {
    font-size: 13px;
  }
  body.item-page .pool-board-row__tier {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* v55fz Phase 6 (2026-04-30): Removed 491 lines of v55fn-fq mobile @media retrofit (line 7230 onwards). Mobile UI now lives in /item-v2.css with proper mobile-first design. The retrofit was an attempt to bolt mobile @media onto desktop-first DOM — abandoned in favor of /item.html DOM rewrite. */

/* ═════════════════════════════════════════════════════════════════════════
   v55gq (2026-04-30): 「只看可選」filter toggle + drawn cards 視覺淡化
   user 報怨 drawn rate 高時找 undrawn 籤超難 — 加 toggle 讓他直接過濾掉。
   ═════════════════════════════════════════════════════════════════════════ */

/* Filter button active state — 按下後變綠色（已啟用 filter）*/
#drawPickFilterAvailableBtn[data-active="1"] {
  background: linear-gradient(135deg, #b9e63d, #6cb02e);
  color: #0a1f00;
  border-color: #5fa629;
  font-weight: 800;
}

/* c101 (2026-04-30): 拿掉 .is-mostly-drawn auto-dim CSS — user 看到 drawn
   cards 被「壓扁」成橫條 (lazy-load image 還沒回 + opacity dim 疊起來造成
   視覺塌掉)。只保留 toggle button「只看可選」filter 邏輯。 */

/* ═════════════════════════════════════════════════════════════════════════
   c168c (2026-05-01): Desktop /item UI/UX scale-up + polish
   User: 「我覺得網頁版的他 可以大一點 好看一點 UIUX好一點」
   Audit (Kapture, 2560 viewport):
     .iv2-legacy: 1118px (44% viewport, 對 widescreen 太小)
     .detail-side: 377px wide (塞 6 tier + queue 太擠)
     .tier-stock-cell: 106×46 (字 12px 太小)
     .detail-side__queue-btn: 310×48 (矮)
   Strategy: 桌機 (≥1100px) 整頁放大 — page max 1600 → 1680, hero thumb
   560 → 660, side panel padding+gap+font 全部 bump，按鈕 48 → 60。
   ═════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1100px) {
  /* Page shell — give the whole layout breathing room on widescreens */
  body.item-page,
  body.item-page.frontend-theme-default {
    --layout-max-width: 1680px;
  }
  body.item-page.frontend-theme-default .page,
  body.item-page .page {
    width: min(calc(100% - 32px), var(--layout-max-width));
  }

  /* Hero card — generous padding + tighter 2-col split */
  body.item-page .detail-hero {
    grid-template-columns: minmax(520px, 660px) minmax(420px, 1fr);
    gap: 36px;
    padding: 32px;
    border-radius: 24px;
  }

  /* Hero thumb — bump max from 560 → 660 so the figure has presence */
  body.item-page .detail-thumb {
    max-height: 660px;
    max-width: 660px;
  }
  body.item-page .detail-thumb:has(.hero-carousel) {
    max-height: 660px;
  }

  /* Title — punch it up a notch */
  body.item-page .detail-main h1,
  body.item-page .iv2-hero__title {
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: -0.01em;
  }

  /* Right info column — wider padding + breathing gap */
  body.item-page .detail-side {
    padding: 24px;
    gap: 18px;
    border-radius: 22px;
  }

  /* Tier stock grid — bigger cells, larger fonts, more padding */
  body.item-page .detail-side .tier-stock-grid {
    gap: 10px;
  }
  body.item-page .tier-stock-cell {
    padding: 14px 14px 12px;
    gap: 6px;
    border-radius: 12px;
    font-size: 15px;
    min-height: 64px;
  }
  body.item-page .tier-stock-cell__label {
    font-size: 14px;
    letter-spacing: 0.06em;
  }
  body.item-page .tier-stock-cell__count {
    font-size: 16px;
  }
  body.item-page .tier-stock-cell__prob {
    font-size: 13px;
  }

  /* Queue card — bigger header row, taller CTA, stronger price pill */
  body.item-page .detail-side__queue {
    padding: 18px 20px;
    gap: 14px;
    border-radius: 18px;
  }
  body.item-page .detail-side__queue-head {
    gap: 10px;
  }
  body.item-page .detail-side__queue-head-title {
    font-size: 16px;
    letter-spacing: 0.04em;
  }
  body.item-page .detail-side__queue-head-pill {
    font-size: 12px;
    padding: 5px 12px;
  }
  body.item-page .detail-side__queue-head-price {
    font-size: 13px;
    padding: 5px 12px;
  }
  body.item-page .detail-side__queue-head-price strong {
    font-size: 15px;
  }
  body.item-page .detail-side__queue-btn {
    height: 60px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 14px;
  }
  body.item-page .detail-side__queue-stop-btn {
    height: 56px;
    font-size: 16px;
    border-radius: 14px;
  }
  body.item-page .detail-side__queue-hint {
    font-size: 13px;
    line-height: 1.55;
  }
}

/* Extra breathing room on very wide screens (≥1600px viewport) */
@media (min-width: 1600px) {
  body.item-page .detail-hero {
    grid-template-columns: minmax(600px, 720px) minmax(480px, 1fr);
    gap: 40px;
    padding: 36px;
  }
  body.item-page .detail-thumb,
  body.item-page .detail-thumb:has(.hero-carousel) {
    max-height: 720px;
    max-width: 720px;
  }
  body.item-page .detail-main h1,
  body.item-page .iv2-hero__title {
    font-size: 42px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c168d (2026-05-01): Tweaks user 反饋
   ① 拿掉 tier-stock-cell hover popover (B賞 / 賞級機率 / 獎品名稱) — user
      說「這邊不用有文字」。整塊 hover 出來的 .tier-stock-cell__hover 隱藏，
      cursor 改 default 不再暗示可互動。
   ② 「開始排隊」按鈕文字看不清 — 按鈕 default 用 .btn.primary 漸層 (cyan
      到 purple)，淺色文字在淺底上對比不夠。所有 idle / default state 強制
      白字 + dark text-shadow + bolder weight，提升所有狀態下的可讀性。
   ═════════════════════════════════════════════════════════════════════════ */

/* ① 拿掉賞級格 hover popover */
body.item-page .tier-stock-cell {
  cursor: default;
}
body.item-page .tier-stock-cell__hover {
  display: none !important;
}

/* ② 排隊按鈕文字對比補強 — 涵蓋 default(cyan), active(green), blocked(orange) 三色底 */
body.item-page .detail-side__queue-btn,
body.item-page .detail-side__queue-btn[data-queue-state="idle"] {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.55), 0 0 1px rgba(2, 6, 23, 0.35) !important;
}
body.item-page .detail-side__queue-btn .detail-side__queue-btn-text {
  color: inherit;
  font-weight: inherit;
  letter-spacing: 0.06em;
}
/* active state already had #042f2e dark text on light green — keep that */
body.item-page .detail-side__queue-btn[data-queue-state="active"] {
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35) !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   c168f (2026-05-01): User feedback
   ① 自動更新警告多一行「仍可以繼續抽獎」— 不讓 user 誤以為池被鎖
   ② 單一獎品 tier (S/A/B/C/D/普通 各 1 prize) 之前 v55av 改成「圖片在左
      文字在右」橫式排版，user 反饋「字應該在底下不在右邊」— 改回直式
      (圖在上、名字在下)
   ═════════════════════════════════════════════════════════════════════════ */

/* ① 警告 banner 補一行 reassurance */
body.item-page .detail-side__reset-warn-note {
  color: #d1fae5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body.item-page .detail-side__reset-warn-note::before {
  content: "✓";
  color: #34d399;
  font-weight: 900;
}

/* ② 單一獎品 tier — 改回直式（覆蓋 line 3665 v55av :only-child 橫式 rule）
   :where(:only-child) keeps specificity at (0,2,0) so we don't accidentally
   force this on multi-prize tiers. */
body.item-page .tier-card .prize-card:only-child {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px !important;
  align-items: stretch !important;
  text-align: center;
}
body.item-page .tier-card .prize-card:only-child img,
body.item-page .tier-card .prize-card:only-child .prize-preview-trigger {
  width: 100% !important;
  max-width: 220px !important;
  margin: 0 auto !important;
  flex-basis: auto !important;
}
body.item-page .tier-card .prize-card:only-child .prize-card-body,
body.item-page .tier-card .prize-card:only-child > span {
  text-align: center;
  padding: 4px 6px 6px;
}

/* ═════════════════════════════════════════════════════════════════════════
   c168g (2026-05-01): Breadcrumb cosmic chip 風格 + 獎品 tab tier-card polish
   User: 「breadcrumb 太樸素 → 改成 cosmic chip 風格」
        「獎品 tab — prize 卡片、tier 標題、整體間距可以再 polish」
   ═════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1000px) {
  /* Breadcrumb chips — every link/current 變成有 border 的 cosmic pill */
  body.item-page .pool-breadcrumb {
    margin: 0 0 22px;
    padding: 4px 8px;
  }
  body.item-page .pool-breadcrumb__list {
    gap: 6px;
    font-size: 13px;
  }
  body.item-page .pool-breadcrumb__sep {
    margin: 0 4px;
    color: rgba(56, 189, 248, 0.55);
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
  }
  body.item-page .pool-breadcrumb__link,
  body.item-page .pool-breadcrumb__current {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.06em;
    line-height: 1.2;
    border: 1px solid rgba(118, 148, 193, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(9, 15, 28, 0.4));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
    margin: 0;
    max-width: none;
  }
  body.item-page .pool-breadcrumb__link {
    color: rgba(226, 232, 240, 0.78);
    text-decoration: none;
  }
  body.item-page .pool-breadcrumb__link:hover {
    color: #f1f5f9;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.12));
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
  }
  body.item-page .pool-breadcrumb__current {
    color: #f8fafc;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.22));
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow:
      0 6px 18px -8px rgba(56, 189, 248, 0.55),
      inset 0 0 0 1px rgba(56, 189, 248, 0.18);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
    /* keep width-cap behavior so very long pool name still ellipsizes */
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 1100px) {
  /* Tier-list — more breathing between tier-cards */
  body.item-page #poolCatalogPanelMount .tier-list {
    gap: 16px;
  }

  /* Tier-card — bigger padding, rounder corners, soft glass */
  body.item-page #poolCatalogPanelMount .tier-card {
    padding: 14px 14px 14px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(9, 15, 28, 0.48));
    border: 1px solid rgba(118, 148, 193, 0.18);
    box-shadow: 0 8px 24px -12px rgba(2, 8, 23, 0.55);
  }
  /* Thicker rarity spine on desktop */
  body.item-page #poolCatalogPanelMount .tier-card::before {
    width: 5px;
  }

  /* Tier head — bigger label + better pill */
  body.item-page #poolCatalogPanelMount .tier-card .tier-head {
    margin-bottom: 12px;
    gap: 10px;
  }
  body.item-page #poolCatalogPanelMount .tier-card .tier-head strong {
    font-size: 17px;
    letter-spacing: 0.06em;
  }
  body.item-page #poolCatalogPanelMount .tier-card .tier-head span {
    font-size: 12px;
    padding: 4px 12px;
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(9, 15, 28, 0.5));
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #cbd5e1;
  }

  /* Prize-card on desktop — slightly bigger padding, name a touch larger */
  body.item-page #poolCatalogPanelMount .prize-card {
    padding: 10px;
    border-radius: 12px;
  }
  body.item-page #poolCatalogPanelMount .prize-card .prize-name,
  body.item-page #poolCatalogPanelMount .prize-card > span {
    font-size: 13px;
    line-height: 1.4;
  }
  body.item-page #poolCatalogPanelMount .prize-card .prize-probability {
    font-size: 11px;
    margin-top: 2px;
  }
  /* image stays prominent */
  body.item-page #poolCatalogPanelMount .prize-card img,
  body.item-page #poolCatalogPanelMount .prize-card .prize-preview-trigger {
    border-radius: 10px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c168h (2026-05-01): User feedback bundle
   ① page-title-top — pool name 顯示在最上方，cuter font
   ② 即時中獎 ticker bar 細一點 (76 → 52)
   ③ JS task: closeActionModal 加 fetchPoolDetailData (item.js)
   ④ JS task: item-loader.js cache key bumped (was 寫死 c168b never bumped)
   ═════════════════════════════════════════════════════════════════════════ */

/* mobile: page-title-top hidden (mobile already has iv2-hero__title at top) */
body.item-page .page-title-top {
  display: none;
}
body.item-page .page-title-top[hidden] {
  display: none !important;
}

@media (min-width: 1000px) {
  body.item-page .page-title-top {
    display: block;
    margin: 6px 0 18px;
    padding: 0;
    font-family: "Fredoka", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.18;
    text-align: center;
    background: linear-gradient(135deg, #67e8f9 0%, #c4b5fd 50%, #f0abfc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.28));
    position: relative;
    padding-bottom: 14px;
  }
  body.item-page .page-title-top::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg,
      rgba(56, 189, 248, 0) 0%,
      rgba(56, 189, 248, 0.9) 30%,
      rgba(168, 85, 247, 0.9) 70%,
      rgba(168, 85, 247, 0) 100%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
    -webkit-text-fill-color: initial;
  }
  /* hide the in-card .iv2-hero__title since we now have one at the top */
  body.item-page .iv2-hero__title {
    display: none;
  }
}

@media (min-width: 1600px) {
  body.item-page .page-title-top {
    font-size: 44px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c169 yifan-child-pools — admin 子箱管理 section table style
   Loaded on /admin-game-probability-manage. See SKILL `yifan-child-pools`.
   ═════════════════════════════════════════════════════════════════════════ */
.child-boxes-section .child-boxes-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}
.child-boxes-section .child-boxes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.child-boxes-section .child-boxes-table th,
.child-boxes-section .child-boxes-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(118, 148, 193, 0.18);
}
.child-boxes-section .child-boxes-table th {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.85);
  text-transform: uppercase;
}
.child-boxes-section .child-boxes-table td {
  color: #e2e8f0;
}
.child-boxes-section .child-boxes-table .form-hint {
  color: rgba(148, 163, 184, 0.6);
  text-align: center;
  padding: 18px 0;
}
.child-boxes-section .child-box-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #67e8f9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.child-boxes-section .child-box-tag.is-parent {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}
.child-boxes-section .child-boxes-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.child-boxes-section .form-message[data-tone="success"] { color: #86efac; }
.child-boxes-section .form-message[data-tone="error"] { color: #fca5a5; }

/* c169: brief flash highlight when admin lands here from pool list "管理箱池" */
.child-boxes-section.is-focus-flash {
  animation: child-boxes-focus-flash 1.4s ease-out;
}
@keyframes child-boxes-focus-flash {
  0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
  20%  { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* ═════════════════════════════════════════════════════════════════════════
   c169 yifan-child-pools — 子箱切換 chip switcher
   Renders ABOVE .iv2-legacy on desktop / ABOVE .iv2-hero on mobile.
   Hidden when family has only 1 box (no children spawned).
   See `.claude/skills/yifan-child-pools/SKILL.md`.
   ═════════════════════════════════════════════════════════════════════════ */
body.item-page .child-box-switcher {
  margin: 0 0 14px;
  padding: 0;
}
body.item-page .child-box-switcher[hidden] { display: none; }
body.item-page .child-box-switcher__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(9, 15, 28, 0.4));
  border: 1px solid rgba(118, 148, 193, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-wrap: wrap;
}
body.item-page .child-box-switcher__title {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.7);
  text-transform: uppercase;
  flex: 0 0 auto;
}
body.item-page .child-box-switcher__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
body.item-page .child-box-switcher__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(118, 148, 193, 0.28);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(9, 15, 28, 0.55));
  color: rgba(226, 232, 240, 0.85);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  font-family: inherit;
  position: relative;
}
body.item-page .child-box-switcher__chip:hover:not(.is-current) {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.12));
  border-color: rgba(56, 189, 248, 0.45);
  color: #f1f5f9;
  transform: translateY(-1px);
}
body.item-page .child-box-switcher__chip.is-current {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(168, 85, 247, 0.28));
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  cursor: default;
  box-shadow:
    0 6px 18px -8px rgba(56, 189, 248, 0.55),
    inset 0 0 0 1.5px rgba(56, 189, 248, 0.4);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}
body.item-page .child-box-switcher__chip.is-sold-out {
  opacity: 0.55;
  filter: grayscale(45%);
}
body.item-page .child-box-switcher__chip.is-sold-out:not(.is-current) {
  cursor: not-allowed;
}
body.item-page .child-box-switcher__chip.is-parent .child-box-switcher__label::before {
  content: "★ ";
  color: #fbbf24;
}
body.item-page .child-box-switcher__stock {
  font-size: 11px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.85);
  font-variant-numeric: tabular-nums;
}
body.item-page .child-box-switcher__chip.is-current .child-box-switcher__stock {
  color: #c4f4ff;
}
body.item-page .child-box-switcher__stamp {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
}

@media (min-width: 1100px) {
  body.item-page .child-box-switcher {
    margin: 0 0 18px;
  }
  body.item-page .child-box-switcher__inner {
    padding: 10px 16px;
    gap: 16px;
    border-radius: 16px;
  }
  body.item-page .child-box-switcher__chip {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c169i yifan-child-pools — fresh standalone child-box modal CSS.
   Lives in customer bundle (90-item-public-redesign.css) but is admin-only —
   loaded on /admin-game-probability via styles.css. Visual style mirrors
   legacy boxPoolModal (chip cards on dark cosmic gradient).
   See `.claude/skills/yifan-child-pools/SKILL.md`.
   ═════════════════════════════════════════════════════════════════════════ */
.cbm-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.cbm-modal.is-hidden { display: none; }
.cbm-submodal { z-index: 9100; }
.cbm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.cbm-modal__dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(28, 28, 50, 0.98), rgba(18, 19, 35, 0.99));
  border-radius: 22px;
  border: 1px solid rgba(78, 255, 195, 0.18);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.6);
  padding: 24px 28px;
}
.cbm-submodal__dialog { width: min(560px, 100%); }
.cbm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cbm-modal__close:hover { background: rgba(255, 255, 255, 0.16); }
.cbm-modal__header { margin: 0 0 14px; padding-right: 36px; }
.cbm-modal__header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #f1f5f9;
  letter-spacing: 0.04em;
}
.cbm-modal__subtitle, .cbm-modal__header p {
  margin: 0;
  color: rgba(203, 213, 225, 0.85);
  font-size: 13px;
  line-height: 1.5;
}
.cbm-modal__body { margin: 12px 0 18px; }
.cbm-modal__message {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #cbd5e1;
  font-size: 13px;
}
.cbm-modal__message[data-tone="success"] { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.cbm-modal__message[data-tone="error"] { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }

.cbm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0 0 12px;
}
.cbm-empty {
  padding: 24px;
  text-align: center;
  color: rgba(148, 163, 184, 0.7);
  font-size: 13px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 12px;
  border: 1px dashed rgba(118, 148, 193, 0.25);
}

.cbm-card {
  border-radius: 14px;
  border: 1px solid rgba(118, 148, 193, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(9, 15, 28, 0.55));
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cbm-card.is-inactive { opacity: 0.65; }
.cbm-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cbm-card__no { font-size: 15px; color: #f1f5f9; letter-spacing: 0.04em; }
.cbm-card__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #67e8f9;
}
.cbm-card__tag.is-parent {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}
.cbm-card__status {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  letter-spacing: 0.06em;
}
.cbm-card.is-inactive .cbm-card__status {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}
.cbm-card__body {
  font-size: 13px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cbm-card__name { font-weight: 600; }
.cbm-card__stock { color: rgba(148, 163, 184, 0.85); font-variant-numeric: tabular-nums; font-size: 12px; }
.cbm-card__tier-loading { color: rgba(148, 163, 184, 0.5); font-size: 11px; }
.cbm-card__tiers {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cbm-card__tier {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.5);
}
.cbm-card__tier--more {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  background: transparent;
  text-align: center;
  padding-top: 0;
}
.cbm-card__tier-name { color: #cbd5e1; }
.cbm-card__tier-count { color: #cbd5e1; font-variant-numeric: tabular-nums; }
.cbm-card__tier-count strong { color: #67e8f9; }
.cbm-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.cbm-card__btn { font-size: 11px !important; padding: 4px 10px !important; }
.cbm-card__btn--danger { color: #fca5a5 !important; border-color: rgba(239, 68, 68, 0.45) !important; }
.cbm-card__btn--danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fee2e2 !important;
}

.cbm-modal__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(118, 148, 193, 0.18);
  padding-top: 14px;
}
.cbm-modal__hint {
  margin: 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.75);
  line-height: 1.5;
}
.cbm-modal__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.cbm-count-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}
.cbm-count-select {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(118, 148, 193, 0.3);
  color: #f1f5f9;
  font-size: 13px;
}

.cbm-tier-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 280px;
  overflow-y: auto;
}
.cbm-tier-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(118, 148, 193, 0.18);
  cursor: pointer;
  font-size: 13px;
  color: #e2e8f0;
}
.cbm-tier-toggle:hover { border-color: rgba(56, 189, 248, 0.4); }
.cbm-tier-toggle--enable {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 600;
  margin-bottom: 6px;
}
.cbm-tier-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

body.cbm-open { overflow: hidden; }

/* c169 yifan-child-pools — 第 N 箱 chip in record table prize cell */
body.item-page .pool-record__box-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #67e8f9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
  white-space: nowrap;
}
body.item-page .pool-record__box-chip.is-parent {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

/* ② 即時中獎 ticker — 細一點，76 → 52 */
@media (min-width: 1100px) {
  body.item-page .item-winners-marquee {
    height: 52px;
    margin-top: 16px;
    border-radius: 14px;
  }
  body.item-page .item-winners-marquee__head {
    padding: 0 16px;
    gap: 8px;
  }
  body.item-page .item-winners-marquee__title {
    font-size: 13px;
  }
  body.item-page .item-winners-marquee__pulse {
    width: 8px;
    height: 8px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c168i (2026-05-01): tier-stock-cell 字體再大一階
   User: 「S賞 0/2 0.2% 這裡面的字體或許可以稍微大一點」
   c168c 已 bump label 12→14, count 12→16, prob 11.5→13。再加一階：
     label 14 → 17, count 16 → 19, prob 13 → 15.
   配合 min-height 64 → 76 + padding 14/14/12 → 16/14/14 容納大字體。
   ═════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1100px) {
  body.item-page .tier-stock-cell {
    padding: 16px 14px 14px;
    min-height: 76px;
    gap: 8px;
    font-size: 17px;
  }
  body.item-page .tier-stock-cell__label {
    font-size: 17px;
    letter-spacing: 0.08em;
  }
  body.item-page .tier-stock-cell__count {
    font-size: 19px;
  }
  body.item-page .tier-stock-cell__count em {
    font-size: 14px;
  }
  body.item-page .tier-stock-cell__prob {
    font-size: 15px;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   c168e (2026-05-01): Below-hero polish — title accent, winners ticker,
   pool tabs (獎品 / 榜單 / 記錄)
   Desktop only (>=1100px). Mobile keeps its existing styles.
   ═════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1100px) {
  /* Title — add cosmic underline accent + slight glow so 火影忍者系列…
     doesn't look lonely on a 1200 px wide card */
  body.item-page .iv2-hero__title {
    position: relative;
    text-align: center;
    padding-bottom: 14px;
    margin-bottom: 6px;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.18);
  }
  body.item-page .iv2-hero__title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 88px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg,
      rgba(56, 189, 248, 0) 0%,
      rgba(56, 189, 248, 0.85) 30%,
      rgba(168, 85, 247, 0.85) 70%,
      rgba(168, 85, 247, 0) 100%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  }

  /* Winners ticker — taller bar + bigger title text + bolder pulse */
  body.item-page .item-winners-marquee {
    height: 76px;
    margin-top: 22px;
    border-radius: 18px;
  }
  body.item-page .item-winners-marquee__head {
    padding: 0 22px;
    gap: 10px;
  }
  body.item-page .item-winners-marquee__title {
    font-size: 15px;
    letter-spacing: 0.08em;
  }
  body.item-page .item-winners-marquee__pulse {
    width: 10px;
    height: 10px;
  }

  /* Pool tabs (獎品 / 榜單 / 記錄) — bigger button targets, stronger
     active state, more breathing in the nav container */
  body.item-page .pool-tabs__nav {
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    margin-bottom: 22px;
  }
  body.item-page .pool-tabs__tab {
    gap: 8px;
    padding: 14px 30px;
    border-radius: 14px;
    font-size: 16px;
    min-width: 130px;
    letter-spacing: 0.08em;
  }
  body.item-page .pool-tabs__tab-icon {
    font-size: 18px;
  }
  body.item-page .pool-tabs__tab-icon img {
    width: 22px !important;
    height: 22px !important;
  }
  body.item-page .pool-tabs__tab.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(168, 85, 247, 0.32));
    color: #ffffff;
    box-shadow:
      0 6px 18px -4px rgba(56, 189, 248, 0.5),
      inset 0 0 0 1.5px rgba(56, 189, 248, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  }
}
