/* ==========================================================================
   RANHILL SAJ × whynt — LIQUID GLASS CINEMA OS (v11.0)
   Sculpted Optical Liquid Glass · Atmospheric Selection Blur Depth ·
   Spring Micro-Physics · Pointer Specular Refraction · Zero Visual Noise
   ========================================================================== */

:root {
  /* Razor-Sharp Pure #FFFFFF Swiss-Hardware Light Theme (20:1 Contrast · Zero Washed-Out Pastel!) */
  --bg: #FFFFFF;
  --bg-mesh: #FFFFFF;

  /* Machined Optical Frosted White Glass */
  --glass:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.86) 100%);
  --glass-strong: rgba(255, 255, 255, 0.96);
  --glass-card:
    linear-gradient(166deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 249, 252, 0.95) 100%);
  --glass-rim: rgba(11, 13, 18, 0.24);
  --glass-stroke: rgba(11, 13, 18, 0.13);
  --glass-bevel-top: rgba(255, 255, 255, 1);
  --glass-bevel-left: rgba(255, 255, 255, 0.90);
  --glass-bevel-bot: rgba(11, 13, 18, 0.14);
  --glass-spec-top: rgba(255, 255, 255, 0.98);
  --glass-spec-side: rgba(255, 255, 255, 0.72);
  --glass-spec-bot: rgba(11, 13, 18, 0.07);
  --glass-glint: rgba(255, 255, 255, 0.60);

  --ink: #0B0D12;
  --ink-soft: #334155;
  --ink-dim: #525B6B;
  --field: rgba(11, 13, 18, 0.046);
  --field-hover: rgba(11, 13, 18, 0.088);
  --hair: rgba(11, 13, 18, 0.145);
  --surface-soft: #F3F5F8;
  --monogram-bg: linear-gradient(145deg, #FFFFFF 0%, #F4F6F9 55%, #EDF4F6 100%);

  /* Restrained Official Ranhill Terracotta + High-Contrast Text Ink */
  --accent: #E54619;
  --accent-deep: #A6330E;
  --accent-ink: #B3360F;
  --accent-soft: rgba(201, 70, 28, 0.10);
  --accent-line: rgba(201, 70, 28, 0.30);
  --teal: #0A5863;
  --teal-soft: rgba(10, 88, 99, 0.095);
  --ok: #046C4E;
  --ok-soft: #ECFDF5;
  --amber: #9E5908;
  --amber-soft: rgba(158, 89, 8, 0.11);

  --shadow-card:
    0 8px 22px -12px rgba(11, 13, 18, 0.10),
    0 1px 2px rgba(11, 13, 18, 0.04),
    inset 0 1px 0 var(--glass-spec-top);
  --shadow-glass:
    0 18px 42px -16px rgba(11, 13, 18, 0.14),
    0 3px 10px -2px rgba(11, 13, 18, 0.06),
    inset 0 1.5px 0 var(--glass-spec-top),
    inset 1px 0 0 var(--glass-spec-side),
    inset 0 -1px 0 var(--glass-spec-bot);
  --shadow-float:
    0 30px 72px -16px rgba(11, 13, 18, 0.22),
    0 6px 18px -4px rgba(11, 13, 18, 0.08),
    inset 0 1.5px 0 var(--glass-spec-top),
    inset 1px 0 0 var(--glass-spec-side),
    inset 0 -1px 0 var(--glass-spec-bot);
  --shadow-screen:
    0 34px 86px -24px rgba(11, 13, 18, 0.26),
    0 8px 24px -8px rgba(11, 13, 18, 0.10);

  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);

  --dw: 356px;
  --tz: 1;
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

[data-theme="night"] {
  /* Authentic VisionOS Smoked Crystal Liquid Glass — Two-Layer Optical Substrate + Directional Bevels */
  --bg: #050608;
  --bg-mesh:
    radial-gradient(900px 560px at 50% -10%, rgba(120, 148, 198, 0.14), transparent 62%),
    radial-gradient(780px 540px at 85% 92%, rgba(46, 134, 152, 0.12), transparent 60%),
    radial-gradient(640px 460px at 14% 88%, rgba(188, 92, 54, 0.09), transparent 62%),
    linear-gradient(180deg, #090B10 0%, #050608 100%);
  /* Two-Layer Smoked Optical Substrate (Top-Left Specular Glaze OVER Continuous Smoked Obsidian Base!) */
  --glass:
    linear-gradient(152deg, rgba(255, 255, 255, 0.105) 0%, rgba(255, 255, 255, 0.025) 42%, transparent 100%),
    rgba(16, 19, 26, 0.80);
  --glass-strong: rgba(20, 24, 32, 0.94);
  /* Quiet Flat-Luminance Inner Panels (Zero Murky Mud · Crisp Separation) */
  --glass-card: linear-gradient(168deg, rgba(26, 30, 39, 0.86) 0%, rgba(15, 18, 24, 0.88) 100%);
  --glass-rim: rgba(255, 255, 255, 0.30);
  --glass-stroke: rgba(255, 255, 255, 0.13);
  --glass-bevel-top: rgba(255, 255, 255, 0.28);
  --glass-bevel-left: rgba(255, 255, 255, 0.16);
  --glass-bevel-bot: rgba(0, 0, 0, 0.42);
  --glass-spec-top: rgba(255, 255, 255, 0.24);
  --glass-spec-side: rgba(255, 255, 255, 0.11);
  --glass-spec-bot: rgba(0, 0, 0, 0.52);
  --glass-glint: rgba(255, 255, 255, 0.09);

  /* Single Signature Terracotta Fill + High-Contrast Coral Text Ink (WCAG AAA >= 7:1!) */
  --accent: #C8461B;
  --accent-deep: #A93812;
  --accent-ink: #FF9A76;
  --accent-soft: rgba(255, 138, 96, 0.15);
  --accent-line: rgba(255, 154, 118, 0.36);

  /* Razor-Crisp High-Contrast Ink Hierarchy */
  --ink: #FFFFFF;
  --ink-soft: #D3DAE6;
  --ink-dim: #97A4B8;
  --field: rgba(255, 255, 255, 0.065);
  --field-hover: rgba(255, 255, 255, 0.125);
  --hair: rgba(255, 255, 255, 0.11);
  --surface-soft: rgba(20, 24, 32, 0.88);
  --monogram-bg: linear-gradient(145deg, rgba(44, 38, 36, 0.80) 0%, rgba(20, 24, 32, 0.85) 100%);

  /* High-Luminance Readable Signal Inks on Dark Glass */
  --teal: #7DD3FC;
  --teal-soft: rgba(125, 211, 252, 0.14);
  --ok: #4ADE80;
  --ok-soft: rgba(74, 222, 128, 0.14);
  --amber: #FCD34D;
  --amber-soft: rgba(252, 211, 77, 0.15);

  --shadow-card:
    0 10px 26px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-glass:
    0 24px 56px -14px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.60),
    inset 0 1px 0 var(--glass-spec-top),
    inset 1px 0 0 var(--glass-spec-side),
    inset 0 -1px 0 var(--glass-spec-bot);
  --shadow-float:
    0 38px 92px -12px rgba(0, 0, 0, 0.84),
    0 0 0 1px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 1px 0 0 rgba(255, 255, 255, 0.13);
  color-scheme: dark;
}
/* 60/120fps Hardware Precision: Real optical liquid-glass refraction on floating planes (.gl) */
[data-theme="night"] .btn.dark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}
[data-theme="night"] .btn.dark:hover {
  background: rgba(255, 255, 255, 0.20);
}
[data-theme="night"] .fpill.on {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.30);
  color: #FFFFFF;
}
[data-theme="night"] .dtab.on {
  background: rgba(255, 255, 255, 0.17);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
[data-theme="night"] .studio-dock {
  background:
    linear-gradient(156deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.025) 42%, transparent 100%),
    rgba(15, 18, 25, 0.82);
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.28);
}
[data-theme="night"] .top-capsule {
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.024) 42%, transparent 100%),
    rgba(15, 18, 25, 0.82);
  border-color: rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.26);
}
[data-theme="night"] .top-capsule .ib.active {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
[data-theme="night"] .top-capsule .ib.dark-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
}
[data-theme="night"] .top-capsule .ib.dark-pill:hover {
  background: rgba(255, 255, 255, 0.20);
}
[data-theme="night"] .og-prev-thumb { border-color: rgba(255, 255, 255, 0.18); }

* { box-sizing: border-box; }
html, body { height: 100%; height: 100dvh; margin: 0; padding: 0; overflow: hidden; }
body {
  font-family: var(--body); font-size: 13px; line-height: 1.5;
  color: var(--ink); background: var(--bg-mesh);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.ic { display: block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }

/* Sculptural Hairline Sliders */
input[type="range"]:not(.ba-slider) {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; border-radius: 999px;
  background: var(--hair); outline: none; cursor: pointer;
}
input[type="range"]:not(.ba-slider)::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #FFFFFF; border: 1.75px solid var(--accent);
  box-shadow: 0 2px 6px rgba(18, 22, 28, 0.18);
  transition: transform 0.14s var(--ease);
}
input[type="range"]:not(.ba-slider)::-webkit-slider-thumb:hover { transform: scale(1.16); }

/* Pure #FFFFFF Swiss ground in light mode; optical smoked bokeh only in Night mode */
.ambient-caustics {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: none;
  contain: strict;
}
[data-theme="night"] .ambient-caustics {
  background:
    radial-gradient(46% 38% at 50% 4%, rgba(140, 165, 210, 0.10) 0%, transparent 66%),
    radial-gradient(42% 40% at 88% 82%, rgba(40, 128, 148, 0.10) 0%, transparent 66%),
    radial-gradient(40% 38% at 14% 86%, rgba(176, 86, 52, 0.08) 0%, transparent 66%);
}

/* Authentic VisionOS Translucent Crystal Glass Surface (Directional Specular Bevels) */
.gl {
  background: var(--glass);
  -webkit-backdrop-filter: blur(42px) saturate(180%) brightness(1.02);
  backdrop-filter: blur(42px) saturate(180%) brightness(1.02);
  border: 1px solid var(--glass-stroke);
  border-top-color: var(--glass-bevel-top);
  border-left-color: var(--glass-bevel-left);
  border-bottom-color: var(--glass-bevel-bot);
  box-shadow: var(--shadow-glass);
}
[data-theme="night"] .gl {
  -webkit-backdrop-filter: blur(44px) saturate(165%) brightness(0.88);
  backdrop-filter: blur(44px) saturate(165%) brightness(0.88);
}

/* ==========================================================================
   FULL-BLEED GALLERY VIEWPORT + SINGLE-PASS SEAMLESS OPTICAL BLUR DEPTH
   ========================================================================== */
.viewport {
  position: relative; z-index: 1; width: 100vw; height: 100dvh; overflow: hidden;
  transition: filter 0.3s var(--spring), transform 0.34s var(--spring);
  transform-origin: center center;
}
body.overlay-blur .viewport,
body:has(.flowpane:not([hidden])) .viewport,
body:has(#appMenu:not([hidden])) .viewport,
body:has(#welcomeOverlay:not([hidden])) .viewport {
  filter: blur(18px) saturate(1.08);
  transform: scale(0.985);
  will-change: filter, transform;
}
body:has(.flowpane:not([hidden])) .top-capsule,
body:has(.flowpane:not([hidden])) .emblem-btn,
body:has(.flowpane:not([hidden])) .studio-dock,
body:has(.flowpane:not([hidden])) .side-pill {
  opacity: 0.42;
  pointer-events: none;
}
body.drawer-open #viewEditor .monitor-stage {
  transition: filter 0.3s var(--spring), transform 0.34s var(--spring);
}
body.drawer-fs #viewEditor .monitor-stage {
  filter: blur(16px) saturate(1.12);
  transform: scale(0.975);
}

/* Click-Outside Lightweight Tinted Scrim (Zero Double-Blur Pass!) */
#studioBackdrop {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(244, 241, 235, 0.34);
  animation: backdropFadeIn 0.22s ease-out forwards;
}
[data-theme="night"] #studioBackdrop { background: rgba(8, 10, 14, 0.46); }
@keyframes backdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Restrained Leica/VisionOS Optical Precision (Zero Overshoot Bounce, Zero AI-Slop Motion) */
@keyframes quietIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popPrecision {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes drawerSlide {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.gallery-view:not([hidden]) { animation: quietIn 0.15s ease-out both; }
#viewEditor:not([hidden]) { animation: quietIn 0.15s ease-out both; }
.flowpane:not([hidden]) { animation: quietIn 0.18s ease-out both; }
#appMenu:not([hidden]) { animation: popPrecision 0.16s var(--ease) both; }
#aiChat:not([hidden]) { animation: quietIn 0.16s ease-out both; }
#adhocDrawer:not([hidden]) { animation: drawerSlide 0.18s var(--ease) both; }

/* 1. TOP-LEFT SCULPTURAL LAYAR EMBLEM CIRCLE (ALIGNED 14px WITH TOP CAPSULE!) */
.emblem-btn {
  position: fixed; top: 14px; left: 20px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  transition: transform 0.22s var(--ease), box-shadow 0.22s ease;
}
.emblem-btn:hover { transform: scale(1.06); }

/* 2. TOP COMMAND BAR (DESKTOP APP SHELL · ALWAYS-VISIBLE AD-HOC INPUT + CONTEXT TOOLS) */
.top-capsule {
  position: fixed; top: 14px; left: 82px; right: 20px; transform: none; z-index: 40;
  height: 48px; padding: 5px 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
  max-width: none; overflow: hidden;
}
body:not(.studio-editor) .top-capsule .stage-only { display: none; }
.adhoc-top-form {
  flex: 1; min-width: 190px; max-width: 540px; height: 34px; margin: 0 4px;
  padding: 0 4px 0 11px; border-radius: 999px;
  background: var(--field); border: 1px solid var(--hair);
  display: flex; align-items: center; gap: 7px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.adhoc-top-form:focus-within {
  border-color: var(--accent-line); background: var(--field-hover);
}
.adhoc-top-form .adhoc-ic { color: var(--accent-ink); flex: none; width: 14px; height: 14px; }
.adhoc-top-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 13px; font-weight: 450; color: var(--ink);
}
.adhoc-top-form input::placeholder { color: var(--ink-dim); }
.adhoc-go {
  height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--hair);
  background: var(--field-hover); color: var(--ink); font-size: 11.5px; font-weight: 600; cursor: pointer;
  flex: none; transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
[data-theme="night"] .adhoc-go {
  border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.12); color: #FFFFFF;
}
.adhoc-top-form:focus-within .adhoc-go, .adhoc-go:hover {
  background: var(--accent); border-color: var(--accent); color: #FFFFFF;
}
.adhoc-k {
  height: 24px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--hair);
  background: transparent; color: var(--ink-dim); font-family: var(--mono); font-size: 10px;
  font-weight: 600; cursor: pointer; flex: none;
}
.adhoc-k:hover { color: var(--ink); border-color: var(--glass-rim); }
.top-capsule .cap-div { margin-left: auto; }
.top-capsule .cap-div + .ib + .ib + .ib + .ib + .cap-div { margin-left: 4px; }
.cap-div { width: 1px; height: 18px; background: var(--hair); margin: 0 5px; flex: none; }
.co-sel {
  height: 32px; border-radius: 999px; border: 1px solid var(--accent-line);
  background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600;
  padding: 0 11px; cursor: pointer; flex: none; max-width: 158px;
}
.co-sel:focus { outline: none; border-color: var(--accent); }

/* Sculptural Icon Buttons (Expand ONLY when Active — Garden Studio Signature!) */
.ib {
  height: 36px; min-width: 36px; padding: 0 9px; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; font-weight: 500; white-space: nowrap; flex: none;
  transition: all 0.2s var(--ease);
}
.ib:hover { background: var(--field-hover); color: var(--ink); }
.ib:disabled { opacity: 0.30; cursor: default; }
.ib.active, .ib[aria-pressed="true"] {
  background: var(--accent); color: #FFFFFF; padding: 0 15px 0 12px;
  box-shadow: 0 6px 18px -6px rgba(217, 70, 26, 0.45);
}
.ib .nm { display: none; }
.ib.active .nm, .ib[aria-pressed="true"] .nm, .ib.show-nm .nm { display: inline; }
.ib.pill-soft { background: var(--field); color: var(--ink); padding: 0 13px; }
.ib.pill-soft:hover { background: var(--field-hover); }
.ib.dark-pill { background: var(--ink); color: var(--bg); padding: 0 15px 0 12px; }
.ib.dark-pill:hover { opacity: 0.88; background: var(--ink); color: var(--bg); }
.ib.dirty { background: var(--accent-soft); color: var(--accent); padding: 0 13px; }

/* 3. RIGHT-EDGE SLIM FLOATING VERTICAL GLASS TOOL PILL (GARDEN + / - / ↻ FEEL!) */
.side-pill {
  position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 38;
  width: 48px; padding: 6px; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: right 0.34s var(--ease), opacity 0.2s ease;
}
body.drawer-open .side-pill { right: calc(var(--dw) + 32px); }
.side-pill .ib { width: 36px; height: 36px; padding: 0; }
.side-pill .ib.active { padding: 0; width: 36px; }

/* SINGLE TRANSLUCENT FLOATING STUDIO DRAWER (OPEN ONLY ON DEMAND · ALIGNED TO 74px GRIDLINE!) */
.studio-drawer {
  position: fixed; top: 74px; right: 20px; bottom: 82px; width: var(--dw); z-index: 39;
  border-radius: 26px; display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(100% + 40px)); opacity: 0; pointer-events: none;
  transition: transform 0.24s var(--ease), opacity 0.18s ease;
}
body.drawer-open .studio-drawer { transform: translateX(0); opacity: 1; pointer-events: auto; }
body.drawer-fs .studio-drawer { inset: 74px 20px 82px !important; width: auto !important; z-index: 58 !important; }
body.drawer-fs .drawer-body { max-width: 1120px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }

.drawer-resizer { position: absolute; left: 0; top: 20px; bottom: 20px; width: 7px; cursor: ew-resize; z-index: 5; }
.drawer-hd {
  display: flex; align-items: center; gap: 8px; padding: 16px 14px 12px 20px;
  border-bottom: 1px solid var(--hair); flex: none;
}
.drawer-hd h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; line-height: 1.05; }
.drawer-hd .sp { flex: 1; }
.drawer-tabs { display: flex; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; flex: none; }
.drawer-tabs::-webkit-scrollbar { display: none; }
.dtab {
  height: 27px; padding: 0 7px; border-radius: 999px; border: 0; background: transparent;
  color: var(--ink-soft); font-size: 10.75px; font-weight: 500; cursor: pointer; white-space: nowrap; flex: none;
}
.dtab:hover { background: var(--field); color: var(--ink); }
.dtab.on { background: var(--ink); color: var(--bg); font-weight: 600; }
.drawer-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 20px; scrollbar-width: thin; }

/* 4. SIGNATURE FLOATING LIQUID-GLASS BOTTOM DOCK + SPRING GLIDER PILL */
.studio-dock {
  position: fixed; left: 50%; bottom: calc(16px + var(--sab)); transform: translateX(-50%); z-index: 42;
  display: flex; align-items: center; gap: 4px; padding: 6px 7px; border-radius: 26px;
  box-shadow: var(--shadow-float);
  max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
}
.studio-dock::-webkit-scrollbar { display: none; }
.dock-glider {
  position: absolute; left: 0; top: 6px; height: 44px; border-radius: 18px;
  background: var(--accent);
  box-shadow: 0 8px 22px -6px rgba(217, 70, 26, 0.48);
  pointer-events: none; z-index: 0; opacity: 0;
  transition: transform 0.42s var(--spring), width 0.36s var(--spring), opacity 0.2s ease, background 0.28s ease;
  will-change: transform, width;
}
.dock-sep { width: 1px; height: 22px; background: var(--hair); margin: 0 4px; flex: none; position: relative; z-index: 1; }
.dock-btn {
  position: relative; z-index: 1;
  height: 44px; min-width: 44px; padding: 0 11px; border-radius: 18px; border: 0;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: none;
  transition: transform 0.22s var(--ease), background 0.18s ease, color 0.2s ease, padding 0.24s var(--spring);
}
.dock-btn:hover { transform: translateY(-2.5px); background: var(--field-hover); color: var(--ink); }
.dock-btn:active { transform: scale(0.95); }
.dock-btn .dock-lbl { display: none; }
.dock-btn[aria-selected="true"] {
  background: transparent; color: #FFFFFF; padding: 0 18px 0 14px;
}
.studio-dock.no-glider .dock-btn[aria-selected="true"] {
  background: var(--accent);
  box-shadow: 0 8px 22px -6px rgba(217, 70, 26, 0.48);
}
.dock-btn[aria-selected="true"]:hover { background: transparent; color: #FFFFFF; }
.dock-btn[aria-selected="true"] .dock-lbl { display: inline; }

/* ==========================================================================
   VIEW 1: AIRY MUSEUM-GRADE VIDEO STAGE + COLLAPSIBLE FILMSTRIP / NLE DECK
   ========================================================================== */
#viewEditor {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 78px 86px calc(158px + var(--sab)) 86px;
  transition: padding-right 0.34s var(--ease), padding-bottom 0.32s var(--ease);
}
body.drawer-open #viewEditor { padding-right: calc(var(--dw) + 96px); }
body.tl-expanded #viewEditor { padding-bottom: calc(368px + var(--sab)); }

.monitor-stage {
  width: 100%; height: 100%; display: grid; place-items: center; position: relative; min-height: 180px;
}
.video-frame {
  position: relative; width: min(1120px, 100%); max-height: 100%; height: auto;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: 22px; background: #0A0C10;
  box-shadow: var(--shadow-screen);
  transition: aspect-ratio 0.3s var(--ease);
}
.video-frame.r916 { aspect-ratio: 9 / 16; width: auto; height: 100%; }
.video-frame.r11 { aspect-ratio: 1 / 1; width: auto; height: 100%; }
.video-frame.r329 { aspect-ratio: 32 / 9; width: min(1240px, 100%); height: auto; }
.led-stage-mock {
  position: relative; aspect-ratio: 32 / 9; width: 100%; border-radius: 22px; overflow: hidden;
  padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background:
    radial-gradient(45% 85% at 85% 20%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 65%),
    radial-gradient(40% 80% at 15% 85%, color-mix(in srgb, var(--teal) 36%, transparent), transparent 65%),
    linear-gradient(140deg, #0D141D 0%, #162231 55%, #0A1017 100%);
  color: #fff; border: 1px solid rgba(255,255,255,0.16); box-shadow: var(--shadow-screen);
  margin-bottom: 16px;
}
.led-stage-safe {
  position: absolute; inset: 8% 4%; border: 1px dashed rgba(255,255,255,0.28); border-radius: 10px; pointer-events: none;
}
.ai-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 960px) { .ai-model-grid { grid-template-columns: 1fr; } }
#mainVideo { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center center; will-change: transform, filter; }

/* Subtle Optical Layers inside Video Frame */
.safe-guides { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.sg-outer { position: absolute; inset: 5%; border: 1px dashed rgba(255, 255, 255, 0.32); }
.sg-inner { position: absolute; inset: 10%; border: 1px dashed rgba(255, 255, 255, 0.50); }
.sg-916 { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 31.64%; border-left: 1px solid rgba(217, 70, 26, 0.85); border-right: 1px solid rgba(217, 70, 26, 0.85); }

.cinema-bars { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.cinema-bars::before, .cinema-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 12%; background: #050608; }
.cinema-bars::before { top: 0; } .cinema-bars::after { bottom: 0; }
.cinema-optics { position: absolute; inset: 0; pointer-events: none; z-index: 4; }

.brand-bug-layer {
  position: absolute; top: 18px; right: 20px; z-index: 6; pointer-events: none;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #17191C; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.dot-accent { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.pip-layer {
  position: absolute; left: 73%; top: 62%; width: 22%; aspect-ratio: 16 / 10; z-index: 7;
  border-radius: 14px; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, 0.90);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38); cursor: grab; user-select: none;
}
.pip-layer img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.pip-layer span { position: absolute; left: 7px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(18, 22, 28, 0.74); color: #fff; font-size: 9px; font-weight: 600; }

/* Pure Swiss Zero-Box Floating Draggable Title */
.canvas-title-box {
  position: absolute; left: 5%; top: 7%; max-width: 68%; z-index: 6;
  padding: 6px 10px; border-radius: 10px; cursor: grab; user-select: none;
  border: 1px dashed transparent;
}
.canvas-title-box:hover, .canvas-title-box.selected { border-color: rgba(255, 255, 255, 0.65); }
.ct-kicker {
  display: inline-block; padding: 2px 9px; border-radius: 999px; margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.86); color: var(--accent);
  font-size: 9px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
}
.ct-bm { font-family: var(--display); font-weight: 500; font-size: clamp(19px, 2.2vw, 28px); line-height: 1.12; color: #FFFFFF; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.88); }
.ct-en { font-size: clamp(13px, 1.35vw, 17px); font-weight: 400; color: rgba(255, 255, 255, 0.94); margin-top: 4px; line-height: 1.25; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.92); }

/* Pixel-Aligned Before/After Curtain */
.ba-curtain { position: absolute; inset: 0; z-index: 9; overflow: hidden; user-select: none; }
.ba-before { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(0 52% 0 0); }
.ba-before img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.45) contrast(0.90) sepia(0.28) blur(0.6px); display: block; }
.ba-divider { position: absolute; top: 0; bottom: 0; left: 48%; width: 1.5px; background: #fff; box-shadow: 0 0 18px rgba(0, 0, 0, 0.55); pointer-events: none; z-index: 10; }
.ba-divider::after { content: "◀ ▶"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 5px 10px; border-radius: 999px; background: #fff; color: #17191C; font-size: 9.5px; font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); }
.ba-tag { position: absolute; top: 14px; padding: 4px 11px; border-radius: 999px; font-size: 10px; font-weight: 600; background: rgba(255, 255, 255, 0.88); color: #17191C; }
.ba-tag.l { left: 14px; } .ba-tag.r { right: 14px; }
.ba-slider { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 10; }

/* SLEEK FLOATING FILMSTRIP RIBBON -> EXPANDS SMOOTHLY INTO FULL 5-TRACK NLE (ZERO RAIL/DRAWER OVERLAP!) */
.filmstrip-dock {
  position: fixed; left: 50%; bottom: calc(80px + var(--sab)); transform: translateX(-50%); z-index: 36;
  width: min(920px, calc(100vw - 180px)); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: width 0.22s var(--ease), left 0.22s var(--ease);
}
body.left-rail-open .filmstrip-dock {
  left: calc(256px + (100vw - 256px - 88px) / 2);
  width: min(860px, calc(100vw - 256px - 104px));
}
body.drawer-open .filmstrip-dock {
  left: calc(88px + (100vw - 88px - var(--dw) - 88px) / 2);
  width: min(820px, calc(100vw - var(--dw) - 188px));
}
body.left-rail-open.drawer-open .filmstrip-dock {
  left: calc(256px + (100vw - 256px - var(--dw) - 92px) / 2);
  width: min(740px, calc(100vw - 256px - var(--dw) - 108px));
}
.fs-bar {
  height: 60px; padding: 0 12px; display: flex; align-items: center; gap: 10px;
}
.play-dot {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px -5px rgba(217, 70, 26, 0.48); transition: transform 0.16s var(--ease);
}
.play-dot:hover { transform: scale(1.06); }
.tc-clean { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); white-space: nowrap; flex: none; }
.tc-clean em { font-style: normal; color: var(--ink); font-weight: 600; }

/* Compact Visual Filmstrip Scrubber (Visible when collapsed — Pure Beauty!) */
.mini-strip {
  flex: 1; height: 38px; position: relative; border-radius: 12px; overflow: hidden;
  display: flex; gap: 2px; background: var(--field); cursor: pointer; user-select: none;
}
.mini-seg { position: relative; height: 100%; overflow: hidden; flex: 1; }
.mini-seg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.90; display: block; transition: opacity 0.15s ease; }
.mini-seg.active { box-shadow: inset 0 0 0 2px var(--accent); }
.mini-needle {
  position: absolute; top: 0; bottom: 0; left: 0%; width: 2px; background: var(--accent);
  box-shadow: 0 0 8px rgba(217, 70, 26, 0.65); pointer-events: none; z-index: 4;
}

/* Full 5-Track Pro NLE Drawer (Cleanly hidden until you tap "Tracks"!) */
.nle-expanded { border-top: 1px solid var(--hair); display: flex; flex-direction: column; height: 212px; }
body:not(.tl-expanded) .nle-expanded { display: none; }
.nle-tools {
  height: 36px; padding: 0 12px; border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.nle-g { display: flex; align-items: center; gap: 3px; }
.tl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 116px minmax(0, 1fr); overflow: hidden; }
.tl-headers { border-right: 1px solid var(--hair); display: flex; flex-direction: column; }
.tl-hdr { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 10px; border-bottom: 1px solid var(--hair); font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.tl-hdr.ruler-hdr { flex: none; height: 20px; font-family: var(--mono); font-size: 9px; color: var(--ink-dim); }
.tl-mini { width: 18px; height: 18px; border: 0; background: transparent; border-radius: 5px; color: var(--ink-dim); font-size: 9px; cursor: pointer; }
.tl-mini.off { background: var(--accent-soft); color: var(--accent); }

.tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; }
.tl-canvas { position: relative; height: 100%; min-width: 100%; width: calc(100% * var(--tz)); display: flex; flex-direction: column; cursor: pointer; user-select: none; }
.tl-ruler { height: 20px; flex: none; position: relative; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 9px; color: var(--ink-dim); }
.tl-tick { position: absolute; top: 3px; transform: translateX(-50%); pointer-events: none; }
.tl-lane { flex: 1; position: relative; border-bottom: 1px solid var(--hair); overflow: hidden; }
.tl-lane.is-muted { opacity: 0.32; }

.nle-clip { position: absolute; top: 2.5px; bottom: 2.5px; border-radius: 7px; overflow: hidden; border: 1.5px solid transparent; cursor: grab; }
.nle-clip.selected { border-color: var(--accent); z-index: 4; }
.nle-clip.v-clip { background: #14181F; }
.nle-clip.v-clip img { width: 100%; height: 100%; object-fit: cover; opacity: 0.90; pointer-events: none; display: block; }
.nle-clip.v-clip .clip-lbl { position: absolute; left: 9px; right: 7px; bottom: 2px; font-size: 9px; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.nle-clip.t-clip { background: var(--accent-soft); display: flex; align-items: center; padding: 0 8px; font-size: 9.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trim-h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 6; display: flex; align-items: center; justify-content: center; }
.trim-h.l { left: 0; } .trim-h.r { right: 0; }
.trim-h::after { content: ""; width: 2px; height: 12px; border-radius: 99px; background: #fff; opacity: 0; }
.nle-clip:hover .trim-h::after, .nle-clip.selected .trim-h::after { opacity: 1; }
.trans-badge { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 7; width: 14px; height: 20px; border-radius: 5px; border: 1px solid var(--hair); background: var(--glass-strong); color: var(--ink-soft); font-size: 8px; cursor: pointer; display: grid; place-items: center; }
.trans-badge.on { background: rgba(23, 25, 28, 0.82); color: #fff; border-color: rgba(255, 255, 255, 0.72); }
.clip-swapped-dot { position: absolute; top: 3px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.wave-wrap { position: absolute; inset: 2px 4px; border-radius: 7px; overflow: hidden; background: var(--field); display: flex; align-items: center; }
.wave-canvas { width: 100%; height: 100%; display: block; }
.audio-overlay-clip {
  position: absolute; top: 3px; bottom: 3px; border-radius: 6px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 7px;
  font-size: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden;
}
.audio-overlay-clip.vo { background: var(--teal); color: #fff; }
.audio-overlay-clip.sfx { background: var(--accent); color: #fff; }
.audio-overlay-clip .del-x { border: 0; background: rgba(255, 255, 255, 0.22); color: #fff; width: 14px; height: 14px; border-radius: 50%; font-size: 9px; cursor: pointer; display: grid; place-items: center; flex: none; }
.playhead { position: absolute; top: 0; bottom: 0; left: 0%; width: 1.5px; background: var(--accent); z-index: 14; pointer-events: none; }

/* ==========================================================================
   FIXED ZERO-WINDOW-SCROLL DESKTOP COMMAND OS ARCHITECTURE (100vw x 100dvh)
   ========================================================================== */
.gallery-view {
  position: absolute; inset: 74px 20px calc(82px + var(--sab)) 84px;
  overflow: hidden; display: flex; flex-direction: column;
  padding: 0; transition: left 0.2s var(--ease);
}
body.left-rail-open .gallery-view { left: 256px; }
body.left-rail-open #viewEditor { padding-left: 256px; }
.gallery-inner {
  width: 100%; height: 100%; max-width: none; margin: 0;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.gallery-inner:not(.cmd-fixed) {
  overflow-y: auto; padding-right: 4px; scrollbar-width: thin;
}
.gal-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap;
  flex: none; min-height: 38px; margin-bottom: 10px;
}
.gal-hdr h1 {
  margin: 0; font-family: var(--display); font-weight: 600;
  font-size: clamp(21px, 1.9vw, 25px); line-height: 1.05; letter-spacing: -0.025em;
  color: var(--ink); white-space: nowrap;
}
.gal-hdr p { display: none; }

/* Fixed Desktop Master-Detail Split & Framed Scroll Panes (Window NEVER Scrolls!) */
.cmd-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding-right: 4px; scrollbar-width: thin;
}
.cmd-split {
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 356px;
  gap: 12px; overflow: hidden;
}
@media (max-width: 1360px) {
  .cmd-split { grid-template-columns: minmax(0, 1fr) 318px; }
}
.cmd-main {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.cmd-inspector {
  min-width: 0; min-height: 0; border-radius: 24px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 11px; overflow-y: auto; scrollbar-width: thin;
  background: var(--glass);
  -webkit-backdrop-filter: blur(42px) saturate(180%) brightness(1.02);
  backdrop-filter: blur(42px) saturate(180%) brightness(1.02);
  border: 1px solid var(--glass-stroke);
  border-top-color: var(--glass-bevel-top);
  border-left-color: var(--glass-bevel-left);
  border-bottom-color: var(--glass-bevel-bot);
  box-shadow: var(--shadow-glass);
}
[data-theme="night"] .cmd-inspector {
  -webkit-backdrop-filter: blur(44px) saturate(165%) brightness(0.88);
  backdrop-filter: blur(44px) saturate(165%) brightness(0.88);
}
.cmd-frame-table {
  flex: 1; min-height: 0; overflow: auto; border-radius: 20px;
  border: 1px solid var(--glass-stroke); background: var(--glass-card);
  box-shadow: var(--shadow-card); scrollbar-width: thin;
}
.cmd-frame-table .gantt-table thead th {
  position: sticky; top: 0; z-index: 6;
  background: #13161E; border-bottom: 1px solid var(--hair);
}
:root:not([data-theme="night"]) .cmd-frame-table .gantt-table thead th {
  background: #FFFFFF;
}

/* Right-Docked Ad-Hoc World Execution Drawer */
.adhoc-drawer {
  position: fixed; top: 74px; right: 20px; bottom: calc(82px + var(--sab)); z-index: 62;
  width: min(420px, calc(100vw - 28px)); border-radius: 26px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-float);
}
.adhoc-hd {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px 16px;
  border-bottom: 1px solid var(--hair); flex: none;
}
.adhoc-badge {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--accent-ink); padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.adhoc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; scrollbar-width: thin; }

.sakshi-cue {
  padding: 8px 10px; border-radius: 10px; background: var(--field);
  border: 1px solid var(--hair); font-size: 12.5px; line-height: 1.46; color: var(--ink);
  margin-bottom: 5px;
}
.rasa-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 10px;
  background: var(--teal-soft); color: var(--teal); font-family: var(--mono); font-size: 11px; font-weight: 600;
  line-height: 1.35;
}
.status-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 999px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink-soft);
}
.status-pill.PUBLISHED { background: var(--ok-soft); color: var(--ok); border-color: rgba(19, 115, 79, 0.35); }
.status-pill.SAMI_LIVE { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.status-pill.STAGE_1 { background: var(--amber-soft); color: var(--amber); border-color: rgba(180, 105, 14, 0.36); }
.status-pill.IN_PROD { background: var(--teal-soft); color: var(--teal); border-color: rgba(15, 110, 122, 0.36); }

.filter-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fpill {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hair);
  background: var(--glass-card); color: var(--ink-soft); font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.16s ease;
}
.fpill:hover { border-color: var(--ink-dim); color: var(--ink); }
.fpill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fpill.accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Precision Hardware Cast & Family Cards (60/120fps · Zero Bouncy Pop-Ins, Zero Dimming) */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cast-card {
  border-radius: 20px; overflow: hidden; cursor: pointer;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  contain: layout style paint; content-visibility: auto; contain-intrinsic-size: auto 290px;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.cast-card:hover { border-color: var(--glass-rim); transform: translateY(-2px); }
.cast-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.cast-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #14181F; }
.cast-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.cast-pill-top {
  position: absolute; top: 11px; left: 11px; max-width: calc(100% - 22px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75); color: #17191C; font-size: 10px; font-weight: 600;
}
[data-theme="night"] .cast-pill-top {
  background: rgba(15, 19, 26, 0.86); border-color: rgba(255, 255, 255, 0.16); color: #F3F4F6;
}
.cast-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cast-body h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.018em; line-height: 1.12; color: var(--ink); }
.cast-role { font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.cast-feel { font-size: 12px; color: var(--ink-soft); line-height: 1.48; margin-top: 2px; }
.cast-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 10px; }
.ctag { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--field); color: var(--ink-soft); }

/* Storyboard & Campaigns */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 14px; }
.story-card, .cal-card {
  border-radius: 22px; overflow: hidden;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  contain: layout style paint; content-visibility: auto; contain-intrinsic-size: auto 320px;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.story-card:hover, .cal-card:hover { transform: translateY(-2px); border-color: var(--glass-rim); }
.shot-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #14181F; }
.shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.shot-badge {
  position: absolute; top: 11px; left: 11px; max-width: calc(100% - 118px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75); color: #17191C; font-size: 10px; font-weight: 600;
}
[data-theme="night"] .shot-badge:not(.r) {
  background: rgba(15, 19, 26, 0.86); border-color: rgba(255, 255, 255, 0.16); color: #F3F4F6;
}
.shot-badge.r { left: auto; right: 11px; max-width: none; background: var(--accent); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.camp-avatars { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.camp-av { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 3px; border-radius: 999px; border: 1px solid var(--hair); background: var(--field); font-size: 10.5px; font-weight: 500; cursor: pointer; }
.camp-av:hover { border-color: var(--accent); color: var(--accent); }
.camp-av img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; object-position: center 20%; }

/* Full-Bleed Orbitable 3D Johor Plant Twin */
#viewTwin { position: absolute; inset: 0; overflow: hidden; background: #D7ECF2; }
[data-theme="night"] #viewTwin { background: #0C141C; }
#twinCanvas, #blockoutCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#twinCanvas:active, #blockoutCanvas:active { cursor: grabbing; }
.mode-pill-toggle {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--field);
  border: 1px solid var(--hair); gap: 2px;
}
.mpt-btn {
  height: 28px; padding: 0 11px; border-radius: 999px; border: 0; background: transparent;
  color: var(--ink-soft); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.2s var(--spring);
}
.mpt-btn.on { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
:root:not([data-theme="night"]) .mpt-btn.on { background: var(--accent); color: #FFFFFF; }
.bo-sel {
  height: 32px; border-radius: 999px; border: 1px solid var(--hair);
  background: var(--glass-strong); color: var(--ink); padding: 0 11px; font-size: 11.5px; cursor: pointer;
}
.blockout-frame-guides {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
}
.bfg-safe {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(82vw, 1120px); aspect-ratio: 16 / 9; max-height: calc(100vh - 230px);
  border: 1px dashed rgba(217, 70, 26, 0.55); border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.bfg-hud {
  position: absolute; left: 50%; top: 148px; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  background: rgba(15, 19, 26, 0.72); color: #F5F7FA; border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.style-bible-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-radius: 24px; margin-bottom: 18px;
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--glass-glint), transparent 65%),
    var(--glass-card);
  -webkit-backdrop-filter: blur(28px) saturate(185%); backdrop-filter: blur(28px) saturate(185%);
  border: 1px solid var(--accent-line); box-shadow: var(--shadow-glass);
}
.style-swatch-row { display: inline-flex; align-items: center; gap: 5px; }
.style-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.85); box-shadow: 0 2px 6px rgba(0,0,0,0.18); }
.blockout-attach-strip {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--hair); background: var(--field); flex-wrap: wrap;
}
.blockout-attach-strip img {
  width: 96px; height: 54px; border-radius: 10px; object-fit: cover; border: 1px solid var(--hair); background: #14181F;
}

/* Titis Mascot Studio & Beginning of 2027 Year-End Wrapped Story */
.mascot-stage {
  display: grid; place-items: center; padding: 20px; border-radius: 22px;
  background: var(--field); border: 1px solid var(--hair); margin-bottom: 12px; position: relative; overflow: hidden;
}
.titis-float { /* Calm physical stillness — zero bobbing clip-art */ }
.wrapped-stage {
  position: relative; border-radius: 28px; overflow: hidden; padding: 28px 28px 24px;
  background:
    radial-gradient(62% 54% at 86% 14%, rgba(217, 70, 26, 0.30), transparent 64%),
    radial-gradient(58% 60% at 14% 88%, rgba(15, 110, 122, 0.34), transparent 68%),
    linear-gradient(155deg, #101720 0%, #152230 55%, #0D141C 100%);
  color: #F6F7F9; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: var(--shadow-screen);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 410px;
}
.wrapped-stage.r916 { max-width: 380px; margin: 0 auto; min-height: 610px; }
.wrapped-stat {
  font-family: var(--display); font-weight: 400; font-size: clamp(44px, 5.2vw, 68px);
  line-height: 0.96; color: #FFFFFF; letter-spacing: -0.02em; margin: 8px 0 4px;
}
.wrapped-dots { display: flex; gap: 5px; margin-bottom: 14px; }
.wrapped-dot {
  flex: 1; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.22);
  border: 0; padding: 0; cursor: pointer; transition: background 0.2s ease;
}
.wrapped-dot.on { background: var(--accent); }
.twin-hud-top { position: fixed; top: 80px; left: 20px; right: 20px; z-index: 20; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.twin-hud-top > * { pointer-events: auto; }
.twin-hud-bot { position: fixed; left: 20px; right: 20px; bottom: calc(82px + var(--sab)); z-index: 20; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.twin-hud-bot > * { pointer-events: auto; }
.twin-card { padding: 10px 16px; border-radius: 20px; color: var(--ink); flex-wrap: wrap; }
#twinPlantSel { min-height: 36px; border-radius: 999px; border: 1px solid var(--hair); background: var(--glass-strong); color: var(--ink); padding: 0 12px; font-size: 12px; cursor: pointer; }
.twin-pin { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; z-index: 12; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--hair); background: var(--glass-strong); color: var(--ink); font-size: 10.5px; font-weight: 600; box-shadow: var(--shadow-glass); transition: transform 0.16s ease; }
.twin-pin:hover { transform: translate(-50%, -108%) scale(1.04); }
.twin-pin.alert { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Clean Form & Panel Elements (Sculpted Translucent Glass!) */
.sec-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 9px; }
.gcard {
  border-radius: 24px;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-glass);
  padding: 16px 18px; margin-bottom: 14px;
  contain: layout style;
  transition: border-color 0.2s ease, box-shadow 0.22s ease;
}
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-tile {
  border-radius: 22px; padding: 16px 18px;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-glass);
  transition: transform 0.26s var(--spring), box-shadow 0.22s ease;
}
.kpi-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.kpi-tile small { display: block; font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; }
.kpi-tile strong { display: block; font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.025em; line-height: 1.08; margin-top: 4px; color: var(--ink); }

.field { display: grid; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field label { font-size: 11px; font-weight: 500; color: var(--ink-soft); display: flex; justify-content: space-between; }
.field label span { font-family: var(--mono); font-size: 10.5px; color: var(--accent-ink); }
.field input:not([type="range"]), .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 36px; border-radius: 12px;
  border: 1px solid var(--hair); background: var(--field); padding: 7px 11px; font-size: 12.5px; color: var(--ink);
}
.field select { padding-right: 28px; text-overflow: ellipsis; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; background: var(--glass-strong); }

.btn {
  height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--hair);
  background: var(--glass-card);
  color: var(--ink); font-size: 12px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  box-shadow: inset 0 1px 0 var(--glass-spec-top);
  transition: transform 0.2s var(--spring), background 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease; white-space: nowrap;
}
.btn:hover { background: var(--glass-strong); border-color: var(--ink-dim); transform: translateY(-1.5px); }
.btn:active, .fpill:active, .ib:active, .s2t-node:active, .pick-chip:active { transform: scale(0.965); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 11.5px; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(217, 70, 26, 0.50); }
.btn.accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.list-row:last-child { border-bottom: 0; }
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.chip-opt { border: 1px solid var(--hair); background: var(--field); border-radius: 12px; padding: 8px 10px; font-size: 11.5px; font-weight: 500; cursor: pointer; text-align: left; }
.chip-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--field); font-size: 12px; cursor: pointer; margin-bottom: 7px; }
.media-row { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; margin-bottom: 5px; }
.media-row:hover { background: var(--field); }
.media-row.active { border-color: var(--accent-line); background: var(--accent-soft); }
.media-row img { width: 56px; height: 34px; border-radius: 8px; object-fit: cover; background: #14181F; flex: none; }

/* Modals (Individual Character Bible, Launchpad, Settings, Lazy) */
.flowpane {
  position: fixed; inset: 34px 40px 88px; z-index: 60; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 30px; box-shadow: var(--shadow-float);
}
.fp-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--hair); flex: none; }
.fp-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.025em; line-height: 1.05; }
.fp-head small { color: var(--ink-soft); font-size: 12.5px; }
.fp-head .sp { flex: 1; }
.fp-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 26px 38px; }
.flowpane .field { margin-bottom: 9px; }
.char-prof-grid { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 24px; align-items: start; }
.feel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.feel-tile { padding: 14px 15px; border-radius: 18px; background: var(--field); }
.feel-tile small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 5px; }
.feel-tile p { margin: 0; font-size: 12px; color: var(--ink); line-height: 1.5; }
.alert-studio-grid { display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); gap: 22px; align-items: start; }
.phone-frame { position: relative; aspect-ratio: 9/16; width: 100%; border-radius: 30px; overflow: hidden; background: #0B2545; box-shadow: var(--shadow-screen); }
.phone-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.80; }
.phone-top { position: absolute; top: 0; left: 0; right: 0; padding: 16px; background: rgba(11, 37, 69, 0.90); color: #fff; }
.phone-bot { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; background: linear-gradient(180deg, rgba(11, 37, 69, 0.86), rgba(7, 25, 46, 0.98)); color: #fff; }

/* Supercharged VisionOS Smoked Liquid-Glass ⌘K Spotlight Dialog */
#appMenu.spotlight-cmd {
  position: fixed; left: 50%; top: 82px; transform: translateX(-50%); z-index: 64;
  width: min(640px, calc(100vw - 28px)); max-height: min(600px, calc(100dvh - 168px));
  padding: 0; border-radius: 28px; box-shadow: var(--shadow-float);
  display: flex; flex-direction: column; overflow: hidden;
}
#appMenu.spotlight-cmd .menu-search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; margin: 12px 14px 8px;
  border-radius: 18px; background: var(--field); border: 1px solid var(--hair); flex: none;
}
#appMenu.spotlight-cmd .menu-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; font-weight: 500; }
.sp-kbd {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--ink-dim);
  padding: 3px 7px; border-radius: 7px; border: 1px solid var(--hair); background: var(--field);
}
.sp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 14px 18px; }
.sp-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.sp-qtile {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 16px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink); cursor: pointer;
  text-align: left; transition: transform 0.16s var(--spring), background 0.15s ease, border-color 0.15s ease;
}
.sp-qtile:hover, .sp-qtile.sel { background: var(--accent-soft); border-color: var(--accent-line); transform: translateY(-1px); }
.sp-qtile svg { color: var(--accent); flex: none; }
.sp-qtile strong { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.sp-qtile small { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--ink-dim); margin-top: 1px; }
.sp-sec { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); padding: 8px 8px 4px; }
.sp-row {
  width: 100%; min-height: 40px; padding: 6px 10px; border-radius: 13px; border: 1px solid transparent;
  background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13px; font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.sp-row:hover, .sp-row.sel { background: var(--field-hover); border-color: var(--hair); }
.sp-row.sel { background: var(--accent-soft); border-color: var(--accent-line); }
.sp-row img.sp-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; }
.sp-row .sp-ic { color: var(--ink-soft); flex: none; }
.sp-row.sel .sp-ic { color: var(--accent); }
.sp-row .sp-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row .sp-sub { font-size: 11px; color: var(--ink-dim); margin-left: 6px; font-weight: 400; }
.sp-row .sp-tag { font-family: var(--mono); font-size: 9.5px; padding: 2px 7px; border-radius: 999px; background: var(--field); color: var(--ink-soft); flex: none; }
.sp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; border-top: 1px solid var(--hair); background: var(--field);
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim); flex: none;
}
@media (max-width: 640px) { .sp-quick-grid { grid-template-columns: repeat(2, 1fr); } }

/* Quiet Translucent Lazy × Titis Companion */
#aiChat {
  position: fixed; left: 50%; bottom: calc(76px + var(--sab)); transform: translateX(-50%);
  width: min(390px, calc(100vw - 28px)); max-height: min(400px, calc(100dvh - 150px));
  border-radius: 26px; z-index: 50; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-float);
}
.aic-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--hair); }
.aic-head strong { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.015em; line-height: 1; display: block; }
.aic-msgs { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.aic-m { padding: 9px 13px; border-radius: 16px; line-height: 1.45; max-width: 90%; }
.aic-m.bot { background: var(--field); align-self: flex-start; }
.aic-m.me { background: var(--accent); color: #fff; align-self: flex-end; }
.aic-slash { padding: 8px 12px; border-top: 1px solid var(--hair); display: flex; gap: 5px; flex-wrap: wrap; }
.aic-slash button { border: 1px solid var(--hair); background: transparent; color: var(--ink-soft); font-size: 11px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.aic-slash button:hover { border-color: var(--accent); color: var(--accent); }
.aic-slash button.boss { background: var(--accent); border-color: var(--accent); color: #fff; }
.aic-bar { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--hair); }
.aic-bar input { flex: 1; border: 1px solid var(--hair); background: var(--field); border-radius: 999px; padding: 7px 13px; font-size: 12px; outline: none; }

#toast {
  position: fixed; right: 20px; left: auto; top: 66px; bottom: auto; transform: translateY(-6px); z-index: 80;
  padding: 8px 16px; border-radius: 999px; background: rgba(15, 18, 24, 0.92); color: #fff;
  border: 1px solid var(--glass-rim); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  font-size: 12px; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.22s var(--ease);
}
#toast.on { opacity: 1; transform: translateY(0); }
body:not(.is-admin) .admin-only { display: none !important; }
.go-mob { display: none; }
.gantt-legend-bar {
  display: flex; align-items: center; gap: 14px; padding: 6px 12px;
  border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 10px;
  color: var(--ink-dim); background: var(--field);
}
.mob-swipe-hint { display: none; margin-left: auto; color: var(--accent-ink); font-weight: 600; }
.g-beat-title {
  font-weight: 600; font-size: 12px; color: var(--ink); line-height: 1.24;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 184px; white-space: normal;
}
.av-mini-mono {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: var(--mono); font-size: 9px; font-weight: 700; flex: none;
}
@media (min-width: 1400px) {
  .studio-dock .dock-btn { padding: 0 10px; gap: 6px; }
  .studio-dock .dock-lbl { display: inline; font-size: 11px; }
}
#stopDemoBtn { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 75; }

/* Whisper Hover Tooltip (Exact Garden Studio Style!) */
#tip {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  padding: 5px 10px; border-radius: 10px; background: rgba(23, 25, 28, 0.88); color: #fff;
  border: 1px solid var(--glass-rim);
  font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity 0.16s ease;
}
#tip.on { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #fff; z-index: 99; }

/* Story Lab Motion Plate Layer inside Video Frame */
.mix-motion-plate { position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #0A0C10; }
.mix-motion-plate img.plate-bg { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform, filter; }
.mix-plate-refs {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; display: flex; gap: 6px; padding: 5px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mix-plate-refs img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; object-position: center 20%; display: block; }

/* ==========================================================================
   v10 UNIVERSAL CAST DNA, RANHILL ASSET VAULT & MIX-AND-MATCH STORY LAB
   ========================================================================== */
/* Docked cleanly BELOW portrait — ZERO face occlusion! */
.angle-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  padding: 7px 10px; background: var(--field); border-bottom: 1px solid var(--hair);
}
.angle-thumb {
  aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; border: 1.5px solid transparent;
  cursor: pointer; background: var(--surface-soft); padding: 0;
}
.angle-thumb.on, .angle-thumb:hover { border-color: var(--accent); }
.angle-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }

.staff-monogram {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--monogram-bg);
  color: var(--ink); text-align: center; padding: 16px;
}
.staff-monogram .mono-ring {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--accent-line);
  font-family: var(--display); font-size: 28px; color: var(--accent); box-shadow: var(--shadow-glass);
}
.staff-monogram small { font-size: 11px; color: var(--ink-soft); font-weight: 500; }

.angle-viewer {
  position: relative; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden;
  background: var(--surface-soft); border: 1px solid var(--hair); margin-bottom: 10px;
  transition: aspect-ratio 0.34s var(--spring);
}
.angle-viewer.wide { aspect-ratio: 16 / 10; }
.angle-viewer.is-fullbody { aspect-ratio: 16 / 9; background: #C8C5BE; }
.angle-viewer.is-tall { aspect-ratio: 3 / 4; background: #C8C5BE; }
.angle-viewer.is-macro { aspect-ratio: 1 / 1; background: #14181F; }
.angle-viewer img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; transition: opacity 0.22s ease; }
.angle-viewer.is-sheet img, .angle-viewer.is-fullbody img, .angle-viewer.is-tall img { object-fit: contain; object-position: center center; }
.angle-viewer.is-macro img { object-fit: cover; object-position: center center; }
.vfx-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.vfx-tile {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--hair); background: var(--field); cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center;
  transition: transform 0.22s var(--spring), border-color 0.16s ease, box-shadow 0.2s ease;
}
.vfx-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-glass); }
.vfx-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.vfx-tile.empty { border-style: dashed; border-color: var(--ink-dim); }
.vfx-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.vfx-tile.wide-fit img { object-fit: cover; object-position: center center; }
.vfx-tile span {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 2px 6px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.72); color: #16181C; font-size: 8.5px; font-weight: 600;
}
[data-theme="night"] .vfx-tile span {
  background: rgba(15, 19, 26, 0.82); border-color: rgba(255, 255, 255, 0.14); color: #F3F4F6;
}
.dna-card.vfx-card { background: linear-gradient(155deg, rgba(217, 70, 26, 0.05) 0%, var(--field) 100%); border-color: var(--accent-line); }
.dna-card.vfx-card textarea { min-height: 76px; }
.vfx-tag-pill {
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
  font-weight: 600;
}
.angle-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.angle-tab {
  min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--hair);
  background: var(--field); color: var(--ink-soft); font-size: 11px; font-weight: 500; cursor: pointer;
}
.angle-tab.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.angle-upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.angle-drop-tile {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  border: 1.5px dashed var(--ink-dim); background: var(--field); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.angle-drop-tile:hover, .angle-drop-tile.is-dragover { border-color: var(--accent); background: var(--accent-soft); border-style: solid; }
.angle-drop-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.angle-drop-tile span {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7); color: #16181C; font-size: 9px; font-weight: 600;
}
[data-theme="night"] .angle-drop-tile span {
  background: rgba(15, 19, 26, 0.80); border-color: rgba(255, 255, 255, 0.14); color: #F3F4F6;
}
.bulk-drop-zone {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; margin-bottom: 10px;
  border-radius: 12px; border: 1.5px dashed var(--accent-line); background: var(--accent-soft);
  color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; text-align: center;
}
.bulk-drop-zone.is-dragover { background: var(--accent); color: #fff; border-style: solid; }

.dna-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.dna-card {
  padding: 12px 14px; border-radius: 18px; background: var(--field); border: 1px solid var(--hair);
  display: grid; gap: 6px;
}
.dna-card label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent-ink); }
.dna-card textarea {
  width: 100%; border: 0; background: transparent; resize: vertical; font-size: 12px;
  line-height: 1.46; color: var(--ink); padding: 0; outline: none; min-height: 98px;
}

.swatch-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; align-items: center; }
.swatch-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px;
  border-radius: 999px; border: 1px solid var(--hair); background: var(--field); font-size: 11px; color: var(--ink-soft);
}
.swatch-pill input[type="color"] { width: 18px; height: 18px; border: 0; padding: 0; background: transparent; border-radius: 50%; cursor: pointer; }

/* 6 Cohesive Bangsa Johor Family Showcase Cards & Modal Anchor */
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; margin-bottom: 28px; }
.family-card {
  border-radius: 22px; overflow: hidden;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  contain: layout style paint; content-visibility: auto; contain-intrinsic-size: auto 380px;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.family-card:hover { transform: translateY(-2px); border-color: var(--glass-rim); }
.family-portrait { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #14181F; }
.family-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.family-body { padding: 15px 18px 17px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.family-body h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; line-height: 1.1; }
.family-members-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.family-banner {
  display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 18px; align-items: center;
  border-radius: 24px; overflow: hidden; padding: 14px 18px; margin-bottom: 22px;
  background: var(--glass-card); border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-glass);
}
.family-banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; display: block; }
.family-modal-anchor {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px;
  border-radius: 16px; background: var(--field); border: 1px solid var(--hair); flex-wrap: wrap;
}
.family-modal-anchor img.fma-port { width: 92px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
@media (max-width: 760px) {
  .family-grid { grid-template-columns: 1fr; }
  .family-banner { grid-template-columns: 1fr; }
}

/* 9-Stage Source-to-Tap End-to-End Visual Journey Strip (Single Balanced 9-Col Row on Desktop!) */
.s2t-strip {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 7px;
  margin-bottom: 18px;
}
@media (max-width: 1240px) {
  .s2t-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .s2t-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.s2t-node {
  padding: 9px 10px; border-radius: 16px; border: 1px solid var(--glass-stroke);
  background: var(--glass-card);
  box-shadow: var(--shadow-card);
  text-align: left; cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.s2t-node:hover { transform: translateY(-2px); border-color: var(--accent); }
.s2t-node small { display: block; font-family: var(--mono); font-size: 9px; color: var(--accent-ink); font-weight: 700; }
.s2t-node strong { display: block; font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.22; margin: 2px 0; }
.s2t-node span { display: block; font-size: 9.5px; color: var(--ink-soft); line-height: 1.28; }

/* Mix-and-Match Story Composer Engine */
.mix-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); gap: 20px; align-items: start; margin-bottom: 28px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pick-chip {
  display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: 16px;
  border: 1px solid var(--hair); background: var(--glass-card); cursor: pointer; text-align: left;
  transition: all 0.16s ease;
}
.pick-chip:hover { border-color: var(--ink-dim); }
.pick-chip.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 6px 16px -10px rgba(217, 70, 26, 0.45); }
.pick-chip .pk-top { display: flex; align-items: center; gap: 7px; }
.pick-chip img, .pick-chip .pk-mono {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover; object-position: center 20%; flex: none;
  background: var(--field); display: grid; place-items: center; font-family: var(--display); font-size: 14px; color: var(--accent);
}
.pick-chip .pk-name { font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.pick-chip .pk-meta { font-size: 10px; color: var(--ink-dim); }
.pick-chip select {
  width: 100%; height: 27px; border-radius: 8px; border: 1px solid var(--hair);
  background: var(--glass-strong); font-size: 10.5px; padding: 0 6px; color: var(--ink);
}

.shot-board {
  border-radius: 28px; overflow: hidden;
  background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-float);
}
.shot-loc-hero { position: relative; aspect-ratio: 16 / 7.5; overflow: hidden; background: #14181F; }
.shot-loc-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-loc-bar {
  position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.84); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 11px; font-weight: 600; color: #17191C;
}
[data-theme="night"] .shot-loc-bar {
  background: rgba(16, 20, 28, 0.78); border-color: rgba(255, 255, 255, 0.14); color: #F3F4F6;
}
[data-theme="night"] .mix-plate-refs {
  background: rgba(16, 20, 28, 0.78); border: 1px solid rgba(255, 255, 255, 0.14);
}
.preflight-bar {
  padding: 8px 16px; font-size: 11.5px; font-weight: 500; border-bottom: 1px solid var(--hair);
  background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.preflight-bar.warn { background: var(--amber-soft); color: var(--amber); }
.shot-refs-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--hair); }
.shot-ref-tile {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--hair); background: var(--field);
  transition: transform 0.26s var(--spring), box-shadow 0.22s ease, border-color 0.18s ease;
}
.shot-ref-tile:hover { transform: translateY(-3px) scale(1.03); border-color: var(--accent); box-shadow: var(--shadow-glass); }
@media (prefers-reduced-motion: reduce) {
  .ambient-caustics, .gallery-view, #viewEditor, .flowpane, #appMenu, #aiChat, .cast-card, .family-card, .cal-card, .story-card, .s2t-node {
    animation: none !important; transition-duration: 0.01ms !important;
  }
}
.shot-ref-tile .srt-img { aspect-ratio: 1 / 1; overflow: hidden; position: relative; background: var(--surface-soft); }
.shot-ref-tile .srt-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.shot-ref-tile .srt-lbl { padding: 4px 6px; font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-ref-tile .srt-ang { display: block; font-size: 8.5px; font-weight: 500; color: var(--accent); }

.prompt-preview {
  font-family: var(--mono); font-size: 10.5px; line-height: 1.48; color: var(--ink);
  background: var(--field); border: 1px solid var(--hair); border-radius: 14px;
  padding: 10px 12px; max-height: 132px; overflow: auto; white-space: pre-wrap; margin-bottom: 10px;
}

/* Live Storyboard Animatic Stage Modal */
.animatic-frame {
  position: relative; width: 100%; max-width: 960px; margin: 0 auto 14px; aspect-ratio: 16 / 9;
  border-radius: 22px; overflow: hidden; background: #0B0D12; box-shadow: var(--shadow-screen);
}
.animatic-frame img.ani-bg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 5.8s linear; }
.animatic-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,14,0.22) 0%, transparent 35%, rgba(8,10,14,0.78) 100%); pointer-events: none; }
.animatic-caption { position: absolute; left: 26px; right: 26px; bottom: 22px; z-index: 4; color: #fff; }
.animatic-caption h3 { margin: 4px 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.06; text-shadow: 0 2px 16px rgba(0,0,0,0.85); }
.animatic-caption p { margin: 0; font-size: 13px; opacity: 0.92; text-shadow: 0 1px 10px rgba(0,0,0,0.9); }

.intel-table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--hair); background: var(--glass-card); margin-bottom: 18px; }
.intel-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.intel-table th { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); padding: 11px 14px; border-bottom: 1px solid var(--hair); font-weight: 600; }
.intel-table td { padding: 10px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.intel-table tbody tr { cursor: pointer; transition: background 0.14s ease; }
.intel-table tbody tr:hover { background: var(--field); }
.intel-table tr:last-child td { border-bottom: 0; }

/* Calm First-Visit Ranhill Spotlight Tour + SamiPulse Funnel Bars + Broadcast Motion Graphics */
.motion-gfx-layer {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden;
}
/* 1. River-to-Tap Telemetry Ribbon (Deepened Feathered Top Scrim for Sunlit Footage Legibility) */
.mg-river-bar {
  position: absolute; left: 0; right: 0; top: 0; padding: 14px 28px 26px;
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.84) 0%, rgba(6, 10, 16, 0.42) 66%, transparent 100%);
  display: flex; flex-direction: column; gap: 5px;
  animation: mgFadeRise 0.65s var(--spring) both;
}
.mg-river-svg { width: 100%; height: 22px; overflow: visible; display: block; }
.mg-river-path {
  fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 1.4;
}
.mg-river-flow {
  fill: none; stroke: url(#mgRiverGrad); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 180 860; animation: mgDashRun 5.2s linear infinite;
}
@keyframes mgDashRun {
  from { stroke-dashoffset: 1040; }
  to   { stroke-dashoffset: 0; }
}
.mg-river-stops {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95);
}
.mg-stop { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mg-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #FFFFFF;
}
.mg-stop:nth-child(4) .mg-dot { background: #FF8C61; }

/* 2. Setitis Kinetic Editorial Title (Clean Upper-Left Safe Zone — Zero Baked-Caption Overlap!) */
.mg-lower-third {
  position: absolute; left: 0; top: 0; right: 0; padding: 22px 28px 36px;
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.80) 0%, rgba(6, 10, 16, 0.36) 66%, transparent 100%);
}
.mg-lower-third > * { max-width: min(560px, 72%); }
.mg-hairline {
  width: 96px; height: 2px; border-radius: 999px; background: var(--accent);
  transform-origin: left center; margin-bottom: 8px;
  animation: mgLineGrow 0.75s var(--spring) both;
}
.mg-mask { overflow: hidden; }
.mg-kicker {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #FF9C7A; text-shadow: 0 1px 10px rgba(0,0,0,0.95);
  animation: mgSlideUp 0.65s var(--spring) 0.12s both;
}
.mg-headline {
  font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.06; color: #FFFFFF; margin-top: 3px; text-shadow: 0 3px 20px rgba(0,0,0,0.92);
  animation: mgSlideUp 0.78s var(--spring) 0.22s both;
}
.mg-sub {
  font-size: 12px; color: rgba(255,255,255,0.94); margin-top: 3px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.95);
  animation: mgSlideUp 0.72s var(--spring) 0.34s both;
}
@keyframes mgLineGrow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes mgSlideUp  { from { transform: translate3d(0, 115%, 0); opacity: 0; } to { transform: translate3d(0, 0, 0); opacity: 1; } }
@keyframes mgFadeRise { from { transform: translate3d(0, 12px, 0); opacity: 0; } to { transform: translate3d(0, 0, 0); opacity: 1; } }

/* 3. 23.6% Lowest NRW Live Optical Ring (Feathered Upper-Left Scrim — Crisp Legibility, Zero Dark Box) */
.mg-nrw-hud {
  position: absolute; left: 0; top: 0; right: 0; padding: 20px 26px 32px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.50) 0%, rgba(8, 12, 18, 0.12) 66%, transparent 100%);
  display: flex; align-items: center; gap: 14px;
  animation: mgFadeRise 0.62s var(--spring) both;
}
.mg-ring-wrap { position: relative; width: 78px; height: 78px; flex: none; }
.mg-ring-wrap svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.mg-ring-arc {
  stroke-dasharray: 214; stroke-dashoffset: 214;
  animation: mgRingDraw 1.35s var(--spring) 0.15s forwards;
}
@keyframes mgRingDraw { to { stroke-dashoffset: 52; } }
.mg-ring-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 21px; color: #FFFFFF;
  text-shadow: 0 2px 12px rgba(0,0,0,0.88);
}
.mg-nrw-copy { color: #FFFFFF; text-shadow: 0 2px 14px rgba(0,0,0,0.88); }
.mg-nrw-copy small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #8FE3EE; font-weight: 700; }
.mg-nrw-copy strong { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.08; margin-top: 2px; }
.mg-nrw-copy span { display: block; font-size: 11px; color: rgba(255,255,255,0.85); }

/* 4. 32:9 Larkin HQ LED Living Contour Wave */
.mg-led-wave {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 24px 36px;
}
.mg-led-svg {
  position: absolute; left: -6%; right: -6%; bottom: -8%; width: 112%; height: 58%;
  pointer-events: none; opacity: 0.72;
}
.mg-wave-a { opacity: 0.85; }
.mg-wave-b { opacity: 0.65; }

/* Interactive Animated River-to-Tap End-to-End Flow Card (Marketing OS) */
.r2t-flow-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 18px 20px 16px;
  background: var(--glass-card); border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-glass);
  margin-bottom: 18px;
}
.r2t-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.r2t-live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-family: var(--mono); font-size: 10px; font-weight: 600;
}
.r2t-live-pill i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}
.r2t-track-wrap { position: relative; padding: 6px 0 2px; }
.r2t-spline-svg { width: 100%; height: 34px; display: block; overflow: visible; }
.r2t-nodes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.r2t-node {
  border: 1px solid var(--hair); background: var(--field); border-radius: 16px;
  padding: 10px 11px; text-align: left; cursor: pointer;
  transition: transform 0.24s var(--spring), border-color 0.18s ease, background 0.18s ease, box-shadow 0.2s ease;
}
.r2t-node:hover {
  transform: translateY(-3px); border-color: var(--accent); background: var(--glass-strong);
  box-shadow: var(--shadow-card);
}
.r2t-node small { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--accent-ink); font-weight: 700; text-transform: uppercase; }
.r2t-node strong { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; color: var(--ink); }
.r2t-node span { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 2px; line-height: 1.35; }

/* Animated LED Stage Mockup Waves */
.led-wave-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.55;
}

/* Zero AI-Slop Staggered Entrance Animations on Headlines & KPIs */
.gal-hdr h1 { /* Immediate crisp desktop render */ }
.kpi-strip .kpi-tile { /* Immediate crisp desktop render */ }

@media (max-width: 900px) {
  .r2t-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-caustics, .wm-ribbon-a, .wm-ribbon-b, .wm-pulse-stroke, .wm-pulse-stroke-b,
  .mg-river-flow, .mg-dot, .mg-hairline, .mg-kicker, .mg-headline, .mg-sub,
  .mg-ring-arc, .mg-wave-a, .mg-wave-b, .r2t-live-pill i, .gal-hdr h1, .kpi-strip .kpi-tile {
    animation: none !important; transition-duration: 0.01ms !important;
  }
  .mg-ring-arc { stroke-dashoffset: 52 !important; }
}

/* ==========================================================================
   FULL-SCREEN LEFT CONTEXT RAIL, MINIMAL ICON CARDS, CAST MAP, GANTT & LAZY
   ========================================================================== */
.left-rail {
  position: fixed; left: 20px; top: 74px; bottom: calc(82px + var(--sab)); z-index: 38;
  width: 52px; padding: 8px 6px; border-radius: 26px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; transition: width 0.22s var(--ease), padding 0.2s var(--ease);
}
.left-rail::-webkit-scrollbar { display: none; }
body.left-rail-open .left-rail { width: 224px; padding: 10px 10px; }
.lr-head { display: flex; align-items: center; justify-content: center; gap: 8px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--hair); }
body.left-rail-open .lr-head { justify-content: space-between; padding: 2px 4px 8px; }
.lr-title { display: none; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); font-weight: 700; white-space: nowrap; }
body.left-rail-open .lr-title { display: block; }
.lr-btn {
  width: 100%; min-height: 36px; padding: 0 9px; border-radius: 14px; border: 0;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
body.left-rail-open .lr-btn { justify-content: flex-start; padding: 0 11px; }
.lr-btn:hover { background: var(--field-hover); color: var(--ink); }
.lr-btn.on { background: var(--field-hover); color: var(--ink); font-weight: 600; box-shadow: inset 0 1px 0 var(--glass-spec-top); }
[data-theme="night"] .lr-btn.on { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.lr-btn .lr-lbl, .lr-btn .lr-cnt { display: none; }
body.left-rail-open .lr-btn .lr-lbl { display: inline; flex: 1; overflow: hidden; text-overflow: ellipsis; }
body.left-rail-open .lr-btn .lr-cnt { display: inline-flex; font-family: var(--mono); font-size: 10px; color: var(--ink-dim); }
.lr-btn.on .lr-cnt { color: var(--accent-ink); font-weight: 700; }
.lr-sep { height: 1px; background: var(--hair); margin: 4px 6px; flex: none; }
.lr-beat-thumb { width: 24px; height: 16px; border-radius: 5px; object-fit: cover; flex: none; border: 1px solid var(--hair); }
.lr-sentinel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.lr-sentinel-dot.warn { background: var(--accent); }

/* Minimal High-Information Cast Cards (Photo-First · Crisp Hierarchy · Zero Clutter) */
.cast-grid.min-grid { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 14px; }
.cast-card.min-card { border-radius: 22px; }
.cast-card.min-card .cast-photo.contain-fit img {
  object-fit: contain; object-position: center center;
  background: #E7E4DC;
}
.cast-card.min-card .cast-body { padding: 12px 14px 13px; gap: 4px; }
.cast-card.min-card h3 { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.18; letter-spacing: -0.015em; margin: 0; color: var(--ink); }
.cast-card.min-card .cast-role {
  font-size: 11.5px; font-weight: 500; color: var(--ink-soft); line-height: 1.38;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal;
}
.cast-icon-row { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 7px; flex-wrap: wrap; }
.cast-ic-chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 23px; padding: 2px 8.5px;
  border-radius: 999px; background: var(--field); border: 1px solid var(--hair); color: var(--ink-soft);
  font-family: var(--mono); font-size: 10px; font-weight: 600; white-space: nowrap; flex: none;
}
.cast-ic-chip.accent { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.cast-ic-chip.teal { background: var(--teal-soft); color: var(--teal); border: 1px solid rgba(12, 98, 110, 0.28); }
.cast-ic-chip svg { width: 11px; height: 11px; }

/* Campaign Casting Matrix & 12-Month Video Gantt Chart */
.matrix-wrap {
  border-radius: 24px; border: 1px solid var(--glass-stroke); background: var(--glass-card);
  box-shadow: var(--shadow-glass); overflow-x: auto; margin-bottom: 18px;
}
.matrix-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 860px; }
.matrix-table th {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); padding: 11px 12px; border-bottom: 1px solid var(--hair); text-align: left; font-weight: 700;
}
.matrix-table td { padding: 9px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.matrix-table tbody tr:hover { background: var(--field); }
.matrix-table tr:last-child td { border-bottom: 0; }
.av-stack { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.av-dot-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 2px;
  border-radius: 999px; border: 1px solid var(--hair); background: var(--glass-strong);
  font-size: 10.5px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
}
.av-dot-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.av-dot-btn img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; object-position: center 20%; }

.ch-badge-row { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.ch-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 6px; border-radius: 6px; font-family: var(--mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--field); color: var(--ink-soft); border: 1px solid var(--hair);
}
.ch-pill.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.ch-pill.teal { background: var(--teal-soft); color: var(--teal); border-color: rgba(15,110,122,0.28); }

.gantt-table { table-layout: fixed; width: 100%; border-collapse: collapse; min-width: 580px; font-size: 12px; }
.gantt-table th {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--ink-soft); padding: 9px 2px; border-bottom: 1px solid var(--hair); text-align: center;
}
.gantt-table th:first-child { text-align: left; padding-left: 12px; }
.gantt-table td { padding: 7.5px 4px; border-bottom: 1px solid var(--hair); vertical-align: middle; color: var(--ink); }
.gantt-table td:first-child { padding-left: 12px; }
@media (min-width: 1081px) {
  body.left-rail-open .rail-dup { display: none; }
}
.gantt-track-cell { position: relative; height: 26px; padding: 0 !important; }
.gantt-track {
  position: relative; width: 100%; height: 24px;
  background: repeating-linear-gradient(90deg, transparent, transparent calc(100%/13 - 1px), var(--hair) calc(100%/13 - 1px), var(--hair) calc(100%/13));
}
.g-bar { position: absolute; top: 6px; height: 12px; border-radius: 999px; }
.g-bar.pre { background: rgba(15, 110, 122, 0.28); border: 1px solid rgba(15, 110, 122, 0.45); }
.g-bar.prod { background: rgba(180, 105, 14, 0.42); }
.g-bar.pub { background: var(--accent); box-shadow: 0 2px 8px -2px rgba(217, 70, 26, 0.55); }
.g-gate {
  position: absolute; top: 7px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg);
  background: var(--ok); border: 1.5px solid #fff; z-index: 3;
}
.gap-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.gap-chip {
  padding: 10px 12px; border-radius: 16px; background: var(--glass-card);
  border: 1px solid var(--glass-stroke); display: flex; align-items: flex-start; gap: 9px;
}
.gap-chip svg { flex: none; color: var(--accent); margin-top: 2px; }
.gap-chip strong { display: block; font-size: 11.5px; line-height: 1.2; }
.gap-chip span { display: block; font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }

/* Upgraded Tactile Lazy UI */
#aiChat { width: min(368px, calc(100vw - 24px)); max-height: min(470px, calc(100dvh - 130px)); border-radius: 28px; }
#lazyDragHead { cursor: grab; user-select: none; }
#lazyDragHead:active { cursor: grabbing; }
.lazy-avatar-wrap {
  width: 36px; height: 36px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line); flex: none;
}
.lazy-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.lazy-eye { transform-origin: center 21.5px; }
.lazy-grid-actions {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 10px 12px; border-bottom: 1px solid var(--hair);
}
.lazy-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 6px; border-radius: 14px; border: 1px solid var(--hair); background: var(--field);
  color: var(--ink); font-size: 10.5px; font-weight: 600; cursor: pointer;
  transition: transform 0.18s var(--spring), border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.lazy-act:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.lazy-mic-btn { background: var(--accent-soft); color: var(--accent); }
.lazy-mic-btn:hover { background: var(--accent); color: #fff; }

@media (max-width: 1080px) {
  .left-rail { display: none; }
  .top-capsule { left: 74px; right: 14px; }
  .gallery-view, body.left-rail-open .gallery-view { left: 16px; right: 16px; overflow-y: auto; }
  .gallery-inner, .gallery-inner.cmd-fixed { height: auto; overflow: visible; display: flex; flex-direction: column; }
  .gal-hdr { flex-wrap: wrap; gap: 8px; }
  .cmd-split { display: flex; flex-direction: column; overflow: visible; flex: none; gap: 12px; }
  .cmd-main { overflow: visible; flex: none; }
  .cmd-frame-table { flex: none; max-height: 360px; overflow: auto; }
  .cmd-inspector { overflow: visible; flex: none; }
  .sent-story-card > div:first-child { flex-wrap: wrap !important; }
  .sent-callout-bar { flex-wrap: wrap; }
  body.left-rail-open #viewEditor { padding-left: 20px; }
  body.left-rail-open .filmstrip-dock { left: 50%; width: calc(100vw - 24px); }
}

/* Wardrobe & Dress Bible + Analytics Storage / Cost Ledger Grids (4-Col Balanced Desktop Row!) */
.wardrobe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
@media (max-width: 1200px) { .wardrobe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .wardrobe-grid { grid-template-columns: 1fr; } }
.wardrobe-card {
  border-radius: 22px; overflow: hidden; background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
}
.wardrobe-card .w-img { aspect-ratio: 16 / 10; overflow: hidden; background: #14181F; position: relative; }
.wardrobe-card .w-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.wardrobe-card .w-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wardrobe-card h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.015em; line-height: 1.18; color: var(--ink); }
.dress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dress-tile {
  padding: 13px 15px; border-radius: 20px; background: var(--glass-card);
  border: 1px solid var(--glass-stroke); display: flex; flex-direction: column; gap: 5px;
}
.dress-tile .dt-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; color: var(--ink); }
.dress-tile .dt-head svg { color: var(--accent); flex: none; }
.dress-tile p { margin: 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; }

.storage-pill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.storage-pill {
  padding: 11px 13px; border-radius: 16px; background: var(--field); border: 1px solid var(--hair);
}
.storage-pill small { display: block; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); font-weight: 700; }
.storage-pill code { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink); margin-top: 3px; word-break: break-all; }

.tour-card {
  position: fixed; right: 20px; bottom: 86px; z-index: 68; width: min(368px, calc(100vw - 24px));
  padding: 16px 18px; border-radius: 24px; box-shadow: var(--shadow-float);
  animation: quietIn 0.16s ease-out;
}
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tour-step-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--accent-ink); font-weight: 700; text-transform: uppercase; }
.tour-card h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; line-height: 1.15; }
.tour-card p { margin: 0 0 14px; font-size: 12.5px; line-height: 1.48; color: var(--ink-soft); }
.tour-foot { display: flex; align-items: center; gap: 6px; }

.pulse-funnel-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; margin-bottom: 8px; font-size: 11.5px; }
.pulse-bar-track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--field); overflow: hidden; }
.pulse-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.35s var(--ease); }

@media (max-width: 1080px) {
  .mix-layout { grid-template-columns: 1fr; }
  .mix-sticky { position: static !important; }
  .ai-model-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .emblem-btn { top: 12px; left: 12px; width: 42px; height: 42px; }
  .top-capsule { top: 12px; height: 42px; max-width: calc(100vw - 74px); left: auto; right: 12px; transform: none; overflow-x: auto; scrollbar-width: none; }
  .top-capsule::-webkit-scrollbar { display: none; }
  .side-pill, body.drawer-open .side-pill {
    flex-direction: row; width: auto; height: 44px; padding: 4px 8px;
    left: 50%; right: auto; top: auto; bottom: calc(144px + var(--sab)); transform: translateX(-50%);
  }
  body.tl-expanded .side-pill { display: none; }
  #viewEditor { padding: 66px 12px calc(198px + var(--sab)) 12px; }
  .video-frame { height: auto; width: 100%; border-radius: 16px; }
  .filmstrip-dock { width: calc(100vw - 20px); bottom: calc(74px + var(--sab)); }
  .nle-tools { overflow-x: auto; }
  .fs-bar .btn-cut-mini { display: none; }
  .studio-drawer { inset: 64px 10px calc(76px + var(--sab)) 10px !important; width: auto !important; }
  .studio-dock { max-width: calc(100vw - 16px); width: min(356px, calc(100vw - 20px)); justify-content: space-between; overflow: visible; padding: 5px 8px; gap: 4px; -webkit-mask-image: none; mask-image: none; }
  .studio-dock .mob-hide-dock { display: none !important; }
  .studio-dock .dock-btn { min-width: 44px; min-height: 40px; flex: 0 1 auto; }
  .studio-dock .dock-btn[aria-selected="true"] { padding: 0 14px; }
  .studio-dock .dock-lbl { display: none; }
  #lTip { display: none !important; }
  .gallery-view { inset: 64px 12px calc(74px + var(--sab)) 12px; overflow-y: auto; padding: 0 0 18px; }
  .gal-hdr { flex-wrap: wrap; gap: 6px; }
  .gal-hdr > div:first-child { flex-wrap: wrap; gap: 6px !important; }
  .gal-hdr h1 { font-size: 20px; }
  .gal-hdr .mode-pill-toggle { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%; border-radius: 999px; gap: 4px; padding: 4px; }
  .gal-hdr .mode-pill-toggle::-webkit-scrollbar { display: none; }
  .gal-hdr .mode-pill-toggle .mpt-btn { flex: none; white-space: nowrap; min-height: 30px; font-size: 11px; padding: 0 11px; }
  #saveBtn { display: none !important; }
  .sent-story-card > div:first-child > div:first-child { flex-wrap: wrap; gap: 5px !important; }
  .adhoc-top-form { min-width: 0; flex: 0 0 auto; padding: 0 4px 0 8px; gap: 5px; }
  .adhoc-top-form input { display: none; }
  .adhoc-top-form .adhoc-go { padding: 0 10px; white-space: nowrap; }
  .go-desk { display: none; }
  .go-mob { display: inline; }
  .adhoc-top-form .adhoc-k { display: none; }
  .cmd-frame-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .gantt-table { min-width: 780px !important; }
  .gantt-table col.g-mcol { width: 34px; }
  .mob-swipe-hint { display: inline; }
  .sent-callout-bar { flex-wrap: wrap; gap: 6px; }
  .sent-callout-bar > div:first-child { flex-wrap: wrap; white-space: normal; overflow: visible; }
  .sent-callout-bar > div:first-child > span:last-child { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; font-size: 11px; line-height: 1.4; }
  .sent-story-card .sent-legend { display: none !important; }
  .filter-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-strip::-webkit-scrollbar { display: none; }
  .filter-strip .fpill { flex: none; min-height: 38px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .led-stage-mock { aspect-ratio: 16 / 9; }
  .led-stage-safe { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .tour-card { left: 12px; right: 12px; width: auto; bottom: calc(74px + var(--sab)); }
  .flowpane { inset: 14px 10px calc(74px + var(--sab)) 10px; border-radius: 22px; }
  .fp-head { flex-wrap: wrap; padding: 14px 16px; gap: 8px; }
  .fp-head h2 { font-size: 24px; }
  #appMenu { grid-template-columns: 1fr; max-height: calc(100dvh - 150px); overflow: auto; }
  .kpi-tile strong { font-size: clamp(20px, 5.2vw, 28px); }
  #toast { top: 62px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%) translateY(-6px); max-width: calc(100vw - 24px); text-align: center; }
  #toast.on { transform: translateX(-50%) translateY(0); }
  .char-prof-grid, .feel-grid, .dna-grid, .mix-layout, .alert-studio-grid, .row2, .row3, .lang-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v17.0: 4-LANGUAGE BANGSA JOHOR MATRIX, SENTIMENT LOOP & RM BUDGET METERS
   ========================================================================== */
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.lang-card {
  border-radius: 22px; padding: 14px 16px; background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 8px;
}
.lang-card.overflow { border-color: var(--accent-line); }
.lang-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lang-code {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.lang-status {
  height: 22px; padding: 0 9px; border-radius: 999px; font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  display: inline-flex; align-items: center;
}
.lang-status.pass { background: var(--ok-soft); color: var(--ok); }
.lang-status.tight { background: var(--amber-soft); color: var(--amber); }
.lang-status.overflow, .lang-status.missing { background: var(--accent-soft); color: var(--accent); }
.lang-meter { height: 5px; border-radius: 999px; background: var(--field); overflow: hidden; }
.lang-meter-fill { height: 100%; border-radius: 999px; background: var(--teal); transition: width 0.25s var(--ease); }
.lang-meter-fill.warn { background: var(--amber); }
.lang-meter-fill.over { background: var(--accent); }
.lang-wrap-prev {
  padding: 8px 10px; border-radius: 12px; background: #10141B; color: #F8FAFC;
  font-size: 12px; line-height: 1.42; text-align: center; white-space: pre-line;
  border: 1px solid rgba(255,255,255,0.08);
}

.trust-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--field); gap: 1px; }
.trust-seg.pos { background: var(--ok); }
.trust-seg.neu { background: rgba(148, 163, 184, 0.65); }
.trust-seg.neg { background: var(--accent); }

.budget-track { height: 8px; border-radius: 999px; background: var(--field); overflow: hidden; margin: 8px 0; }
.budget-fill { height: 100%; border-radius: 999px; background: var(--ok); transition: width 0.35s var(--ease); }
.budget-fill.warn { background: var(--amber); }
.budget-fill.over { background: var(--accent); }
.og-prev-thumb {
  width: 100%; aspect-ratio: 1200 / 630; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--hair); background: #FFFFFF; margin-top: 8px;
}
.og-prev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 2-Stage Human Approval Gate (Stage 1 First Reviewer -> Stage 2 Sami Final Live Check) */
.appr-stage-box {
  padding: 12px 13px; border-radius: 16px; border: 1px solid var(--hair); background: var(--glass-strong);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.appr-stage-box.active { border-color: var(--accent-line); }
.appr-stage-box.done { border-color: rgba(21, 128, 61, 0.36); background: var(--ok-soft); }
.appr-stage-box.locked { opacity: 0.72; background: var(--field); }
.appr-stage-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; flex-wrap: wrap; }
.appr-q-card {
  padding: 12px 13px; border-radius: 18px; border: 1px solid var(--hair); background: var(--field);
  margin-bottom: 10px;
}
.appr-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.appr-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--glass-strong); font-family: var(--mono);
  font-size: 10px; font-weight: 600; color: var(--ink-soft);
}
.appr-pill.ok { background: var(--ok-soft); border-color: rgba(21,128,61,0.3); color: var(--ok); }
.appr-pill.next { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.appr-arrow { color: var(--ink-dim); font-size: 11px; }

/* ==========================================================================
   VISUAL STORY-DRIVEN YEARLY GANTT + PUBLIC SENTIMENT IMPROVEMENT CURVE
   ========================================================================== */
.sent-story-card {
  border-radius: 22px; padding: 11px 16px 10px; background: var(--glass-card);
  border: 1px solid var(--glass-stroke); box-shadow: var(--shadow-card); flex: none;
}
.sent-acts-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px;
}
.sent-act-pill {
  padding: 4px 9px; border-radius: 10px; background: var(--field); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px;
}
.sent-act-pill small { font-family: var(--mono); font-size: 8.5px; font-weight: 700; color: var(--accent-ink); letter-spacing: 0.08em; }
.sent-act-pill strong { font-family: var(--mono); font-size: 10px; color: var(--ok); }
.sent-svg-wrap { position: relative; width: 100%; overflow: hidden; }
.sent-svg { width: 100%; height: auto; max-height: 132px; display: block; overflow: visible; }
@media (max-width: 760px) {
  .sent-svg-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .sent-svg { width: 960px; min-width: 960px; height: 162px; max-height: none; }
}
.sent-node { cursor: pointer; }
.sent-node:hover { opacity: 0.88; }
.sent-callout-bar {
  margin-top: 6px; padding: 6px 11px; border-radius: 11px; background: var(--field);
  border: 1px solid var(--hair); display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: nowrap; font-size: 11.5px; overflow: hidden;
}
.pillar-strip {
  display: flex; flex-wrap: nowrap; gap: 4px; margin-bottom: 0; overflow-x: auto; scrollbar-width: none;
  padding-right: 12px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent 100%);
}
.pillar-strip::-webkit-scrollbar { display: none; }
.pillar-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 27px; padding: 0 7.5px;
  border-radius: 999px; border: 1px solid var(--hair); background: var(--field);
  font-size: 10.75px; font-weight: 600; color: var(--ink-soft); cursor: pointer; flex: none; white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.pillar-chip:hover { border-color: var(--ink-dim); color: var(--ink); background: var(--field-hover); }
.pillar-chip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
[data-theme="night"] .pillar-chip.on { border-color: rgba(255, 255, 255, 0.30); background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.pillar-chip .p-shp { font-size: 11px; color: var(--p-col, var(--accent-ink)); }
.pillar-chip .p-cnt { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); opacity: 1; }

.gantt-group-row td {
  background: var(--field); padding: 7px 14px !important;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-soft);
}
.gantt-story-row { cursor: pointer; transition: background 0.14s ease; }
.gantt-story-row:hover { background: var(--field); }
.gantt-story-row.sel { background: var(--accent-soft); }
.g-month-hl {
  position: absolute; top: 0; bottom: 0; background: rgba(15, 110, 122, 0.10);
  border-left: 1px dashed rgba(15, 110, 122, 0.45); border-right: 1px dashed rgba(15, 110, 122, 0.45);
  pointer-events: none; z-index: 1;
}
.g-lift-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; white-space: nowrap;
  background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(4, 108, 78, 0.22);
}
[data-theme="night"] .g-lift-tag { border-color: rgba(74, 222, 128, 0.24); }
.g-mini-avs { display: inline-flex; align-items: center; margin-top: 3px; }
.g-mini-avs img {
  width: 18px; height: 18px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 1.5px solid var(--bg); margin-left: -4px;
}
.g-mini-avs img:first-child { margin-left: 0; }
.gantt-story-drawer {
  margin-top: 12px; padding: 12px 16px; border-radius: 20px; background: var(--glass-strong);
  border: 1px solid var(--accent-line); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
@media (max-width: 900px) { .sent-acts-row { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   VISIONOS SMOKED-GLASS LOGIN DIALOG & PERSONALIZED EXECUTIVE WELCOME CARD
   ========================================================================== */
body.auth-locked .viewport,
body.auth-locked .studio-dock {
  filter: blur(22px) saturate(1.06);
  pointer-events: none;
  user-select: none;
  opacity: 0.32;
}
.auth-gate {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(560px 400px at 50% 18%, rgba(130, 158, 210, 0.16), transparent 64%),
    radial-gradient(500px 380px at 20% 84%, rgba(44, 134, 154, 0.14), transparent 64%),
    rgba(5, 6, 9, 0.78);
}
:root:not([data-theme="night"]) .auth-gate {
  background:
    radial-gradient(560px 400px at 50% 18%, rgba(201, 70, 28, 0.06), transparent 64%),
    radial-gradient(500px 380px at 20% 84%, rgba(12, 98, 110, 0.06), transparent 64%),
    rgba(244, 246, 250, 0.76);
}
.auth-gate.welcome-mode { background: rgba(5, 6, 9, 0.68); }
:root:not([data-theme="night"]) .auth-gate.welcome-mode { background: rgba(244, 246, 250, 0.72); }
.auth-card {
  width: min(420px, calc(100vw - 28px));
  border-radius: 28px; padding: 28px 28px 24px;
  box-shadow: var(--shadow-float);
  display: flex; flex-direction: column; gap: 15px;
}
.welcome-card {
  width: min(520px, calc(100vw - 28px));
  border-radius: 28px; padding: 26px 28px 24px;
  box-shadow: var(--shadow-float);
  display: flex; flex-direction: column; gap: 13px;
}
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-emblem {
  width: 46px; height: 46px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
  background: var(--field); border: 1px solid var(--glass-stroke); color: var(--ink);
}
.auth-brand h1 {
  margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1; letter-spacing: -0.025em; color: var(--ink);
}
.auth-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.13em; color: var(--ink-dim); margin-top: 4px;
}
.auth-lead {
  margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft);
}
.auth-form { display: grid; gap: 12px; }
.auth-field { display: grid; gap: 5px; }
.auth-field label {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-dim);
}
.auth-field input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink);
  font-size: 13.5px; outline: none; transition: border-color 0.14s ease, background 0.14s ease;
}
.auth-field input:focus { border-color: var(--accent); background: var(--field-hover); }
.auth-pass-wrap { position: relative; display: flex; align-items: center; }
.auth-pass-wrap input { padding-right: 42px; }
.auth-eye {
  position: absolute; right: 6px; width: 32px; height: 32px; border-radius: 10px; border: 0;
  background: transparent; color: var(--ink-dim); cursor: pointer; display: grid; place-items: center;
}
.auth-eye:hover { color: var(--ink); background: var(--field-hover); }
.auth-err {
  padding: 9px 12px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid var(--accent-line); color: var(--accent-ink); font-size: 12px; font-weight: 600;
}
.auth-submit { width: 100%; height: 42px; font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.auth-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
}

.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.welcome-top-right { display: flex; align-items: center; gap: 8px; }
.welcome-ring {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink);
}
.welcome-card h2 {
  margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 27px; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink);
}
.welcome-role { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-top: 3px; }
.welcome-msg { margin: 2px 0 4px; font-size: 13.5px; line-height: 1.54; color: var(--ink-soft); }
.guide-steps { display: grid; gap: 8px; margin: 2px 0 4px; }
.guide-step {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 12px; border-radius: 15px;
  background: var(--field); border: 1px solid var(--hair);
}
.gs-num {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--accent-ink);
}
.guide-step strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.28; }
.guide-step span { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.46; margin-top: 3px; }
.guide-step em { font-style: normal; color: var(--ink); font-weight: 600; }
.guide-step code {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 5px;
  background: var(--field-hover); color: var(--ink);
}
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.welcome-actions .btn { flex: 1; height: 40px; }

.user-av-dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink);
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; flex: none;
}


/* ==========================================================================
   v22 PERFORMANCE CAP (<= 6 ACTIVE BLUR LAYERS) + 4-ACT VISUAL STORYTELLER
   + RANHILL SAJ LIVING BRAND EVOLUTION STUDIO
   ========================================================================== */
/* Keep GPU backdrop-filter strictly on visible floating chrome & open dialogs — zero blur tax on hidden overlays or scrolling cards */
.gl[hidden], [hidden] .gl, .gcard, .cast-card, .cal-card, .story-card, .family-card, .wardrobe-card, .appr-q-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.cast-card, .cal-card, .family-card, .appr-q-card {
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

/* 4-Act Visual Storyteller Strip on 2027 World Roadmap */
.story-acts-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px;
}
.story-act-card {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 13px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink);
  cursor: pointer; text-align: left; transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.14s var(--ease);
  min-width: 0;
}
.story-act-card:hover { background: var(--field-hover); transform: translateY(-1px); }
.story-act-card.on { border-color: var(--accent-line); background: var(--accent-soft); }
.story-act-card img {
  width: 38px; height: 36px; border-radius: 9px; object-fit: cover; flex: none;
  border: 1px solid var(--hair); display: block;
}
.story-act-card .sa-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.story-act-card .sa-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.story-act-card .sa-title { font-size: 10.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-act-card .sa-delta { font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--ok); white-space: nowrap; flex: none; }
.story-act-card .sa-note { font-size: 10.5px; color: var(--ink-soft); line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.whatif-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 7px 11px; border-radius: 12px; margin-bottom: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-size: 11.5px; color: var(--ink);
}
@media (max-width: 1160px) {
  .story-acts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .story-acts-strip { grid-template-columns: 1fr; }
}

/* Living Brand Evolution Studio */
.be-shell { display: flex; flex-direction: column; gap: 16px; }
.be-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.be-diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.be-diff-col { padding: 13px 15px; border-radius: 16px; background: var(--field); border: 1px solid var(--hair); }
.be-diff-col.next { background: var(--ok-soft); border-color: rgba(4, 108, 78, 0.24); }
.be-diff-col ul { margin: 6px 0 0; padding-left: 17px; font-size: 12px; color: var(--ink-soft); display: grid; gap: 4px; line-height: 1.44; }
.be-logo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.be-logo-card {
  padding: 14px; border-radius: 18px; border: 1.5px solid var(--hair); background: var(--field);
  display: flex; flex-direction: column; gap: 9px; cursor: pointer; transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.be-logo-card:hover { background: var(--field-hover); }
.be-logo-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.be-parent-bar {
  margin-top: 12px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--hair);
  background: var(--field); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.be-parent-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 13px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--hair); font-size: 11.5px; color: var(--ink-soft); white-space: nowrap;
}
.be-parent-pill strong { color: var(--ink); font-weight: 600; }
.be-parent-sep { width: 1px; height: 14px; background: var(--hair); display: inline-block; }
.be-svg-stage {
  border-radius: 14px; padding: 14px 10px; background: var(--bg); border: 1px solid var(--hair);
  display: grid; place-items: center; min-height: 102px;
}
.be-svg-stage svg { max-width: 100%; height: auto; display: block; }
.be-mock-stage { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: center; }
.be-mock-meta h4 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); }
.be-mock-meta p { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.be-meta-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.be-meta-chips span { padding: 4px 10px; border-radius: 999px; font-family: var(--mono); font-size: 10px; font-weight: 600; background: var(--field); border: 1px solid var(--hair); color: var(--ink-soft); }
.be-tanker-wrap { border-radius: 18px; padding: 18px; background: linear-gradient(180deg, #EBF3F7 0%, #F8FAFC 76%, #CBD5E1 76%, #E2E8F0 100%); border: 1px solid var(--hair); }
[data-theme="night"] .be-tanker-wrap { background: linear-gradient(180deg, #111926 0%, #172130 76%, #0B0F17 76%, #0E131D 100%); }
.be-tanker-svg { width: 100%; height: auto; display: block; }
.be-shirt-card { padding: 18px; border-radius: 18px; background: #F8FAFC; color: #0B0D12; border: 1px solid var(--hair); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.be-shirt-pocket { width: 100%; padding: 14px; border-radius: 14px; background: #FFFFFF; border: 1px dashed #CBD5E1; text-align: center; }
.be-crest-mini svg { width: 180px; height: auto; }
.be-emb-note { font-family: var(--mono); font-size: 10px; color: #475569; margin-top: 4px; }
.be-lanyard-badge { width: 100%; padding: 10px 14px; border-radius: 12px; background: #0A5863; color: #FFFFFF; display: flex; flex-direction: column; gap: 2px; }
.be-lanyard-badge span { font-family: var(--mono); font-size: 9.5px; opacity: 0.82; letter-spacing: .1em; }
.be-lanyard-badge strong { font-size: 14px; }
.be-lanyard-badge small { font-size: 11px; opacity: 0.85; }
.be-phone-mock { max-width: 340px; margin: 0 auto; width: 100%; border-radius: 24px; padding: 16px; background: #0C1018; color: #FFFFFF; border: 2px solid rgba(255,255,255,0.16); display: flex; flex-direction: column; gap: 8px; }
.be-phone-hdr { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; color: #94A3B8; }
.be-phone-hdr span:last-child { margin-left: auto; }
.be-phone-dot { width: 8px; height: 8px; border-radius: 50%; }
.be-phone-logo svg { width: 170px; height: auto; }
.be-phone-pill { align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: #FFFFFF; }
.be-phone-title { font-family: var(--display); font-weight: 600; font-size: 16px; }
.be-phone-sub { font-size: 12px; color: #CBD5E1; line-height: 1.45; }
.be-phone-prog { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.14); overflow: hidden; }
.be-phone-prog > div { height: 100%; border-radius: 999px; }
.be-phone-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: #94A3B8; }
.be-led-ribbon { border-radius: 16px; padding: 14px 18px; background: linear-gradient(90deg, #07121E 0%, #0F2942 52%, #1C1412 100%); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.16); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.be-led-left svg { width: 150px; height: auto; }
.be-led-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.be-led-mid span { font-family: var(--mono); font-size: 9.5px; color: #7DD3FC; letter-spacing: .08em; }
.be-led-mid strong { font-family: var(--display); font-size: 15px; line-height: 1.2; }
.be-led-right { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
.be-led-right img { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; background: #E7E4DC; padding: 2px; }
.be-led-right span { font-family: var(--mono); font-size: 9px; color: #FF9A76; font-weight: 700; }
.be-wa-card { border-radius: 18px; padding: 16px; background: #FFFFFF; color: #0B0D12; border: 1px solid #CBD5E1; display: flex; flex-direction: column; gap: 10px; }
.be-wa-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.be-wa-logo svg { width: 170px; height: auto; }
.be-wa-ver { padding: 4px 10px; border-radius: 999px; background: #ECFDF5; color: #046C4E; font-family: var(--mono); font-size: 10px; font-weight: 700; }
.be-wa-body strong { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 4px; }
.be-wa-body p { margin: 0; font-size: 12.5px; color: #334155; line-height: 1.5; }
.be-wa-foot { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid #E2E8F0; font-family: var(--mono); font-size: 10px; color: #0A5863; font-weight: 700; }
.be-swatch-list { display: grid; gap: 7px; }
.be-swatch-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; border: 1px solid var(--hair); background: var(--field); cursor: pointer; width: 100%; }
.be-swatch-row:hover { background: var(--field-hover); }
.be-sw-dot { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--hair); flex: none; }
.be-type-spec { padding: 13px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--hair); }
.be-phase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.be-phase-card { padding: 14px; border-radius: 16px; background: var(--field); border: 1px solid var(--hair); display: flex; flex-direction: column; gap: 7px; }
.be-phase-card h4 { margin: 2px 0 0; font-family: var(--display); font-size: 16px; color: var(--ink); }
.be-phase-card p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 980px) {
  .be-diff-grid, .be-logo-grid, .be-mock-stage, .be-phase-grid { grid-template-columns: 1fr; }
  .be-led-ribbon { flex-direction: column; text-align: center; }
}

/* Chairman 8-Pack Rapid Supply & Marketing Broadcast Engine */
.rb-shell { display: flex; flex-direction: column; gap: 15px; }
.rb-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rb-value-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rb-val-tile { padding: 11px 14px; border-radius: 15px; background: var(--field); border: 1px solid var(--hair); display: flex; flex-direction: column; gap: 3px; }
.rb-val-tile small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); font-weight: 700; }
.rb-val-tile strong { font-family: var(--display); font-size: 20px; line-height: 1.1; color: var(--ink); }
.rb-val-tile span { font-size: 11.5px; color: var(--ok); font-weight: 600; }
.rb-pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.rb-pack-card {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 14px;
  border: 1.5px solid var(--hair); background: var(--field); color: var(--ink);
  cursor: pointer; text-align: left; transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.14s var(--ease);
  min-width: 0;
}
.rb-pack-card:hover { background: var(--field-hover); transform: translateY(-1px); }
.rb-pack-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.rb-pack-card img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--hair); }
.rb-pack-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rb-pack-badge { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.rb-pack-badge.marketing { color: var(--ok); }
.rb-pack-body strong { font-size: 12px; font-weight: 600; line-height: 1.22; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-pack-body small { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-work-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 15px; align-items: start; }
.rb-stage-wrap { display: flex; justify-content: center; background: var(--field); border: 1px solid var(--hair); border-radius: 18px; padding: 12px; margin-bottom: 10px; }
.rb-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #090B10; color: #FFFFFF; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.65); }
.rb-stage-wrap.fmt-vert .rb-frame { max-width: 310px; aspect-ratio: 9 / 16; }
.rb-stage-wrap.fmt-sq .rb-frame { max-width: 420px; aspect-ratio: 1 / 1; }
.rb-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-grad-top { position: absolute; inset: 0 0 auto 0; height: 42%; background: linear-gradient(180deg, rgba(9,11,16,0.92) 0%, rgba(9,11,16,0.45) 60%, rgba(9,11,16,0) 100%); pointer-events: none; }
.rb-grad-bot { position: absolute; inset: auto 0 0 0; height: 68%; background: linear-gradient(0deg, rgba(9,11,16,0.97) 0%, rgba(9,11,16,0.82) 55%, rgba(9,11,16,0) 100%); pointer-events: none; }
.rb-f-top { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 2; }
.rb-f-brand { display: flex; align-items: center; gap: 8px; }
.rb-drop { width: 18px; height: 23px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #E54619; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,0.22); }
.rb-draft-ribbon {
  position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  padding: 6px 26px; background: rgba(229, 70, 25, 0.78); color: #FFFFFF;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  border-radius: 6px; z-index: 3; pointer-events: none; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}
.rb-f-ver.draft { background: rgba(229, 70, 25, 0.92); }
.rb-geo-bar {
  padding: 8px 11px; border-radius: 11px; font-size: 11.5px; line-height: 1.4; margin-bottom: 10px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink-soft);
}
.rb-geo-bar.ok { background: var(--ok-soft); border-color: rgba(4, 108, 78, 0.25); color: var(--ink); }
.rb-geo-bar.err { background: rgba(220, 38, 38, 0.14); border-color: rgba(220, 38, 38, 0.45); color: var(--ink); }
.rb-geo-bar.warn { background: rgba(217, 119, 6, 0.13); border-color: rgba(217, 119, 6, 0.35); color: var(--ink); }
.rb-f-brand strong { display: block; font-family: var(--display); font-size: 14px; line-height: 1.05; color: #FFFFFF; }
.rb-f-brand small { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: #B7C4D6; }
.rb-f-ver { padding: 3px 9px; border-radius: 999px; background: rgba(10, 88, 99, 0.92); color: #FFFFFF; font-family: var(--mono); font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.rb-f-bot { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.rb-f-kicker { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: #FF8C61; font-weight: 700; text-transform: uppercase; }
.rb-f-dist { font-family: var(--display); font-size: clamp(18px, 2.1vw, 24px); font-weight: 700; line-height: 1.08; color: #FFFFFF; }
.rb-f-cause { font-size: 11.5px; color: #E2E8F0; line-height: 1.35; }
.rb-f-shot-cap { font-size: 11px; color: #F8FAFC; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; padding: 5px 8px; line-height: 1.35; margin-top: 2px; }
.rb-f-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--mono); font-size: 10px; color: #7DD3FC; font-weight: 600; margin-top: 2px; }
.rb-f-hotline { font-family: var(--mono); font-size: 9px; color: #94A3B8; letter-spacing: .04em; margin-top: 2px; }
.rb-shots-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.rb-shot-btn {
  display: flex; align-items: center; gap: 7px; padding: 6px; border-radius: 11px;
  border: 1px solid var(--hair); background: var(--field); color: var(--ink); cursor: pointer; text-align: left; min-width: 0;
}
.rb-shot-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.rb-shot-btn img { width: 34px; height: 28px; border-radius: 7px; object-fit: cover; flex: none; }
.rb-shot-btn span { display: block; font-family: var(--mono); font-size: 8.5px; color: var(--accent-ink); font-weight: 700; }
.rb-shot-btn strong { display: block; font-size: 10.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.rb-form-grid { display: grid; gap: 8px; }
.rb-script-box {
  padding: 12px 13px; border-radius: 13px; background: var(--field); border: 1px solid var(--hair);
  font-size: 12.5px; line-height: 1.55; color: var(--ink); min-height: 92px;
}
@media (max-width: 1160px) {
  .rb-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb-work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rb-value-strip, .rb-pack-grid, .rb-shots-strip { grid-template-columns: 1fr; }
  .rb-stage-wrap { padding: 8px; }
  .rb-hero { padding: 14px; }
  .rb-hero h2 { font-size: 19px !important; }
  .rb-hero p { font-size: 12px !important; }
}
@media (hover: none) {
  #lTip { display: none !important; }
}
.btn.teal-on {
  background: rgba(10, 88, 99, 0.16);
  border-color: rgba(10, 88, 99, 0.44);
  color: var(--teal);
  font-weight: 600;
}
