/* ==========================================================================
   LegendPC Official Website
   Light default · Dark night mode · Product Fluent palette (warm sand + 麦穗金)
   ========================================================================== */

:root,
html[data-theme="light"] {
  color-scheme: light;

  --bg-deep: #faf8f3;
  --bg-base: #f4f2eb;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --bg-hover: rgba(26, 24, 20, 0.04);
  --bg-surface-soft: rgba(26, 24, 20, 0.03);
  --bg-nav: rgba(250, 248, 243, 0.86);
  --bg-nav-mobile: rgba(250, 248, 243, 0.98);
  --bg-footer: rgba(244, 242, 235, 0.92);

  --text-primary: #1a1814;
  --text-secondary: #5c5648;
  --text-muted: #8a8270;

  --accent: #b87a0a;
  --accent-bright: #9a6608;
  --accent-deep: #9a6608;
  --accent-glow: rgba(184, 122, 10, 0.22);
  --accent-soft: rgba(184, 122, 10, 0.12);
  --accent-rgb: 184, 122, 10;

  --border: rgba(26, 24, 20, 0.08);
  --border-strong: rgba(26, 24, 20, 0.12);
  --glass: rgba(255, 255, 255, 0.86);

  --grid-line: rgba(26, 24, 20, 0.05);
  --bg-gradient-end: #ebe6db;
  /* Preview mock — same product palette */
  --preview-frame-bg: #f4f2eb;
  --preview-chrome: #faf8f3;
  --preview-item: rgba(26, 24, 20, 0.06);
  --preview-border: rgba(26, 24, 20, 0.08);
  --preview-text: #1a1814;
  --preview-text-secondary: #5c5648;
  --preview-text-muted: #8a8270;
  --preview-accent: #b87a0a;
  --preview-accent-rgb: 184, 122, 10;
  --preview-accent-text: #ffffff;
  --preview-card: #ffffff;
  --preview-secondary: #faf8f3;
  --preview-tertiary: #ebe6db;
  --preview-hero-bar: linear-gradient(90deg, #e8b018, #b87a0a);
  --preview-shadow: 0 2px 4px rgba(26, 24, 20, 0.05), 0 0 2px rgba(26, 24, 20, 0.06);
  --btn-primary-text: #ffffff;
  --btn-primary-bg: #b87a0a;
  --btn-primary-bg-hover: #9a6608;
  --btn-primary-shadow: 0 1px 2px rgba(26, 24, 20, 0.06), 0 4px 14px rgba(184, 122, 10, 0.24);
  --btn-primary-shadow-hover: 0 2px 6px rgba(26, 24, 20, 0.08), 0 8px 22px rgba(184, 122, 10, 0.3);
  --btn-ghost-bg: rgba(255, 255, 255, 0.72);
  --btn-ghost-hover: #ffffff;
  --btn-ghost-border: rgba(26, 24, 20, 0.1);
  --btn-ghost-border-hover: rgba(184, 122, 10, 0.4);
  --btn-secondary-bg: rgba(184, 122, 10, 0.1);
  --btn-secondary-bg-hover: rgba(184, 122, 10, 0.16);
  --btn-secondary-border: rgba(184, 122, 10, 0.22);
  --btn-secondary-text: #9a6608;
  --btn-radius: 12px;
  --stat-value-from: #1a1814;
  --particle-rgb: 184, 122, 10;
  --theme-icon-sun: none;
  --theme-icon-moon: block;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 10px rgba(26, 24, 20, 0.06);
  --shadow: 0 16px 40px rgba(26, 24, 20, 0.08);
  --shadow-glow: 0 0 50px rgba(184, 122, 10, 0.1);

  --font: "Inter", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --nav-h: 72px;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-deep: #121612;
  --bg-base: #1a1f1b;
  --bg-elevated: #222822;
  --bg-card: rgba(38, 45, 39, 0.78);
  --bg-card-solid: #262d27;
  --bg-hover: rgba(245, 242, 232, 0.06);
  --bg-surface-soft: rgba(245, 242, 232, 0.035);
  --bg-nav: rgba(21, 26, 22, 0.86);
  --bg-nav-mobile: rgba(21, 26, 22, 0.98);
  --bg-footer: rgba(0, 0, 0, 0.28);

  --text-primary: #f5f2e8;
  --text-secondary: rgba(245, 242, 232, 0.78);
  --text-muted: rgba(245, 242, 232, 0.52);

  --accent: #e8b018;
  --accent-bright: #f0c440;
  --accent-deep: #e8b018;
  --accent-glow: rgba(232, 176, 24, 0.28);
  --accent-soft: rgba(232, 176, 24, 0.14);
  --accent-rgb: 232, 176, 24;

  --border: rgba(245, 242, 232, 0.08);
  --border-strong: rgba(245, 242, 232, 0.14);
  --glass: rgba(26, 31, 27, 0.72);

  --grid-line: rgba(245, 242, 232, 0.04);
  --bg-gradient-end: #151a16;
  --preview-frame-bg: #1a1f1b;
  --preview-chrome: #151a16;
  --preview-item: rgba(245, 242, 232, 0.08);
  --preview-border: rgba(245, 242, 232, 0.08);
  --preview-text: #f5f2e8;
  --preview-text-secondary: rgba(245, 242, 232, 0.78);
  --preview-text-muted: rgba(245, 242, 232, 0.52);
  --preview-accent: #e8b018;
  --preview-accent-rgb: 232, 176, 24;
  --preview-accent-text: #1a1408;
  --preview-card: #262d27;
  --preview-secondary: #151a16;
  --preview-tertiary: #252c26;
  --preview-hero-bar: linear-gradient(90deg, #f0c440, #e8b018);
  --preview-shadow: 0 2px 4px rgba(0, 0, 0, 0.32), 0 0 2px rgba(0, 0, 0, 0.24);
  --btn-primary-text: #1a1408;
  --btn-primary-bg: linear-gradient(180deg, #f0c440 0%, #e8b018 100%);
  --btn-primary-bg-hover: linear-gradient(180deg, #f5d060 0%, #f0c440 100%);
  --btn-primary-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(232, 176, 24, 0.28);
  --btn-primary-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(232, 176, 24, 0.36);
  --btn-ghost-bg: rgba(245, 242, 232, 0.05);
  --btn-ghost-hover: rgba(245, 242, 232, 0.09);
  --btn-ghost-border: rgba(245, 242, 232, 0.12);
  --btn-ghost-border-hover: rgba(232, 176, 24, 0.45);
  --btn-secondary-bg: rgba(232, 176, 24, 0.12);
  --btn-secondary-bg-hover: rgba(232, 176, 24, 0.2);
  --btn-secondary-border: rgba(232, 176, 24, 0.28);
  --btn-secondary-text: #f0c440;
  --btn-radius: 12px;
  --stat-value-from: #ffffff;
  --particle-rgb: 232, 176, 24;
  --theme-icon-sun: block;
  --theme-icon-moon: none;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.42);
  --shadow-glow: 0 0 60px rgba(232, 176, 24, 0.12);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--accent-bright);
  background: var(--accent-soft);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* Background layers */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(184, 122, 10, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(184, 122, 10, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(232, 176, 24, 0.05), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 40%, var(--bg-gradient-end) 100%);
  transition: background 0.3s var(--ease);
}

html[data-theme="dark"] .bg-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 176, 24, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(184, 122, 10, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(240, 196, 64, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 40%, var(--bg-gradient-end) 100%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.bg-glow-1 {
  width: 480px;
  height: 480px;
  top: 10%;
  right: -5%;
  background: rgba(232, 176, 24, 0.2);
  animation: floatGlow 14s ease-in-out infinite;
}

.bg-glow-2 {
  width: 360px;
  height: 360px;
  bottom: 15%;
  left: -8%;
  background: rgba(240, 196, 64, 0.12);
  animation: floatGlow 18s ease-in-out infinite reverse;
}

.bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.08); }
}

/* Typography helpers */
.text-gradient {
  background: linear-gradient(135deg, #e8b018 0%, var(--accent) 45%, #9a6608 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #f5d060 0%, var(--accent) 45%, #e8b018 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Buttons — Fluent-inspired, product gold, card-aligned radius */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  border-radius: var(--btn-radius);
  transition:
    transform 0.22s var(--ease),
    background 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease),
    color 0.22s var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-1px); }
.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 10px;
  min-height: 36px;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 0.975rem;
  border-radius: 14px;
  min-height: 52px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: transparent;
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  box-shadow: var(--btn-primary-shadow-hover);
  color: var(--btn-primary-text);
}

.btn-primary:active {
  box-shadow: 0 1px 3px rgba(15, 26, 24, 0.12);
}

.btn-ghost {
  background: var(--btn-ghost-bg);
  border-color: var(--btn-ghost-border);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(15, 26, 24, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--btn-ghost-hover);
  border-color: var(--btn-ghost-border-hover);
  color: var(--accent-bright);
  box-shadow: 0 2px 10px rgba(184, 122, 10, 0.1);
}

html[data-theme="dark"] .btn-ghost {
  box-shadow: none;
}

html[data-theme="dark"] .btn-ghost:hover {
  box-shadow: 0 0 0 1px rgba(240, 196, 64, 0.08);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--btn-secondary-bg-hover);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
  box-shadow: 0 2px 10px rgba(184, 122, 10, 0.12);
}

.btn-disabled,
.btn-disabled:hover {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.15);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
  overflow: visible;
}

.nav.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--border);
}

/* backdrop-filter creates a containing block for position:fixed children —
   disable it while the mobile menu is open so the drawer can fill the viewport */
body.nav-open .nav,
body.nav-open .nav.scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-bottom-color: transparent;
  overflow: visible;
  /* expand header so fixed drawer isn't clipped by 60px bar height */
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
}

body.nav-open .nav-inner,
body.nav-open .nav-links,
body.nav-open .nav-toggle,
body.nav-open .theme-toggle,
body.nav-open .nav-brand {
  pointer-events: auto;
}

body.nav-open .nav-inner {
  height: var(--nav-h);
  background: var(--bg-nav-mobile);
  border-bottom: 1px solid var(--border);
  max-width: none;
  width: 100%;
}

/* Theme toggle — matches ghost control language */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--btn-ghost-border);
  background: var(--btn-ghost-bg);
  color: var(--text-secondary);
  margin-left: 12px;
  box-shadow: 0 1px 2px rgba(15, 26, 24, 0.04);
  transition:
    background 0.22s var(--ease),
    border-color 0.22s var(--ease),
    transform 0.22s var(--ease),
    color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--btn-ghost-hover);
  border-color: var(--btn-ghost-border-hover);
  color: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(184, 122, 10, 0.1);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.96);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: var(--theme-icon-sun); }
.theme-toggle .icon-moon { display: var(--theme-icon-moon); }

.nav-inner {
  max-width: calc(var(--container) + 48px);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-name-accent { color: var(--accent-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links a {
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
  }
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-github {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
  transform-origin: center;
}

/* Hero */
.hero {
  max-width: calc(var(--container) + 48px);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) 24px 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: min(100vh, 900px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(232, 176, 24, 0.25);
  color: var(--accent-bright);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(240, 196, 64, 0.25);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(240, 196, 64, 0.25); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(240, 196, 64, 0.1); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.meta-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Product preview — mirrors LegendPC Fluent shell + home */
.hero-visual {
  position: relative;
  perspective: 1200px;
}

.preview-frame {
  background: var(--preview-frame-bg);
  color: var(--preview-text);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(184, 122, 10, 0.06);
  overflow: hidden;
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 0.5s var(--ease);
  font-family: "Segoe UI Variable", "Segoe UI", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

.hero-visual:hover .preview-frame {
  transform: rotateY(-2deg) rotateX(1deg);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 0 0 12px;
  background: var(--preview-chrome);
  border-bottom: 1px solid var(--preview-border);
}

.preview-titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.preview-app-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.preview-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--preview-text-secondary);
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
}

.preview-win-controls {
  display: flex;
  height: 100%;
}

.preview-win-btn {
  width: 42px;
  height: 100%;
  position: relative;
}

.preview-win-btn::before,
.preview-win-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--preview-text-muted);
}

.preview-win-btn:first-child::before {
  width: 10px;
  height: 1.2px;
  transform: translate(-50%, -50%);
}

.preview-win-btn:nth-child(2)::before {
  width: 8px;
  height: 8px;
  border: 1.2px solid var(--preview-text-muted);
  background: transparent;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

.preview-win-btn.close::before,
.preview-win-btn.close::after {
  width: 10px;
  height: 1.2px;
}

.preview-win-btn.close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.preview-win-btn.close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.preview-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 360px;
  background: var(--preview-frame-bg);
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--preview-chrome);
  border-right: 1px solid var(--preview-border);
}

.ps-item {
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  color: var(--preview-text-secondary);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
}

.ps-item svg {
  width: 20px;
  height: 20px;
  padding: 6px;
  box-sizing: content-box;
  border-radius: 10px;
  background: transparent;
  color: var(--preview-text-secondary);
}

.ps-item span {
  opacity: 0.9;
}

.ps-item.active {
  color: var(--preview-accent);
}

.ps-item.active svg {
  background: rgba(var(--preview-accent-rgb), 0.14);
  color: var(--preview-accent);
  box-shadow: 0 0 0 1px rgba(var(--preview-accent-rgb), 0.28);
}

.preview-main {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--preview-frame-bg);
}

/* Fluent home hero inside preview
   Uses container queries so the launch row adapts to the mock window
   width (always ~300–500px), not the viewport. */
.pv-home-hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px;
  background: var(--preview-card);
  border: 1px solid var(--preview-border);
  border-radius: 12px;
  box-shadow: var(--preview-shadow);
  overflow: hidden;
  container-type: inline-size;
  container-name: pv-home;
}

.pv-home-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--preview-hero-bar);
  pointer-events: none;
}

.pv-home-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pv-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--preview-accent);
}

.pv-home-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--preview-text);
}

.pv-home-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--preview-text-secondary);
  line-height: 1.45;
  max-width: 280px;
}

/* Launch row inside the mock window.
   The mock is always ~300–500px wide (even on large desktops), so a rigid
   3-column grid used to collapse .pv-version. Use a wrapping flex layout:
   account + version share the first line; play wraps when needed. */
.pv-launch-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px;
  background: var(--preview-secondary);
  border: 1px solid var(--preview-border);
  border-radius: 10px;
  min-width: 0;
}

.pv-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 9rem;
}

.pv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--preview-tertiary);
  border: 1px solid var(--preview-border);
  flex-shrink: 0;
  box-shadow: var(--preview-shadow);
}

.pv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-account-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-account-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--preview-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-account-type {
  font-size: 11px;
  color: var(--preview-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-version {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Grow to claim free space; never shrink below readable text width */
  flex: 1 1 8.5rem;
  min-width: 8.5rem;
  width: auto;
  min-height: 48px;
  padding: 8px 10px;
  background: var(--preview-card);
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  box-shadow: var(--preview-shadow);
  overflow: hidden;
}

.pv-ver-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, rgba(var(--preview-accent-rgb), 0.28), rgba(var(--preview-accent-rgb), 0.06)),
    var(--preview-tertiary);
  position: relative;
}

.pv-ver-icon::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: linear-gradient(145deg, #e8b018, var(--preview-accent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pv-ver-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.pv-ver-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--preview-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-ver-loader {
  font-size: 11px;
  color: var(--preview-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-chevron {
  width: 14px;
  height: 14px;
  color: var(--preview-text-muted);
  flex-shrink: 0;
}

.pv-launch-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.preview-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--preview-accent);
  color: var(--preview-accent-text);
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(var(--preview-accent-rgb), 0.28);
  pointer-events: none;
  white-space: nowrap;
}

/* Narrow mock window (desktop side panel / tablet): stack so version is full-width */
@container pv-home (max-width: 380px) {
  .pv-account {
    flex: 1 1 auto;
    max-width: none;
  }

  .pv-version {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    min-height: 44px;
  }

  .pv-launch-actions {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .preview-play {
    width: 100%;
    justify-content: center;
  }
}

/* Mid mock width: keep one row, free space for version text */
@container pv-home (min-width: 381px) and (max-width: 460px) {
  .pv-account {
    max-width: 7rem;
  }

  .pv-account-type {
    display: none;
  }

  .pv-version {
    min-width: 7.5rem;
  }

  .preview-play {
    padding: 10px 12px;
    font-size: 12px;
  }

  .pv-ver-name {
    font-size: 12px;
  }
}

.preview-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  animation: floatCard 6s ease-in-out infinite;
}

.preview-float strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.preview-float span:not(.float-icon) {
  color: var(--text-muted);
}

.float-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.float-1 {
  top: 12%;
  left: -8%;
}

.float-2 {
  bottom: 16%;
  right: -6%;
  animation-delay: -3s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-soft);
}

.stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--stat-value-from), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px 24px;
}

.section-alt {
  max-width: none;
  padding: 96px 24px;
  background:
    linear-gradient(180deg, transparent, rgba(184, 122, 10, 0.05), transparent),
    var(--bg-surface-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-alt .section-head,
.section-alt .experience-grid {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 176, 24, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(232, 176, 24, 0.08);
}

.feature-card-lg {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(232, 176, 24, 0.1), transparent 55%),
    var(--bg-card);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  margin-bottom: 18px;
  border: 1px solid rgba(232, 176, 24, 0.2);
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.feature-tags span {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-bright);
  background: rgba(232, 176, 24, 0.1);
  border: 1px solid rgba(232, 176, 24, 0.2);
  border-radius: 999px;
}

/* Experience */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.exp-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.exp-card:hover {
  border-color: rgba(232, 176, 24, 0.3);
  transform: translateY(-3px);
}

.exp-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.exp-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.exp-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.exp-card strong { color: var(--text-primary); }

/* Platforms */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.platform-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.platform-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 176, 24, 0.3);
  box-shadow: var(--shadow-sm);
}

.platform-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(232, 176, 24, 0.15), rgba(232, 176, 24, 0.04));
  color: var(--accent-bright);
  border: 1px solid rgba(232, 176, 24, 0.2);
}

.platform-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.platform-req {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 22px;
}

/* Download */
.download-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.download-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  padding: 48px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(232, 176, 24, 0.12), transparent 50%),
    linear-gradient(225deg, rgba(184, 122, 10, 0.08), transparent 45%),
    var(--bg-elevated);
  border: 1px solid rgba(232, 176, 24, 0.25);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.download-copy .section-title { margin-bottom: 8px; }
.download-copy .section-desc { margin-bottom: 24px; text-align: left; }
.download-copy .section-head { text-align: left; }
.download-copy .section-tag { display: block; }

.download-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.download-list svg {
  flex-shrink: 0;
  color: var(--accent-bright);
}

.download-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.download-main {
  width: 100%;
  justify-content: flex-start;
  padding: 1.05rem 1.25rem;
  border-radius: 14px;
  text-align: left;
  min-height: 64px;
}

.download-main span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.download-main strong { font-size: 1.05rem; font-weight: 700; }
.download-main small {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.78;
}

/* 夸克网盘：次主按钮，与城通并列但不抢主色 */
.download-main-quark {
  background: var(--bg-elevated);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.download-main-quark:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.12);
}

html[data-theme="dark"] .download-main-quark {
  background: rgba(245, 242, 232, 0.05);
  border-color: rgba(232, 176, 24, 0.28);
  color: var(--text-primary);
}

html[data-theme="dark"] .download-main-quark:hover {
  background: rgba(232, 176, 24, 0.12);
  border-color: rgba(232, 176, 24, 0.45);
  color: #f0c440;
}

.platform-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.platform-download-links .btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.download-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.download-secondary .btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
}

/* Nav download CTA — prominent but on-theme */
.nav-cta {
  margin-left: 8px;
  flex-shrink: 0;
  gap: 0.4rem;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 40px;
  border-radius: 12px;
  box-shadow: var(--btn-primary-shadow);
}

.nav-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-cta:hover {
  transform: translateY(-1px);
}

.download-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.download-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.download-code-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}

html[data-theme="dark"] .download-code-item {
  background: rgba(232, 176, 24, 0.08);
  border-color: rgba(232, 176, 24, 0.2);
}

.download-code-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.download-code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
  user-select: all;
}

.platform-code-hint {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.platform-code-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--accent-bright);
  user-select: all;
}

@media (max-width: 520px) {
  .download-codes {
    grid-template-columns: 1fr;
  }
}

/* CTA band */
.cta-band {
  padding: 80px 24px 48px;
  text-align: center;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

/* Feedback invite — soft, sincere, a little cute */
.feedback-invite {
  max-width: var(--container);
  margin: 0 auto 72px;
  padding: 0 24px;
}

.feedback-invite-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px 24px;
  align-items: center;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.09), transparent 55%),
    linear-gradient(225deg, rgba(232, 176, 24, 0.06), transparent 50%),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.feedback-invite-emoji {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 1.65rem;
  line-height: 1;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  flex-shrink: 0;
}

.feedback-invite-copy h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.feedback-invite-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 52ch;
}

.feedback-channel {
  margin-top: 12px !important;
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
}

.feedback-channel code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.92em;
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 6px;
  padding: 0.1em 0.45em;
  user-select: all;
}

.feedback-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.feedback-invite-actions .btn {
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
}

.feedback-invite-actions .btn-community {
  gap: 0.45rem;
  box-shadow: var(--btn-primary-shadow);
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  border: none;
}

.feedback-invite-actions .btn-community svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.feedback-invite-actions .btn-community:hover {
  transform: translateY(-1px);
}

.feedback-invite-actions .btn-ghost {
  background: var(--bg-elevated);
}

body[data-page="download"] .feedback-invite,
body[data-page="about"] .feedback-invite {
  margin-top: 8px;
  margin-bottom: 48px;
}

body[data-page="about"] .page-cta {
  padding-top: 8px;
}

/* Community page */
.community-page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px 72px;
}

.community-card {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 32px 28px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.1), transparent 48%),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

html[data-theme="dark"] .community-card {
  background:
    linear-gradient(160deg, rgba(232, 176, 24, 0.1), transparent 48%),
    var(--bg-card);
  border-color: rgba(232, 176, 24, 0.22);
}

.community-card-head {
  margin-bottom: 8px;
}

.community-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  margin-bottom: 12px;
}

.community-card-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.community-card-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.community-qr-wrap {
  margin: 22px auto 16px;
  width: min(100%, 280px);
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), var(--shadow-sm);
}

html[data-theme="dark"] .community-qr-wrap {
  background: #f7f4ec;
  border-color: rgba(232, 176, 24, 0.22);
}

.community-qr {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 10px;
}

.community-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  width: fit-content;
  max-width: 100%;
}

.community-meta-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.community-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  user-select: all;
}

.community-hint {
  margin: 0 0 20px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.community-hint strong {
  color: var(--accent-bright);
  font-weight: 700;
}

.community-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.community-actions .btn,
.community-secondary .btn {
  min-height: 46px;
  width: 100%;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
}

.community-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.community-secondary .btn-ghost {
  background: var(--bg-elevated);
}

body[data-page="community"] .page-hero {
  padding-bottom: 12px;
}

@media (max-width: 900px) {
  .feedback-invite-inner {
    grid-template-columns: auto 1fr;
    padding: 24px;
  }

  .feedback-invite-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .feedback-invite {
    margin-bottom: 48px;
    padding: 0 16px;
  }

  .feedback-invite-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 16px;
  }

  .feedback-invite-emoji {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .feedback-invite-copy p {
    font-size: 0.9rem;
    max-width: none;
  }

  .feedback-channel {
    font-size: 0.84rem !important;
  }

  .feedback-invite-actions {
    flex-direction: column;
    width: 100%;
  }

  .feedback-invite-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    white-space: normal;
    text-align: center;
  }

  .community-page {
    padding: 0 16px 56px;
  }

  .community-card {
    padding: 24px 16px 20px;
    border-radius: 22px;
  }

  .community-qr-wrap {
    width: min(100%, 240px);
    padding: 12px;
  }

  .community-actions,
  .community-secondary {
    grid-template-columns: 1fr;
  }

  .community-actions .btn,
  .community-secondary .btn {
    min-height: 48px;
  }
}

@media (max-width: 360px) {
  .community-qr-wrap {
    width: min(100%, 200px);
    padding: 10px;
  }

  .community-code {
    font-size: 1rem;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-footer);
  padding: 48px 24px 36px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand strong {
  display: block;
  font-size: 1rem;
}

.footer-brand span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-bright); }

.footer-copy {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-made { margin-top: 6px; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 40px);
    gap: 40px;
  }

  .hero-visual {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .preview-frame {
    transform: none;
  }

  .hero-visual:hover .preview-frame {
    transform: none;
  }

  .float-1 { left: -4%; }
  .float-2 { right: -4%; }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-lg { grid-column: span 2; }

  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-panel {
    grid-template-columns: 1fr;
    padding: 36px;
  }
}

/* Tablet & phone */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
    --btn-radius: 12px;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
  }

  /* Scroll-lock via fixed body (preserves position; avoids iOS fixed-menu bugs) */
  body.nav-open-fixed {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
  }

  .nav-inner {
    padding: 0 14px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    gap: 10px;
    position: relative;
    overflow: visible;
  }

  .nav-brand {
    font-size: 1.05rem;
    min-width: 0;
  }

  .nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  /* Mobile drawer — use dvh height (not bottom:0 under backdrop-filter parents) */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-nav-mobile);
    /* no backdrop-filter here — parent .nav may already stack; blur broke fixed layout after scroll */
    border-bottom: none;
    box-shadow: 0 16px 40px rgba(15, 26, 24, 0.12);
    transform: translate3d(0, -12px, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.28s var(--ease),
      opacity 0.28s var(--ease),
      visibility 0.28s;
    margin-left: 0;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 101;
  }

  .nav-links.open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open .nav {
    z-index: 200;
  }

  .nav-links a {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .nav-links a.active {
    background: var(--accent-soft);
  }

  /* Mobile-only download entry inside menu */
  .nav-links .nav-mobile-download {
    display: flex !important;
    margin-top: 12px;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text) !important;
    border: none;
    box-shadow: var(--btn-primary-shadow);
    font-weight: 600;
  }

  .nav-links .nav-mobile-download:hover {
    color: var(--btn-primary-text) !important;
    background: var(--btn-primary-bg-hover);
  }

  .nav-cta {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-toggle {
    display: flex;
    margin-left: 6px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--btn-ghost-border);
    background: var(--btn-ghost-bg);
  }

  .nav-toggle span {
    transition: transform 0.25s var(--ease), opacity 0.2s;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hero */
  .hero {
    padding: calc(var(--nav-h) + 28px) 16px 40px;
    gap: 28px;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    margin-bottom: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 1.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 1.15rem;
  }

  .meta-divider { display: none; }

  .meta-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border);
  }

  .preview-float { display: none; }

  .preview-frame {
    transform: none;
    border-radius: 14px;
  }

  .hero-visual:hover .preview-frame {
    transform: none;
  }

  .preview-body {
    min-height: 300px;
    grid-template-columns: 56px 1fr;
  }

  .preview-sidebar {
    padding: 10px 4px;
    gap: 4px;
  }

  .ps-item {
    width: 48px;
    padding: 6px 2px 4px;
    font-size: 9px;
  }

  .ps-item svg {
    width: 18px;
    height: 18px;
    padding: 5px;
  }

  .preview-main {
    padding: 12px;
    min-width: 0;
  }

  .pv-home-hero {
    padding: 16px 14px;
    gap: 14px;
  }

  .pv-home-title {
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .pv-home-desc {
    font-size: 12px;
    max-width: none;
  }

  /* Phone: force stacked launch card so version is always fully visible & scales with screen */
  .pv-launch-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .pv-account {
    max-width: none;
    flex: 0 0 auto;
  }

  .pv-avatar {
    width: clamp(32px, 9vw, 40px);
    height: clamp(32px, 9vw, 40px);
    border-radius: 9px;
  }

  .pv-account-name {
    font-size: clamp(12px, 3.4vw, 13px);
  }

  .pv-account-type {
    font-size: clamp(10px, 2.8vw, 11px);
  }

  .pv-version {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    gap: 8px;
    padding: 8px 10px;
  }

  .pv-ver-icon {
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
  }

  .pv-ver-icon::after {
    inset: clamp(6px, 1.8vw, 8px);
  }

  .pv-ver-name {
    font-size: clamp(12px, 3.4vw, 13px);
  }

  .pv-ver-loader {
    font-size: clamp(10px, 2.8vw, 11px);
  }

  .pv-launch-actions {
    margin-left: 0;
    justify-content: stretch;
    width: 100%;
  }

  .preview-play {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: clamp(12px, 3.4vw, 13px);
  }

  /* Stats */
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 28px 16px;
  }

  .stat {
    padding: 14px 10px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Sections & grids */
  .section {
    padding: 56px 16px;
  }

  .section-alt {
    padding: 56px 16px;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
  }

  .section-desc {
    font-size: 0.95rem;
  }

  .feature-grid,
  .platform-grid,
  .experience-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card-lg {
    grid-column: span 1;
  }

  .feature-card,
  .exp-card,
  .platform-card {
    padding: 22px 18px;
  }

  .platform-card {
    padding: 28px 18px;
  }

  .platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .download-panel {
    padding: 22px 16px;
    gap: 24px;
    border-radius: var(--radius-lg);
  }

  .download-secondary {
    flex-direction: column;
  }

  .download-secondary .btn,
  .download-main {
    width: 100%;
    min-height: 48px;
  }

  .download-main {
    min-height: 60px;
  }

  .cta-band {
    padding: 56px 16px 72px;
  }

  .cta-inner h2 {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  .cta-inner .btn {
    width: 100%;
    max-width: 320px;
    min-height: 48px;
  }

  .footer {
    padding: 36px 16px calc(28px + env(safe-area-inset-bottom));
  }

  .footer-links {
    gap: 10px 16px;
  }

  .footer-links a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  /* Multi-page mobile */
  .page-hero {
    padding: 36px 16px 20px;
  }

  .page-main {
    min-height: calc(100vh - 160px);
  }

  .feature-detail-grid,
  .about-grid,
  .req-table-wrap,
  .changelog,
  .page-cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .feature-detail {
    padding: 20px;
    gap: 14px;
  }

  .about-card {
    padding: 20px;
  }

  .req-table th,
  .req-table td {
    padding: 12px;
    font-size: 0.88rem;
  }

  .btn-lg {
    padding: 0.85rem 1.25rem;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .btn-sm {
    min-height: 40px;
  }

  .bg-glow-1 {
    width: 280px;
    height: 280px;
    opacity: 0.35;
  }

  .bg-glow-2 {
    width: 220px;
    height: 220px;
    opacity: 0.3;
  }

  .bg-particles {
    opacity: 0.35;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .nav-name {
    font-size: 0.98rem;
  }

  .stats-inner {
    gap: 10px;
  }

  .stat {
    padding: 12px 8px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .preview-body {
    grid-template-columns: 1fr;
    min-height: 260px;
  }

  .preview-sidebar {
    display: none;
  }

  .pv-home-hero {
    padding: 14px 12px;
    gap: 12px;
  }

  .pv-home-title {
    font-size: clamp(14px, 4.5vw, 16px);
  }

  .pv-kicker {
    font-size: 10px;
  }

  .pv-launch-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .pv-version {
    min-height: 40px;
    padding: 6px 8px;
  }
}

/* Landscape phones */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--nav-h) + 16px);
    padding-bottom: 24px;
  }

  .hero-visual {
    display: none;
  }

  .nav-links {
    padding-top: 8px;
  }
}

/* ==========================================================================
   Multi-page layout
   ========================================================================== */

.nav-links a.active {
  color: var(--accent-bright);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Desktop: hide mobile-only menu download */
.nav-mobile-download {
  display: none !important;
}

@media (max-width: 768px) {
  .nav-mobile-download {
    display: flex !important;
  }
}

.page-main {
  padding-top: var(--nav-h);
  min-height: calc(100vh - 200px);
}

.page-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

.page-hero .section-tag {
  display: inline-block;
}

.page-hero .section-title {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero .section-desc {
  max-width: 560px;
  margin: 0 auto;
}

.home-feature-preview {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.home-feature-preview .feature-grid {
  margin-bottom: 32px;
}

.home-more {
  text-align: center;
}

.feature-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.feature-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.feature-detail:hover {
  border-color: rgba(184, 122, 10, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.feature-detail .feature-icon {
  margin-bottom: 0;
}

.feature-detail h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.feature-detail p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.feature-detail ul {
  margin-top: 12px;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.feature-detail li::marker {
  color: var(--accent);
}

.req-table-wrap {
  max-width: var(--container);
  margin: 0 auto 72px;
  padding: 0 24px;
  overflow-x: auto;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.95rem;
}

.req-table th,
.req-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.req-table th {
  background: var(--bg-surface-soft);
  font-weight: 600;
  color: var(--text-primary);
}

.req-table tr:last-child td {
  border-bottom: none;
}

.req-table td {
  color: var(--text-secondary);
}

.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 72px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.about-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-card p,
.about-card li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-card ul {
  padding-left: 1.15rem;
}

.about-card a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.changelog {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.changelog-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.changelog-item:first-child {
  padding-top: 0;
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.changelog-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.changelog-item ul {
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.page-cta {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 80px;
  text-align: center;
}

.page-cta p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .feature-detail {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   3D Skin Doll — marketing showcase + shared viewer chrome
   ========================================================================== */

.feature-card-highlight {
  position: relative;
  border-color: rgba(var(--accent-rgb), 0.28);
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), transparent 55%),
    var(--bg-card);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.08);
}

.feature-badge,
.feature-inline-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--btn-primary-text);
  background: var(--accent);
}

.feature-badge-row {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.feature-badge-origin,
.feature-inline-badge.feature-badge-origin {
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: none;
}

.section-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.section-tag-row .section-tag {
  margin-bottom: 0;
}

.section-tag-origin {
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
}

.feature-icon-accent {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.feature-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
}

.feature-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feature-detail-highlight {
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), transparent 50%),
    var(--bg-card);
}

.feature-inline-badge {
  margin-left: 8px;
  vertical-align: middle;
}

.section-skin-doll {
  position: relative;
}

.skin-showcase {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 16px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.1fr;
  gap: 28px;
  align-items: stretch;
}

.skin-showcase-stage {
  position: relative;
  min-height: 380px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 55% at 50% 78%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg-base));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* Full-body sits near the floor; half-body is centered mid-frame */
.skin-showcase-stage:has(.skin-doll.is-full-body) {
  align-items: flex-end;
}

.skin-showcase-stage:has(.skin-doll.is-half-body) {
  align-items: center;
}

.skin-showcase-glow {
  position: absolute;
  inset: auto 18% 18% 18%;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.skin-showcase-floor {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(26, 24, 20, 0.14), transparent 70%);
  pointer-events: none;
}

html[data-theme="dark"] .skin-showcase-floor {
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%);
}

.skin-showcase-canvas-host {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 360px;
  pointer-events: none;
}

.skin-showcase-canvas-host:has(.skin-doll.is-full-body) {
  align-items: flex-end;
}

.skin-showcase-canvas-host:has(.skin-doll.is-half-body) {
  align-items: center;
}

.skin-showcase-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 4px 8px 0;
}

.skin-showcase-copy h3 {
  font-size: 1.25rem;
  font-weight: 750;
  margin-bottom: 8px;
}

.skin-showcase-origin-note {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--accent-bright);
  font-weight: 600;
}

.skin-showcase-origin-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

html[data-theme="dark"] .skin-showcase-origin-chip {
  color: #f0d08a;
  background: rgba(20, 22, 18, 0.72);
  border-color: rgba(232, 176, 24, 0.28);
}

.skin-showcase-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skin-showcase-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.skin-showcase-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.skin-showcase-list strong {
  color: var(--text-primary);
  font-weight: 650;
}

.skin-showcase-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.skin-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skin-ctrl-group.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.skin-ctrl-label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.skin-ctrl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skin-ctrl-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.skin-ctrl-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--text-primary);
}

.skin-ctrl-btn.active {
  color: var(--btn-primary-text);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.24);
}

.skin-showcase-hint {
  margin: 2px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.skin-showcase-hint a {
  color: var(--accent-bright);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.28);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.skin-showcase-hint a:hover {
  color: var(--accent);
  border-bottom-color: rgba(var(--accent-rgb), 0.55);
}

.skin-showcase-fallback {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.feature-detail-links {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-detail-links a {
  color: var(--accent-bright);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
}

.feature-detail-links a:hover {
  border-bottom-color: rgba(var(--accent-rgb), 0.55);
}

.feature-detail-sep {
  margin: 0 8px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Shared skin-doll chrome (showcase + demo corner) */
.skin-doll {
  position: relative;
  width: 168px;
  height: 220px;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.skin-doll.is-full-body {
  width: 168px;
  height: 260px;
  border-radius: 12px;
}

.skin-doll.is-half-body {
  width: 168px;
  height: 220px;
  border-radius: 14px 14px 0 0;
}

.skin-doll-showcase {
  width: 220px !important;
  height: 320px !important;
  border-radius: 0;
  margin-bottom: 8px;
}

.skin-doll-showcase.is-half-body {
  /* Wider/taller canvas so enlarged half-body stays fully visible mid-frame */
  width: 250px !important;
  height: 290px !important;
  border-radius: 18px;
  margin-bottom: 0;
  overflow: visible;
}

.skin-doll-showcase.is-half-body .skin-doll-drag,
.skin-doll-showcase.is-half-body .skin-doll-canvas {
  overflow: visible;
}

.skin-doll-drag,
.skin-doll-canvas {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  position: relative;
}

.skin-doll-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  pointer-events: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

@media (max-width: 960px) {
  .skin-showcase {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .skin-showcase-stage {
    min-height: 340px;
  }

  .skin-showcase-canvas-host {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .skin-showcase {
    padding: 0 16px 8px;
  }

  .skin-showcase-stage {
    min-height: 300px;
  }

  .skin-doll-showcase {
    width: 180px !important;
    height: 270px !important;
  }

  .skin-doll-showcase.is-half-body {
    width: 210px !important;
    height: 250px !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bg-glow,
  .preview-float,
  .badge-dot {
    animation: none;
  }
}
