/**
 * PixelArtPro — Editorial Bento Design System
 * Warm Ivory Canvas · Dark Slate Bento · Coral Accent
 * https://pixelartpro.com/
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Warm Ivory Canvas (Light/Default) */
  --bg-canvas: #ececea;
  --bg-page: #ececea;
  --bg-color: var(--bg-canvas);
  --bg-card: #ffffff;
  --bg-card-dark: #111111;
  --bg-card-dark-2: #0a0a0a;
  --bg-input: #f5f5f3;
  --bg-tertiary: #e4e4e2;

  --border-subtle: rgba(17, 17, 17, 0.08);
  --border-medium: rgba(17, 17, 17, 0.18);
  --border-focus: #111111;

  --text-primary: #111111;
  --text-secondary: #4B5563;
  --text-muted: #4B5563;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);

  /* Coral Accent */
  --accent-primary: #d83a1e;
  --accent-primary-hover: #b92f16;
  --accent-dark: #111111;
  --accent-gradient: linear-gradient(135deg, #ff5a3d 0%, #d83a1e 100%);
  --accent-glow: 0 0 24px rgba(216, 58, 30, 0.3);

  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(17,17,17,0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(17,17,17,0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(17,17,17,0.07);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);

  /* Studio workspace tokens (Default / Light Mode - Ivory & Slate) */
  --studio-bg: #FAF8F5;
  --studio-border: #E2E4E9;
  --studio-card: #FFFFFF;
  --studio-card-2: #FAF8F5;
  --studio-text: #111827;
  --studio-text-muted: #4B5563;
  --studio-accent: #d83a1e;
  --studio-accent-grad: linear-gradient(135deg, #ff5a3d 0%, #d83a1e 100%);
  --studio-grid: rgba(17, 24, 39, 0.05);
  --studio-blueprint: linear-gradient(to right, var(--studio-grid) 1px, transparent 1px),
                      linear-gradient(to bottom, var(--studio-grid) 1px, transparent 1px);
}

/* Dark Mode overrides (high contrast ratio) */
[data-theme="dark"],
html.dark {
  --bg-canvas: #090a0f;
  --bg-page: #090a0f;
  --bg-color: var(--bg-canvas);
  --bg-card: #13151b;
  --bg-card-dark: #101218;
  --bg-card-dark-2: #07080b;
  --bg-input: #161820;
  --bg-tertiary: #1a1d26;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-focus: #ff4522;

  --text-primary: #F4F4F6;
  --text-secondary: #9DA3AE;
  --text-muted: #9DA3AE;
  --text-on-dark: #F4F4F6;
  --text-on-dark-muted: rgba(244, 244, 246, 0.65);

  --accent-primary: #ff4522;
  --accent-primary-hover: #e03a1a;
  --accent-dark: #F4F4F6;
  --accent-gradient: linear-gradient(135deg, #ff5a3d 0%, #ff4522 100%);
  --accent-glow: 0 0 24px rgba(255, 69, 34, 0.35);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.7);

  --studio-bg: #090a0f;
  --studio-border: rgba(255, 255, 255, 0.08);
  --studio-card: #13151b;
  --studio-card-2: #161820;
  --studio-text: #F4F4F6;
  --studio-text-muted: #9DA3AE;
  --studio-accent: #ff4522;
  --studio-accent-grad: linear-gradient(135deg, #ff5a3d 0%, #ff4522 100%);
  --studio-grid: rgba(255, 255, 255, 0.025);
  --studio-blueprint: linear-gradient(to right, var(--studio-grid) 1px, transparent 1px),
                      linear-gradient(to bottom, var(--studio-grid) 1px, transparent 1px);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  background-color: var(--bg-canvas);
  font-feature-settings: "salt", "ss01", "ss02", "rlig" 1, "calt" 1;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

h1, h2 { letter-spacing: -0.05em; }

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #F4F4F6;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, canvas, svg { max-width: 100%; display: block; }
button, input, select { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Grid backdrop (only shown in dark mode) */
.grid-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 600px;
  background-size: 32px 32px;
  background-image: linear-gradient(to right,rgba(255,255,255,0.03) 1px,transparent 1px),
                    linear-gradient(to bottom,rgba(255,255,255,0.03) 1px,transparent 1px);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

[data-theme="dark"] .grid-backdrop,
html.dark .grid-backdrop {
  opacity: 0.35;
  mask-image: linear-gradient(to bottom,black 0%,transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,black 0%,transparent 100%);
}

/* ==========================================================================
   Navigation Bar — Floating Editorial Style
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Inner floating pill bar */
.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Light mode: transparent/bg navbar */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(236, 236, 234, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(17,17,17,0.07);
  z-index: -1;
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-header::before,
html.dark .site-header::before {
  background-color: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.brand-logo:hover { text-decoration: none; color: var(--text-primary); }

.brand-icon {
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.brand-logo-img.logo-light {
  display: block;
  mix-blend-mode: multiply;
}

.brand-logo-img.logo-dark {
  display: none;
}

[data-theme="dark"] .brand-icon,
html.dark .brand-icon {
  background: transparent;
  box-shadow: 0 0 10px rgba(255, 69, 34, 0.25);
}

[data-theme="dark"] .brand-logo-img.logo-light,
html.dark .brand-logo-img.logo-light {
  display: none;
}

[data-theme="dark"] .brand-logo-img.logo-dark,
html.dark .brand-logo-img.logo-dark {
  display: block;
  mix-blend-mode: screen;
}

/* In dark blueprint footer, force dark logo with screen blend mode */
.site-footer .brand-icon {
  background: transparent;
}
.site-footer .brand-logo-img.logo-light {
  display: none !important;
}
.site-footer .brand-logo-img.logo-dark {
  display: block !important;
  mix-blend-mode: screen !important;
}

.brand-icon svg { color: #ffffff; }

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(17,17,17,0.08);
  color: #334155;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(17,17,17,0.16);
}

[data-theme="dark"] .brand-badge,
html.dark .brand-badge {
  background: rgba(255, 69, 34, 0.15);
  color: #ff4522;
  border-color: rgba(255, 69, 34, 0.35);
}

nav[aria-label="Primary Navigation"] {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(17,17,17,0.07);
  text-decoration: none;
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(17,17,17,0.09);
}

[data-theme="dark"] .nav-link:hover,
html.dark .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="dark"] .nav-link.active,
html.dark .nav-link.active {
  background: rgba(255, 69, 34, 0.14);
  color: #ff4522;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(17,17,17,0.08);
  border-color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle-btn:hover,
html.dark .theme-toggle-btn:hover { background: rgba(255,255,255,0.1); }

/* CTA pill button */
.btn-cta {
  background: #111111;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.08);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.1);
  color: #ffffff !important;
  text-decoration: none;
}

.btn-cta:active { transform: scale(0.97); }

[data-theme="dark"] .btn-cta,
html.dark .btn-cta {
  background: #ff4522;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(255, 69, 34, 0.35);
}

[data-theme="dark"] .btn-cta:hover,
html.dark .btn-cta:hover {
  background: #e03a1a;
  box-shadow: 0 6px 20px rgba(255, 69, 34, 0.5);
}

/* Mobile Hamburger Menu Button & Drawer (desktop hidden) */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: rgba(17, 17, 17, 0.08);
  border-color: var(--text-primary);
}

[data-theme="dark"] .mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-drawer {
  display: none;
}

/* ==========================================================================
   Marquee Ticker Strip
   ========================================================================== */
.marquee-section {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.marquee-band {
  overflow: hidden;
  white-space: nowrap;
  padding: 0.85rem 0;
}

.marquee-band-coral {
  background: #d83a1e;
  transform: rotate(-1.5deg) scaleX(1.04);
  margin: 0 -2%;
  box-shadow: 0 4px 20px rgba(216, 58, 30, 0.25);
}

.marquee-band-dark {
  background: #0B0C0E;
  transform: rotate(1.2deg) scaleX(1.04);
  margin: 0.75rem -2% 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .marquee-band-coral { background: #d83a1e; }
[data-theme="dark"] .marquee-band-dark  { background: #07090e; }

.marquee-inner {
  display: inline-flex;
  animation: marquee-scroll-left 28s linear infinite;
}

.marquee-inner-b {
  display: inline-flex;
  animation: marquee-scroll-right 22s linear infinite;
}

@keyframes marquee-scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 1.5rem;
  color: #F4F4F6;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9DA3AE;
  opacity: 0.9;
  flex-shrink: 0;
}

/* ==========================================================================
   Status Pill (hero eyebrow)
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #111111;
  color: #F4F4F6;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16,185,129,0.9);
  flex-shrink: 0;
}

[data-theme="dark"] .status-pill,
html.dark .status-pill {
  background: #13151b;
  border: 1px solid rgba(255,255,255,0.12);
  color: #F4F4F6;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 2rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(17,17,17,0.07);
  border: 1px solid rgba(17,17,17,0.16);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-pill,
html.dark .hero-pill {
  background: rgba(255, 69, 34, 0.12);
  border-color: rgba(255, 69, 34, 0.3);
  color: #ff4522;
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

[data-theme="dark"] .hero-title,
html.dark .hero-title {
  color: #F4F4F6;
}

.hero-title .gradient-text {
  color: #ff4522;
  display: inline;
}

[data-theme="dark"] .hero-title .gradient-text,
html.dark .hero-title .gradient-text {
  color: #ff4522;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: initial;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero-features-strip {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.hero-feature-item svg { color: var(--success); }

/* Hero CTA buttons */
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  background: #111111;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-hero-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  color: #ffffff;
  text-decoration: none;
}

.btn-hero-secondary {
  background: rgba(17,17,17,0.06);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-hero-secondary:hover {
  background: rgba(17,17,17,0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

[data-theme="dark"] .btn-hero-primary,
html.dark .btn-hero-primary {
  background: #ff4522;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 69, 34, 0.35);
}

[data-theme="dark"] .btn-hero-secondary,
html.dark .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--studio-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Upload Dropzone
   ========================================================================== */
.dropzone-container {
  margin: 0 auto 2rem;
  max-width: 820px;
}

.dropzone {
  background: var(--bg-card);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-2xl);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dropzone,
html.dark .dropzone {
  background: #13151b;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.dropzone:hover, .dropzone.drag-active {
  border-color: #ff5a3d;
  box-shadow: 0 0 0 4px rgba(255,90,61,0.08), var(--shadow-md);
  transform: translateY(-2px);
}

[data-theme="dark"] .dropzone:hover,
[data-theme="dark"] .dropzone.drag-active,
html.dark .dropzone:hover,
html.dark .dropzone.drag-active {
  border-color: #ff4522;
  box-shadow: 0 0 0 4px rgba(255, 69, 34, 0.12), var(--shadow-md);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: rgba(17,17,17,0.07);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

[data-theme="dark"] .dropzone-icon,
html.dark .dropzone-icon {
  background: rgba(255, 69, 34, 0.12);
  color: #ff4522;
}

.dropzone:hover .dropzone-icon { transform: scale(1.1); }

.dropzone-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.dropzone-title span { color: #ff4522; }
[data-theme="dark"] .dropzone-title span,
html.dark .dropzone-title span { color: #ff4522; }

.dropzone-formats {
  font-size: 0.875rem;
  color: #4B5563;
  margin-bottom: 1.75rem;
}

[data-theme="dark"] .dropzone-formats,
html.dark .dropzone-formats {
  color: #9DA3AE;
}

.dropzone-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-upload {
  background: #111111;
  color: #ffffff;
  min-height: 44px;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-upload:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

[data-theme="dark"] .btn-upload,
html.dark .btn-upload {
  background: #ffffff;
  color: #090a0f;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-upload:hover,
html.dark .btn-upload:hover {
  background: #e4e4e7;
  color: #000000;
  transform: translateY(-1px);
}

.btn-sample {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sample:hover {
  background: rgba(17,17,17,0.06);
  border-color: var(--text-primary);
}

[data-theme="dark"] .btn-sample:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

/* ==========================================================================
   Studio Workspace (Active Editing Interface)
   ========================================================================== */
.studio-section {
  display: none; /* Shown after image loaded */
  margin-bottom: 4rem;
}

.studio-container {
  max-width: 1360px;
}

/* Base Studio Grid: mobile-first flex column */
#editorWorkspace,
.studio-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Bento-style studio cards */
.studio-viewport-card,
.studio-controls-card,
.studio-panel {
  background: var(--studio-card);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.viewport-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.view-mode-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--studio-border);
}

[data-theme="dark"] .view-mode-tabs {
  background: rgba(255, 255, 255, 0.06);
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-mode-btn.active {
  background: var(--studio-card);
  color: var(--studio-text);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .view-mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.viewport-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
}

.badge-tag {
  background: var(--bg-tertiary);
  color: var(--studio-text-muted);
  border: 1px solid var(--studio-border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

[data-theme="dark"] .badge-tag {
  background: rgba(255, 255, 255, 0.07);
  color: var(--studio-text-muted);
}

.badge-tag.highlight {
  color: #d83a1e;
  border-color: rgba(216, 58, 30, 0.3);
  background: rgba(216, 58, 30, 0.08);
}

[data-theme="dark"] .badge-tag.highlight,
html.dark .badge-tag.highlight {
  color: #ff4522;
  border-color: rgba(255, 69, 34, 0.3);
  background: rgba(255, 69, 34, 0.12);
}

/* Before / After stage */
.before-after-stage {
  position: relative;
  width: 100%;
  min-height: 360px;
  height: clamp(360px, 46vh, 460px);
  max-height: 480px;
  background-color: #EDE9E3;
  background-image: var(--studio-blueprint);
  background-size: 20px 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .before-after-stage {
  background-color: #07090e;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.canvas-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 460px;
  display: inline-block;
  line-height: 0;
}

.canvas-wrapper canvas {
  display: block;
  max-width: 100%;
  max-height: 460px;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#before-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
}

#after-canvas {
  position: relative;
  z-index: 1;
}

/* Split Divider */
.split-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4), 0 0 12px var(--studio-accent);
  z-index: 10;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
}

.split-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  min-width: 40px; min-height: 40px;
  background: #ffffff;
  color: #111827;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
  touch-action: none;
}

.stage-label {
  position: absolute;
  bottom: 10px;
  padding: 0.25rem 0.65rem;
  background: rgba(17, 24, 39, 0.75);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  z-index: 5;
  pointer-events: none;
}

.stage-label.before { left: 10px; }
.stage-label.after  { right: 10px; }

/* Active Swatches Bar */
.active-swatches-wrap {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--studio-card-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--studio-border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatches-header {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--studio-text);
}

.active-swatches-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.active-swatch {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast);
}

[data-theme="dark"] .active-swatch {
  border-color: rgba(255, 255, 255, 0.25);
}

.active-swatch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

.active-swatch:hover {
  transform: scale(1.18);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}

/* Studio Panels & Controls */
.studio-panel {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.controls-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--studio-border);
}

.controls-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-heading {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--studio-text);
}

.section-heading small {
  font-size: 0.72rem;
  color: var(--studio-text-muted);
  font-weight: 500;
}

/* Slider Controls */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--studio-text);
  font-weight: 500;
}

.slider-val-tag {
  font-family: monospace;
  font-weight: 700;
  color: var(--studio-accent);
}

.btn-slider-reset {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  transition: color var(--transition-fast);
}

.btn-slider-reset:hover {
  color: var(--studio-text);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  margin: 8px 0;
  background: #E2E4E9;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  touch-action: pan-y;
}

[data-theme="dark"] input[type="range"] {
  background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--studio-accent);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--studio-accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Palette Presets Chips */
.palette-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.palette-chip {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.65rem;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--studio-text);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: left;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.palette-chip:hover {
  background: #F9FAFB;
  border-color: var(--border-medium);
  color: var(--studio-text);
  transform: translateY(-1px);
}

.palette-chip.active {
  background: rgba(216, 58, 30, 0.08);
  border-color: var(--studio-accent);
  color: var(--studio-accent);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--studio-accent);
}

[data-theme="dark"] .palette-chip {
  background: #202228;
  border-color: #24262C;
  color: var(--studio-text);
  box-shadow: none;
}

[data-theme="dark"] .palette-chip:hover {
  background: #282a32;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

[data-theme="dark"] .palette-chip.active,
html.dark .palette-chip.active {
  background: rgba(255, 69, 34, 0.16);
  border-color: #ff4522;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 69, 34, 0.3);
}

.chip-swatches {
  display: flex;
  gap: 2px;
}

.swatch-mini {
  width: 8px;
  height: 14px;
  border-radius: 2px;
}

.rainbow-gradient {
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0088ff, #8b00ff);
}

/* Select Inputs */
select.studio-select {
  background: #FFFFFF;
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  min-height: 42px;
  width: 100%;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

select.studio-select:focus {
  border-color: var(--studio-accent);
}

[data-theme="dark"] select.studio-select {
  background: #1D1F24;
  color: var(--studio-text);
  border-color: var(--studio-border);
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--studio-text);
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #E2E4E9;
  border: 1px solid var(--studio-border);
  border-radius: 34px;
  transition: 0.3s;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

input:checked + .slider-round {
  background-color: var(--studio-accent);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

[data-theme="dark"] .slider-round {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Export Actions */
.export-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-export-primary {
  background: var(--studio-accent-grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px rgba(216, 58, 30, 0.25);
  transition: all var(--transition-fast);
}

.btn-export-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(216, 58, 30, 0.35);
}

[data-theme="dark"] .btn-export-primary,
html.dark .btn-export-primary {
  box-shadow: 0 4px 14px rgba(255, 69, 34, 0.3);
}

[data-theme="dark"] .btn-export-primary:hover,
html.dark .btn-export-primary:hover {
  box-shadow: 0 6px 18px rgba(255, 69, 34, 0.45);
}

.btn-export-secondary {
  background: #FFFFFF;
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-export-secondary:hover {
  background: #F9FAFB;
  border-color: var(--border-medium);
}

[data-theme="dark"] .btn-export-secondary {
  background: #1D1F24;
  color: var(--studio-text);
  border-color: var(--studio-border);
  box-shadow: none;
}

[data-theme="dark"] .btn-export-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-export-ghost {
  background: transparent;
  color: var(--studio-text-muted);
  border: 1px dashed var(--border-medium);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-export-ghost:hover {
  color: var(--studio-text);
  border-color: var(--studio-text);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .btn-export-ghost {
  color: var(--studio-text-muted);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .btn-export-ghost:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

/* Mobile Segmented Nav & Carousel Pager */
.studio-mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem;
  background: var(--studio-card);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.mobile-nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
  padding: 2px 0;
}

.mobile-nav-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-tab-btn {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.5rem 0.65rem;
  min-height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-tab-btn .tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--studio-text);
  font-size: 0.68rem;
  font-weight: 800;
}

[data-theme="dark"] .mobile-tab-btn .tab-num {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.mobile-tab-btn.active {
  background: var(--studio-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-tab-btn.active .tab-num {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.mobile-nav-arrow {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-card-2);
  border: 1px solid var(--studio-border);
  color: var(--studio-text);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.mobile-nav-arrow:hover,
.mobile-nav-arrow:active {
  background: var(--studio-accent);
  color: #ffffff;
}

.mobile-dots-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.mobile-dots-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.mobile-dots-indicator .dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--studio-accent);
}

/* Desktop 3-Column Unified-Height Layout (Strictly min-width: 1024px) */
@media (min-width: 1024px) {
  #editorWorkspace,
  .studio-grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr !important;
    gap: 24px !important;
    align-items: stretch !important;
  }

  /* Column 1 (Left): Image Preview Area (Canvas stage, toolbar, active swatches) */
  #canvasContainer,
  .studio-viewport-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    box-shadow: var(--shadow-md) !important;
    padding: 1.15rem !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }

  /* Column 2 (Middle): Setting 1 Area (Pixel Block Size & Color Palette Presets) */
  #studio-panel-palette,
  .studio-panel-palette {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: var(--studio-canvas-height, 620px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    flex: none !important;
    scroll-snap-align: unset !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(17, 24, 39, 0.2) transparent !important;
  }

  [data-theme="dark"] #studio-panel-palette,
  [data-theme="dark"] .studio-panel-palette {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
  }

  /* Column 3 (Right): Setting 2 Area (Unified Card: Tuning & Dither + Collapsible Export) */
  .studio-panel-column-tuning {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: var(--studio-canvas-height, 620px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    background: var(--studio-card) !important;
    border: 1px solid var(--studio-border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.15rem !important;
    box-shadow: var(--shadow-md) !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(17, 24, 39, 0.2) transparent !important;
    transition: background var(--transition-fast), border-color var(--transition-fast) !important;
  }

  [data-theme="dark"] .studio-panel-column-tuning {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
  }

  /* Reset inner panels inside Column 3 on desktop so it forms one seamless bento card */
  .studio-panel-column-tuning #studio-panel-tuning {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Accordion card inside Column 3 */
  .studio-panel-column-tuning #studio-panel-export {
    background: var(--studio-card-2) !important;
    border: 1px solid var(--studio-border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    margin-top: 0.25rem !important;
    flex: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Hide mobile-specific navigation elements on desktop */
  .studio-mobile-nav,
  .mobile-dots-indicator {
    display: none !important;
  }

  /* Unwrap drawer and panels-track wrappers on desktop */
  #mobileControlsDrawer,
  .studio-drawer-wrap,
  .studio-panels-track {
    display: contents !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .studio-panel {
    flex: none !important;
    min-width: 0 !important;
    width: 100% !important;
    scroll-snap-align: unset !important;
  }
}

/* Subtle thin internal scrollbars for Settings columns */
#studio-panel-palette::-webkit-scrollbar,
.studio-panel-column-tuning::-webkit-scrollbar {
  width: 6px;
}

#studio-panel-palette::-webkit-scrollbar-track,
.studio-panel-column-tuning::-webkit-scrollbar-track {
  background: transparent;
}

#studio-panel-palette::-webkit-scrollbar-thumb,
.studio-panel-column-tuning::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.16);
  border-radius: 4px;
}

#studio-panel-palette::-webkit-scrollbar-thumb:hover,
.studio-panel-column-tuning::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 24, 39, 0.28);
}

[data-theme="dark"] #studio-panel-palette::-webkit-scrollbar-thumb,
[data-theme="dark"] .studio-panel-column-tuning::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] #studio-panel-palette::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .studio-panel-column-tuning::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Collapsible Export Dropdown / Accordion */
.export-accordion {
  padding: 0.85rem 1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.export-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 0.5rem;
}

.export-accordion-summary::-webkit-details-marker {
  display: none;
}

.export-summary-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.export-summary-icon {
  color: var(--studio-accent);
  flex-shrink: 0;
}

.export-summary-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--studio-text);
}

.export-summary-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-summary-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.06);
  color: var(--studio-text-muted);
}

[data-theme="dark"] .export-summary-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--studio-text-muted);
}

.export-chevron {
  color: var(--studio-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

details.export-accordion[open] .export-chevron {
  transform: rotate(180deg);
}

details.export-accordion .export-section {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--studio-border);
  animation: exportFadeIn 0.2s ease-out;
}

@keyframes exportFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile & Tablet Swipeable Drawer (max-width: 1023px) */
@media (max-width: 1023px) {
  #mobileControlsDrawer,
  .studio-drawer-wrap {
    width: 100%;
  }

  .studio-panels-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.2rem 0 0.6rem 0;
    scrollbar-width: none;
  }

  .studio-panels-track::-webkit-scrollbar {
    display: none;
  }

  .studio-panel-column-tuning {
    display: contents;
  }

  .studio-panel {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
}

/* Mobile Viewport: Sticky Compact Canvas & Independent Settings Scroll (< 768px) */
@media (max-width: 768px) {
  :root {
    --pinned-canvas-height: 295px;
  }

  /* Header unpins on mobile so canvas has full access to top of screen */
  .site-header {
    position: relative;
    top: auto;
    z-index: 10;
  }

  /* Scoped sticky canvas pinning inside #studio-section */
  #canvasContainer,
  .studio-viewport-card {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-color, var(--studio-card));
    border-bottom: 1px solid var(--studio-border);
    padding: 0.65rem 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  [data-theme="dark"] #canvasContainer,
  [data-theme="dark"] .studio-viewport-card {
    background: var(--bg-card, #111827);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .viewport-toolbar {
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .view-mode-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
  }

  /* Compact stage keeps pixel art preview visible above settings */
  .before-after-stage {
    min-height: 185px;
    height: clamp(185px, 24vh, 220px);
    max-height: 220px;
  }

  .canvas-wrapper canvas {
    max-height: 220px;
  }

  .active-swatches-wrap {
    margin-top: 0.4rem;
    padding: 0.35rem 0.5rem;
  }

  .swatches-header {
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
  }

  .active-swatch {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }

  /* Sticky segmented navigation directly below pinned canvas */
  .studio-mobile-nav {
    position: sticky;
    top: var(--pinned-canvas-height, 295px);
    z-index: 19;
    background: var(--studio-card);
    border: 1px solid var(--studio-border);
    border-radius: var(--radius-md);
    padding: 0.3rem 0.45rem;
    margin-bottom: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  [data-theme="dark"] .studio-mobile-nav {
    background: #16171B;
    border-color: #24262C;
  }

  .mobile-nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
  }

  .mobile-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.4rem 0.65rem;
  }

  /* Settings drawer & independent panel scroll */
  #mobileControlsDrawer,
  .studio-drawer-wrap {
    width: 100%;
  }

  .studio-panel {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    max-height: calc(100vh - var(--pinned-canvas-height, 295px) - 68px);
    max-height: calc(100dvh - var(--pinned-canvas-height, 295px) - 68px);
    padding: 1rem 0.85rem;
  }
}

/* ==========================================================================
   Content Sections (on ivory canvas)
   ========================================================================== */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c0260e;
  margin-bottom: 0.75rem;
  background: rgba(192, 38, 14, 0.08);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(192, 38, 14, 0.22);
}

[data-theme="dark"] .section-badge {
  color: #ff8a75;
  background: rgba(255, 90, 61, 0.16);
  border-color: rgba(255, 90, 61, 0.35);
}

.section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Bento Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .feature-card {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(17,17,17,0.15);
}

[data-theme="dark"] .feature-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.feature-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: rgba(17,17,17,0.07);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .feature-icon-wrap,
html.dark .feature-icon-wrap {
  background: rgba(255, 69, 34, 0.12);
  color: #ff4522;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.03em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* 3-Step Process */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  position: relative;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .step-card {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.step-card:hover {
  border-color: rgba(255,90,61,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .step-card:hover,
html.dark .step-card:hover { border-color: #ff4522; }

.step-number {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: #111111;
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .step-number,
html.dark .step-number {
  background: #ff4522;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 69, 34, 0.3);
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.step-card p { color: var(--text-secondary); font-size: 0.93rem; }

/* Workflow Cards */
.workflows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .workflow-card {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.workflow-card:hover {
  border-color: rgba(255,90,61,0.25);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}

[data-theme="dark"] .workflow-card:hover,
html.dark .workflow-card:hover { border-color: #ff4522; }

.workflow-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.03em;
}

.workflow-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.workflow-link-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff5a3d;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="dark"] .workflow-link-text,
html.dark .workflow-link-text { color: #ff4522; }

/* FAQ Accordion */
.faq-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .faq-item {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.faq-item.active {
  border-color: rgba(255,90,61,0.25);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .faq-item.active { border-color: var(--studio-accent); }

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .faq-question { color: var(--studio-text); }

.faq-icon {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #ff5a3d;
}

[data-theme="dark"] .faq-item.active .faq-icon { color: var(--studio-accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

[data-theme="dark"] .faq-answer-inner { color: var(--studio-text-muted); }

/* Before/After Showcase Split Slider */
.showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

[data-theme="dark"] .showcase-card {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.showcase-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 400;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  background-color: #05070c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.showcase-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

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

.showcase-layer.showcase-before {
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
}

.showcase-layer.showcase-after {
  z-index: 1;
}

.showcase-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 16px #d83a1e;
  z-index: 10;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  outline: none;
}

[data-theme="dark"] .showcase-divider,
html.dark .showcase-divider {
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 0 16px #ff4522;
}

.showcase-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;
  background: #111111;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
  touch-action: none;
}

[data-theme="dark"] .showcase-handle,
html.dark .showcase-handle {
  background: #ff4522;
  color: #ffffff;
}

.showcase-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

[data-theme="dark"] .showcase-footer-bar {
  background: var(--studio-card-2);
  border-top-color: var(--studio-border);
}

.showcase-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.showcase-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   Blog & Tutorials Hub
   ========================================================================== */
.blog-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .filter-pill,
html.dark .filter-pill {
  background: var(--studio-card);
  border-color: var(--studio-border);
  color: var(--studio-text-muted);
}

.filter-pill:hover, .filter-pill.active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

[data-theme="dark"] .filter-pill:hover,
[data-theme="dark"] .filter-pill.active,
html.dark .filter-pill:hover,
html.dark .filter-pill.active {
  background: #ff4522;
  border-color: #ff4522;
  color: #ffffff;
}

.blog-search-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.2rem;
  min-height: 44px;
  color: var(--text-primary);
  font-size: 0.85rem;
  min-width: 260px;
  outline: none;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .blog-search-box,
html.dark .blog-search-box {
  background: var(--studio-card);
  border-color: var(--studio-border);
  color: var(--studio-text);
}

.blog-search-box:focus {
  border-color: #d83a1e;
  box-shadow: 0 0 0 3px rgba(216,58,30,0.12);
}

[data-theme="dark"] .blog-search-box:focus,
html.dark .blog-search-box:focus {
  border-color: #ff4522;
  box-shadow: 0 0 0 3px rgba(255, 69, 34, 0.2);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .article-card,
html.dark .article-card {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(216,58,30,0.25);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .article-card:hover,
html.dark .article-card:hover { border-color: #ff4522; }

.article-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.article-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(192, 38, 14, 0.08);
  color: #c0260e;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(192, 38, 14, 0.22);
}

[data-theme="dark"] .article-tag,
html.dark .article-tag {
  background: rgba(255, 69, 34, 0.12);
  color: #ff4522;
  border-color: rgba(255, 69, 34, 0.3);
}

.article-read-time { font-size: 0.78rem; color: #4B5563; }
[data-theme="dark"] .article-read-time,
html.dark .article-read-time { color: #9DA3AE; }

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.article-snippet {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .article-snippet,
html.dark .article-snippet { color: #9DA3AE; }

.article-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

[data-theme="dark"] .article-footer,
html.dark .article-footer { border-top-color: var(--studio-border); }

.article-read-btn {
  color: #d83a1e;
  font-size: 0.9rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.25rem 0;
}

[data-theme="dark"] .article-read-btn,
html.dark .article-read-btn { color: #ff4522; }
[data-theme="dark"] .article-read-btn:hover,
html.dark .article-read-btn:hover { color: #ff5a3d; }

/* Modal Reader */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-2xl);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2);
}

[data-theme="dark"] .modal-dialog {
  background: var(--studio-card);
  border-color: var(--studio-border);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(17,17,17,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(17,17,17,0.12);
  border-color: var(--text-primary);
}

#modal-title {
  color: var(--text-primary);
}

[data-theme="dark"] #modal-title,
html.dark #modal-title {
  color: var(--studio-text);
}

[data-theme="dark"] .modal-close-btn,
html.dark .modal-close-btn {
  background: rgba(255,255,255,0.07);
  border-color: var(--studio-border);
  color: var(--studio-text);
}

.modal-article-body h2 { font-size: 1.7rem; margin: 1.75rem 0 0.75rem; letter-spacing: -0.04em; color: var(--text-primary); }
.modal-article-body h3 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; letter-spacing: -0.03em; color: var(--text-primary); }
[data-theme="dark"] .modal-article-body h2,
[data-theme="dark"] .modal-article-body h3,
html.dark .modal-article-body h2,
html.dark .modal-article-body h3 {
  color: var(--studio-text);
}
.modal-article-body p { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 1.02rem; line-height: 1.75; }
.modal-article-body ul, .modal-article-body ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--text-secondary); }
.modal-article-body li { margin-bottom: 0.5rem; }

[data-theme="dark"] .modal-article-body p,
[data-theme="dark"] .modal-article-body ul,
[data-theme="dark"] .modal-article-body ol,
html.dark .modal-article-body p,
html.dark .modal-article-body ul,
html.dark .modal-article-body ol { color: var(--studio-text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: #0B0C0E;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 4.5rem 0 2rem;
  color: #9DA3AE;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand-title {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #F4F4F6;
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
}

.footer-brand-title .brand-icon {
  width: 28px;
  height: 28px;
}

.footer-brand-desc { font-size: 0.9rem; line-height: 1.65; max-width: 320px; color: #9DA3AE; }

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #F4F4F6;
  margin-bottom: 1.25rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }

.footer-links a {
  color: #9DA3AE;
  font-size: 0.87rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: #ff4522; text-decoration: none; }

.featured-badges-strip {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.featured-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9DA3AE;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: #D1D5DB;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 1rem;
  color: #9DA3AE;
}

.footer-bottom a {
  color: #9DA3AE;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Toast Notification Stack
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  color: #F4F4F6;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-show { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { border-color: rgba(16,185,129,0.4); }
.toast-error   { border-color: rgba(239,68,68,0.4); }
.toast-info    { border-color: rgba(216,58,30,0.4); }

/* ==========================================================================
   Processing Spinner
   ========================================================================== */
#processing-spinner {
  color: var(--studio-accent);
  font-size: 0.8rem;
  display: none;
}

/* ==========================================================================
   Responsive & Mobile Viewport Refinement (360px - 430px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hide Start Converting button and desktop navigation links on mobile */
  .nav-links,
  .site-header .btn-cta,
  .site-header .nav-cta-btn,
  .site-header #nav-cta-btn,
  .btn-cta {
    display: none !important;
  }

  /* CRITICAL: Dark/Light mode toggle button MUST remain completely visible next to hamburger */
  .theme-toggle-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  /* Hamburger menu button visible */
  .mobile-menu-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-actions {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
  }

  /* Mobile Navigation Drawer dropdown */
  .mobile-nav-drawer {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    background: var(--bg-canvas);
    border-bottom: 1px solid var(--border-subtle);
  }

  [data-theme="dark"] .mobile-nav-drawer {
    background: #0B0C0E;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .mobile-nav-drawer.open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.35rem;
  }

  .mobile-nav-link {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    background: rgba(17, 17, 17, 0.08);
  }

  [data-theme="dark"] .mobile-nav-link:hover,
  html.dark .mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  [data-theme="dark"] .mobile-nav-link.active,
  html.dark .mobile-nav-link.active {
    background: rgba(255, 69, 34, 0.14);
    color: #ff4522;
  }

  .mobile-nav-link.mobile-nav-cta {
    margin-top: 0.5rem;
    background: #111111;
    color: #ffffff !important;
    text-align: center;
    border-radius: var(--radius-full);
    padding: 0.75rem 1rem;
  }

  [data-theme="dark"] .mobile-nav-link.mobile-nav-cta,
  html.dark .mobile-nav-link.mobile-nav-cta {
    background: #ff4522;
    color: #ffffff !important;
  }

  .hero-title { font-size: 2.2rem; }
  .dropzone { padding: 2.25rem 1.25rem; border-radius: 20px; }
  .palette-presets-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .marquee-band-coral { transform: rotate(-1.5deg) scaleX(1.04); margin: 0 -2%; }
  .marquee-band-dark  { transform: rotate(1.2deg) scaleX(1.04); margin: 0.75rem -2% 0; }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section {
    padding: 3rem 0 1.5rem;
  }

  .hero-title {
    font-size: 1.95rem;
    letter-spacing: -0.04em;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
  }

  .hero-features-strip {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .feature-card,
  .step-card,
  .workflow-card,
  .article-card {
    padding: 1.35rem 1.15rem;
    border-radius: 20px;
  }

  .studio-controls-card {
    padding: 1.15rem 1rem;
    border-radius: 20px;
  }

  .showcase-footer-bar {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .export-row {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    padding: 0.5rem 0.75rem;
  }

  .dropzone {
    padding: 2rem 1rem;
  }

  .dropzone-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-upload, .btn-sample {
    width: 100%;
  }
}

/* ==========================================================================
   Aura Ported Components Typography & Design System Variables
   ========================================================================== */
.font-urbanist {
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.font-caveat {
  font-family: 'Caveat', cursive;
}

/* ==========================================================================
   1. Intersecting Diagonal Marquee Ribbons
   ========================================================================== */
.diagonal-marquee-section {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0;
  background-color: #e4e4e1;
  width: 100%;
  margin: 1.5rem 0 3rem;
}
[data-theme="dark"] .diagonal-marquee-section {
  background-color: #0d0e12;
}

.diagonal-ribbon-wrap-top {
  position: absolute;
  left: -15%;
  right: -15%;
  top: 50%;
  transform: rotate(-3deg) translateY(-2.2rem);
  z-index: 10;
  pointer-events: none;
}

.diagonal-ribbon-wrap-bottom {
  position: absolute;
  left: -15%;
  right: -15%;
  top: 50%;
  transform: rotate(3deg) translateY(1.2rem);
  z-index: 20;
  pointer-events: none;
}

.diagonal-ribbon-red {
  background-color: #ff5a3d;
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 10px 30px -5px rgba(255, 90, 61, 0.35);
  display: flex;
}

.diagonal-ribbon-black {
  background-color: #0a0a0a;
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.55);
  display: flex;
}

.marquee-flex-track-left {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: marqueeScrollLeft 26s linear infinite;
  will-change: transform;
}

.marquee-flex-track-right {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: marqueeScrollRight 30s linear infinite;
  will-change: transform;
}

.marquee-flex-text {
  color: #ffffff;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0 1.25rem;
  font-family: var(--sans);
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes marqueeScrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ==========================================================================
   2. Pinned Stacking Showcase Section (GSAP ScrollTrigger)
   ========================================================================== */
/* ==========================================================================
   Showcase Stacking Scroll Section (1:1 Port from Aura Reference)
   ========================================================================== */
#showcase,
#showcase-section {
  position: relative;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 6rem;
  overflow: visible !important;
}

@media (min-width: 768px) {
  #showcase,
  #showcase-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  #showcase,
  #showcase-section {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

#showcase h2,
#showcase-section h2 {
  color: #090a0f;
}

[data-theme="light"] #showcase h2,
[data-theme="light"] #showcase-section h2,
html:not(.dark) #showcase h2,
html:not(.dark) #showcase-section h2 {
  color: #090a0f;
}

[data-theme="dark"] #showcase h2,
[data-theme="dark"] #showcase-section h2,
html.dark #showcase h2,
html.dark #showcase-section h2 {
  color: #ffffff;
}

#showcase p.text-base,
#showcase-section p.text-base {
  color: #52525b;
}

[data-theme="light"] #showcase p.text-base,
[data-theme="light"] #showcase-section p.text-base,
html:not(.dark) #showcase p.text-base,
html:not(.dark) #showcase-section p.text-base {
  color: #52525b;
}

[data-theme="dark"] #showcase p.text-base,
[data-theme="dark"] #showcase-section p.text-base,
html.dark #showcase p.text-base,
html.dark #showcase-section p.text-base {
  color: #a1a1aa;
}

.showcase-cards-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 440px;
  min-height: 0;
}

@media (min-width: 640px) {
  .showcase-cards-wrapper {
    height: 480px;
  }
}

@media (min-width: 768px) {
  .showcase-cards-wrapper {
    height: auto;
  }
}

#showcase .min-h-\[115vh\],
#showcase-section .min-h-\[115vh\] {
  position: relative;
}

@media (min-width: 768px) {
  #showcase .min-h-\[115vh\],
  #showcase-section .min-h-\[115vh\] {
    min-height: 115vh;
  }
}

#showcase .min-h-\[135vh\],
#showcase-section .min-h-\[135vh\] {
  position: relative;
}

@media (min-width: 768px) {
  #showcase .min-h-\[135vh\],
  #showcase-section .min-h-\[135vh\] {
    min-height: 135vh;
  }
}

#showcase .-mt-\[35vh\],
#showcase-section .-mt-\[35vh\] {
  margin-top: 1rem;
}

@media (min-width: 640px) {
  #showcase .-mt-\[35vh\],
  #showcase-section .-mt-\[35vh\] {
    margin-top: 1.5rem;
  }
}

@media (min-width: 768px) {
  #showcase .-mt-\[35vh\],
  #showcase-section .-mt-\[35vh\] {
    margin-top: -35vh;
  }
}

#showcase [data-stack],
#showcase-section [data-stack] {
  position: -webkit-sticky;
  position: sticky;
  top: 4.5rem;
  border-radius: 24px;
  overflow: hidden;
  padding: 1rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.625rem;
  height: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  will-change: transform, filter, opacity;
  transition: transform 0.1s linear, filter 0.1s linear, opacity 0.1s linear;
}

@media (min-width: 640px) {
  #showcase [data-stack],
  #showcase-section [data-stack] {
    top: 5.5rem;
    border-radius: 28px;
    padding: 1.25rem;
    gap: 0.75rem;
    height: 100%;
  }
}

@media (min-width: 768px) {
  #showcase [data-stack],
  #showcase-section [data-stack] {
    top: 6rem;
    border-radius: 36px;
    padding: 3rem;
    justify-content: space-between;
    align-items: stretch;
    gap: 0;
    height: 590px;
    max-height: none;
  }
}

@media (min-width: 1024px) {
  #showcase [data-stack],
  #showcase-section [data-stack] {
    border-radius: 40px;
    padding: 3.5rem;
    height: 620px;
  }
}

.showcase-compare-card-left {
  transform: none;
}
.showcase-compare-card-right {
  transform: none;
}

@media (min-width: 768px) {
  .showcase-compare-card-left {
    transform: rotate(-2deg);
  }
  .showcase-compare-card-right {
    transform: rotate(1.5deg);
  }
}

/* Global Blur-to-Focus Scroll Reveals (Aura Reference Engine) */
[data-reveal],
[data-reveal="blur"] {
  will-change: opacity, filter, transform;
}

/* Hero Section Page-Load Blur Stagger */
.hero-stagger-el {
  will-change: opacity, filter, transform;
}

.hero-stagger-el.hero-revealed,
.hero-revealed .hero-stagger-el {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  visibility: visible !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal="blur"],
  .hero-stagger-el {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
  }
}

.badge-after {
  background: #ff5a3d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 90, 61, 0.4);
}

/* ==========================================================================
   3. Converter Controls 3x2 Grid (Studio Build Dark vs Starter Build Light)
   ========================================================================== */
.controls-3x2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 1023px) {
  .controls-3x2-grid {
    grid-template-columns: 1fr;
  }
}

.control-card-dark {
  background: radial-gradient(at 50% 130%, rgb(122, 43, 22) 0%, rgb(42, 14, 6) 40%, rgb(10, 10, 10) 75%);
  border: 1px solid rgba(255, 90, 61, 0.35);
  box-shadow: 0 20px 50px -15px rgba(255, 90, 61, 0.28);
  border-radius: 26px;
  padding: 2.25rem 2rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.control-card-dark:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px -12px rgba(255, 90, 61, 0.4);
}

.control-card-light {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 26px;
  padding: 2.25rem 2rem;
  color: #18181b;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .control-card-light,
html.dark .control-card-light {
  background-color: #13151b;
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.5);
}

.control-card-light:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(17, 17, 17, 0.12);
}

.control-card-light h3 {
  color: #18181b;
}

[data-theme="dark"] .control-card-light h3,
html.dark .control-card-light h3 {
  color: #ffffff;
}

.control-card-light p {
  color: #52525b;
}

[data-theme="dark"] .control-card-light p,
html.dark .control-card-light p {
  color: #a1a1aa;
}

.control-card-light .control-spec-list {
  margin: 1.25rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: #3f3f46;
}

[data-theme="dark"] .control-card-light .control-spec-list,
html.dark .control-card-light .control-spec-list {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
}

.control-spec-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   4. Interactive 2-Column FAQ Accordion (Aura Reference Engine)
   ========================================================================== */
.faq-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .faq-grid-2col {
    grid-template-columns: 1fr;
  }
}

.faq-aura-item {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 1.35rem 1.6rem;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  overflow: hidden;
}

[data-theme="light"] .faq-aura-item,
html:not(.dark) .faq-aura-item {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

[data-theme="dark"] .faq-aura-item,
html.dark .faq-aura-item {
  background-color: #13151b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.faq-aura-item:hover {
  border-color: rgba(255, 69, 34, 0.35);
  box-shadow: 0 8px 24px -4px rgba(17, 17, 17, 0.07);
}

.faq-aura-item[data-open="true"],
.faq-aura-item.active {
  border-color: rgba(255, 69, 34, 0.45);
  box-shadow: 0 10px 30px -5px rgba(255, 69, 34, 0.12);
}

.faq-aura-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  user-select: none;
}

.faq-aura-question {
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: -0.02em;
  color: #18181b;
  transition: color 0.2s ease;
  line-height: 1.4;
  margin: 0;
}

[data-theme="light"] .faq-aura-question,
html:not(.dark) .faq-aura-question {
  color: #18181b;
}

[data-theme="dark"] .faq-aura-question,
html.dark .faq-aura-question {
  color: #ffffff;
}

.faq-aura-item[data-open="true"] .faq-aura-question,
.faq-aura-item.active .faq-aura-question {
  color: #ff4522;
}

.faq-aura-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: #71717a;
  transition: color 0.25s ease, transform 0.25s ease;
}

.faq-aura-icon .faq-icon-vert {
  transform-origin: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.faq-aura-item[data-open="true"] .faq-aura-icon,
.faq-aura-item.active .faq-aura-icon {
  color: #ff4522;
}

.faq-aura-item[data-open="true"] .faq-icon-vert,
.faq-aura-item.active .faq-icon-vert {
  opacity: 0;
  transform: scaleY(0);
}

.faq-aura-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-aura-body p {
  color: #52525b;
  font-size: 0.875rem;
  line-height: 1.6;
  padding-top: 0.85rem;
  margin: 0;
}

[data-theme="light"] .faq-aura-body p,
html:not(.dark) .faq-aura-body p {
  color: #52525b;
}

[data-theme="dark"] .faq-aura-body p,
html.dark .faq-aura-body p {
  color: #a1a1aa;
}

/* ==========================================================================
   Utility helpers
   ========================================================================== */
.icon-sun, .icon-moon { display: block; }
