/* ==========================================================================
 * Wallpaper++ Official Website — Flagship Minimal Liquid Glass Design System
 * 1:1 faithful to Wallpaper++ v1.0.0 UI components, tokens, radii & springs
 * ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Segoe UI Variable Display', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', Consolas, ui-monospace, monospace;

  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.64, 1);
  --ease-jelly: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-panel: 24px;
  --radius-card: 20px;
  --radius-input: 14px;
  --radius-pill: 9999px;

  /* Dynamic preset tokens (default: azure dark) */
  --accent: #0A84FF;
  --accent-rgb: 10, 132, 255;
  --accent-soft: rgba(10, 132, 255, 0.22);
  --glow-a: rgba(10, 132, 255, 0.20);
  --glow-b: rgba(64, 156, 255, 0.12);

  /* Live Material metrics (overridden by Material mode & level controls) */
  --surface-alpha: 0.60;
  --elevated-alpha: 0.72;
  --glass-blur: 24px;

  /* Dark palette */
  --bg-page: #07090e;
  --surface-rgb: 28, 32, 42;
  --elevated-rgb: 38, 43, 56;
  --bg-surface: rgba(var(--surface-rgb), var(--surface-alpha));
  --bg-surface-strong: rgba(var(--elevated-rgb), var(--elevated-alpha));
  --bg-control: rgba(255, 255, 255, 0.08);
  --bg-control-hover: rgba(255, 255, 255, 0.14);
  --pill-track: rgba(255, 255, 255, 0.09);
  --toggle-off: rgba(255, 255, 255, 0.22);
  --text-primary: rgba(248, 250, 255, 0.96);
  --text-secondary: rgba(235, 240, 255, 0.62);
  --text-tertiary: rgba(235, 240, 255, 0.40);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --hairline: rgba(255, 255, 255, 0.16);
  --shadow-panel: 0 28px 72px rgba(0, 0, 0, 0.44), 0 2px 10px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 18px 42px rgba(0, 0, 0, 0.44), 0 2px 8px rgba(0, 0, 0, 0.22);
  --star-gold: #ffd43b;
  --star-bg: rgba(255, 212, 59, 0.13);
  --star-border: rgba(255, 212, 59, 0.32);

  --wave-x: 50vw;
  --wave-y: 50vh;
}

:root[data-theme='light'] {
  --bg-page: #f4f6fb;
  --surface-rgb: 255, 255, 255;
  --elevated-rgb: 255, 255, 255;
  --bg-control: rgba(18, 20, 24, 0.06);
  --bg-control-hover: rgba(18, 20, 24, 0.11);
  --pill-track: rgba(18, 20, 24, 0.07);
  --toggle-off: rgba(120, 124, 134, 0.32);
  --text-primary: rgba(18, 20, 24, 0.94);
  --text-secondary: rgba(18, 20, 24, 0.58);
  --text-tertiary: rgba(18, 20, 24, 0.38);
  --border-subtle: rgba(18, 20, 24, 0.08);
  --border-strong: rgba(18, 20, 24, 0.15);
  --hairline: rgba(255, 255, 255, 0.85);
  --shadow-panel: 0 22px 56px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-float: 0 14px 34px rgba(15, 23, 42, 0.11), 0 2px 6px rgba(15, 23, 42, 0.06);
  --star-gold: #c98a00;
  --star-bg: rgba(245, 180, 0, 0.14);
  --star-border: rgba(217, 152, 0, 0.34);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.snap-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

@media (min-width: 769px) and (min-height: 600px) {
  .snap-page {
    height: 100dvh;
    overflow: hidden;
  }

  /* Upper 60dvh = Commanding Hero Logo & Title; Lower 40dvh = top half of 3D Monitor */
  .snap-page.hero-opening {
    height: 60dvh;
    min-height: 410px;
    overflow: visible;
  }

  .snap-page.showcase-page {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

.snap-page--last {
  justify-content: space-between;
  padding-bottom: 0 !important;
}

.feedback-page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: clamp(12px, 2vh, 24px);
}

/* Minimal Right-Edge Vertical Page Indicator Rail */
.page-dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-radius: var(--radius-pill);
}

.page-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--text-tertiary);
  opacity: 0.45;
  cursor: pointer;
  transition: height 280ms var(--ease-spring), background-color 220ms var(--ease-apple),
    opacity 200ms var(--ease-apple);
}

.page-dot:hover {
  opacity: 0.85;
}

.page-dot.is-active {
  height: 22px;
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: transparent;
  transition: background-color 480ms var(--ease-apple), color 360ms var(--ease-apple);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ==================== BACKGROUND WEBGL & AMBIENT ==================== */
#liquid-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vw 44vh at 20% 10%, var(--glow-a), transparent 72%),
    radial-gradient(52vw 48vh at 82% 28%, var(--glow-b), transparent 74%),
    radial-gradient(58vw 46vh at 50% 90%, var(--glow-a), transparent 76%);
  transition: opacity 420ms var(--ease-apple);
}

/* Real Full-Page Circular Wave Theme Transition (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

.theme-wave {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--wave-x) var(--wave-y),
    rgba(var(--accent-rgb), 0.28) 0%,
    rgba(var(--accent-rgb), 0.10) 48%,
    transparent 74%
  );
  clip-path: circle(0px at var(--wave-x) var(--wave-y));
}

.theme-wave.animating {
  animation: wpp-radial-wave 740ms var(--ease-apple) forwards;
}

@keyframes wpp-radial-wave {
  0% { opacity: 0.95; clip-path: circle(0px at var(--wave-x) var(--wave-y)); }
  65% { opacity: 0.42; }
  100% { opacity: 0; clip-path: circle(170vmax at var(--wave-x) var(--wave-y)); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 120;
  background: linear-gradient(90deg, var(--accent), #64d2ff);
  pointer-events: none;
}

/* ==================== LAYOUT & SURFACES ==================== */
.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.glass-panel {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel), inset 0 1px 0 var(--hairline);
  transition: background-color 320ms var(--ease-apple), border-color 220ms var(--ease-apple),
    backdrop-filter 320ms var(--ease-apple), transform 280ms var(--ease-apple);
}

.glass-pill {
  background: var(--bg-surface-strong);
  backdrop-filter: blur(26px) saturate(175%);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float), inset 0 1px 0 var(--hairline);
}

/* ==================== STICKY TOP NAV (PURE TRANSLATE3D FOR INSTANT BLUR COMPOSITING) ==================== */
.nav-shell {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  transform: translate3d(0, -104px, 0);
  pointer-events: none;
  will-change: transform;
  transition: transform 360ms var(--ease-apple);
}

.nav-shell.is-visible {
  transform: translate3d(0, 0, 0);
}

.nav-shell.is-visible .nav-bar {
  pointer-events: auto;
}

.nav-bar {
  pointer-events: none;
  width: min(1320px, 92vw, 100%);
  height: clamp(50px, 3.4vw, 62px);
  padding: 0 clamp(10px, 1vw, 14px) 0 clamp(14px, 1.4vw, 22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.2vw, 18px);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 0.7vw, 11px);
  flex-shrink: 0;
}

.nav-logo {
  width: clamp(24px, 1.75vw, 30px);
  height: clamp(24px, 1.75vw, 30px);
  border-radius: 8px;
}

.nav-name {
  font-weight: 650;
  font-size: clamp(14px, 1.02vw, 16.5px);
  letter-spacing: -0.02em;
}

.nav-links {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--pill-track);
  border: 1px solid var(--border-subtle);
}

.nav-link-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 var(--hairline);
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms var(--ease-spring), width 320ms var(--ease-spring),
    opacity 180ms var(--ease-apple);
}

.nav-link-thumb.is-ready {
  opacity: 1;
}

.nav-links a {
  position: relative;
  z-index: 2;
  padding: 6px clamp(12px, 1.1vw, 18px);
  border-radius: var(--radius-pill);
  font-size: clamp(13px, 0.92vw, 14.5px);
  font-weight: 550;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 200ms var(--ease-apple);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.55vw, 9px);
  flex-shrink: 0;
}

.btn-star-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: clamp(32px, 2.3vw, 38px);
  padding: 0 clamp(10px, 0.9vw, 14px);
  border-radius: var(--radius-pill);
  background: var(--star-bg);
  border: 1px solid var(--star-border);
  font-size: clamp(12.5px, 0.88vw, 13.5px);
  font-weight: 600;
  transition: transform 200ms var(--ease-spring), filter 180ms var(--ease-apple);
}

.btn-star-nav .icon-star,
.btn-star-hero .icon-star {
  color: var(--star-gold);
  transition: transform 240ms var(--ease-spring);
}

.btn-star-nav:hover,
.btn-star-hero:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-star-nav:hover .icon-star,
.btn-star-hero:hover .icon-star {
  transform: rotate(20deg) scale(1.14);
}

.star-count,
.star-pill-badge {
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.22);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

:root[data-theme='light'] .star-count,
:root[data-theme='light'] .star-pill-badge {
  background: rgba(0, 0, 0, 0.08);
}

.icon-btn {
  width: clamp(32px, 2.3vw, 38px);
  height: clamp(32px, 2.3vw, 38px);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--bg-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms var(--ease-apple), transform 180ms var(--ease-spring);
}

.icon-btn:hover {
  background: var(--bg-control-hover);
  transform: translateY(-1px);
}

.lang-btn {
  width: auto;
  padding: 0 clamp(10px, 0.85vw, 13px);
  font-size: clamp(12px, 0.85vw, 13px);
  font-weight: 650;
}

.btn-nav-download {
  height: clamp(32px, 2.3vw, 38px);
  padding: 0 clamp(14px, 1.1vw, 18px);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  font-size: clamp(12.5px, 0.88vw, 14px);
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.36);
  white-space: nowrap;
  transition: transform 180ms var(--ease-spring), filter 180ms var(--ease-apple);
}

.btn-nav-download:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-nav-soon {
  display: none;
  height: clamp(32px, 2.3vw, 38px);
  padding: 0 clamp(13px, 1vw, 16px);
  border-radius: var(--radius-pill);
  align-items: center;
  font-size: clamp(12.5px, 0.86vw, 13.5px);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-control);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

/* ==================== PLATFORM-ADAPTIVE RULES (WINDOWS / MACOS / IOS / ANDROID) ==================== */
.hero-apple-soon,
.apple-soon-card {
  display: none;
}

.btn-soon-pill {
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14), inset 0 1px 0 var(--hairline);
  user-select: none;
}

/* macOS Desktop: Show Coming Soon instead of Windows Download */
:root[data-platform='macos'] .hero-dl-btn,
:root[data-platform='macos'] .btn-nav-download,
:root[data-platform='macos'] .dl-win-only {
  display: none !important;
}

:root[data-platform='macos'] .hero-apple-soon,
:root[data-platform='macos'] .btn-nav-soon {
  display: inline-flex;
}

:root[data-platform='macos'] .apple-soon-card {
  display: flex;
}

/* iOS / iPadOS Mobile: No download buttons, showcase only + Apple Coming Soon badge */
:root[data-platform='ios'] .hero-dl-btn,
:root[data-platform='ios'] .btn-nav-download,
:root[data-platform='ios'] .btn-nav-soon,
:root[data-platform='ios'] .nav-link-download,
:root[data-platform='ios'] .page-dot--download,
:root[data-platform='ios'] #download {
  display: none !important;
}

:root[data-platform='ios'] .hero-apple-soon {
  display: inline-flex;
}

/* Android / Other Mobile: No download buttons, showcase only */
:root[data-platform='android'] .hero-dl-btn,
:root[data-platform='android'] .btn-nav-download,
:root[data-platform='android'] .btn-nav-soon,
:root[data-platform='android'] .nav-link-download,
:root[data-platform='android'] .page-dot--download,
:root[data-platform='android'] #download {
  display: none !important;
}

.apple-soon-card {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 36px 28px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.apple-soon-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-control);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.apple-soon-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.apple-soon-card p {
  margin: 0 0 4px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-glass,
.btn-star-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 220ms var(--ease-spring), box-shadow 220ms var(--ease-apple),
    background-color 200ms var(--ease-apple), filter 180ms var(--ease-apple);
  user-select: none;
}

.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn-md { height: 46px; padding: 0 24px; font-size: 15px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-xs { height: 32px; padding: 0 13px; font-size: 12px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }

.btn-primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)) var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.btn-glass {
  background: var(--bg-surface-strong);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14), inset 0 1px 0 var(--hairline);
}

.btn-glass:hover {
  transform: translateY(-2px);
  background: var(--bg-control-hover);
}

.btn-star-hero {
  background: var(--star-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--star-border);
  color: var(--text-primary);
}

.text-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
  transition: opacity 180ms var(--ease-apple);
}

.text-link:hover {
  opacity: 0.78;
}

/* ==================== PAGE 1: HERO (UPPER 60dvh, COMMANDING LOGO & TITLE) & PAGE 2: GIANT 3D MONITOR ==================== */
.hero-opening {
  padding: clamp(44px, 6.8vh, 86px) 0 clamp(14px, 2vh, 28px);
  justify-content: center;
  align-items: center;
}

.hero-copy {
  text-align: center;
  max-width: 920px;
  will-change: opacity, transform;
}

.hero-icon-wrap {
  position: relative;
  width: clamp(82px, 11.2vh, 120px);
  height: clamp(82px, 11.2vh, 120px);
  margin: 0 auto clamp(16px, 2.2vh, 26px);
  display: grid;
  place-items: center;
  transition: transform 280ms var(--ease-apple);
}

.hero-app-icon {
  width: 100%;
  height: 100%;
  border-radius: clamp(20px, 2.8vh, 30px);
  position: relative;
  z-index: 2;
  box-shadow: 0 26px 58px rgba(var(--accent-rgb), 0.42), 0 6px 16px rgba(0, 0, 0, 0.30);
}

.hero-icon-halo {
  position: absolute;
  inset: -20px;
  border-radius: 40px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.46), transparent 70%);
  filter: blur(24px);
  z-index: 1;
}

.hero-title {
  margin: 0 0 clamp(10px, 1.5vh, 18px);
  font-size: clamp(54px, min(7.8vw, 10.2vh), 116px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.02;
  background: linear-gradient(180deg, var(--text-primary) 25%, rgba(var(--accent-rgb), 0.92) 125%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 auto clamp(22px, 3.2vh, 36px);
  font-size: clamp(18px, min(1.8vw, 2.4vh), 25px);
  line-height: 1.46;
  color: var(--text-secondary);
  font-weight: 420;
  letter-spacing: -0.01em;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* PAGE 2: RAZOR-SHARP PROPORTIONAL 3D STUDIO DISPLAY (Native vector text via cqw — zero bitmap scale blur!) */
.showcase-page {
  padding: 0 0 clamp(120px, 20vh, 240px);
  align-items: center;
  justify-content: flex-start;
}

.hero-stage-perspective {
  position: relative;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  perspective: 1800px;
  perspective-origin: 50% 42%;
}

@media (min-width: 769px) and (min-height: 600px) {
  .hero-stage-perspective {
    width: min(1220px, calc((100dvh - 150px) * 1.54), calc(100% - 48px));
  }
}

.hero-stage-3d {
  position: relative;
  width: 100%;
  container-type: inline-size;
  transition: transform 220ms var(--ease-apple);
}

.studio-display {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1040 / 636;
  border-radius: 2.5cqw;
  padding: 1.2cqw;
  background: linear-gradient(145deg, #2d313a 0%, #14171d 38%, #0d0f14 68%, #252932 100%);
  box-shadow:
    0 44px 100px rgba(0, 0, 0, 0.56),
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.display-bezel-edge {
  position: absolute;
  inset: -1.5px;
  border-radius: calc(2.5cqw + 1.5px);
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04) 42%, rgba(var(--accent-rgb), 0.28) 100%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.display-glass-glare {
  position: absolute;
  inset: 1.2cqw;
  border-radius: 1.3cqw;
  z-index: 8;
  pointer-events: none;
  background: radial-gradient(
    540px circle at var(--glare-x, 28%) var(--glare-y, 18%),
    rgba(255, 255, 255, 0.14),
    transparent 62%
  );
  mix-blend-mode: screen;
}

.display-camera {
  position: absolute;
  top: 0.45cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 0.56cqw;
  height: 0.56cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b5876, #06080d);
}

.display-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  border-radius: 1.3cqw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.1cqw 2.7cqw;
  background: #0a0d16;
}

.screen-wallpaper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b1530;
}

.wallpaper-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Native crisp proportional inner sizing for the Studio Display app window (zero bitmap scaling!) */
.studio-display .app-window {
  border-radius: 1.15cqw;
}

.studio-display .app-titlebar {
  height: 5cqw;
  padding: 0 1.35cqw;
  gap: 0.8cqw;
}

.studio-display .app-brand-icon {
  width: 1.95cqw;
  height: 1.95cqw;
  border-radius: 0.48cqw;
}

.studio-display .app-brand-title {
  font-size: 1.3cqw;
}

.studio-display .app-capsule-tabs {
  padding: 0.28cqw;
}

.studio-display .app-capsule-thumb {
  top: 0.28cqw;
  bottom: 0.28cqw;
  left: 0.28cqw;
}

.studio-display .app-capsule-btn {
  height: 2.7cqw;
  padding: 0 1.35cqw;
  gap: 0.55cqw;
  font-size: 1.2cqw;
}

.studio-display .app-capsule-btn svg,
.studio-display .app-pill-btn svg,
.studio-display .app-icon-btn svg {
  width: 1.25cqw;
  height: 1.25cqw;
}

.studio-display .app-icon-btn {
  width: 2.9cqw;
  height: 2.9cqw;
}

.studio-display .app-pill-btn {
  height: 2.9cqw;
  padding: 0 1.05cqw;
  gap: 0.48cqw;
  font-size: 1.15cqw;
}

.studio-display .app-search-pill {
  height: 2.9cqw;
  min-width: 2.9cqw;
}

.studio-display .app-search-pill.is-open .app-search-input {
  width: 10.2cqw;
  font-size: 1.15cqw;
}

.studio-display .win-ctl {
  width: 2.7cqw;
  height: 2.7cqw;
}

.studio-display .win-ctl svg {
  width: 1.3cqw;
  height: 1.3cqw;
}

.studio-display .app-home-grid {
  padding: 0.6cqw 1.55cqw 1.55cqw;
  gap: 1.35cqw;
}

.studio-display .media-card {
  border-radius: 1.5cqw;
  padding: 0.68cqw;
  gap: 0.78cqw;
}

.studio-display .media-thumb-wrap {
  border-radius: 0.96cqw;
  min-height: 0;
}

.studio-display .media-play-circle {
  width: 3.3cqw;
  height: 3.3cqw;
}

.studio-display .media-play-circle svg {
  width: 1.45cqw;
  height: 1.45cqw;
}

.studio-display .media-card-footer {
  gap: 0.58cqw;
  padding: 0 0.4cqw 0.2cqw;
  font-size: 1.16cqw;
}

.studio-display .media-card-footer svg {
  width: 1.25cqw;
  height: 1.25cqw;
}

.studio-stand {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stand-neck {
  width: 12.5%;
  aspect-ratio: 130 / 62;
  background: linear-gradient(90deg, #5e636e 0%, #c6cbd6 24%, #eff2f8 48%, #a2a8b5 76%, #565b66 100%);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
  box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.42);
}

.stand-foot {
  width: 23.5%;
  aspect-ratio: 244 / 12;
  border-radius: 4px 4px 12px 12px;
  background: linear-gradient(180deg, #e5e9f0 0%, #9ea5b3 55%, #5b606b 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
}

.stand-shadow {
  width: 40%;
  height: 20px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.46), transparent 72%);
  filter: blur(8px);
}

/* ==================== 1:1 AUTHENTIC WALLPAPER++ WINDOW CHROME ==================== */
.app-window {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(185%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(185%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-panel), inset 0 1px 0 var(--hairline);
  color: var(--text-primary);
  transition: background-color 280ms var(--ease-apple), backdrop-filter 280ms var(--ease-apple),
    -webkit-backdrop-filter 280ms var(--ease-apple);
}

.app-window--player {
  height: auto;
  width: min(1060px, 100%);
  margin-inline: auto;
  border-radius: 18px;
}

@media (min-width: 769px) and (min-height: 600px) {
  .app-window--player {
    width: min(1060px, max(680px, calc((100dvh - 205px) * 1.72)), 100%);
  }
}

.app-window--settings {
  height: auto;
  width: 100%;
  max-width: min(940px, 100%);
  margin-inline: auto;
  border-radius: 20px;
}

.app-titlebar {
  height: 52px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.app-tb-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-brand-icon {
  border-radius: 5px;
  flex-shrink: 0;
}

.app-brand-title,
.app-player-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-tb-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

/* Exact CapsuleTabs Component */
.app-capsule-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--pill-track);
  border: 1px solid var(--border-subtle);
}

.app-capsule-tabs--compact {
  padding: 2px;
}

.app-capsule-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16), inset 0 1px 0 var(--hairline);
  transition: transform 300ms var(--ease-spring), width 300ms var(--ease-spring);
}

.app-capsule-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: color 180ms var(--ease-apple), background-color 200ms var(--ease-apple);
}

.app-capsule-tabs--compact .app-capsule-btn {
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
}

.app-capsule-btn.active {
  color: var(--text-primary);
}

.app-capsule-btn.app-capsule-btn--solid.active {
  background: var(--bg-surface-strong);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16), inset 0 1px 0 var(--hairline);
}

.app-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms var(--ease-apple), color 160ms var(--ease-apple);
}

.app-icon-btn:hover,
.app-icon-btn.is-active {
  background: var(--bg-control);
  color: var(--text-primary);
}

.app-pill-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-control);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 160ms var(--ease-apple);
}

.app-pill-btn:hover {
  background: var(--bg-control-hover);
}

.app-search-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  min-width: 30px;
  flex-shrink: 1;
  overflow: hidden;
  transition: background-color 200ms var(--ease-apple), border-color 180ms var(--ease-apple);
}

.app-search-pill.is-open {
  background: var(--pill-track);
  border-color: var(--border-subtle);
  padding-right: 10px;
}

.app-search-pill.is-open:focus-within {
  border-color: var(--accent);
}

.app-search-pill .app-icon-btn {
  flex-shrink: 0;
}

.app-search-pill .app-icon-btn:focus,
.app-search-pill .app-icon-btn:focus-visible {
  outline: none;
}

.app-search-input {
  width: 0;
  min-width: 0;
  opacity: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--text-primary);
  transition: width 240ms var(--ease-apple), opacity 180ms var(--ease-apple);
}

.app-search-pill.is-open .app-search-input {
  width: clamp(64px, 9vw, 108px);
  opacity: 1;
}

/* Exact Sort Popover */
.app-sort-wrap {
  position: relative;
}

.app-sort-popover {
  position: absolute;
  top: 36px;
  right: 0;
  width: 146px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-surface-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  z-index: 30;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 180ms var(--ease-apple), transform 200ms var(--ease-spring);
}

.app-sort-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.app-pop-item {
  width: 100%;
  height: 29px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.app-pop-item:hover {
  background: var(--bg-control);
  color: var(--text-primary);
}

.app-pop-item.is-selected {
  color: var(--accent);
  font-weight: 600;
}

.pop-check {
  opacity: 0;
  font-size: 11px;
}

.app-pop-item.is-selected .pop-check {
  opacity: 1;
}

.app-pop-divider {
  height: 1px;
  margin: 5px 6px;
  background: var(--border-subtle);
}

.app-win-divider {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 2px;
}

.app-win-btns {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.win-ctl {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Exact Home 3x2 Media Cards Grid (explicit 2 rows so 1-3 filtered items never stretch across both rows) */
.app-home-grid {
  flex: 1;
  padding: 6px 16px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: hidden;
}

.media-card {
  border-radius: 16px;
  padding: 7px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 240ms var(--ease-apple), border-color 200ms var(--ease-apple),
    box-shadow 240ms var(--ease-apple);
}

.media-card:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.media-thumb-wrap {
  position: relative;
  flex: 1;
  min-height: 82px;
  border-radius: 10px;
  overflow: hidden;
}

.media-play-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 18, 26, 0.54);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 200ms var(--ease-apple), transform 240ms var(--ease-spring);
}

.media-card:hover .media-play-circle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.media-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.media-card-footer svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.media-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Procedural animated wallpaper thumbnail art */
.art-aurora { background: linear-gradient(125deg, #0b1e3f, #0a84ff 48%, #30d19a 85%, #64d2ff); background-size: 200% 200%; animation: art-flow 7s ease-in-out infinite alternate; }
.art-cyber { background: linear-gradient(135deg, #1b0b38, #7d3cff 45%, #ff2d78 88%, #ff9f43); background-size: 200% 200%; animation: art-flow 8s ease-in-out infinite alternate-reverse; }
.art-ocean { background: linear-gradient(140deg, #072230, #0d6e8a 48%, #2ec4b6 88%, #a8f5eb); background-size: 200% 200%; animation: art-flow 9s ease-in-out infinite alternate; }
.art-sakura { background: linear-gradient(135deg, #32152c, #d93b62 46%, #ff8fa3 82%, #ffd6a5); background-size: 200% 200%; animation: art-flow 7.5s ease-in-out infinite alternate-reverse; }
.art-alpine { background: linear-gradient(145deg, #192638, #4b749f 52%, #a8c0d8 85%, #f2e9e4); background-size: 200% 200%; animation: art-flow 10s ease-in-out infinite alternate; }
.art-prism { background: linear-gradient(125deg, #1c1b4d, #5856d6 38%, #00c7be 72%, #ff5c82); background-size: 200% 200%; animation: art-flow 6.5s ease-in-out infinite alternate; }

@keyframes art-flow {
  0% { background-position: 0% 20%; }
  100% { background-position: 100% 85%; }
}

/* ==================== SECTIONS & HEADINGS (VIEWPORT-ADAPTIVE PER PAGE) ==================== */
.section {
  padding: clamp(72px, 8.6vh, 92px) 0 clamp(18px, 2.8vh, 34px);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(18px, 3vh, 36px);
}

.section-title {
  margin: 0 0 clamp(8px, 1.2vh, 14px);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-desc {
  margin: 0;
  font-size: clamp(15.5px, 1.4vw, 18px);
  line-height: 1.58;
  color: var(--text-secondary);
}

.stage-caption {
  margin: clamp(10px, 1.6vh, 16px) 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ==================== SECTION 1: 1:1 PLAYER VIEWPORT & CAPSULE ==================== */
.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #060912;
  overflow: hidden;
}

#player-wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.real-status-pill {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  height: 32px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: rgba(18, 22, 32, 0.72);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-apple), transform 220ms var(--ease-spring);
}

.real-status-pill.is-visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.real-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.real-player-capsule {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(20, 24, 34, 0.74);
  backdrop-filter: blur(26px) saturate(175%);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 28px);
  color: #f5f7ff;
}

.real-capsule-transport,
.real-capsule-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.real-cap-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(248, 250, 255, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms var(--ease-apple), transform 180ms var(--ease-spring);
}

.real-cap-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

.real-cap-icon:active {
  transform: scale(0.9);
}

.real-cap-accent {
  color: var(--accent);
}

.real-cap-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.42);
  transition: transform 200ms var(--ease-spring), filter 160ms var(--ease-apple);
}

.real-cap-play:hover {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.real-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(140px, 26vw, 310px);
}

.real-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(248, 250, 255, 0.62);
  min-width: 34px;
  text-align: center;
}

.real-track-wrap {
  position: relative;
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.real-track {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.real-track-fill {
  height: 100%;
  width: 28%;
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.real-track-thumb {
  position: absolute;
  left: 28%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
}

.real-rate-btn {
  height: 30px;
  width: 50px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 160ms var(--ease-apple), color 160ms var(--ease-apple);
}

.real-rate-btn.is-modified {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==================== SECTION 2: 1:1 DESKTOP TAB + 3D MODEL ==================== */
.desktop-showcase {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  align-items: stretch;
}

.app-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.app-theme-card {
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-theme-card--stretch {
  flex: 1;
  justify-content: space-between;
}

.app-theme-card--collapsible {
  gap: 0;
}

.app-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  border-radius: 10px;
  transition: background-color 260ms var(--ease-apple);
}

.app-setting-row.is-triggered {
  background: var(--accent-soft);
}

.app-setting-row + .app-setting-row {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.app-row-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 520;
  color: var(--text-primary);
}

.app-row-label svg {
  color: var(--text-secondary);
}

/* Exact JellyToggle from Wallpaper++ */
.jelly-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: none;
  padding: 3px;
  background: var(--toggle-off);
  cursor: pointer;
  transition: background-color 240ms var(--ease-apple);
  flex-shrink: 0;
}

.jelly-toggle.is-on {
  background: var(--accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.14);
}

.jelly-knob {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
  transform: translateX(0);
  transition: transform 280ms var(--ease-jelly);
}

.jelly-toggle.is-on .jelly-knob {
  transform: translateX(20px);
}

/* Exact Interactive HotkeyRecorder from Wallpaper++ */
.hotkey-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 4px 0 12px;
  border-radius: var(--radius-pill);
  background: var(--pill-track);
  border: 1px solid var(--border-subtle);
  transition: border-color 180ms var(--ease-apple), box-shadow 180ms var(--ease-apple),
    background-color 180ms var(--ease-apple);
}

.hotkey-box:not(.has-value) {
  padding-right: 12px;
}

.hotkey-box.is-recording {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hotkey-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.hotkey-box.has-value .hotkey-btn,
.hotkey-box.is-recording .hotkey-btn {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

.hotkey-box.is-recording .hotkey-btn {
  color: var(--accent);
  font-family: var(--font-sans);
}

.hotkey-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms var(--ease-apple), color 150ms var(--ease-apple);
}

.hotkey-clear:hover {
  background: var(--bg-control-hover);
  color: var(--text-primary);
}

.hotkey-clear[hidden] {
  display: none;
}

.app-link-chips {
  display: flex;
  gap: 6px;
}

.app-link-chip {
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--pill-track);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 180ms var(--ease-apple), color 180ms var(--ease-apple),
    border-color 180ms var(--ease-apple);
}

.app-link-chip.is-active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
}

/* 3D Isometric Desktop Panel (matched top & bottom height with left settings panel) */
.iso-panel {
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  overflow: hidden;
}

.iso-stage {
  flex: 1;
  min-height: clamp(250px, 38vh, 370px);
  perspective: 1400px;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}

.iso-stack {
  position: relative;
  width: clamp(260px, 34vw, 370px);
  height: clamp(162px, 21vw, 228px);
  transform-style: preserve-3d;
  transform: rotateX(52deg) rotateZ(-28deg);
  transition: transform 680ms var(--ease-apple);
}

.iso-stack:not(.exploded) {
  transform: rotateX(8deg) rotateZ(0deg) scale(1.1);
}

.iso-layer {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  transition: transform 640ms var(--ease-apple), opacity 220ms var(--ease-apple);
}

.layer-tag {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(0, 0, 0, 0.56);
  transition: opacity 280ms var(--ease-apple);
}

.iso-stack:not(.exploded) .layer-tag { opacity: 0; }

.layer-wallpaper {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 32px 50px rgba(0, 0, 0, 0.42);
  transform: translateZ(0px);
}

.iso-wallpaper-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(var(--accent-rgb), 0.85), transparent 56%),
    radial-gradient(circle at 78% 70%, rgba(125, 122, 255, 0.74), transparent 55%),
    linear-gradient(135deg, #0b1630, #12294a 52%, #1d1b4b);
}

.layer-icons {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: translateZ(54px);
  padding: 16px;
}

.iso-stack:not(.exploded) .layer-icons {
  transform: translateZ(2px);
  background: transparent;
  border-color: transparent;
}

.layer-icons.desktop-hidden,
.layer-taskbar.desktop-hidden {
  opacity: 0;
}

.iso-icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 12px 10px;
}

.iso-desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 9.5px;
}

.iso-desk-icon i {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(190, 215, 255, 0.65));
}

.layer-taskbar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  transform: translateZ(106px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}

.iso-stack:not(.exploded) .layer-taskbar {
  transform: translateZ(4px);
  background: transparent;
  border-color: transparent;
}

.iso-tb-bar {
  width: 76%;
  height: 24px;
  border-radius: 9px;
  background: rgba(18, 22, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.iso-tb-pill {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: linear-gradient(135deg, #4cc2ff, #0078d4);
}

.iso-tb-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.iso-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.iso-hint {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ==================== SECTION 3: 1:1 REAL THEME PANEL ==================== */
:root[data-material='transparent'] .app-window,
:root[data-material='transparent'] .glass-panel,
:root[data-material='transparent'] .glass-pill {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: var(--border-strong);
}

:root[data-material='off'] .app-window,
:root[data-material='off'] .glass-panel,
:root[data-material='off'] .glass-pill {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.real-theme-page {
  padding: clamp(6px, 1.2vh, 12px) 24px clamp(14px, 2.2vh, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 18px);
}

.real-theme-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.real-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.real-section-title svg {
  color: var(--text-secondary);
}

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

.real-preset-card {
  width: 100%;
  padding: 8px;
  border-radius: 20px;
  background: var(--bg-surface-strong);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 240ms var(--ease-apple), border-color 220ms var(--ease-apple),
    box-shadow 220ms var(--ease-apple);
}

.real-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.real-preset-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.preset-preview {
  height: clamp(54px, 8.8vh, 86px);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.preset-preview-dots {
  display: flex;
  gap: 5px;
}

.preset-preview-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.preset-preview-bar {
  height: 14px;
  width: 64%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.preset-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 4px;
}

.preset-card-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 200ms var(--ease-apple), transform 240ms var(--ease-spring);
}

.real-preset-card.is-selected .preset-check {
  opacity: 1;
  transform: scale(1);
}

.real-surface-card {
  background: var(--bg-surface-strong);
  border: 1px solid var(--border-subtle);
}

/* Exact Collapsible Material Level Row from ThemePage */
.real-level-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows 280ms var(--ease-apple), opacity 220ms var(--ease-apple),
    margin-top 280ms var(--ease-apple);
}

.real-level-collapse.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
}

.real-level-collapse-inner {
  overflow: hidden;
}

.real-level-collapse-content {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ==================== COMPACT 4-PILLAR ROW (INTEGRATED IN PAGE 5) ==================== */
.pillars-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(18px, 2.8vh, 30px);
  padding: clamp(18px, 2.4vh, 26px) 0 0;
  border-top: 1px solid var(--border-subtle);
}

.pillar-item strong {
  display: block;
  font-size: 15px;
  font-weight: 660;
  margin-bottom: 6px;
}

.pillar-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ==================== DOWNLOAD SECTION ==================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.2vw, 26px);
  width: 100%;
  max-width: min(980px, 100%);
  margin: 0 auto clamp(16px, 2.2vh, 24px);
}

.download-card {
  padding: clamp(22px, 3vh, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.3vh, 14px);
}

.download-card-featured {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--shadow-panel), 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.dl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dl-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.dl-tag {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.dl-tag-subtle {
  background: var(--bg-control);
  color: var(--text-secondary);
}

.dl-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.dl-meta {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.dl-meta code {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.dl-secondary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.smartscreen-note {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ==================== FEEDBACK SECTION (SPACIOUS & VIEWPORT-ADAPTIVE) ==================== */
.feedback-shell {
  width: 100%;
  max-width: min(980px, 100%);
  margin-inline: auto;
  padding: clamp(26px, 3.4vh, 40px);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vh, 20px);
}

.fb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fb-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Custom Apple Liquid Glass Dropdowns (replaces ugly native OS <select>) */
.glass-dd {
  position: relative;
}

.glass-dd-trigger {
  height: 34px;
  padding: 0 12px 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--pill-track);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 180ms var(--ease-apple), border-color 180ms var(--ease-apple);
}

.glass-dd-trigger:hover,
.glass-dd.is-open .glass-dd-trigger {
  background: var(--bg-control-hover);
  border-color: var(--border-strong);
}

.glass-dd.is-open .glass-dd-trigger {
  border-color: var(--accent);
}

.glass-dd-chevron {
  color: var(--text-secondary);
  transition: transform 220ms var(--ease-apple);
}

.glass-dd.is-open .glass-dd-chevron {
  transform: rotate(180deg);
}

.glass-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-surface-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float), inset 0 1px 0 var(--hairline);
  z-index: 40;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 180ms var(--ease-apple), transform 200ms var(--ease-spring);
}

.glass-dd.is-open .glass-dd-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.glass-dd-item {
  width: 100%;
  height: 31px;
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-apple), color 140ms var(--ease-apple);
}

.glass-dd-item:hover {
  background: var(--bg-control);
  color: var(--text-primary);
}

.glass-dd-item.is-selected {
  color: var(--accent);
  font-weight: 600;
}

.dd-check {
  opacity: 0;
  font-size: 11px;
}

.glass-dd-item.is-selected .dd-check {
  opacity: 1;
}

.glass-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-subtle);
  background: var(--bg-control);
  font-size: 14px;
  outline: none;
  transition: border-color 180ms var(--ease-apple), box-shadow 180ms var(--ease-apple),
    background-color 180ms var(--ease-apple);
}

.glass-select {
  width: auto;
  min-height: 34px;
  padding: 4px 10px;
  font-size: 12.5px;
  border-radius: 10px;
}

.glass-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.glass-input option {
  background: #141824;
  color: #f4f7ff;
}

:root[data-theme='light'] .glass-input option {
  background: #ffffff;
  color: #141824;
}

.glass-textarea {
  resize: vertical;
  min-height: clamp(140px, 22vh, 230px);
  line-height: 1.65;
}

.fb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fb-all {
  margin-left: auto;
}

.fb-toast {
  margin: 0;
  font-size: 13px;
  min-height: 18px;
  color: var(--accent);
}

.fb-toast.error {
  color: #ff453a;
}

/* ==================== FOOTER ==================== */
.site-footer {
  padding: clamp(16px, 2.2vh, 24px) 0 clamp(18px, 2.4vh, 26px);
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.footer-brand img { border-radius: 5px; }
.footer-brand a { color: var(--accent); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-disclaimer {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-tertiary);
}

/* ==================== SCROLL REVEAL ==================== */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 680ms var(--ease-apple), transform 680ms var(--ease-apple);
}

.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE (NARROW WINDOWS & MOBILE) ==================== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .desktop-showcase,
  .download-grid {
    grid-template-columns: 1fr;
  }
  .pillars-row {
    grid-template-columns: 1fr 1fr;
  }
  .app-window--player .app-win-btns,
  .app-window--settings .app-win-btns {
    display: none;
  }
}

@media (max-width: 760px) {
  .page-dots { display: none; }
  .container {
    width: calc(100% - 28px);
  }
  .snap-page {
    min-height: auto;
    height: auto;
  }
  .hero-opening {
    padding: 64px 0 32px;
  }
  .showcase-page {
    padding: 8px 0 48px;
  }
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 30px; }

  /* Player capsule responsive */
  .real-player-capsule {
    bottom: 12px;
    padding: 6px 10px;
    gap: 8px;
    width: calc(100% - 20px);
    justify-content: space-between;
  }
  .real-timeline {
    width: auto;
    flex: 1;
    min-width: 80px;
  }
  .real-cap-play {
    width: 34px;
    height: 34px;
  }
  .real-cap-icon {
    width: 28px;
    height: 28px;
  }

  /* Desktop 3D stack responsive */
  .iso-stage {
    min-height: 250px;
  }
  .iso-stack {
    width: 250px;
    height: 156px;
  }
  .iso-footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Theme settings responsive */
  .real-theme-page {
    padding: 8px 14px 18px;
    gap: 14px;
  }
  .real-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .preset-preview {
    height: 62px;
  }
  .app-setting-row,
  .real-level-collapse-content {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Feedback & pillars */
  .pillars-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .feedback-shell {
    padding: 20px;
  }
  .fb-top {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-selects {
    justify-content: flex-start;
  }
  .glass-dd-menu {
    left: 0;
    right: auto;
  }
  .fb-all {
    margin-left: 0;
  }
}

/* Short desktop windows (< 600px tall): natural vertical flow, zero clipping */
@media (max-height: 599px) {
  .page-dots { display: none; }
  .snap-page,
  .snap-page.hero-opening,
  .snap-page.showcase-page {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }
  .hero-opening { padding: 44px 0 28px; }
  .showcase-page { padding: 8px 0 44px; }
  .section { padding: 56px 0; }
  .app-window--player { width: min(820px, 100%); }
}

@media (max-width: 520px) {
  .nav-bar {
    height: 48px;
    padding: 0 8px 0 12px;
  }
  .nav-name { font-size: 13.5px; }
  .btn-star-nav span:first-of-type { display: none; }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin-inline: auto;
  }
  .btn-lg {
    height: 46px;
    padding: 0 20px;
    font-size: 14.5px;
  }
  /* Hide secondary icons on tiny player widths so capsule never overflows */
  .real-capsule-actions .real-cap-icon {
    display: none;
  }
  .real-time {
    display: none;
  }
  .iso-stack {
    width: min(210px, 66vw);
    height: min(132px, 41vw);
  }
  .iso-icons-grid {
    grid-template-columns: repeat(3, 34px);
    gap: 7px 5px;
  }
  .iso-desk-icon i {
    width: 17px;
    height: 17px;
  }
  .iso-desk-icon span {
    font-size: 8px;
  }
  .app-capsule-tabs--settings .app-capsule-btn {
    padding: 0 9px;
    font-size: 11.5px;
  }
  .app-window--settings .app-tb-left .app-pill-btn span {
    display: none;
  }
  .fb-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-all {
    text-align: center;
  }
}

@media (max-width: 390px) {
  .nav-name { display: none; }
  .real-capsule-transport .real-cap-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-up { opacity: 1; transform: none; }
}
