/*
 * Luma Studio Design System v3
 * Inspired by Ansphare (Obsidian Cinema + Editorial Serif Italic + Atmospheric Glow)
 * and Picsart Create (Left Rail Sidebar + Global Search + Multi-page Creative Hub).
 */

:root {
  --bg: #11100f;
  --bg-elevated: #171614;
  --surface: #1b1917;
  --surface-2: #22201d;
  --surface-hover: #292623;
  --ink: #faf8f4;
  --muted: #9c978e;
  --muted-2: #6e6a63;
  --border: rgba(255, 248, 236, 0.085);
  --border-strong: rgba(255, 248, 236, 0.16);
  --gold: #e9b872;
  --gold-soft: rgba(233, 184, 114, 0.14);
  --amber: #f39c58;
  --danger: #e85a5e;
  --success: #46c289;

  /* Studio Editor compat tokens */
  --dark-canvas: #0b0b0c;
  --dark-surface: #141312;
  --dark-panel: #1c1a18;
  --dark-pill: #252320;
  --dark-ink: #faf8f4;
  --dark-muted: #9c978e;
  --dark-border: rgba(255, 248, 236, 0.1);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sidebar-w: 236px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------------- Multi-Page App Layout ---------------- */

.luma-layout {
  display: flex;
  min-height: 100dvh;
  background: var(--bg);
}

.luma-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #131210;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 18px 14px 16px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
}
.brand-glyph {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, #fff4dc, #e9b872 52%, #9a5b25 100%);
  box-shadow: 0 0 18px rgba(233, 184, 114, 0.35);
  position: relative;
}
.brand-glyph::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #11100f;
}
.brand-word {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.brand-dot { color: var(--gold); }

.sidebar-create-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--ink);
  color: #11100f;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.14s, background 0.15s, box-shadow 0.2s;
}
.sidebar-create-btn:hover {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(250, 248, 244, 0.16);
  transform: translateY(-1px);
}
.plus-badge { font-size: 16px; line-height: 1; }

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 12px 10px 5px;
}
.nav-group-label:first-child { padding-top: 2px; }

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 10px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.14s, color 0.14s;
}
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link.is-active {
  background: rgba(250, 248, 244, 0.09);
  color: var(--ink);
  font-weight: 650;
}
.side-link.side-sub {
  padding: 6.5px 10px 6.5px 32px;
  font-size: 12.5px;
  color: #847f77;
}
.side-link.side-sub.is-active { color: var(--gold); background: var(--gold-soft); }
.sl-ico { width: 18px; text-align: center; font-size: 14px; opacity: 0.9; }
.sl-pill-ai {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(233, 184, 114, 0.28);
}
.sl-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 999px;
}

.sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.model-mini-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(233, 184, 114, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(233, 184, 114, 0.24);
  transition: border-color 0.15s, transform 0.12s;
}
.model-mini-card:hover { border-color: rgba(233, 184, 114, 0.55); transform: translateY(-1px); }
.model-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.model-mini-sub { font-size: 11.5px; color: var(--muted); }
.dot-ready {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}
.dot-idle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------------- Main Right Column & Topbar ---------------- */

.luma-main-col {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.luma-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  padding: 0 28px;
  background: rgba(17, 16, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left-mobile { display: none; }

.global-search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.gs-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}
.global-search-input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s;
}
.global-search-input:focus {
  outline: none;
  border-color: rgba(233, 184, 114, 0.5);
  background: var(--surface-2);
}
.global-search-input::placeholder { color: var(--muted-2); }
.gs-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  pointer-events: none;
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1b1a17;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65);
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 50;
}
.gs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13.5px;
}
.gs-item:hover { background: var(--surface-hover); }
.gs-item small { color: var(--muted); font-size: 11.5px; }

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

.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(233, 184, 114, 0.28);
  font-size: 13px;
  font-weight: 650;
  color: var(--gold);
  transition: background 0.15s;
}
.credits-pill:hover { background: var(--surface-2); }
.credits-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* Primary & Secondary Editorial Buttons */
.btn-cream {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  background: var(--ink);
  color: #11100f;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  transition: transform 0.14s, background 0.15s, box-shadow 0.2s;
}
.btn-cream:hover { background: #ffffff; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(250, 248, 244, 0.16); }
.btn-cream.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-cream:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 250, 240, 0.04);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-glass:hover { background: rgba(255, 250, 240, 0.1); border-color: rgba(255, 250, 240, 0.28); }
.btn-glass.btn-lg { padding: 14px 24px; font-size: 15px; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: linear-gradient(135deg, #f1c784, #df9c55);
  color: #14110e;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  transition: transform 0.14s, filter 0.15s;
}
.btn-gold:hover { filter: brightness(1.07); transform: translateY(-1px); }

.btn-danger-outline {
  border: 1px solid rgba(232, 90, 94, 0.4);
  background: rgba(232, 90, 94, 0.08);
  color: #ff8a8e;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.btn-danger-outline:hover { background: rgba(232, 90, 94, 0.16); }

/* ---------------- Page Container & Editorial Hero ---------------- */

.page-root {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

.editorial-hero {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, #171512 0%, #0f0e0c 100%);
  padding: 40px 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 36px;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-left, .hero-showcase { position: relative; z-index: 2; }

/* Animated subtle film grain overlay */
.editorial-hero::after {
  content: "";
  position: absolute;
  inset: -40%;
  background-image: radial-gradient(rgba(255,248,236,0.06) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
  animation: grainDrift 6s steps(6) infinite;
}
@keyframes grainDrift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5%, 1%); }
  50% { transform: translate(1%, -1.5%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* Reels Progress Timeline inside Hero Cinema Frame */
.reel-timeline {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 6;
  display: flex;
  gap: 5px;
  pointer-events: none;
}
.reel-seg {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.reel-seg-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #faf8f4, var(--gold));
  border-radius: 999px;
}
.reel-seg.is-done .reel-seg-fill { width: 100%; }

.reel-play-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 7;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(17, 16, 15, 0.72);
  backdrop-filter: blur(10px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.reel-play-btn:hover { background: rgba(255,255,255,0.18); }

.reel-caption-bar {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 58px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.reel-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.reel-caption-text {
  font-size: 12px;
  font-weight: 600;
  color: rgba(250, 248, 244, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Ken Burns slow cinema zoom on hero images */
.hero-compare-frame.is-playing img {
  animation: kenBurnsHero 11s ease-in-out infinite alternate;
}
@keyframes kenBurnsHero {
  0% { transform: scale(1.0) translate3d(0, 0, 0); }
  100% { transform: scale(1.075) translate3d(-1%, -1.2%, 0); }
}

/* Glowing optical beam on Before/After scanner line */
.hero-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), #ffffff 30%, var(--gold) 70%, rgba(255,255,255,0.4));
  box-shadow: 0 0 18px rgba(233, 184, 114, 0.95), 0 0 38px rgba(233, 184, 114, 0.45);
  z-index: 4;
  pointer-events: none;
}

/* ---------------- 35mm Cinema Filmstrip Marquee ---------------- */

.filmstrip-wrap {
  margin-top: 28px;
  position: relative;
  border-radius: var(--radius-lg);
  background: #0d0c0b;
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 18px 0;
}
.filmstrip-sprockets {
  height: 10px;
  margin: 0 0 12px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 14px,
    rgba(255, 248, 236, 0.14) 14px 28px,
    transparent 28px 42px
  );
}
.filmstrip-sprockets.is-bottom { margin: 12px 0 0; }
.filmstrip-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: filmMarquee 38s linear infinite;
  padding: 2px 0;
}
.filmstrip-wrap:hover .filmstrip-track { animation-play-state: paused; }
@keyframes filmMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.film-frame {
  position: relative;
  width: 196px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #171614;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.25s;
}
.film-frame:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(233, 184, 114, 0.65);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}
.film-frame img { width: 100%; height: 100%; object-fit: cover; }
.film-frame-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 11px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 11, 10, 0.9) 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.film-frame-cap strong { font-size: 13px; font-weight: 650; color: var(--ink); }
.film-frame-cap span { font-size: 11px; color: var(--gold); }

/* ---------------- Bento Live Video Reel & Laser Beam ---------------- */

.bento-reel-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.15s ease, transform 5.8s linear;
}
.bento-reel-layer.is-active {
  opacity: 1;
  transform: scale(1.0);
}

.erase-scan-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #ffffff 30%, var(--gold) 70%, transparent);
  box-shadow: 0 0 24px 4px rgba(233, 184, 114, 0.65);
  z-index: 2;
  pointer-events: none;
  animation: scanSweep 4.2s ease-in-out infinite;
}
@keyframes scanSweep {
  0%, 100% { left: 16%; opacity: 0.7; }
  50% { left: 82%; opacity: 1; }
}

/* Cursor Spotlight Glow on Interactive Cards (Ansphare feel) */
.bento-card::before,
.quick-hub-tile::before,
.preset-showcase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(233, 184, 114, 0.16), transparent 60%);
}
.bento-card:hover::before,
.quick-hub-tile:hover::before,
.preset-showcase-card:hover::before {
  opacity: 1;
}
.quick-hub-tile, .preset-showcase-card { position: relative; overflow: hidden; }

/* Scroll Reveal (blur -> sharp) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(4px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(233, 184, 114, 0.25);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
}

.ui-svg-ico {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}
.plus-badge .ui-svg-ico { width: 15px; height: 15px; }
.gs-ico .ui-svg-ico { width: 16px; height: 16px; }
.tb-ico .ui-svg-ico { width: 20px; height: 20px; }
.tb-plus .ui-svg-ico { width: 20px; height: 20px; }
.qht-icon .ui-svg-ico { width: 20px; height: 20px; }
.dark-icon-btn .ui-svg-ico { width: 16px; height: 16px; }
.reel-play-btn .ui-svg-ico { width: 14px; height: 14px; }
.ba-knob-svg { width: 16px; height: 16px; display: block; }
.ba-stage.is-compact .ba-knob-svg { width: 12px; height: 12px; }

.hero-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Instant Hero Dropzone + Demo Models Strip */
.hero-quick-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(233, 184, 114, 0.34);
  background: rgba(255, 248, 236, 0.03);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  max-width: 520px;
}
.hero-quick-drop:hover,
.hero-quick-drop.is-dragover {
  background: rgba(233, 184, 114, 0.09);
  border-color: var(--gold);
}
.hero-quick-drop-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.hero-quick-drop-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(233, 184, 114, 0.12);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-quick-drop-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
.hero-quick-drop-text span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
.hero-kbd {
  font-size: 11px;
  font-weight: 650;
  color: var(--gold);
  background: rgba(233, 184, 114, 0.1);
  border: 1px solid rgba(233, 184, 114, 0.3);
  padding: 3px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.hero-demo-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.hero-demo-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
.hero-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.hero-demo-chip:hover {
  border-color: rgba(233, 184, 114, 0.5);
  background: rgba(233, 184, 114, 0.1);
  transform: translateY(-1px);
}
.hero-demo-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
}
.hero-stat span {
  font-size: 12px;
  color: var(--muted);
}

/* Interactive Live Before/After Showcase inside Hero */
.hero-showcase {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-compare-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 500px;
  width: 100%;
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  background: #0d0c0b;
  user-select: none;
  touch-action: none;
}

.hero-compare-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-compare-after {
  transition: filter 0.35s ease;
}

.hero-compare-before-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  z-index: 4;
  pointer-events: none;
}
.hero-compare-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(17, 16, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: ew-resize;
  z-index: 5;
}
.hero-compare-badge {
  position: absolute;
  top: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(17, 16, 15, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  z-index: 4;
  pointer-events: none;
}
.hero-compare-badge.is-left { left: 14px; color: var(--muted); }
.hero-compare-badge.is-right { right: 14px; color: var(--gold); }

.hero-mode-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hero-mode-pills::-webkit-scrollbar { display: none; }
.hero-mode-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s;
}
.hero-mode-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.hero-mode-pill.is-active {
  background: var(--ink);
  color: #11100f;
  border-color: var(--ink);
}

/* ---------------- Section Headers ---------------- */

.page-section { margin-top: 48px; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.sec-head h2 em { font-style: italic; color: var(--gold); }
.sec-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.sec-all-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(233, 184, 114, 0.25);
}
.sec-all-link:hover { background: var(--gold-soft); }

/* ---------------- Quick Action Strip (Picsart style) ---------------- */

.quick-hub-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.quick-hub-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.quick-hub-tile:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: rgba(233, 184, 114, 0.35);
}
.qht-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 248, 236, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gold);
}
.quick-hub-tile strong { font-size: 14px; font-weight: 650; }
.quick-hub-tile span { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---------------- AI Bento Showcase (Ansphare inspired) ---------------- */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 290px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 184, 114, 0.42);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.48);
}
.bento-card.span-7 { grid-column: span 7; min-height: 360px; }
.bento-card.span-5 { grid-column: span 5; min-height: 360px; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-6 { grid-column: span 6; }

.bento-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.bento-card:hover .bento-bg { transform: scale(1.045); }

.bento-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,16,15,0.12) 0%, rgba(17,16,15,0.42) 50%, rgba(15,14,13,0.95) 100%);
}

.bento-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bento-top-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.glass-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(17, 16, 15, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
}
.glass-tag.is-gold { color: var(--gold); border-color: rgba(233, 184, 114, 0.4); }
.glass-tag.is-free { color: #8be5b9; border-color: rgba(70, 194, 137, 0.38); }

.bento-content h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.05;
}
.bento-card.span-4 .bento-content h3 { font-size: 24px; }
.bento-content p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(250, 248, 244, 0.78);
  line-height: 1.45;
  max-width: 440px;
}
.bento-arrow {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--gold);
}

/* ---------------- Ready-Made Presets Strip & Catalog ---------------- */

.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.cat-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.cat-pill.is-active { background: var(--ink); color: #11100f; border-color: var(--ink); }

.presets-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.preset-showcase-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, border-color 0.16s;
}
.preset-showcase-card:hover { transform: translateY(-3px); border-color: rgba(233, 184, 114, 0.4); }
.preset-preview-box {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0e0d0c;
  overflow: hidden;
}
.preset-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.preset-showcase-card:hover .preset-preview-box img { transform: scale(1.04); }
.preset-card-info {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.preset-card-info strong { font-size: 15px; font-weight: 650; }
.preset-card-info p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}
.preset-card-cta {
  margin-top: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  width: 100%;
}
.preset-card-cta:hover { background: var(--ink); color: #11100f; border-color: var(--ink); }

/* ---------------- Tool Landing Pages (SEO & Multi-page) ---------------- */

.tool-landing-hero {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(560px 320px at 84% 20%, rgba(233, 184, 114, 0.14), transparent 65%),
    linear-gradient(155deg, #1a1815 0%, #12110f 100%);
  padding: 36px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 32px;
  align-items: center;
}
.tool-landing-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  aspect-ratio: 4 / 5;
  max-height: 480px;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  background: #0d0c0b;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.tool-landing-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Interactive Before/After Showcase System ---------------- */

.ba-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e0d0c;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.ba-stage.is-dragging {
  touch-action: none;
}
.ba-stage .ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  display: block;
}
.ba-before-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: clip-path;
}
.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(233,184,114,0.96) 35%, #ffffff 50%, rgba(233,184,114,0.96) 65%, rgba(255,255,255,0.25));
  box-shadow: 0 0 18px rgba(233, 184, 114, 0.72), 0 0 8px rgba(0, 0, 0, 0.65);
  z-index: 4;
  pointer-events: none;
}
.ba-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(17, 16, 15, 0.84);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 14px rgba(233, 184, 114, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -1px;
  z-index: 5;
  pointer-events: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.ba-stage.is-interactive .ba-knob,
.ba-stage.is-dragging .ba-knob {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: var(--gold);
}
.ba-badge {
  position: absolute;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 14, 13, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 4;
  pointer-events: none;
}
.ba-badge.is-left { left: 12px; color: rgba(250, 248, 244, 0.82); }
.ba-badge.is-right { right: 12px; color: var(--gold); border-color: rgba(233, 184, 114, 0.35); }

/* Compact mode for filter cards */
.ba-stage.is-compact .ba-knob {
  width: 26px;
  height: 26px;
  font-size: 10px;
  border-width: 1.5px;
}
.ba-stage.is-compact .ba-badge {
  bottom: 8px;
  padding: 3px 8px;
  font-size: 9.5px;
}
.ba-stage.is-compact .ba-badge.is-left { left: 8px; }
.ba-stage.is-compact .ba-badge.is-right { right: 8px; }
.preset-showcase-card:hover .preset-preview-box .ba-img { transform: none; }

/* Editorial Before/After Effect Showcase Grid (AI & Local Tools) */
.effect-ba-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.effect-ba-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.effect-ba-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 184, 114, 0.42);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
}
.effect-ba-media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  background: #0d0c0b;
  overflow: hidden;
}
.effect-ba-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.effect-ba-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  background: linear-gradient(180deg, #171614 0%, #131210 100%);
}
.effect-ba-body h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.08;
  color: var(--ink);
}
.effect-ba-body p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}
.effect-ba-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.effect-ba-try-btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 248, 236, 0.06);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  padding: 9px 13px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: center;
}
.effect-ba-try-btn:hover {
  background: var(--ink);
  color: #11100f;
  border-color: var(--ink);
}
.effect-ba-more-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.effect-ba-more-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone-card {
  border: 1.5px dashed rgba(233, 184, 114, 0.35);
  background: rgba(233, 184, 114, 0.04);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone-card:hover { background: rgba(233, 184, 114, 0.09); border-color: var(--gold); }

.feature-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pillar-card strong { font-size: 15.5px; color: var(--ink); }
.pillar-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------------- Projects Cards (Dark) ---------------- */

.recent-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
}
.project-card {
  flex: 0 0 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}
.projects-grid .project-card { flex: none; width: 100%; }
.project-card:hover { transform: translateY(-2px); border-color: rgba(233, 184, 114, 0.4); }
.project-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #0e0d0c;
  cursor: pointer;
}
.project-card-meta {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.project-card-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.project-card-sub { font-size: 11px; color: var(--muted); }
.project-card-menu {
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--muted);
}
.project-card-menu:hover { background: var(--surface-hover); color: var(--ink); }

.empty-inline {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------- Footer ---------------- */

.luma-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #0e0d0c;
  padding: 44px 32px 28px;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
}
.footer-brand p {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 320px;
}
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.footer-col a { font-size: 13.5px; color: var(--muted); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1320px;
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------------- Mobile Bottom Tabbar ---------------- */

.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: rgba(17, 16, 15, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
.tabbar-btn {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.tabbar-btn .tb-ico { font-size: 18px; line-height: 1.1; }
.tabbar-btn.is-active { color: var(--gold); }
.tabbar-create .tb-plus {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #11100f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

/* ---------------- Trends Banner inside AI Page ---------------- */

.trends-banner {
  background: linear-gradient(135deg, #1d1a16 0%, #161513 100%);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(233, 184, 114, 0.28);
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.trends-banner h2 { margin: 0 0 6px; font-family: var(--font-serif); font-size: 28px; font-weight: 500; }
.trends-banner p { margin: 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 8px;
}
.status-pill.is-ready { background: rgba(70, 194, 137, 0.18); color: #7ee2b8; border: 1px solid rgba(70, 194, 137, 0.35); }
.status-pill.is-training { background: rgba(233, 184, 114, 0.2); color: var(--gold); }

.trends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
}
.trend-feature-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.trend-feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 184, 114, 0.42);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
}
.trend-feature-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 440px;
  background: #0d0c0b;
  overflow: hidden;
}
.trend-feature-media .card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(17, 16, 15, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 184, 114, 0.4);
  color: var(--gold);
}
.trend-feature-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trend-feature-body strong {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.08;
}
.trend-feature-body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.48;
}

/* ---------------- Embedded AI Photoshoot & 4K Hair Stylist Workspace ---------------- */

.ps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ps-header h1 {
  margin: 4px 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 500;
  line-height: 1.02;
}
.ps-header h1 em { font-style: italic; color: var(--gold); }
.ps-header-sub { margin: 0; font-size: 14px; color: var(--muted); max-width: 620px; }

.ps-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 450px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.ps-composer {
  background: linear-gradient(160deg, #191816 0%, #131210 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-block-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 7px;
}
.ps-block-label small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.ps-seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.ps-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  padding: 9px 10px;
  border-radius: 9px;
  transition: background 0.15s, color 0.15s;
}
.ps-seg-btn:hover:not(:disabled) { color: var(--ink); }
.ps-seg-btn.is-active { background: var(--ink); color: #11100f; }
.ps-seg-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ps-model-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 248, 236, 0.035);
  border: 1px solid var(--border);
}
.ps-model-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ps-model-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid rgba(233, 184, 114, 0.5);
  flex-shrink: 0;
}
.ps-model-meta { min-width: 0; }
.ps-model-meta strong { display: block; font-size: 13px; color: var(--ink); }
.ps-model-meta span { display: block; font-size: 11.5px; color: var(--muted); }
.ps-model-meta span.is-ok { color: #7ee2b8; }

.ps-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ps-upload-slot {
  position: relative;
  border: 1.5px dashed rgba(233, 184, 114, 0.3);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  padding: 12px 10px;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ps-upload-slot:hover,
.ps-upload-slot.is-dragover {
  border-color: var(--gold);
  background: rgba(233, 184, 114, 0.08);
}
.ps-upload-slot.has-file {
  border-style: solid;
  border-color: rgba(233, 184, 114, 0.45);
  background: rgba(233, 184, 114, 0.06);
}
.ps-slot-thumb {
  width: 52px;
  height: 64px;
  border-radius: 9px;
  object-fit: cover;
  object-position: center top;
  background: #0d0c0b;
  flex-shrink: 0;
}
.ps-slot-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(233, 184, 114, 0.1);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ps-slot-copy {
  min-width: 0;
  text-align: left;
  flex: 1;
}
.ps-slot-copy strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-slot-copy span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.ps-slot-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(17, 16, 15, 0.85);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.ps-slot-clear:hover { background: #d64c50; border-color: #d64c50; }

.ps-prompt-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-mini-action {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 4px;
  opacity: 0.9;
}
.ps-mini-action:hover { opacity: 1; text-decoration: underline; }
.ps-mini-action.is-muted { color: var(--muted); }

.ps-textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  background: rgba(10, 9, 8, 0.65);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.ps-textarea:focus { outline: none; border-color: var(--gold); }
.ps-textarea::placeholder { color: var(--muted-2); }

.ps-style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ps-style-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  transition: all 0.15s;
}
.ps-style-chip:hover { color: var(--ink); border-color: rgba(233, 184, 114, 0.45); background: rgba(233, 184, 114, 0.08); }

.ps-ar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ps-ar-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 12px;
  padding: 9px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  transition: all 0.15s;
}
.ps-ar-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.ps-ar-btn.is-active {
  background: rgba(233, 184, 114, 0.14);
  border-color: var(--gold);
  color: var(--ink);
}
.ps-ar-box {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.ps-ar-box.ar-34 { width: 12px; height: 16px; }
.ps-ar-box.ar-916 { width: 10px; height: 18px; }
.ps-ar-box.ar-11 { width: 14px; height: 14px; }

.ps-submit-wrap {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #11100f;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.ps-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(250, 248, 244, 0.18);
}
.ps-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ps-credits-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

/* Right Result Canvas Panel */
.ps-canvas-panel {
  position: sticky;
  top: 84px;
  background:
    radial-gradient(520px 320px at 78% 14%, rgba(233, 184, 114, 0.11), transparent 65%),
    linear-gradient(155deg, #171614 0%, #100f0e 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ps-canvas-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ps-canvas-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.ps-canvas-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-stage-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #0c0b0a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-height: 440px;
  padding: 16px;
}
.ps-ba-preview-wrap {
  width: 100%;
  max-width: 390px;
  aspect-ratio: 4 / 5;
  max-height: 490px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.ps-result-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 440px;
  max-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-result-viewport img {
  max-width: 100%;
  max-height: 530px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.ps-developing-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(12, 11, 10, 0.86);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.ps-developing-overlay strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
}
.ps-developing-overlay span {
  font-size: 13px;
  color: var(--gold);
}
.ps-session-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-top: 4px;
}
.ps-session-thumb {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #0d0c0b;
  flex: 0 0 auto;
  transition: border-color 0.15s, transform 0.15s;
}
.ps-session-thumb.is-active { border-color: var(--gold); transform: translateY(-2px); }
.ps-session-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lookbook Prompt Gallery (4 columns) */
.lookbook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.lookbook-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.lookbook-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 184, 114, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.lookbook-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 18px 44px rgba(233, 184, 114, 0.15);
}
.lookbook-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0d0c0b;
}
.lookbook-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.lookbook-card:hover .lookbook-media img { transform: scale(1.045); }
.lookbook-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,16,15,0.05) 35%, rgba(14,13,12,0.92) 100%);
}
.lookbook-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(17, 16, 15, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--gold);
}
.lookbook-info {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lookbook-info strong {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.05;
}
.lookbook-info span {
  font-size: 11.5px;
  color: rgba(250, 248, 244, 0.76);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lookbook-use-pill {
  margin-top: 6px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

/* 3-Step Personal AI Model Guide */
.model-guide-card {
  background: linear-gradient(145deg, #1b1916 0%, #131210 100%);
  border: 1px solid rgba(233, 184, 114, 0.25);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.model-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.model-guide-head h2 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
}
.model-guide-head h2 em { font-style: italic; color: var(--gold); }
.model-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.model-step-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.model-step-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.model-step-box strong { display: block; font-size: 14px; margin-bottom: 4px; }
.model-step-box p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ==================== FULLSCREEN DARK STUDIO LAYER (Editor / AI / Collage) ==================== */

.studio-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--dark-canvas);
  color: var(--dark-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-topbar {
  height: 54px;
  flex-shrink: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--dark-canvas);
  border-bottom: 1px solid var(--dark-border);
}
.studio-topbar-group { display: flex; align-items: center; gap: 8px; }
.studio-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.dark-btn {
  border: 1px solid var(--dark-border);
  background: var(--dark-pill);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s, opacity 0.14s;
}
.dark-btn:hover { background: #312e2a; }
.dark-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.dark-btn.is-active { background: var(--ink); color: #11100f; border-color: var(--ink); }
.dark-btn.btn-primary-dark { background: var(--ink); color: #11100f; border-color: var(--ink); font-weight: 700; }
.dark-btn.btn-primary-dark:hover { background: #ffffff; }
.dark-icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; }

.studio-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 376px;
  background: var(--dark-canvas);
}

.studio-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--dark-canvas);
  user-select: none;
  touch-action: none;
}

.studio-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.studio-viewport.is-zoomed { cursor: grab; }
.studio-viewport.is-zoomed:active { cursor: grabbing; }

.studio-surface {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
}

.photo-frame {
  position: relative;
  display: inline-block;
  line-height: 0;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.6);
  background: repeating-conic-gradient(#1f1d1a 0% 25%, #151412 0% 50%) 50% / 16px 16px;
}
.photo-frame canvas,
.photo-frame img {
  display: block;
  max-width: calc(100vw - 416px);
  max-height: calc(100dvh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.overlay-canvas, .before-layer {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}
.before-layer { pointer-events: none; }

.split-divider {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #ffffff; box-shadow: 0 0 12px rgba(0,0,0,0.7); pointer-events: none; z-index: 6;
}
.split-handle {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(17, 16, 15, 0.85); border: 2px solid #ffffff; color: #ffffff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: ew-resize; z-index: 7;
}

.stage-pills {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 10;
}
.stage-pill {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18, 17, 15, 0.84);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.stage-pill.is-active { background: var(--ink); color: #11100f; }

.stage-busy {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(11, 11, 12, 0.66); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; font-size: 14px; color: #ffffff;
}
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2); border-top-color: var(--gold);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.retouch-loupe {
  position: absolute; top: 16px; left: 16px; width: 128px; height: 128px;
  border-radius: 50%; overflow: hidden; border: 2.5px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.65); z-index: 15; pointer-events: none; background: #0b0b0c;
}
.retouch-loupe.is-right { left: auto; right: 16px; }
.retouch-loupe canvas { width: 100%; height: 100%; display: block; }
.retouch-loupe-ring {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.92); box-shadow: 0 0 0 1px rgba(0,0,0,0.55);
}

.crop-overlay { position: absolute; inset: 0; z-index: 8; pointer-events: auto; }
.crop-box { position: absolute; border: 1.5px solid #ffffff; box-shadow: 0 0 0 9999px rgba(0,0,0,0.6); cursor: move; }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.32) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}
.crop-handle { position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: #ffffff; border: 2px solid #0b0b0c; }
.crop-handle[data-dir="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.crop-handle[data-dir="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.crop-handle[data-dir="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.crop-handle[data-dir="se"] { left: 100%; top: 100%; cursor: nwse-resize; }

.studio-inspector {
  background: var(--dark-surface);
  border-left: 1px solid var(--dark-border);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.studio-tool-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px;
  border-bottom: 1px solid var(--dark-border); flex-shrink: 0;
}
.tool-tab-chip {
  flex: 0 0 auto; border: 1px solid transparent; background: var(--dark-pill);
  color: var(--dark-muted); font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.tool-tab-chip:hover { color: #ffffff; }
.tool-tab-chip.is-active { background: var(--ink); color: #11100f; font-weight: 700; }
.tool-tab-chip.is-ai { border-color: rgba(233, 184, 114, 0.35); color: var(--gold); }
.tool-tab-chip.is-ai.is-active { background: var(--gold); color: #11100f; border-color: var(--gold); }

.inspector-scroll {
  flex: 1; min-height: 0; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.inspector-scroll > * { flex-shrink: 0; }
.inspector-footer {
  padding: 12px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--dark-border); background: var(--dark-surface);
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
}

.sub-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.sub-pills::-webkit-scrollbar { display: none; }
.sub-pill {
  flex: 0 0 auto; border: 1px solid var(--dark-border); background: var(--dark-panel);
  color: var(--dark-muted); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px;
}
.sub-pill.is-active { background: var(--ink); color: #11100f; border-color: var(--ink); }

.dark-search {
  width: 100%; background: var(--dark-panel); border: 1px solid var(--dark-border);
  border-radius: 10px; padding: 8px 12px; color: #ffffff; font-size: 13px;
}
.dark-search::placeholder { color: var(--dark-muted); }

.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.filter-card {
  border: 1.5px solid transparent; background: var(--dark-panel); border-radius: 12px;
  padding: 4px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--dark-ink);
}
.filter-card:hover { border-color: rgba(255,255,255,0.28); }
.filter-card.is-active { border-color: var(--gold); background: #26231f; }
.filter-thumb { width: 100%; aspect-ratio: 1/1; border-radius: 8px; object-fit: cover; background: #0e0d0c; }
.filter-name { font-size: 11.5px; font-weight: 600; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slider-block { display: flex; flex-direction: column; gap: 6px; }
.slider-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.slider-head span { color: var(--dark-ink); font-weight: 600; }
.slider-head output { color: var(--dark-muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }

input[type="range"].dark-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: rgba(255,255,255,0.18); border-radius: 999px; outline: none;
}
input[type="range"].dark-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.5); cursor: pointer;
}

.param-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.param-tile {
  border: 1px solid var(--dark-border); background: var(--dark-panel); border-radius: 12px;
  padding: 9px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--dark-muted); position: relative;
}
.param-tile .pt-val { font-size: 13px; font-weight: 700; color: var(--dark-ink); }
.param-tile.is-active { border-color: var(--gold); background: #26231f; color: #ffffff; }
.param-tile.is-modified::after { content: ""; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.dark-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.dark-media-card {
  border: 1.5px solid transparent; background: var(--dark-panel); border-radius: 12px;
  padding: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--dark-ink);
}
.dark-media-card.is-active { border-color: var(--gold); }
.dark-media-card img, .dark-media-card .swatch-box {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.dark-media-card .card-caption { padding: 6px 5px; font-size: 11px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dark-textarea {
  width: 100%; min-height: 82px; resize: vertical; background: var(--dark-panel);
  border: 1px solid var(--dark-border); border-radius: 12px; padding: 10px 12px;
  color: #ffffff; font-size: 13.5px; line-height: 1.45;
}
.dark-textarea::placeholder { color: var(--dark-muted); }
.prompt-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.example-chip {
  border: 1px solid var(--dark-border); background: var(--dark-panel); color: var(--dark-muted);
  font-size: 12px; padding: 6px 10px; border-radius: 10px; text-align: left;
}
.example-chip:hover { color: #ffffff; border-color: rgba(233,184,114,0.45); }
.info-note-dark { font-size: 12px; color: var(--dark-muted); line-height: 1.48; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > * { flex: 1; }
.text-link { border: 0; background: transparent; color: var(--gold); font-size: 13px; font-weight: 600; padding: 4px 6px; }

/* ---------------- Modals (Obsidian Dark) ---------------- */

dialog.modal-dialog {
  border: 0; padding: 0; background: transparent; max-width: 440px; width: calc(100% - 28px); color: var(--ink);
}
dialog.modal-dialog::backdrop { background: rgba(7, 7, 7, 0.72); backdrop-filter: blur(8px); }
.modal-card {
  background: #191816; color: var(--ink); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 28px 80px rgba(0,0,0,0.65);
  display: flex; flex-direction: column; gap: 14px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 500; }
.modal-close {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  width: 32px; height: 32px; border-radius: 50%; font-size: 18px;
}
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field-input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-size: 14px;
}
.field-input:focus { outline: 1.5px solid var(--gold); background: var(--surface-2); }
.form-error {
  margin: 0; font-size: 13px; color: #ff9c9f;
  background: rgba(232, 90, 94, 0.14); border: 1px solid rgba(232, 90, 94, 0.35);
  padding: 9px 12px; border-radius: 10px;
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--surface); padding: 4px; border-radius: 12px; border: 1px solid var(--border);
}
.auth-tab { border: 0; background: transparent; padding: 8px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.auth-tab.is-active { background: var(--ink); color: #11100f; }

.history-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.history-row {
  display: flex; align-items: center; justify-content: space-between; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--dark-border); background: var(--dark-panel);
  color: var(--dark-ink); font-size: 13.5px; text-align: left;
}
.history-row.is-current { border-color: var(--gold); background: #26231f; font-weight: 700; }
.history-row.is-future { opacity: 0.45; }

.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 120; background: rgba(24, 22, 20, 0.96); color: var(--ink);
  padding: 11px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55); border: 1px solid rgba(233, 184, 114, 0.32);
  max-width: calc(100vw - 32px); text-align: center;
}

/* ==================== RESPONSIVE (Tablet & Mobile PWA) ==================== */

@media (max-width: 1120px) {
  .quick-hub-grid { grid-template-columns: repeat(3, 1fr); }
  .editorial-hero, .tool-landing-hero { grid-template-columns: 1fr; padding: 28px; }
  .hero-compare-frame { max-height: 420px; }
  .bento-card.span-7, .bento-card.span-5, .bento-card.span-4, .bento-card.span-6 { grid-column: span 6; }
  .effect-ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-workspace { grid-template-columns: 1fr; }
  .lookbook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .luma-sidebar { display: none; }
  .luma-main-col { margin-left: 0; padding-bottom: calc(74px + var(--safe-bottom)); }
  .mobile-tabbar { display: grid; }
  .luma-topbar { padding: 0 14px; height: 60px; }
  .topbar-left-mobile { display: flex; }
  .global-search-wrap { display: none; }
  .page-root { padding: 16px 14px 36px; }
  .editorial-hero, .tool-landing-hero { padding: 20px; gap: 22px; }
  .quick-hub-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bento-card.span-7, .bento-card.span-5, .bento-card.span-4, .bento-card.span-6 { grid-column: span 12; min-height: 260px; }
  .effect-ba-grid, .trends-grid, .model-guide-steps { grid-template-columns: 1fr; }
  .ps-composer, .ps-canvas-panel { padding: 16px; }
  .ps-upload-grid { grid-template-columns: 1fr; }
  .feature-pillars { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }

  /* Mobile Dark Studio */
  .studio-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .photo-frame canvas, .photo-frame img { max-width: calc(100vw - 16px); max-height: calc(100dvh - 360px); }
  .studio-inspector { border-left: 0; border-top: 1px solid var(--dark-border); max-height: 46dvh; }
  .studio-tool-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .studio-tool-tabs::-webkit-scrollbar { display: none; }
  .filter-grid { display: flex; overflow-x: auto; gap: 9px; padding-bottom: 4px; scrollbar-width: none; }
  .filter-card { flex: 0 0 84px; }
  .param-strip { display: flex; overflow-x: auto; scrollbar-width: none; }
  .param-tile { flex: 0 0 78px; }
  .dark-card-grid { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .dark-media-card { flex: 0 0 88px; }
}
