/*
 * BlueprintX color system — loaded last (zz_*) so it wins over bootstrap.min.
 * Light + dark modes share the same accent language: teal / sky / emerald.
 */

:root,
[data-bs-theme="light"] {
  color-scheme: light;

  --bx-ink: #0f172a;
  --bx-ink-soft: #334155;
  --bx-paper: #f3f6fb;
  --bx-paper-elevated: #ffffff;
  --bx-paper-tint: #e8eef8;
  --bx-teal: #0d9488;
  --bx-teal-deep: #0f766e;
  --bx-sky: #0284c7;
  --bx-emerald: #059669;
  --bx-amber: #d97706;
  --bx-rose: #e11d48;
  --bx-glow: rgba(13, 148, 136, 0.14);

  --bs-blue: #0284c7;
  --bs-indigo: #4f46e5;
  --bs-purple: #7c3aed;
  --bs-pink: #db2777;
  --bs-red: #e11d48;
  --bs-orange: #ea580c;
  --bs-yellow: #ca8a04;
  --bs-green: #059669;
  --bs-teal: #0d9488;
  --bs-cyan: #0891b2;

  --bs-primary: #0d9488;
  --bs-primary-rgb: 13, 148, 136;
  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;
  --bs-info: #0284c7;
  --bs-info-rgb: 2, 132, 199;
  --bs-warning: #d97706;
  --bs-warning-rgb: 217, 119, 6;
  --bs-danger: #e11d48;
  --bs-danger-rgb: 225, 29, 72;
  --bs-light: #e8eef8;
  --bs-dark: #0f172a;

  --bs-body-color: #0f172a;
  --bs-body-color-rgb: 15, 23, 42;
  --bs-body-bg: #f3f6fb;
  --bs-body-bg-rgb: 243, 246, 251;
  --bs-emphasis-color: #020617;
  --bs-emphasis-color-rgb: 2, 6, 23;
  --bs-secondary-color: rgba(15, 23, 42, 0.68);
  --bs-secondary-color-rgb: 15, 23, 42;
  --bs-secondary-bg: #e8eef8;
  --bs-secondary-bg-rgb: 232, 238, 248;
  --bs-tertiary-color: rgba(15, 23, 42, 0.55);
  --bs-tertiary-bg: #ffffff;
  --bs-tertiary-bg-rgb: 255, 255, 255;

  --bs-border-color: #d5deeb;
  --bs-border-color-translucent: rgba(15, 23, 42, 0.12);
  --bs-link-color: #0f766e;
  --bs-link-color-rgb: 15, 118, 110;
  --bs-link-hover-color: #115e59;
  --bs-link-hover-color-rgb: 17, 94, 89;
  --bs-code-color: #0f766e;
  --bs-highlight-bg: #ccfbf1;

  --bs-primary-bg-subtle: #ccfbf1;
  --bs-primary-border-subtle: #99f6e4;
  --bs-primary-text-emphasis: #115e59;
  --bs-success-bg-subtle: #d1fae5;
  --bs-success-border-subtle: #a7f3d0;
  --bs-success-text-emphasis: #065f46;
  --bs-info-bg-subtle: #e0f2fe;
  --bs-info-border-subtle: #bae6fd;
  --bs-info-text-emphasis: #075985;
  --bs-warning-bg-subtle: #fef3c7;
  --bs-warning-border-subtle: #fde68a;
  --bs-warning-text-emphasis: #92400e;
  --bs-danger-bg-subtle: #ffe4e6;
  --bs-danger-border-subtle: #fecdd3;
  --bs-danger-text-emphasis: #9f1239;
  --bs-secondary-bg-subtle: #f1f5f9;
  --bs-secondary-border-subtle: #e2e8f0;
  --bs-secondary-text-emphasis: #475569;
}

[data-bs-theme="dark"] {
  color-scheme: dark;

  --bx-ink: #e8eef7;
  --bx-ink-soft: #94a3b8;
  --bx-paper: #0b1220;
  --bx-paper-elevated: #121a2b;
  --bx-paper-tint: #172033;
  --bx-teal: #2dd4bf;
  --bx-teal-deep: #5eead4;
  --bx-sky: #38bdf8;
  --bx-emerald: #34d399;
  --bx-amber: #fbbf24;
  --bx-rose: #fb7185;
  --bx-glow: rgba(45, 212, 191, 0.16);

  --bs-blue: #38bdf8;
  --bs-indigo: #818cf8;
  --bs-purple: #a78bfa;
  --bs-pink: #f472b6;
  --bs-red: #fb7185;
  --bs-orange: #fb923c;
  --bs-yellow: #fbbf24;
  --bs-green: #34d399;
  --bs-teal: #2dd4bf;
  --bs-cyan: #22d3ee;

  --bs-primary: #2dd4bf;
  --bs-primary-rgb: 45, 212, 191;
  --bs-secondary: #94a3b8;
  --bs-secondary-rgb: 148, 163, 184;
  --bs-success: #34d399;
  --bs-success-rgb: 52, 211, 153;
  --bs-info: #38bdf8;
  --bs-info-rgb: 56, 189, 248;
  --bs-warning: #fbbf24;
  --bs-warning-rgb: 251, 191, 36;
  --bs-danger: #fb7185;
  --bs-danger-rgb: 251, 113, 133;
  --bs-light: #1e293b;
  --bs-dark: #e8eef7;

  --bs-body-color: #e8eef7;
  --bs-body-color-rgb: 232, 238, 247;
  --bs-body-bg: #0b1220;
  --bs-body-bg-rgb: 11, 18, 32;
  --bs-emphasis-color: #f8fafc;
  --bs-emphasis-color-rgb: 248, 250, 252;
  --bs-secondary-color: rgba(232, 238, 247, 0.68);
  --bs-secondary-color-rgb: 232, 238, 247;
  --bs-secondary-bg: #151d2e;
  --bs-secondary-bg-rgb: 21, 29, 46;
  --bs-tertiary-color: rgba(232, 238, 247, 0.55);
  --bs-tertiary-bg: #121a2b;
  --bs-tertiary-bg-rgb: 18, 26, 43;

  --bs-border-color: #243044;
  --bs-border-color-translucent: rgba(232, 238, 247, 0.12);
  --bs-link-color: #5eead4;
  --bs-link-color-rgb: 94, 234, 212;
  --bs-link-hover-color: #99f6e4;
  --bs-link-hover-color-rgb: 153, 246, 228;
  --bs-code-color: #5eead4;
  --bs-highlight-bg: rgba(45, 212, 191, 0.18);

  --bs-primary-bg-subtle: rgba(45, 212, 191, 0.14);
  --bs-primary-border-subtle: rgba(45, 212, 191, 0.35);
  --bs-primary-text-emphasis: #99f6e4;
  --bs-success-bg-subtle: rgba(52, 211, 153, 0.14);
  --bs-success-border-subtle: rgba(52, 211, 153, 0.35);
  --bs-success-text-emphasis: #a7f3d0;
  --bs-info-bg-subtle: rgba(56, 189, 248, 0.14);
  --bs-info-border-subtle: rgba(56, 189, 248, 0.35);
  --bs-info-text-emphasis: #bae6fd;
  --bs-warning-bg-subtle: rgba(251, 191, 36, 0.14);
  --bs-warning-border-subtle: rgba(251, 191, 36, 0.35);
  --bs-warning-text-emphasis: #fde68a;
  --bs-danger-bg-subtle: rgba(251, 113, 133, 0.14);
  --bs-danger-border-subtle: rgba(251, 113, 133, 0.35);
  --bs-danger-text-emphasis: #fecdd3;
  --bs-secondary-bg-subtle: rgba(148, 163, 184, 0.12);
  --bs-secondary-border-subtle: rgba(148, 163, 184, 0.28);
  --bs-secondary-text-emphasis: #cbd5e1;
}

/* Atmospheric page wash — consistent chrome for both modes */
html {
  background: var(--bs-body-bg);
}

body.bg-body-tertiary {
  background:
    radial-gradient(1200px 480px at 0% -10%, var(--bx-glow), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(var(--bs-info-rgb), 0.10), transparent 50%),
    var(--bs-body-bg) !important;
}

/* Buttons track the teal primary language */
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bx-teal-deep);
  --bs-btn-hover-border-color: var(--bx-teal-deep);
  --bs-btn-active-bg: var(--bx-teal-deep);
  --bs-btn-active-border-color: var(--bx-teal-deep);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: #042f2e;
  --bs-btn-hover-color: #042f2e;
  --bs-btn-active-color: #042f2e;
  --bs-btn-hover-bg: #5eead4;
  --bs-btn-hover-border-color: #5eead4;
}

.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-hover-color: #fff;
}

[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-hover-color: #042f2e;
}

/* Cards / elevated surfaces */
.card,
.bg-body.border,
.terminal-card {
  background-color: var(--bx-paper-elevated);
  border-color: var(--bs-border-color) !important;
}

.dropdown-menu {
  --bs-dropdown-bg: var(--bx-paper-elevated);
  --bs-dropdown-link-hover-bg: var(--bs-primary-bg-subtle);
  --bs-dropdown-link-active-bg: var(--bs-primary);
  border-color: var(--bs-border-color);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

[data-bs-theme="dark"] .dropdown-menu {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* Align Data Mode terminal tokens with the same palette */
[data-bs-theme="dark"] {
  --dt-bg: var(--bx-paper);
  --dt-surface: var(--bx-paper-elevated);
  --dt-surface-2: var(--bx-paper-tint);
  --dt-border: var(--bs-border-color);
  --dt-border-soft: var(--bs-border-color);
  --dt-text: var(--bx-ink);
  --dt-muted: var(--bx-ink-soft);
  --dt-faint: #64748b;
  --dt-accent: var(--bx-teal);
  --dt-accent-dim: var(--bx-glow);
  --dt-header-bg: rgba(11, 18, 32, 0.88);
  --dt-heading: #f8fafc;
  --dt-link: var(--bx-sky);
  --dt-payload: var(--bx-emerald);
}

[data-bs-theme="light"] {
  --dt-bg: var(--bx-paper);
  --dt-surface: var(--bx-paper-elevated);
  --dt-surface-2: var(--bx-paper-tint);
  --dt-border: var(--bs-border-color);
  --dt-border-soft: var(--bs-border-color);
  --dt-text: var(--bx-ink);
  --dt-muted: var(--bx-ink-soft);
  --dt-faint: #94a3b8;
  --dt-accent: var(--bx-teal);
  --dt-accent-dim: var(--bx-glow);
  --dt-header-bg: rgba(243, 246, 251, 0.92);
  --dt-heading: var(--bx-ink);
  --dt-link: var(--bx-sky);
  --dt-payload: var(--bx-emerald);
}

/* Companion pairing QR — opaque cover until the user explicitly reveals */
.companion-qr {
  position: relative;
  width: 240px;
  height: 240px;
}

.companion-qr__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
}

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

.companion-qr__cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.25rem;
  margin: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
  color: var(--bs-body-color);
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.companion-qr__cover:hover,
.companion-qr__cover:focus-visible {
  border-color: var(--bs-primary);
  outline: none;
}

.companion-qr__cover-icon {
  font-size: 1.75rem;
  color: var(--bs-secondary);
  line-height: 1;
}

.companion-qr__cover-title {
  font-weight: 600;
  font-size: 1rem;
}

.companion-qr__cover-body {
  font-size: 0.82rem;
  color: var(--bs-secondary-color, var(--bs-secondary));
  line-height: 1.35;
}

.companion-qr__cover-cta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bs-primary);
}

/* Full-bleed workspace shell */
.workspace-main {
  max-width: none;
}

.workspace-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.workspace-page-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.workspace-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Unified Collaborative Workspace — stage fills the page; room chrome is a drawer */
.workspace-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  min-height: 70vh;
}

.workspace-room--studio {
  height: calc(100dvh - 7.5rem);
  min-height: 28rem;
  max-height: calc(100dvh - 6.5rem);
}

@media (max-width: 1199.98px) {
  .workspace-room,
  .workspace-room--studio {
    height: auto;
    max-height: none;
    min-height: 0;
  }
}

/* BS 5.3 Offcanvas = Drawer pattern (BS 6 renames this to Drawer) */
.workspace-room-drawer.offcanvas-end {
  --bs-offcanvas-width: min(26rem, 100vw);
  border-left: 1px solid var(--bs-border-color);
}
.workspace-room-drawer .offcanvas-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem;
}
.workspace-room-drawer .workspace-room__sidebar {
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
}
.workspace-room:not(.workspace-room--studio) .workspace-room-drawer .workspace-room__sidebar {
  min-height: 0;
}

/* Persistent right-edge tab — always visible way to open room chrome */
.workspace-room-edge-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1040;
  transform: translateY(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.85rem 0.45rem;
  border: 1px solid var(--bs-border-color);
  border-right: 0;
  border-radius: 0.65rem 0 0 0.65rem;
  background: var(--bs-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.workspace-room-edge-tab i {
  writing-mode: horizontal-tb;
  font-size: 1.05rem;
}
.workspace-room-edge-tab:hover,
.workspace-room-edge-tab:focus-visible {
  filter: brightness(1.08);
  color: #fff;
  outline: none;
}
body:has(#workspaceRoomDrawer.show) .workspace-room-edge-tab {
  opacity: 0;
  pointer-events: none;
}
body.photo-maximized .workspace-room-edge-tab {
  visibility: hidden;
  pointer-events: none;
}

.workspace-room__canvas,
.workspace-room__stage,
.workspace-room__sidebar {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  min-width: 0;
}
.workspace-room__stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.workspace-room__stage > .photo {
  flex: 1 1 auto;
  min-height: 0;
}
body.photo-maximized {
  overflow: hidden;
}
body.photo-maximized .workspace-room__sidebar,
body.photo-maximized .workspace-room-drawer,
body.photo-maximized .workspace-page-header,
body.photo-maximized .onboard-fab,
body.photo-maximized .bx-feedback__fab {
  visibility: hidden;
  pointer-events: none;
}

.workspace-room--studio .workspace-room__stage,
.workspace-room--studio .workspace-room__sidebar {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-room__accordion {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.workspace-room__accordion .accordion-button {
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.workspace-room__accordion .accordion-body {
  padding: 0.65rem 0.75rem;
}

.workspace-room__chat-body {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
}

.workspace-chess__stage {
  /* Square board — cap width so nameplates + board fit a tablet viewport. */
  max-width: min(560px, 100%);
  margin: 0 auto;
  border-radius: 0.75rem;
  padding: 0.5rem;
  background: linear-gradient(180deg, #1a2030 0%, #121722 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-chess__clocks-bar {
  max-width: min(560px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg, var(--bs-light));
}

/* Stacked room (tablet/phone): keep the square board from eating the whole page. */
@media (max-width: 1199.98px) {
  .workspace-chess__stage,
  .workspace-chess__clocks-bar {
    max-width: min(520px, 90vw, 52dvh);
  }
}

.workspace-chess__clock-preset {
  width: auto;
  min-width: 9.5rem;
  max-width: 12rem;
}

.workspace-chess__stage--var {
  box-shadow: 0 0 0 2px rgba(230, 162, 60, 0.65);
}

.workspace-chess__nameplate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  margin: 0.35rem 0;
  border-radius: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: #f4f7fb;
}

.workspace-chess__nameplate--black {
  background: #0e121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-chess__nameplate--white {
  background: #e8e6e1;
  color: #1a1208;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.workspace-chess__nameplate-mark {
  opacity: 0.75;
  font-size: 0.85em;
}

.workspace-chess__clock {
  margin-left: auto;
  min-width: 5.5rem;
  text-align: right;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  line-height: 1.1;
}

.workspace-chess__clock.is-active {
  background: rgba(230, 162, 60, 0.28);
  color: #e6a23c;
  box-shadow: 0 0 0 1px rgba(230, 162, 60, 0.35);
}

.workspace-chess__clock.is-low {
  color: #f87171;
}

.workspace-chess__clock.is-flagged {
  background: rgba(248, 113, 113, 0.25);
  color: #f87171;
}

.workspace-chess__nameplate--white .workspace-chess__clock {
  background: rgba(0, 0, 0, 0.06);
}

.workspace-chess__nameplate--white .workspace-chess__clock.is-active {
  background: rgba(138, 90, 18, 0.18);
  color: #8a5a12;
  box-shadow: 0 0 0 1px rgba(138, 90, 18, 0.28);
}

.workspace-chess__nameplate--white .workspace-chess__clock.is-low,
.workspace-chess__nameplate--white .workspace-chess__clock.is-flagged {
  color: #b91c1c;
}

.workspace-chess__material {
  margin-left: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e6a23c;
}

.workspace-chess__nameplate:not(:has(.workspace-chess__clock:not(.d-none))) .workspace-chess__material {
  margin-left: auto;
}

.workspace-chess__nameplate--white .workspace-chess__material {
  color: #8a5a12;
}

.workspace-chess__turn-pip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(230, 162, 60, 0.25);
  color: #e6a23c;
}

.workspace-chess__nameplate--white .workspace-chess__turn-pip {
  background: rgba(138, 90, 18, 0.18);
  color: #8a5a12;
}

.workspace-chess__var-banner {
  margin: 0.25rem 0;
  padding: 0.4rem 0.65rem;
  border-radius: 0.35rem;
  background: rgba(230, 162, 60, 0.95);
  color: #1a1208;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.workspace-chess__var-sans {
  display: block;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-top: 0.15rem;
}

.workspace-chess__var-line {
  list-style: none;
  margin-left: -1rem;
}

.workspace-chess__board {
  width: 100%;
  aspect-ratio: 1;
}

.workspace-chess__log {
  max-height: 220px;
  overflow: auto;
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.workspace-chess__pgn {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow: auto;
  background: var(--bs-tertiary-bg, var(--bs-light));
  border-radius: 0.35rem;
  padding: 0.5rem;
}

/* Broadcast Studio — single-page deck */
.workspace-studio {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  height: 100%;
}

.workspace-studio__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.workspace-studio__video-pool {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

.workspace-studio__cam-op-bar {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.55rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
}

.workspace-studio--camera-op .workspace-studio__shell {
  grid-template-columns: 1fr;
}

/* A1 audio engineer — console-first layout */
.workspace-studio--audio-eng .workspace-studio__shell {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 16rem);
}

.workspace-studio__preview--a1 {
  flex: 0 0 auto;
  min-height: 8rem;
  max-height: 12rem;
}

.workspace-studio__a1-console {
  padding: 0.85rem 1rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, #1a1f2a 0%, #0d1118 100%);
  color: #e8e6e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-studio__a1-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-studio__a1-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e6a23c;
}

.workspace-studio__a1-sub {
  color: rgba(232, 230, 225, 0.55);
}

.workspace-studio__a1-bus {
  font-size: 0.7rem;
  color: rgba(232, 230, 225, 0.55);
}

.workspace-studio__a1-led {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #555;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.workspace-studio__a1-led.is-live {
  background: #2ecc71;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25);
  animation: workspace-a1-pulse 1.4s ease-in-out infinite;
}

@keyframes workspace-a1-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.workspace-studio__a1-strips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 8.25rem;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0.15rem 0.5rem;
  min-height: 22rem;
}

.workspace-studio__a1-empty {
  padding: 1rem 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.workspace-studio__a1-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.4rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141922;
}

.workspace-studio__a1-strip--program {
  border-color: rgba(var(--bs-danger-rgb), 0.65);
  box-shadow: 0 0 0 1px rgba(var(--bs-danger-rgb), 0.2);
}

.workspace-studio__a1-strip--muted {
  opacity: 0.72;
}

.workspace-studio__a1-strip-label {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(232, 230, 225, 0.85);
}

.workspace-studio__a1-meter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 11rem;
}

.workspace-studio__a1-meter {
  display: flex;
  align-items: flex-end;
  width: 0.7rem;
  height: 10rem;
  padding: 2px;
  border-radius: 0.2rem;
  background: #05070c;
}

.workspace-studio__a1-meter-fill {
  width: 100%;
  height: 0%;
  border-radius: 0.12rem;
  background: linear-gradient(0deg, #2ecc71 0%, #f1c40f 70%, #e74c3c 100%);
  transition: height 80ms linear;
}

.workspace-studio__a1-fader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 10.5rem;
}

.workspace-studio__a1-db-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 10rem;
  font-size: 0.58rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(232, 230, 225, 0.4);
  line-height: 1;
}

/* Cross-browser vertical fader: rotate a horizontal range (slider-vertical is flaky). */
.workspace-studio__vertical-fader-slot {
  position: relative;
  width: 2rem;
  height: 10rem;
}

.workspace-studio__vertical-fader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10rem;
  height: 1.35rem;
  margin: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  accent-color: #e6a23c;
  cursor: pointer;
}

.workspace-studio__a1-fx {
  width: 100%;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-studio__a1-fx input[type="range"] {
  width: 100%;
  accent-color: #e6a23c;
}

.workspace-studio__mv-fx {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 1.7rem;
  z-index: 3;
  font-size: 0.65rem;
  padding: 0.15rem 0.25rem;
  background: rgba(10, 16, 28, 0.88);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.2);
}

.workspace-studio__mv-chroma {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  top: 0.2rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
  padding: 0.15rem 0.2rem;
  border-radius: 0.25rem;
  background: rgba(10, 16, 28, 0.9);
  color: #f4f7fb;
  font-size: 0.58rem;
  line-height: 1.1;
}

.workspace-studio__mv-chroma.is-armed {
  box-shadow: inset 0 0 0 1px rgba(0, 220, 90, 0.55);
}

.workspace-studio__mv-chroma-row {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.workspace-studio__mv-chroma-drop {
  padding: 0.05rem 0.3rem !important;
  font-size: 0.65rem !important;
  line-height: 1.2;
}

.workspace-studio__mv-chroma [data-chroma-color] {
  width: 1.35rem;
  height: 1.1rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.15rem;
  background: transparent;
  cursor: pointer;
}

.workspace-studio__mv-chroma-slider {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  flex: 1 1 100%;
}

.workspace-studio__mv-chroma-slider input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #2ecc71;
}

.workspace-studio__mv-chroma:not(.is-armed) .workspace-studio__mv-chroma-slider,
.workspace-studio__mv-chroma:not(.is-armed) [data-chroma-color] {
  display: none;
}

.workspace-studio__a1-gain-readout {
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e6a23c;
}

.workspace-studio__a1-strip .btn {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.2rem 0.15rem;
}

.workspace-studio__a1-master {
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(230, 162, 60, 0.35);
  background: rgba(0, 0, 0, 0.28);
}

.workspace-studio__a1-master-meter {
  flex: 0 0 6.5rem;
  height: 0.55rem;
  border-radius: 0.2rem;
  background: #05070c;
  overflow: hidden;
}

.workspace-studio__a1-master-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 0.12rem;
  background: linear-gradient(90deg, #2ecc71 0%, #f1c40f 72%, #e74c3c 100%);
  transition: width 80ms linear;
}

.workspace-studio__a1-master-meter-fill.is-hot {
  box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.45);
}

.workspace-studio__a1-presets {
  padding-top: 0.35rem;
}

.workspace-studio__dry-run {
  color: #e8e6e1;
}

.workspace-studio__dry-stat {
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.workspace-studio__dry-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.workspace-studio__dry-run-drawer > summary {
  cursor: pointer;
  list-style: none;
}

.workspace-studio__dry-run-drawer > summary::-webkit-details-marker {
  display: none;
}

.workspace-studio__a1-soundboard {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.workspace-studio__a1-soundboard .card,
.workspace-studio__a1-soundboard .border {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: transparent;
}

@media (max-width: 991.98px) {
  .workspace-studio--audio-eng .workspace-studio__shell {
    grid-template-columns: 1fr;
  }
}

.workspace-studio--graphics .workspace-studio__shell,
.workspace-studio--replay .workspace-studio__shell,
.workspace-studio--prompter .workspace-studio__shell,
.workspace-studio--tech-ops .workspace-studio__shell,
.workspace-studio--talent .workspace-studio__shell {
  grid-template-columns: 1fr;
}

.workspace-studio__crew-console {
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a1f2a 0%, #0d1118 100%);
  color: #e8e6e1;
}

.workspace-studio__crew-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-studio__tech-table {
  font-size: 0.75rem;
}

.workspace-studio__health-green { color: #2ecc71; }
.workspace-studio__health-yellow { color: #f1c40f; }
.workspace-studio__health-red { color: #e74c3c; }

.workspace-studio__talent-monitor {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070c;
  color: #f4f7fb;
  overflow: hidden;
}

.workspace-studio__talent-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-studio__talent-scroll-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.workspace-studio__talent-scroll {
  padding: 2rem 1.5rem 40vh;
  font-size: 1.75rem;
  line-height: 1.45;
  font-weight: 600;
  white-space: pre-wrap;
}

.workspace-studio__talent-scroll.is-mirror {
  transform: scaleX(-1);
}

.workspace-studio__talent-placeholder {
  color: rgba(244, 247, 251, 0.45);
  font-weight: 400;
  font-size: 1.1rem;
}

.workspace-studio__talent-cue {
  position: absolute;
  inset: 20% 8% auto;
  z-index: 5;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(225, 29, 72, 0.92);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: workspace-talent-cue 0.35s ease-out;
}

@keyframes workspace-talent-cue {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.workspace-studio__telestrator {
  margin-top: 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 230, 0, 0.28);
  background: #05070c;
  overflow: hidden;
}

.workspace-studio__telestrator-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-studio__telestrator-stage {
  position: relative;
  width: 100%;
  background: #0b1220;
  touch-action: none;
}

.workspace-studio__telestrator-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}

.workspace-studio__ink-swatch {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.workspace-studio__ink-swatch--yellow { background: #ffe600; }
.workspace-studio__ink-swatch--green { background: #39ff14; }
.workspace-studio__ink-swatch--red { background: #ff2d55; }

.workspace-studio__preview {
  position: relative;
}

.workspace-studio__freeze-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 4;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(225, 29, 72, 0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* New workspace — hero title field (stage-aware placeholder + hint) */
.workspace-title-field__label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.workspace-title-field__input {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  padding: 0.85rem 1rem;
  min-height: 3.75rem;
  border-width: 2px;
  border-radius: 0.75rem;
}

.workspace-title-field__input::placeholder {
  font-weight: 500;
  opacity: 0.45;
  letter-spacing: -0.01em;
}

.workspace-title-field__hint {
  margin-top: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--bs-secondary-color);
  max-width: 42rem;
}

.workspace-field-help {
  color: var(--bs-secondary-color);
  line-height: 1;
  text-decoration: none !important;
}

.workspace-field-help:hover,
.workspace-field-help:focus-visible {
  color: var(--bs-primary);
}

.workspace-profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem;
}

.workspace-profile-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.55rem;
  background: rgba(12, 18, 28, 0.55);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workspace-profile-card:hover {
  border-color: rgba(230, 162, 60, 0.55);
}

.workspace-profile-card.is-selected {
  border-color: rgba(230, 162, 60, 0.95);
  box-shadow: 0 0 0 1px rgba(230, 162, 60, 0.35);
  background: rgba(230, 162, 60, 0.08);
}

.workspace-profile-card__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.workspace-profile-card__body {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--bs-secondary-color, #9aa4b2);
}

.workspace-studio__gfx-asset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.45rem;
  padding: 0.55rem 0.65rem;
  background: rgba(8, 12, 22, 0.65);
}

.workspace-studio__gfx-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.workspace-studio__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 22rem);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.workspace-studio__program {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
}

.workspace-studio__preview {
  flex: 1;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(var(--bs-danger-rgb), 0.14), transparent 45%),
    radial-gradient(circle at bottom right, rgba(var(--bs-dark-rgb), 0.1), transparent 40%),
    #0b1220;
}

.workspace-studio__preview--ftb {
  background: #000;
}

.workspace-studio__multiview {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem;
  min-height: 5.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.55rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
}

.workspace-studio__mv-tile {
  position: relative;
  flex: 0 0 auto;
  width: 7.5rem;
  padding: 0;
  border: 2px solid rgba(40, 167, 69, 0.85);
  border-radius: 0.4rem;
  overflow: hidden;
  background: #0b1220;
  cursor: pointer;
}

.workspace-studio__mv-tile:disabled {
  cursor: default;
  opacity: 0.95;
}

.workspace-studio__mv-tile--program {
  border-color: rgba(var(--bs-danger-rgb), 0.95);
  box-shadow: 0 0 0 1px rgba(var(--bs-danger-rgb), 0.35);
}

.workspace-studio__mv-tile--preview {
  border-color: rgba(40, 167, 69, 0.85);
}

.workspace-studio__mv-video {
  display: block;
  width: 100%;
  height: 4.25rem;
  object-fit: cover;
  background: #000;
}

.workspace-studio__mv-label {
  display: block;
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
}

.workspace-studio__mixer-rack {
  max-height: 18rem;
  overflow: auto;
}

.workspace-studio__mix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.workspace-studio__mix-channel {
  padding: 0.45rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  background: var(--bs-body-bg);
}

.workspace-studio__mix-channel--program {
  border-color: rgba(var(--bs-danger-rgb), 0.55);
}

.workspace-studio__mix-meter {
  height: 0.35rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.workspace-studio__mix-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ecc71, #f1c40f, #e74c3c);
  transition: width 80ms linear;
}

.workspace-crew-chat .accordion-button {
  background: rgba(180, 120, 20, 0.12);
  color: inherit;
}

.workspace-crew-chat__body {
  background: rgba(40, 28, 8, 0.04);
}

.workspace-crew-chat__hint {
  color: #9a6b12;
}

.workspace-crew-chat__item {
  border-left: 3px solid #c7911e;
  padding-left: 0.45rem;
}

.workspace-studio__canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.workspace-studio__transport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.55rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
}

.workspace-studio__audio {
  width: min(100%, 16rem);
  height: 2rem;
}

.workspace-studio__transport-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.workspace-studio__rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.65rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
  overflow: hidden;
}

.workspace-studio__tabs {
  gap: 0.2rem;
  padding: 0.4rem;
  border-bottom: 1px solid var(--bs-border-color);
  flex-shrink: 0;
}

.workspace-studio__tabs .nav-link {
  font-size: 0.78rem;
  padding: 0.35rem 0.4rem;
  white-space: nowrap;
}

.workspace-studio__tab-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.7rem;
}

.workspace-studio__layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.workspace-studio__director .form-check-label,
.workspace-studio__layout-grid .form-check-label {
  cursor: pointer;
}

.workspace-studio__egress {
  padding: 0.15rem;
}

.workspace-studio__cue-log {
  max-height: none;
}

@media (max-width: 1199.98px) {
  .workspace-studio {
    height: auto;
  }

  .workspace-studio__shell {
    grid-template-columns: 1fr;
  }

  .workspace-studio__preview {
    min-height: 0;
    aspect-ratio: 16 / 9;
    flex: none;
  }

  .workspace-studio__rail {
    max-height: min(28rem, 55dvh);
  }
}

@media (max-width: 575.98px) {
  .workspace-studio__transport {
    grid-template-columns: 1fr;
  }

  .workspace-studio__audio {
    width: 100%;
  }

  .workspace-studio__transport-controls {
    grid-template-columns: 1fr;
  }

  .workspace-studio__transport-controls .btn-group {
    width: 100%;
  }

  .workspace-studio__transport-controls .btn-group .btn {
    flex: 1;
  }
}

.workspace-room__sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.workspace-room:not(.workspace-room--studio) .workspace-room__sidebar {
  min-height: 70vh;
}

.workspace-room__panel {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: var(--bx-paper-elevated, var(--bs-body-bg));
}

.workspace-room__plate {
  min-height: 520px;
}

.workspace-room__chat {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.workspace-chat__stream {
  flex: 1;
  overflow: auto;
  max-height: 320px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  padding: 0.5rem;
  background: var(--bs-body-bg);
}

.workspace-room--studio .workspace-chat__stream {
  max-height: 14rem;
}

.workspace-chat__item + .workspace-chat__item {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--bs-border-color);
}

.workspace-chat__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.workspace-chat__body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

.workspace-video {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.workspace-room__record-quality {
  width: auto;
  min-width: 5.5rem;
  max-width: 7rem;
}

.workspace-video__local-wrap {
  border-radius: 0.4rem;
  border: 2px solid transparent;
  overflow: hidden;
}

.workspace-video__local-wrap.workspace-video--program {
  border-color: rgba(var(--bs-danger-rgb), 0.95);
  box-shadow: 0 0 0 1px rgba(var(--bs-danger-rgb), 0.35);
}

.workspace-video__local-wrap.workspace-video--preview {
  border-color: rgba(40, 167, 69, 0.85);
}

.workspace-video__local,
.workspace-video__remote {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0b1220;
  border-radius: 0.4rem;
}

.workspace-video__local-wrap .workspace-video__local {
  border-radius: 0;
  display: block;
}

.workspace-video__remotes {
  display: contents;
}

.workspace-roster-row:last-child {
  border-bottom: 0 !important;
}

/* —— Multi-track Studio Jam / 32-Track console (banks + grid) —— */
.workspace-body--multitrack {
  --mt-metal: #1a1f26;
  --mt-metal-2: #12161c;
  --mt-edge: #2a313b;
  --mt-amber: #ffb347;
  --mt-green: #5dff9f;
  --mt-rec: #ff2d55;
  --mt-type: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  background:
    radial-gradient(ellipse at top, rgba(255, 179, 71, 0.06), transparent 40%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(180deg, #10141a 0%, #090b0e 100%) !important;
  color: #e8edf2;
}

.workspace-room--multitrack {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 16rem);
}

.workspace-room--multitrack .workspace-room__stage {
  min-height: 0;
}

.mt-console {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  min-height: 0;
  max-height: calc(100vh - 8.5rem);
  padding: 0.45rem;
  border: 1px solid var(--mt-edge);
  border-radius: 0.45rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 2px),
    var(--mt-metal);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 6px rgba(0, 0, 0, 0.4),
    0 8px 20px rgba(0, 0, 0, 0.3);
  font-family: var(--mt-type);
}

.mt-console__transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--mt-edge);
  border-radius: 0.35rem;
  background: linear-gradient(180deg, #222831, var(--mt-metal-2));
  flex-shrink: 0;
}

.mt-console__brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 8.5rem;
}

.mt-console__brand-mark {
  color: var(--mt-amber);
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.55);
}

.mt-console__brand-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mt-console__brand-sub {
  font-size: 0.58rem;
  color: #7e8896;
}

.mt-console__transport-controls {
  display: flex;
  gap: 0.3rem;
}

.mt-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid #3a4350;
  background: radial-gradient(circle at 30% 25%, #3a4350, #1a1f26 70%);
  color: #e8edf2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 #0a0c10;
}

.mt-btn:hover { filter: brightness(1.08); }
.mt-btn--play { color: var(--mt-green); }
.mt-btn--stop { color: #d7dde6; }
.mt-btn--record { color: var(--mt-rec); }
.mt-btn--record.is-hot {
  background: radial-gradient(circle at 30% 25%, #ff5b76, #7a1024 70%);
  box-shadow: 0 0 0 2px rgba(255, 45, 85, 0.35), 0 0 14px rgba(255, 45, 85, 0.5);
  animation: mt-rec-pulse 1s ease-in-out infinite;
}
.mt-btn--add {
  width: auto;
  height: 1.85rem;
  padding: 0 0.65rem;
  border-radius: 0.3rem;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--mt-amber);
}

.mt-btn--export { color: #9ec1ff; }

.mt-export { position: relative; }

.mt-export__menu {
  font-family: var(--mt-type, monospace);
  font-size: 0.75rem;
  min-width: 12rem;
}

@keyframes mt-rec-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.mt-master-meter {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--mt-edge);
  border-radius: 0.3rem;
  background: #0d1116;
}

.mt-master-meter__label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #8b96a5;
}

.mt-master-meter__pair {
  display: flex;
  gap: 2px;
  height: 44px;
}

.mt-master-meter__pair canvas {
  display: block;
  border-radius: 1px;
  border: 1px solid #222831;
}

.mt-master-meter__clip,
.mt-led__clip {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #2a1518;
  box-shadow: inset 0 0 0 1px #4a2026;
}

.mt-master-meter__clip.is-hot,
.mt-led__clip.is-hot {
  background: #ff2d55;
  box-shadow: 0 0 8px rgba(255, 45, 85, 0.85);
}

.mt-console__clock {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.45rem;
}

.mt-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.55rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8b96a5;
}

.mt-field input,
.mt-field select,
.mt-strip__name,
.mt-strip__instrument,
.mt-strip__in {
  background: #0d1116;
  border: 1px solid #313945;
  color: #e8edf2;
  border-radius: 0.22rem;
  font-family: inherit;
  font-size: 0.68rem;
  padding: 0.12rem 0.28rem;
  line-height: 1.2;
}

.mt-field input { width: 3.6rem; }

.mt-click {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c3cad4;
  cursor: pointer;
  user-select: none;
}

.mt-click input { position: absolute; opacity: 0; pointer-events: none; }

.mt-click__lamp {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #2a313b;
  box-shadow: inset 0 0 0 1px #444e5c;
}

.mt-click__lamp.is-on {
  background: var(--mt-amber);
  box-shadow: 0 0 8px rgba(255, 179, 71, 0.75);
}

.mt-click__lamp.is-pulse {
  background: #fff1c7;
  box-shadow: 0 0 12px rgba(255, 241, 199, 0.95);
}

.mt-console__status {
  margin-left: auto;
  text-align: right;
}

.mt-console__timecode {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mt-green);
  text-shadow: 0 0 10px rgba(93, 255, 159, 0.3);
  line-height: 1;
}

.mt-console__state {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b96a5;
}

.mt-cue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid #2a313b;
  border-radius: 0.3rem;
  background: #10151b;
  max-width: 22rem;
}

.mt-cue__phones {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mt-cue__label,
.mt-cue__pct {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b96a5;
}

.mt-cue__phones input[type="range"] {
  width: 4.5rem;
  accent-color: #6ea8fe;
}

.mt-btn--cue,
.mt-btn--talkback {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #3a4350;
  background: #151a21;
  color: #c3cad4;
  border-radius: 0.25rem;
  padding: 0.28rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mt-btn--cue.is-on {
  border-color: #6ea8fe;
  color: #d7e7ff;
  box-shadow: 0 0 0 1px rgba(110, 168, 254, 0.3);
}

.mt-btn--talkback.is-hot {
  border-color: #ff2d55;
  color: #fff;
  background: #3a1018;
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.35);
}

.mt-click__lamp--talk.is-on {
  background: #ff2d55;
  box-shadow: 0 0 8px rgba(255, 45, 85, 0.75);
}

.mt-cue__tb-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: #6f7a89;
}

.mt-cue__status {
  font-size: 0.52rem;
  color: #6f7a89;
  letter-spacing: 0.03em;
  min-width: 6rem;
}

.mt-console__midi-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  flex-shrink: 0;
  padding: 0.1rem 0 0;
}

.mt-console__midi-device {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b96a5;
}

.mt-console__midi-device select {
  font-size: 0.65rem;
  background: #10151b;
  color: #e8edf2;
  border: 1px solid #3a4350;
  border-radius: 0.25rem;
  padding: 0.15rem 0.35rem;
  min-width: 10rem;
}

.mt-console__midi-status {
  font-size: 0.58rem;
  color: #6f7a89;
  letter-spacing: 0.04em;
}

.mt-strip__midi-patch {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: #8b96a5;
}

.mt-strip__midi-patch select {
  font-size: 0.58rem !important;
  padding: 0.1rem 0.2rem !important;
  background: #0d1116;
  color: #e8edf2;
  border: 1px solid #2a313b;
  border-radius: 0.2rem;
}

.mt-strip.is-midi {
  border-color: rgba(110, 168, 254, 0.55);
}

.mt-strip.is-midi-hit {
  box-shadow: 0 0 0 1px rgba(110, 168, 254, 0.55), inset 0 0 14px rgba(110, 168, 254, 0.12);
}

.mt-strip__roll-toggle {
  position: absolute;
  left: 0.15rem;
  bottom: 0.12rem;
  border: 1px solid #3a4350;
  background: #10151b;
  color: #9aa3b0;
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0.18rem;
  padding: 0.05rem 0.25rem;
  z-index: 2;
}

.mt-midi-roll {
  margin-top: 0.2rem;
  border: 1px solid #2a313b;
  border-radius: 0.25rem;
  background: #0b0e12;
  padding: 0.25rem;
}

.mt-midi-roll__toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.mt-midi-roll__label {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6ea8fe;
  font-weight: 700;
}

.mt-midi-roll__hint {
  font-size: 0.48rem;
  color: #6f7a89;
  flex: 1;
}

.mt-midi-roll__btn {
  border: 1px solid #3a4350;
  background: #10151b;
  color: #c3cad4;
  font-size: 0.48rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0.18rem;
  padding: 0.08rem 0.28rem;
}

.mt-midi-roll__canvas {
  width: 100%;
  height: 5.5rem;
  display: block;
  border-radius: 0.15rem;
  cursor: crosshair;
}

.mt-console__banks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  flex-shrink: 0;
  padding: 0.15rem 0 0.1rem;
}

.mt-console__bank-group,
.mt-console__view-modes {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.mt-bank,
.mt-view-mode {
  border: 1px solid #3a4350;
  background: #10151b;
  color: #9aa3b0;
  font-family: inherit;
  border-radius: 0.28rem;
  padding: 0.22rem 0.45rem;
  line-height: 1.1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.mt-bank__letter {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e8edf2;
}

.mt-bank__range {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mt-view-mode {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mt-bank.is-active,
.mt-view-mode.is-active {
  border-color: var(--mt-amber);
  color: #fff6c8;
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.25), inset 0 0 10px rgba(255, 179, 71, 0.08);
}

.mt-bank:disabled {
  opacity: 0.45;
  cursor: default;
}

.mt-console__strips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7.6rem, 8.4rem);
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.mt-strip.is-bank-hidden {
  display: none !important;
}

/* High-density mixer: fit the full desk side-by-side */
.mt-console--grid .mt-console__strips {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(3.35rem, 1fr));
  grid-auto-columns: unset;
  gap: 0.22rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.mt-console--grid .mt-strip {
  padding: 0.22rem;
  gap: 0.18rem;
}

.mt-console--grid .mt-strip__wave,
.mt-console--grid .mt-fx,
.mt-console--grid .mt-strip__takes,
.mt-console--grid .mt-strip__row,
.mt-console--grid .mt-strip__invite {
  display: none !important;
}

.mt-console--grid .mt-strip__name {
  font-size: 0.55rem;
  padding: 0.05rem 0.1rem;
}

.mt-console--grid .mt-strip__ch {
  font-size: 0.48rem;
}

.mt-console--grid .mt-strip__fader-wrap {
  min-height: 5.5rem;
}

.mt-console--grid .mt-strip__buttons {
  gap: 0.12rem;
}

.mt-console--grid .mt-chip {
  font-size: 0.48rem;
  padding: 0.08rem 0.15rem;
}

.mt-strip {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.35rem;
  border: 1px solid var(--mt-edge);
  border-radius: 0.32rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 36%),
    #151a21;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 0;
}

.mt-strip.is-recording {
  border-color: rgba(255, 45, 85, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 45, 85, 0.3), inset 0 0 12px rgba(255, 45, 85, 0.1);
}

.mt-strip__header {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.mt-strip__ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.mt-strip__ch {
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: #6f7a89;
}

.mt-strip__invite {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.2rem;
  border: 1px solid #3a4350;
  background: #10151b;
  color: var(--mt-amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  padding: 0;
  line-height: 1;
}

.mt-strip__invite:hover {
  border-color: var(--mt-amber);
  box-shadow: 0 0 8px rgba(255, 179, 71, 0.35);
}

.mt-strip.is-assigned {
  border-color: rgba(255, 179, 71, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.25), inset 0 0 14px rgba(255, 179, 71, 0.08);
}

.mt-strip.is-locked {
  opacity: 0.72;
}

.mt-strip.is-locked .mt-chip--rec {
  pointer-events: none;
}

.mt-invite-modal {
  background: #151a21;
  color: #e8edf2;
  border: 1px solid #2a313b;
}

.mt-strip__identity {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.mt-strip__icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.22rem;
  background: #0d1116;
  color: var(--mt-amber);
  flex-shrink: 0;
  font-size: 0.7rem;
}

.mt-strip__name {
  width: 100%;
  min-width: 0;
  font-weight: 600;
  font-size: 0.68rem !important;
}

.mt-strip__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem;
}

.mt-strip__instrument,
.mt-strip__in {
  font-size: 0.6rem !important;
  padding: 0.1rem 0.2rem !important;
}

.mt-strip__in { max-width: 2.6rem; }

.mt-fx {
  border: 1px solid #252c36;
  border-radius: 0.25rem;
  background: #0d1116;
  overflow: hidden;
}

.mt-fx__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #252c36;
}

.mt-fx__tab {
  border: 0;
  background: transparent;
  color: #6f7a89;
  font-family: inherit;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.18rem 0;
}

.mt-fx__tab.is-active {
  color: var(--mt-amber);
  background: rgba(255, 179, 71, 0.08);
  box-shadow: inset 0 -1px 0 var(--mt-amber);
}

.mt-fx__pane {
  display: none;
  padding: 0.22rem 0.28rem 0.28rem;
  gap: 0.18rem;
}

.mt-fx__pane.is-active {
  display: flex;
  flex-direction: column;
}

.mt-fx__ctrl {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: #8b96a5;
}

.mt-fx__ctrl input[type="range"] {
  width: 100%;
  height: 0.9rem;
  accent-color: var(--mt-amber);
}

.mt-fx__note {
  font-size: 0.5rem;
  color: #5c6674;
  letter-spacing: 0.04em;
}

.mt-strip__buttons {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.18rem;
}

.mt-chip {
  border: 1px solid #3a4350;
  background: #10151b;
  color: #c3cad4;
  border-radius: 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.05rem;
  line-height: 1;
}

.mt-chip--rec.is-on {
  color: #fff;
  background: #8a1028;
  border-color: var(--mt-rec);
  box-shadow: 0 0 8px rgba(255, 45, 85, 0.4);
}

.mt-chip--mute.is-on {
  color: #111;
  background: var(--mt-amber);
  border-color: #ffc878;
}

.mt-chip--solo.is-on {
  color: #0b0e12;
  background: var(--mt-green);
  border-color: #9dffc2;
}

.mt-strip__fader-wrap {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0.3rem;
  align-items: stretch;
  height: 6.4rem;
}

.mt-led {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  height: 100%;
}

.mt-led__canvas {
  width: 12px;
  height: 100%;
  border-radius: 2px;
  border: 1px solid #222831;
  background: #0a0d11;
}

.mt-strip__fader,
.mt-strip__pan {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b96a5;
}

.mt-strip__fader {
  height: 100%;
  align-items: center;
}

.mt-strip__fader input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 1.15rem;
  height: 100%;
  accent-color: var(--mt-green);
}

.mt-strip__pan input[type="range"] {
  width: 100%;
  height: 0.95rem;
  accent-color: var(--mt-amber);
}

.mt-strip__wave {
  border: 1px solid #252c36;
  border-radius: 0.22rem;
  background: #0d1116;
  overflow: hidden;
  position: relative;
  height: 1.75rem;
}

.mt-strip__wave canvas {
  display: block;
  width: 100%;
  height: 28px;
}

.mt-strip__wave-status {
  position: absolute;
  right: 0.2rem;
  bottom: 0.05rem;
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6f7a89;
}

.mt-console__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.05rem;
  flex-shrink: 0;
}

.mt-console__hint {
  font-size: 0.62rem;
  color: #8b96a5;
  max-width: 34rem;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .workspace-room--multitrack {
    grid-template-columns: 1fr;
  }

  .mt-console {
    max-height: none;
  }

  .mt-console__strips {
    grid-auto-columns: minmax(7.4rem, 62vw);
  }
}

/* —— Pro timeline / takes / aux —— */
.mt-timeline {
  position: relative;
  height: 2.4rem;
  border: 1px solid var(--mt-edge);
  border-radius: 0.3rem;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 8%),
    #0d1116;
  overflow: hidden;
  flex-shrink: 0;
  cursor: crosshair;
}

.mt-timeline__markers,
.mt-timeline__comments {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mt-timeline__marker,
.mt-timeline__comment {
  position: absolute;
  top: 0.15rem;
  transform: translateX(-50%);
  pointer-events: auto;
  border: 0;
  font-family: inherit;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.28rem;
  border-radius: 0.18rem;
  color: #0b0e12;
  white-space: nowrap;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-timeline__comment {
  top: 1.15rem;
  background: #ff2d55;
  color: #fff;
  font-size: 0.55rem;
  padding: 0.05rem 0.2rem;
}

.mt-timeline__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff6c8;
  box-shadow: 0 0 8px rgba(255, 246, 200, 0.7);
  left: 0;
  pointer-events: none;
}

.mt-timeline__actions {
  position: absolute;
  right: 0.25rem;
  top: 0.2rem;
  display: flex;
  gap: 0.25rem;
  pointer-events: auto;
}

.mt-timeline__btn {
  border: 1px solid #3a4350;
  background: rgba(16, 21, 27, 0.9);
  color: #c3cad4;
  font-family: inherit;
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0.2rem;
  padding: 0.12rem 0.3rem;
}

.mt-click__lamp--punch.is-on {
  background: #ff2d55;
  box-shadow: 0 0 8px rgba(255, 45, 85, 0.75);
}

.mt-strip__takes {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: #8b96a5;
}

.mt-strip__takes select {
  font-size: 0.6rem !important;
  padding: 0.1rem 0.2rem !important;
  background: #0d1116;
  border: 1px solid #313945;
  color: #e8edf2;
  border-radius: 0.22rem;
  font-family: inherit;
}

.mt-strip__wave {
  position: relative;
}

.mt-strip__auto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: crosshair;
}

.mt-strip__auto-line {
  filter: drop-shadow(0 0 2px rgba(255, 179, 71, 0.55));
}

/* —— Telehealth exam room ——————————————————————————————— */
.th-exam {
  --th-bg: #0e1419;
  --th-panel: #151c24;
  --th-line: #2a3542;
  --th-ink: #e7eef5;
  --th-muted: #8b97a6;
  --th-accent: #3d9b8f;
  --th-warn: #c9a227;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 70vh;
  color: var(--th-ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.th-exam__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #121a22 0%, #1a2830 55%, #152028 100%);
  border: 1px solid var(--th-line);
  border-radius: 0.35rem;
}

.th-exam__brand {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.th-exam__sub {
  font-size: 0.72rem;
  color: var(--th-muted);
  text-transform: capitalize;
}

.th-exam__header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.th-exam__cue {
  font-size: 0.68rem;
  color: var(--th-accent);
  letter-spacing: 0.04em;
}

.th-exam__banner {
  padding: 0.55rem 0.85rem;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 0.3rem;
  font-size: 0.78rem;
  color: #e8d48a;
}

.th-exam__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr) minmax(240px, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .th-exam__grid {
    grid-template-columns: 1fr;
  }
}

.th-exam__video,
.th-exam__canvas,
.th-exam__sidebar {
  background: var(--th-panel);
  border: 1px solid var(--th-line);
  border-radius: 0.35rem;
  padding: 0.65rem;
  min-height: 12rem;
}

.th-exam__tiles {
  display: grid;
  gap: 0.5rem;
}

.th-exam__tile {
  position: relative;
  background: #0a0f14;
  border: 1px solid var(--th-line);
  border-radius: 0.3rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.th-exam__tile video,
.th-exam__remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #05080c;
}

.th-exam__tile-label {
  position: absolute;
  left: 0.35rem;
  bottom: 0.3rem;
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0.2rem;
}

.th-exam__tile-empty {
  margin: 0;
  padding: 1.5rem 0.75rem;
  text-align: center;
  color: var(--th-muted);
  font-size: 0.75rem;
}

.th-exam__devices {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.th-exam__devices label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.65rem;
  color: var(--th-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.th-exam__devices select {
  background: #0d1218;
  border: 1px solid var(--th-line);
  color: var(--th-ink);
  border-radius: 0.25rem;
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
}

.th-exam__telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin: 0.55rem 0 0;
}

.th-exam__telemetry div {
  background: #0d1218;
  border: 1px solid var(--th-line);
  border-radius: 0.25rem;
  padding: 0.3rem 0.4rem;
}

.th-exam__telemetry dt {
  font-size: 0.58rem;
  color: var(--th-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.th-exam__telemetry dd {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.th-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.th-panel__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.th-panel label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--th-muted);
}

.th-panel textarea,
.th-panel select,
.th-upload input[type="file"] {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--th-line);
  color: var(--th-ink);
  border-radius: 0.25rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
  font-family: inherit;
}

.th-btn {
  border: 1px solid var(--th-line);
  background: #1a2430;
  color: var(--th-ink);
  border-radius: 0.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
}

.th-btn:hover {
  border-color: var(--th-accent);
}

.th-btn--primary,
.th-btn--start {
  background: var(--th-accent);
  border-color: #2f7f75;
  color: #041210;
  font-weight: 600;
}

.th-btn--invite {
  border-color: #3d6a8c;
  background: #1a3040;
}

.th-btn--complete {
  border-color: #8a6a2a;
  background: #3a3018;
  color: #f0e0a8;
}

.th-btn--tiny {
  padding: 0.15rem 0.4rem;
  font-size: 0.62rem;
}

.th-upload {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.th-upload__label {
  font-size: 0.68rem;
  color: var(--th-muted);
}

.th-imaging {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
}

.th-imaging li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  background: #0d1218;
  border: 1px solid var(--th-line);
  border-radius: 0.25rem;
  font-size: 0.72rem;
}

.th-imaging__actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.th-link {
  color: var(--th-accent);
  font-size: 0.72rem;
}

.th-invite-modal {
  background: var(--th-panel);
  color: var(--th-ink);
  border: 1px solid var(--th-line);
}

.th-exam__canvas .workspace-canvas,
.th-exam__canvas canvas {
  max-width: 100%;
}

.th-exam__vitals-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--th-panel);
  border: 1px solid var(--th-line);
  border-radius: 0.35rem;
}

@media (max-width: 900px) {
  .th-exam__vitals-bar {
    grid-template-columns: 1fr;
  }
}

.th-vitals-chart {
  width: 100%;
  max-width: 420px;
  height: 72px;
  border: 1px solid var(--th-line);
  border-radius: 0.25rem;
  background: #0d1218;
}

.th-vitals-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.th-vitals-form input {
  width: 3.6rem;
  background: #0d1218;
  border: 1px solid var(--th-line);
  color: var(--th-ink);
  border-radius: 0.22rem;
  padding: 0.25rem 0.3rem;
  font-size: 0.7rem;
}

.th-muted {
  color: var(--th-muted);
  font-size: 0.72rem;
}

.th-library {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: 7rem;
  overflow: auto;
  display: grid;
  gap: 0.25rem;
}

.th-library li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
}

.th-rx-form,
.th-rx-search {
  display: grid;
  gap: 0.35rem;
}

.th-rx-form input,
.th-rx-search input,
.th-rx-form select {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--th-line);
  color: var(--th-ink);
  border-radius: 0.25rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
}

.th-soap-summary pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--th-muted);
  background: #0d1218;
  border: 1px solid var(--th-line);
  border-radius: 0.25rem;
  padding: 0.45rem;
}

/* —— Public Web Rx page ——————————————————————————————— */
.web-rx {
  --rx-ink: #102018;
  --rx-accent: #1f6f63;
  --rx-paper: #f4f7f5;
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
  background:
    radial-gradient(circle at 12% 10%, rgba(61, 155, 143, 0.18), transparent 40%),
    linear-gradient(160deg, #e8f0ec 0%, #f7faf8 45%, #dfe9e4 100%);
  color: var(--rx-ink);
  font-family: "Sora", "Segoe UI", sans-serif;
}

.web-rx__hero {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
}

.web-rx__brand {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.web-rx__title {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.web-rx__token {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #4d5f58;
}

.web-rx__card,
.web-rx__scan {
  max-width: 34rem;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(16, 32, 24, 0.12);
  border-radius: 0.6rem;
  padding: 1.1rem 1.2rem;
}

.web-rx__meta {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.web-rx__meta dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5d6e66;
  margin: 0;
}

.web-rx__meta dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.web-rx__med {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.web-rx__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.web-rx__facts li {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  background: var(--rx-paper);
  border-radius: 0.35rem;
}

.web-rx__facts span {
  font-size: 0.68rem;
  color: #5d6e66;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.web-rx__block h3 {
  margin: 0.9rem 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5d6e66;
}

.web-rx__block p {
  margin: 0;
  font-size: 0.92rem;
}

.web-rx__sign {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(16, 32, 24, 0.12);
  display: grid;
  gap: 0.15rem;
}

.web-rx__sign span {
  font-size: 0.7rem;
  color: #5d6e66;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.web-rx__sign strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--rx-accent);
}

.web-rx__scan h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.web-rx__scan p {
  margin: 0 0 0.75rem;
  color: #4d5f58;
  font-size: 0.88rem;
}

.web-rx__qr {
  width: 10rem;
  margin: 0 auto 0.75rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 0.4rem;
}

.web-rx__qr svg {
  width: 100%;
  height: auto;
  display: block;
}

.web-rx__barcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.45rem;
  background: #101a16;
  color: #e7f4ef;
  border-radius: 0.3rem;
}

.web-rx__actions {
  margin-top: 0.9rem;
  text-align: center;
}

.web-rx__btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 0.35rem;
  background: var(--rx-accent);
  color: #f4fffb;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.web-rx__btn:hover {
  color: #fff;
  filter: brightness(1.05);
}

/* —— Browser NLE / Video Editor ——————————————————————————— */
.nle {
  --nle-bg: #0b1016;
  --nle-panel: #121922;
  --nle-line: #2a3542;
  --nle-ink: #e8eef5;
  --nle-muted: #8b97a6;
  --nle-accent: #4aa3ff;
  --nle-clip: #2d6a9f;
  --nle-audio: #3d9b8f;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  height: calc(100dvh - 7.5rem);
  max-height: calc(100dvh - 6.5rem);
  color: var(--nle-ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.nle__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #101820, #182430);
  border: 1px solid var(--nle-line);
  border-radius: 0.35rem;
}

.nle__brand { font-weight: 650; font-size: 0.95rem; }
.nle__sub { font-size: 0.72rem; color: var(--nle-muted); }
.nle__header-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.nle__status { font-size: 0.68rem; color: var(--nle-accent); }
.nle__status.is-danger { color: #e07070; }

.nle__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.nle__bin {
  width: min(280px, 90vw);
  max-height: 100%;
  overflow: auto;
  background: var(--nle-panel);
  border: 1px solid var(--nle-line);
  border-radius: 0.35rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nle__panel-title { margin: 0; font-size: 0.8rem; font-weight: 650; }
.nle-muted { color: var(--nle-muted); font-size: 0.7rem; }

.nle-bin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  max-height: 16rem;
  overflow: auto;
}

.nle-bin-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: center;
}

.nle__preview {
  background: var(--nle-panel);
  border: 1px solid var(--nle-line);
  border-radius: 0.35rem;
  padding: 0.65rem;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: hidden;
}

.nle__monitor {
  position: relative;
  background: #05080c;
  border-radius: 0.3rem;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(52dvh, calc(100dvh - 22rem));
  margin-inline: auto;
}

.nle__monitor canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #05080c;
}

.nle__timecode {
  position: absolute;
  right: 0.5rem;
  bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  background: rgba(0,0,0,0.55);
  border-radius: 0.2rem;
}

.nle__transport {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.5rem;
}

.nle-zoom { font-size: 0.68rem; color: var(--nle-muted); display: flex; gap: 0.35rem; align-items: center; }

.nle__timeline {
  position: relative;
  flex: 0 0 auto;
  background: var(--nle-panel);
  border: 1px solid var(--nle-line);
  border-radius: 0.35rem;
  padding: 0.5rem;
  overflow: auto;
  max-height: min(22rem, 32dvh);
}

.nle__ruler {
  position: relative;
  height: 1.2rem;
  margin-left: 2.6rem;
  border-bottom: 1px solid var(--nle-line);
  margin-bottom: 0.35rem;
}

.nle__ruler span {
  position: absolute;
  top: 0;
  font-size: 0.58rem;
  color: var(--nle-muted);
  transform: translateX(-50%);
}

.nle__playhead {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: #ff5a6a;
  margin-left: 2.6rem;
  z-index: 5;
  pointer-events: none;
}

.nle-track {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
  align-items: stretch;
}

.nle-track__label {
  font-size: 0.62rem;
  color: var(--nle-muted);
  letter-spacing: 0.04em;
  padding-top: 0.45rem;
}

.nle-track__lane {
  position: relative;
  height: 2.1rem;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  border-radius: 0.22rem;
  overflow: hidden;
}

.nle-clip {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  background: var(--nle-clip);
  border-radius: 0.2rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.62rem;
  overflow: hidden;
  cursor: grab;
  border: 1px solid rgba(255,255,255,0.15);
}

.nle-clip--audio { background: var(--nle-audio); }
.nle-clip--image { background: #7a5c9e; }
.nle-clip--title { background: #9a6b2f; }

.nle-clip__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  padding-right: 1.4rem;
}

.nle-clip__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background: rgba(255,255,255,0.25);
}
.nle-clip__handle--left { left: 0; }
.nle-clip__handle--right { right: 0; }

.nle-clip__delete,
.nle-clip__split {
  position: absolute;
  top: 0.1rem;
  border: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  border-radius: 0.15rem;
  padding: 0.05rem 0.2rem;
  cursor: pointer;
}
.nle-clip__delete { right: 0.15rem; }
.nle-clip__split { right: 1.05rem; }

.nle-btn {
  border: 1px solid var(--nle-line);
  background: #1a2430;
  color: var(--nle-ink);
  border-radius: 0.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
}
.nle-btn:hover { border-color: var(--nle-accent); }
.nle-btn--primary { background: var(--nle-accent); border-color: #2f7fcc; color: #041018; font-weight: 600; }
.nle-btn--tiny { padding: 0.15rem 0.4rem; font-size: 0.62rem; }
.nle-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.nle-upload { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.nle-upload input,
.nle-upload select,
.nle__bin input[type="search"] {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  color: var(--nle-ink);
  border-radius: 0.25rem;
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
}
.nle-dropzone {
  border: 1px dashed var(--nle-line);
  border-radius: 0.35rem;
  padding: 0.65rem 0.5rem;
  text-align: center;
  background: #0a1016;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nle-upload--drop.is-dragover .nle-dropzone,
.nle-dropzone.is-dragover {
  border-color: var(--nle-accent);
  background: #122033;
}
.nle-dropzone__label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nle-ink);
}
.nle-dropzone__hint { margin: 0.2rem 0 0.45rem; }
.nle-dropzone__browse {
  position: relative;
  display: inline-block;
  font-size: 0.7rem;
  color: var(--nle-accent);
  cursor: pointer;
}
.nle-dropzone__browse input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.nle-check { font-size: 0.7rem; color: var(--nle-muted); display: flex; gap: 0.35rem; align-items: center; }

@media (max-width: 900px) {
  .nle__body { grid-template-columns: 1fr; }
  .nle__bin { width: 100%; }
}

.nle-tools { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.nle-btn.is-active { border-color: var(--nle-accent); background: #1a3350; }
.nle__timeline--razor { cursor: cell; }
.nle__timeline--razor .nle-clip { cursor: cell; }
.nle-check--inline { margin: 0 0.25rem; }

.nle-clip__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0.55;
}
.nle-clip__fade--in {
  left: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.75), transparent);
}
.nle-clip__fade--out {
  right: 0;
  background: linear-gradient(270deg, rgba(0,0,0,0.75), transparent);
}
.nle-clip__fade-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 2;
}
.nle-clip__fade-handle--in { left: 6px; background: rgba(255,255,255,0.12); }
.nle-clip__fade-handle--out { right: 6px; background: rgba(255,255,255,0.12); }

.nle__remote-layer {
  position: absolute;
  inset: 0.5rem;
  pointer-events: none;
  z-index: 6;
}
.nle__remote-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  opacity: 0.85;
}
.nle__remote-cursor {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.nle__remote-cursor span {
  position: absolute;
  left: 12px;
  top: -2px;
  font-size: 0.58rem;
  color: #041018;
  padding: 0.05rem 0.25rem;
  border-radius: 0.15rem;
  white-space: nowrap;
}

.nle-titles {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--nle-line);
}
.nle-title-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.nle-title-form input,
.nle-title-form select {
  background: #0d1218;
  border: 1px solid var(--nle-line);
  color: var(--nle-ink);
  border-radius: 0.22rem;
  padding: 0.25rem 0.35rem;
  font-size: 0.72rem;
}
.nle-title-form input[type="text"] { min-width: 10rem; flex: 1; }
.nle-title-form input[type="color"] { width: 2rem; height: 1.6rem; padding: 0; }

.nle-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 12, 0.62);
  display: grid;
  place-items: center;
  z-index: 40;
}
.nle-modal[hidden] { display: none !important; }
.nle-modal__card {
  width: min(22rem, 92vw);
  background: var(--nle-panel);
  border: 1px solid var(--nle-line);
  border-radius: 0.45rem;
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
}
.nle-modal__card label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--nle-muted);
}
.nle-modal__card select,
.nle-modal__card input {
  background: #0d1218;
  border: 1px solid var(--nle-line);
  color: var(--nle-ink);
  border-radius: 0.25rem;
  padding: 0.35rem 0.45rem;
}
.nle-modal__actions { display: flex; justify-content: flex-end; gap: 0.4rem; }

.nle-clip--fx { box-shadow: inset 0 0 0 1px rgba(74, 163, 255, 0.55); }
.nle-clip.is-selected { outline: 1px solid #ffd27a; outline-offset: -1px; }

.nle__fx-panel { width: min(320px, 92vw); }
.nle-fx-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; max-height: 12rem; overflow: auto; }
.nle-fx-node {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem;
  align-items: center;
  padding: 0.3rem 0.4rem;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  border-radius: 0.25rem;
}
.nle-fx-node.is-active { border-color: var(--nle-accent); }
.nle-fx-node__name {
  border: 0;
  background: transparent;
  color: var(--nle-ink);
  text-align: left;
  font-size: 0.7rem;
  cursor: pointer;
}
.nle-fx-params { display: grid; gap: 0.4rem; margin-top: 0.45rem; }
.nle-fx-knob { display: grid; gap: 0.15rem; font-size: 0.68rem; color: var(--nle-muted); }
.nle-fx-knob em { color: var(--nle-ink); font-style: normal; }
.nle-fx-knob input[type="range"] { width: 100%; }
.nle-fx-add { margin-top: 0.55rem; display: grid; gap: 0.35rem; }
.nle-fx-add__row { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.nle-fx-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: start;
  padding: 0.45rem;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  border-radius: 0.3rem;
}
.nle-fx-card p { margin: 0.2rem 0 0; }

.nle__monitor { position: relative; }
.nle__review-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: crosshair;
}
.nle-review-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
}
.nle-review-note {
  flex: 1 1 10rem;
  min-width: 8rem;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  color: var(--nle-ink);
  border-radius: 0.25rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
}
.nle-review-markers { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.nle-review-marker {
  border: 0;
  background: transparent;
  color: var(--mk, #ff5a5f);
  cursor: pointer;
  font-size: 0.75rem;
}
.nle-ruler-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  z-index: 3;
}
.nle-clip--locked {
  outline: 1px dashed var(--lock-color, #4aa3ff);
  outline-offset: -1px;
  opacity: 0.92;
}
.nle-node-canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--nle-line);
  border-radius: 0.25rem;
  background: #0b1016;
}
.nle-node-card {
  padding: 0.4rem;
  background: #0d1218;
  border: 1px solid var(--nle-line);
  border-radius: 0.25rem;
  margin-bottom: 0.3rem;
}
.nle-node-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
}

/* —— Photo & Graphics Studio (full-bleed + floating PS chrome) —— */
.photo {
  --photo-bg: #0b1016;
  --photo-panel: rgba(18, 24, 32, 0.92);
  --photo-line: #2a3544;
  --photo-ink: #e8eef5;
  --photo-muted: #8a97a8;
  --photo-accent: #4aa3ff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: min(72vh, 38rem);
  color: var(--photo-ink);
  background: var(--photo-bg);
  border: 1px solid var(--photo-line);
  border-radius: 0.4rem;
  padding: 0.45rem 0.5rem 0.5rem;
  position: relative;
}
.photo--studio { overflow: hidden; }
.photo.is-maximized {
  position: fixed;
  inset: 0;
  z-index: 1400;
  border-radius: 0;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0.5rem;
  background: #05080c;
}
.photo__chrome {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
  flex: 0 0 auto;
  z-index: 5;
}
.photo__chrome-meta { min-width: 0; }
.photo__chrome-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.photo__brand { font-weight: 650; font-size: 0.88rem; font-family: Sora, sans-serif; }
.photo__sub { font-size: 0.7rem; color: var(--photo-muted); }
.photo__status { font-size: 0.7rem; color: var(--photo-muted); }
.photo__status.is-danger { color: #ff7b72; }
.photo-btn {
  border: 1px solid var(--photo-line);
  background: #0d1218;
  color: var(--photo-ink);
  border-radius: 0.25rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.photo-btn--tiny { padding: 0.18rem 0.4rem; font-size: 0.68rem; }
.photo-btn--primary { background: #1a3a5c; border-color: var(--photo-accent); }
.photo-btn.is-active { border-color: var(--photo-accent); color: #fff; }

.photo__workspace {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Photoshop-like pasteboard: canvas owns the center; docks float on edges */
.photo__workspace--ps {
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.92), rgba(8, 12, 18, 0.92)),
    #0a0e14;
}

.photo__stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.photo__canvas-host {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px dashed rgba(232, 238, 245, 0.22);
  border-radius: 0.25rem;
  overflow: hidden;
  background-color: #1a1f26;
  background-image:
    linear-gradient(45deg, #242a33 25%, transparent 25%),
    linear-gradient(-45deg, #242a33 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #242a33 75%),
    linear-gradient(-45deg, transparent 75%, #242a33 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  touch-action: none;
  display: grid;
  place-items: center;
  container-type: size;
}
.photo__canvas-host.is-drop-target {
  outline: 2px solid var(--photo-accent);
  outline-offset: -2px;
  background-color: #1e2a38;
}
.photo__canvas-frame {
  position: relative;
  /* Grow to fill the full-bleed pasteboard while keeping document aspect */
  aspect-ratio: var(--photo-aspect, 16 / 9);
  width: min(100cqw, calc(100cqh * var(--photo-aspect, 1.777)));
  height: min(100cqh, calc(100cqw / var(--photo-aspect, 1.777)));
  max-width: 100%;
  max-height: 100%;
  background: #0b1016;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.photo__canvas-frame canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.photo__canvas-frame .photo__tool-overlay {
  pointer-events: none;
  background: transparent !important;
  box-shadow: none;
}
.photo__canvas-frame .photo__peer-layer,
.photo__peer-layer { position: absolute; inset: 0; pointer-events: none; }
.photo__drop-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}
.photo__drop-hint.is-hidden { opacity: 0; }
.photo__drop-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(232, 238, 245, 0.72);
  font-family: Sora, sans-serif;
}
.photo__drop-brand {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(10, 12, 16, 0.85);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.photo-float {
  position: absolute;
  z-index: 6;
  background: rgba(18, 24, 32, 0.94);
  border: 1px solid var(--photo-line);
  border-radius: 0.35rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: var(--photo-ink);
  touch-action: none;
}
.photo-float.is-dragging { opacity: 0.92; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.photo-float.is-hidden,
.photo-float[hidden] { display: none !important; }
.photo-float__drag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  cursor: grab;
  user-select: none;
  padding: 0.28rem 0.35rem;
  margin: -0.2rem -0.2rem 0.35rem;
  border-bottom: 1px solid var(--photo-line);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--photo-muted);
  font-family: Sora, sans-serif;
}
.photo-float__drag:active { cursor: grabbing; }
.photo-float__hide {
  border: 0;
  background: transparent;
  color: var(--photo-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.2rem;
}
.photo-float__hide:hover { color: #fff; }
/* Default Photoshop docking: tools LEFT, options + layers RIGHT */
.photo-float--tools {
  top: 0.55rem;
  left: 0.55rem;
  right: auto;
  padding: 0.35rem;
}
.photo-float--options {
  top: 0.55rem;
  right: 0.55rem;
  left: auto;
  width: min(15.5rem, calc(100% - 5.5rem));
  padding: 0.45rem 0.55rem 0.55rem;
}
.photo-float--layers {
  top: 14.5rem;
  right: 0.55rem;
  left: auto;
  bottom: auto;
  width: min(15.5rem, calc(100% - 5.5rem));
  max-height: calc(100% - 15.2rem);
  overflow: auto;
  padding: 0.45rem 0.55rem 0.55rem;
}
.photo-float--ai {
  top: 0.55rem;
  left: 4.2rem;
  width: min(15rem, calc(100% - 1.2rem));
  padding: 0.55rem 0.65rem;
}
.photo-float__title {
  font-size: 0.72rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  font-family: Sora, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--photo-muted);
}
.photo-float__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.photo-float__layer-actions { display: flex; gap: 0.15rem; }

.photo-ps-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
}
.photo-ps-tools__sep {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--photo-line);
  margin: 0.15rem 0;
}
.photo-ps-tool {
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.28rem;
  background: transparent;
  color: var(--photo-ink);
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}
.photo-ps-tool:hover:not(:disabled) { background: rgba(74, 163, 255, 0.12); }
.photo-ps-tool.is-active {
  background: rgba(74, 163, 255, 0.22);
  border-color: var(--photo-accent);
  color: #fff;
}
.photo-ps-tool:disabled { opacity: 0.35; cursor: default; }
.photo-ps-tool.photo-upload { margin: 0; }

.photo-panel__title {
  font-size: 0.75rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  font-family: Sora, sans-serif;
}
.photo-muted { color: var(--photo-muted); font-size: 0.68rem; }
.photo-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.photo-layer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.25rem;
  align-items: center;
  padding: 0.3rem 0.35rem;
  background: #0d1218;
  border: 1px solid var(--photo-line);
  border-radius: 0.25rem;
  font-size: 0.7rem;
}
.photo-layer.is-active { border-color: var(--photo-accent); }
.photo-layer.is-locked { opacity: 0.75; }
.photo-layer__name {
  border: 0;
  background: transparent;
  color: var(--photo-ink);
  text-align: left;
  cursor: pointer;
  font-size: 0.7rem;
}
.photo-add, .photo-quick { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.45rem 0; }
.photo-quick input[type="text"], .photo-quick input[type="number"], .photo-field input {
  background: #0d1218;
  border: 1px solid var(--photo-line);
  color: var(--photo-ink);
  border-radius: 0.25rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.7rem;
  width: 100%;
}
.photo-field { display: grid; gap: 0.15rem; font-size: 0.68rem; color: var(--photo-muted); margin-bottom: 0.35rem; }
.photo-upload { display: inline-flex; align-items: center; cursor: pointer; }
.photo-peer-cursor {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.45);
}

.photo__brush-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  font-size: 0.68rem;
  color: var(--photo-muted);
  padding: 0.25rem 0;
}
.photo__brush-bar--float {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
}
.photo__brush-bar--float label {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  align-items: center;
  gap: 0.35rem;
}
.photo__brush-bar label { display: inline-flex; align-items: center; gap: 0.25rem; }
.photo__brush-bar input[type="range"] { width: 100%; }
.photo__brush-bar--float select,
.photo__brush-bar--float input[type="color"] {
  width: 100%;
  background: #0d1218;
  border: 1px solid var(--photo-line);
  color: var(--photo-ink);
  border-radius: 0.25rem;
  font-size: 0.7rem;
}
.photo__tool-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.photo-check {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.7rem;
  color: var(--photo-muted);
  margin-top: 0.35rem;
}

@media (max-width: 720px) {
  .photo-ps-tools { grid-template-columns: repeat(2, 1.85rem); }
  .photo-float--tools { left: 0.4rem; right: auto; }
  .photo-float--options,
  .photo-float--layers {
    left: 0.4rem;
    right: 0.4rem;
    width: auto;
    top: auto;
  }
  .photo-float--options { bottom: 12.5rem; }
  .photo-float--layers { bottom: 0.4rem; max-height: 38%; }
}

/* —— Onboarding Academy —— */
.onboard { position: static; }
.onboard__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(2px);
}
.onboard__modal {
  position: relative;
  z-index: 1;
  width: min(720px, 96vw);
  max-height: min(92vh, 840px);
  overflow: auto;
  background:
    radial-gradient(ellipse 90% 60% at 10% 0%, rgba(74, 163, 255, 0.12), transparent 50%),
    #121820;
  border: 1px solid #2a3544;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem 1.15rem;
  color: #e8eef5;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.onboard__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.65rem;
}
.onboard__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a97a8;
}
.onboard__title {
  margin: 0.15rem 0 0;
  font-family: Sora, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.onboard__close {
  border: 0;
  background: transparent;
  color: #8a97a8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.onboard__svg-host { margin: 0.35rem 0 0.75rem; }
.onboard-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.4rem;
  border: 1px solid #2a3544;
}
.onboard__body {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #d7e0ea;
}
.onboard__hint {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  color: #8a97a8;
}
.onboard__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.onboard__pager { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.onboard__btn {
  border: 1px solid #2a3544;
  background: #0d1218;
  color: #e8eef5;
  border-radius: 0.3rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.onboard__btn--primary { background: #1a3a5c; border-color: #4aa3ff; }
.onboard__btn--demo { background: #1f3a2a; border-color: #5dff9f; color: #e8fff2; }
.onboard__dots { display: inline-flex; gap: 0.25rem; margin-right: 0.25rem; }
.onboard__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #3d4f63;
  cursor: pointer;
}
.onboard__dot.is-active { background: #4aa3ff; }
.onboard__status { margin: 0.55rem 0 0; font-size: 0.72rem; color: #8a97a8; min-height: 1em; }
.onboard__status.is-danger { color: #ff7b72; }
.onboard-highlight {
  outline: 2px solid #4aa3ff !important;
  outline-offset: 3px;
  position: relative;
  z-index: 1100;
  animation: onboardPulse 1.2s ease-in-out infinite;
}
.onboard__spotlight {
  position: absolute;
  border: 2px solid rgba(74, 163, 255, 0.85);
  border-radius: 0.4rem;
  box-shadow: 0 0 0 9999px rgba(5, 8, 12, 0.35);
  pointer-events: none;
  z-index: 1190;
}
@keyframes onboardPulse {
  0%, 100% { outline-color: #4aa3ff; }
  50% { outline-color: #ffd27a; }
}
body.onboard-open { overflow: hidden; }

.onboard-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1150;
  border: 1px solid #4aa3ff;
  background: #1a3a5c;
  color: #e8eef5;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-family: Sora, sans-serif;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.onboard-fab:hover { filter: brightness(1.08); }
.onboard__shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.onboard__shell[hidden] { display: none !important; }

/* ── BlueprintX OS Desktop Shell ── */
.bx-os-body { margin: 0; overflow: hidden; }
.bx-os {
  --os-ink: #e8eef5;
  --os-muted: #8a97a8;
  --os-panel: rgba(12, 18, 26, 0.92);
  --os-line: #2a3544;
  --os-accent: #4aa3ff;
  --os-good: #5dff9f;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--os-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(74, 163, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(93, 255, 159, 0.1), transparent 50%),
    linear-gradient(160deg, #070b10 0%, #101820 45%, #0a1218 100%);
  font-family: Sora, "Segoe UI", sans-serif;
}
.bx-os__menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.85rem;
  background: rgba(8, 12, 18, 0.88);
  border-bottom: 1px solid var(--os-line);
  backdrop-filter: blur(10px);
  z-index: 20;
}
.bx-os__brand { display: flex; align-items: baseline; gap: 0.65rem; }
.bx-os__logo { font-weight: 700; letter-spacing: 0.02em; }
.bx-os__shard { font-size: 0.72rem; color: var(--os-muted); }
.bx-os__menubar-right { display: flex; align-items: center; gap: 0.55rem; }
.bx-os__switcher, .bx-os__input {
  background: #0d1218;
  color: var(--os-ink);
  border: 1px solid var(--os-line);
  border-radius: 0.35rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}
.bx-os__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  background: #0d1218;
}
.bx-os__tray-btn, .bx-os__icon-btn {
  border: 0;
  background: transparent;
  color: var(--os-ink);
  position: relative;
  cursor: pointer;
}
.bx-os__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.35rem;
  background: var(--os-accent);
  color: #041018;
  border-radius: 999px;
  font-size: 0.6rem;
  padding: 0 0.28rem;
  font-weight: 700;
}
.bx-os__clock { font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--os-muted); }
.bx-os__notifications {
  position: fixed;
  top: 2.6rem;
  right: 0.75rem;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: 60vh;
  overflow: auto;
  background: var(--os-panel);
  border: 1px solid var(--os-line);
  border-radius: 0.55rem;
  z-index: 40;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.bx-os__notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--os-line);
}
.bx-os__notif-list { list-style: none; margin: 0; padding: 0; }
.bx-os__notif-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(42, 53, 68, 0.6);
  font-size: 0.78rem;
}
.bx-os__notif-list time { color: var(--os-muted); font-size: 0.68rem; }
.bx-os__stage { position: relative; min-height: 0; padding: 1rem 1rem 5.5rem; }
.bx-os__wallpaper {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  opacity: 0.85;
}
.bx-os__hero-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.bx-os__hero-sub { margin: 0.35rem 0 0; color: var(--os-muted); font-size: 0.9rem; }
.bx-os-window {
  position: relative;
  z-index: 5;
  width: min(720px, 100%);
  max-height: calc(100vh - 8rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--os-panel);
  border: 1px solid var(--os-line);
  border-radius: 0.65rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.bx-os-window--wide { width: min(980px, 100%); }
.bx-os-window[hidden] { display: none !important; }
.bx-os-window__titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.7rem;
  background: rgba(8, 12, 18, 0.95);
  border-bottom: 1px solid var(--os-line);
  font-size: 0.82rem;
  font-weight: 600;
}
.bx-os-window__body { padding: 0.75rem; overflow: auto; }
.bx-os__dock {
  position: fixed;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  background: rgba(8, 12, 18, 0.88);
  border: 1px solid var(--os-line);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  z-index: 30;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.bx-os__dock.is-tucked {
  transform: translateX(-50%) translateY(calc(100% + 1.25rem));
  opacity: 0;
  pointer-events: none;
}
.bx-os__dock.is-revealed {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.onboard-fab,
.bx-feedback__fab {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.onboard-fab.is-tucked,
.bx-feedback__fab.is-tucked {
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
  pointer-events: none;
}
.onboard-fab.is-revealed,
.bx-feedback__fab.is-revealed {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.bx-os__dock-item {
  display: grid;
  place-items: center;
  gap: 0.1rem;
  min-width: 3.4rem;
  border: 0;
  background: transparent;
  color: var(--os-ink);
  font-size: 0.62rem;
  cursor: pointer;
  border-radius: 0.55rem;
  padding: 0.3rem 0.35rem;
}
.bx-os__dock-item i { font-size: 1.15rem; }
.bx-os__dock-item:hover { background: rgba(74, 163, 255, 0.15); }
.bx-os__dock-sep { width: 1px; background: var(--os-line); margin: 0.2rem 0.15rem; }
.bx-os__btn {
  border: 1px solid var(--os-line);
  background: #0d1218;
  color: var(--os-ink);
  border-radius: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.bx-os__btn--primary { background: #1a3a5c; border-color: var(--os-accent); }
.bx-os__status { margin: 0.55rem 0 0; font-size: 0.72rem; color: var(--os-muted); min-height: 1em; }
.bx-os__status.is-danger { color: #ff7b72; }

.bx-explorer__toolbar, .bx-market__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  align-items: center;
}
.bx-explorer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 16rem;
}
@media (max-width: 720px) {
  .bx-explorer__layout { grid-template-columns: 1fr; }
  .bx-os__dock {
    left: 0.5rem;
    right: 0.5rem;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .bx-os__dock.is-tucked {
    transform: translateY(calc(100% + 1.25rem));
  }
  .bx-os__dock.is-revealed {
    transform: translateY(0);
  }
}
.bx-explorer__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--os-line); border-radius: 0.45rem; max-height: 22rem; overflow: auto; }
.bx-explorer__list .is-empty, .bx-os__notif-list .is-empty { padding: 0.75rem; color: var(--os-muted); font-size: 0.78rem; }
.bx-explorer__row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(42, 53, 68, 0.55);
  background: transparent;
  color: inherit;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.bx-explorer__row i { grid-row: 1 / span 2; align-self: center; color: var(--os-accent); }
.bx-explorer__name { font-size: 0.82rem; font-weight: 600; }
.bx-explorer__meta { font-size: 0.68rem; color: var(--os-muted); }
.bx-explorer__row.is-active { background: rgba(74, 163, 255, 0.12); }
.bx-explorer__detail { border: 1px solid var(--os-line); border-radius: 0.45rem; padding: 0.75rem; }
.bx-explorer__dl { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.25rem 0.5rem; font-size: 0.78rem; margin-bottom: 0.75rem; }
.bx-explorer__dl dt { color: var(--os-muted); margin: 0; }
.bx-explorer__dl dd { margin: 0; }

.bx-os__btn--ghost {
  background: transparent;
  border-color: var(--os-line);
  color: var(--os-muted);
}
.bx-os__btn--ghost:hover { color: var(--os-text, #e8eef6); border-color: var(--os-accent); }

.bx-import__reassurance {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--os-good, #6dcaa8);
}
.bx-import__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--os-muted);
  counter-reset: bx-import-step;
}
.bx-import__steps li {
  counter-increment: bx-import-step;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.bx-import__steps li::before {
  content: counter(bx-import-step);
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  font-size: 0.62rem;
  color: var(--os-accent);
}
.bx-os__btn--commit {
  background: rgba(109, 202, 168, 0.18);
  border-color: rgba(109, 202, 168, 0.55);
  color: var(--os-good, #6dcaa8);
  font-weight: 600;
}
.bx-os__btn--commit:hover {
  background: rgba(109, 202, 168, 0.28);
}
.bx-import__drop {
  border: 1.5px dashed var(--os-line);
  border-radius: 0.65rem;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(8, 12, 18, 0.35);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bx-import__drop:hover,
.bx-import__drop.is-dragover {
  border-color: var(--os-accent);
  background: rgba(74, 163, 255, 0.08);
}
.bx-import__drop.is-busy { opacity: 0.65; pointer-events: none; }
.bx-import__drop-icon { font-size: 1.75rem; color: var(--os-accent); display: block; margin-bottom: 0.35rem; }
.bx-import__drop-title { margin: 0; font-size: 0.95rem; font-weight: 600; }
.bx-import__drop-sub { margin: 0.25rem 0 0; font-size: 0.72rem; color: var(--os-muted); }
.bx-import__inventory { margin-top: 0.85rem; display: grid; gap: 0.65rem; }
.bx-import__source {
  border: 1px solid var(--os-line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(8, 12, 18, 0.45);
}
.bx-import__source-head,
.bx-import__child-head,
.bx-import__table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.4rem;
}
.bx-import__source-head i { color: var(--os-accent); }
.bx-import__meta { font-size: 0.68rem; color: var(--os-muted); }
.bx-import__badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  color: var(--os-muted);
}
.bx-import__badge--pack {
  border-color: rgba(109, 202, 168, 0.45);
  color: var(--os-good, #6dcaa8);
}
.bx-import__badge--muted { opacity: 0.75; }
.bx-import__child {
  margin: 0.45rem 0 0.2rem;
  padding: 0.45rem 0.55rem;
  border-left: 2px solid var(--os-line);
}
.bx-import__table { margin-top: 0.4rem; }
.bx-import__table-name { font-size: 0.8rem; font-weight: 600; }
.bx-import__headers {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  color: var(--os-muted);
  word-break: break-word;
}
.bx-import__sample { font-size: 0.72rem; color: var(--os-muted); }
.bx-import__sample summary { cursor: pointer; user-select: none; }
.bx-import__table-wrap { overflow: auto; max-height: 10rem; margin-top: 0.35rem; }
.bx-import__table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}
.bx-import__table-wrap th,
.bx-import__table-wrap td {
  border: 1px solid var(--os-line);
  padding: 0.2rem 0.35rem;
  text-align: left;
  white-space: nowrap;
}
.bx-import__table-wrap th { color: var(--os-muted); font-weight: 600; }
.bx-import__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.bx-import__actions a { text-decoration: none; }
.bx-import__errors {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.65rem;
  list-style: disc inside;
  font-size: 0.72rem;
  color: #e8a0a0;
  border: 1px solid rgba(232, 160, 160, 0.35);
  border-radius: 0.4rem;
}
.bx-import__muted { margin: 0.2rem 0; font-size: 0.72rem; color: var(--os-muted); }
.bx-import__empty { margin: 0; font-size: 0.78rem; color: var(--os-muted); }

.bx-import__xray { margin-top: 0.85rem; display: grid; gap: 0.55rem; }
.bx-import__xray-head { margin-bottom: 0.15rem; }
.bx-import__xray-title {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-muted);
}
.bx-import__xray-summary { margin: 0; font-size: 0.82rem; }
.bx-import__card {
  border: 1px solid var(--os-line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(74, 163, 255, 0.06);
}
.bx-import__card.is-unmapped {
  border-color: #d4a017;
  background: rgba(212, 160, 23, 0.14);
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.35);
}
.bx-import__card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.35rem;
}
.bx-import__card-body { margin: 0 0 0.35rem; font-size: 0.8rem; }
.bx-import__action-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--os-muted);
}
.bx-import__select { max-width: 12rem; font-size: 0.75rem; }

.bx-architect {
  margin-top: 0.9rem;
  border: 1px solid var(--os-line);
  border-radius: 0.55rem;
  padding: 0.75rem;
  background: rgba(109, 202, 168, 0.05);
  display: grid;
  gap: 0.65rem;
}
.bx-architect__title {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--os-good, #6dcaa8);
}
.bx-architect__summary { margin: 0.25rem 0 0; font-size: 0.84rem; }
.bx-architect__cards { display: grid; gap: 0.55rem; }
.bx-architect__card {
  border: 1px solid var(--os-line);
  border-radius: 0.45rem;
  padding: 0.6rem 0.7rem;
  background: rgba(8, 12, 18, 0.4);
}
.bx-architect__card h4 { margin: 0 0 0.3rem; font-size: 0.84rem; }
.bx-architect__card p { margin: 0 0 0.45rem; font-size: 0.76rem; color: var(--os-muted); }
.bx-architect__options { display: grid; gap: 0.3rem; }
.bx-architect__option {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  font-size: 0.74rem;
  cursor: pointer;
}
.bx-architect__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bx-architect__preview-summary { margin: 0 0 0.4rem; font-size: 0.8rem; }
.bx-coach {
  border: 1px solid var(--os-line);
  border-radius: 0.45rem;
  padding: 0.65rem;
  background: rgba(8, 12, 18, 0.35);
  display: grid;
  gap: 0.45rem;
}
.bx-coach__title, .bx-sandbox__title {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-good, #6dcaa8);
}
.bx-coach__hint { margin: 0; font-size: 0.74rem; color: var(--os-muted); }
.bx-coach__transcript {
  max-height: 10rem;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}
.bx-coach__bubble {
  font-size: 0.76rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--os-line);
}
.bx-coach__bubble--assistant { background: rgba(109, 202, 168, 0.08); }
.bx-coach__bubble--user { background: rgba(80, 140, 220, 0.1); justify-self: end; max-width: 92%; }
.bx-coach__form { display: flex; gap: 0.4rem; }
.bx-coach__input {
  flex: 1;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid var(--os-line);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}
.bx-sandbox {
  border: 1px solid var(--os-line);
  border-radius: 0.45rem;
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
  background: rgba(8, 12, 18, 0.4);
}
.bx-sandbox__primitives { display: grid; gap: 0.55rem; }
.bx-sandbox__card {
  border: 1px solid var(--os-line);
  border-radius: 0.4rem;
  padding: 0.55rem 0.65rem;
}
.bx-sandbox__card h5 { margin: 0 0 0.2rem; font-size: 0.84rem; }
.bx-sandbox__sub, .bx-sandbox__msg, .bx-sandbox__hint { margin: 0; font-size: 0.72rem; color: var(--os-muted); }
.bx-sandbox__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.45rem 0;
  font-size: 0.72rem;
}
.bx-sandbox__fields dt { color: var(--os-muted); margin: 0; }
.bx-sandbox__fields dd { margin: 0; font-weight: 600; }
.bx-sandbox__states { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.45rem; }
.bx-sandbox__state {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  border: 1px solid var(--os-line);
  color: var(--os-muted);
}
.bx-sandbox__state.is-current {
  color: #0b1210;
  background: var(--os-good, #6dcaa8);
  border-color: transparent;
}
.bx-sandbox__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.bx-sandbox__capture-panel { display: grid; gap: 0.4rem; }
.bx-sandbox__capture {
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
}
.bx-sandbox__capture input {
  font-size: 0.76rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.3rem;
  border: 1px solid var(--os-line);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}
.bx-architect__json {
  margin: 0;
  max-height: 12rem;
  overflow: auto;
  font-size: 0.68rem;
  padding: 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid var(--os-line);
  background: rgba(0, 0, 0, 0.25);
}

.bx-market__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem;
}
.bx-market__card {
  border: 1px solid var(--os-line);
  border-radius: 0.5rem;
  padding: 0.7rem;
  background: rgba(8, 12, 18, 0.55);
  display: grid;
  gap: 0.35rem;
}
.bx-market__card h3 { margin: 0; font-size: 0.92rem; }
.bx-market__card p { margin: 0; font-size: 0.75rem; color: var(--os-muted); min-height: 2.4em; }
.bx-market__kind { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--os-good); }
.bx-market__meta { display: flex; justify-content: space-between; font-size: 0.72rem; }
.bx-market__actions { display: grid; gap: 0.35rem; }

.bx-admin__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.bx-admin__card {
  border: 1px solid var(--os-line);
  border-radius: 0.45rem;
  padding: 0.65rem;
  background: rgba(8, 12, 18, 0.55);
}
.bx-admin__card h3 { margin: 0; font-size: 0.7rem; color: var(--os-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.bx-admin__value { margin: 0.25rem 0 0; font-size: 1.25rem; font-weight: 700; }
.bx-admin__hint { margin: 0.15rem 0 0; font-size: 0.68rem; color: var(--os-muted); }
.bx-admin__section-title { font-size: 0.85rem; margin: 0 0 0.45rem; }
.bx-admin__table-wrap { overflow: auto; border: 1px solid var(--os-line); border-radius: 0.45rem; }
.bx-admin__table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.bx-admin__table th, .bx-admin__table td { padding: 0.4rem 0.55rem; border-bottom: 1px solid rgba(42, 53, 68, 0.55); text-align: left; }
.bx-admin__table th { color: var(--os-muted); font-weight: 600; background: rgba(8, 12, 18, 0.7); }

/* ── Suggest a Feature + Product Board ── */
.bx-feedback__fab {
  position: fixed;
  right: 1rem;
  bottom: 4.25rem;
  z-index: 1140;
  border: 1px solid #c9a227;
  background: linear-gradient(180deg, #3a2f12, #1f1a0d);
  color: #ffe9a8;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-family: Sora, sans-serif;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.bx-os-body .bx-feedback__fab { bottom: 5.5rem; }
.bx-feedback__fab:hover { filter: brightness(1.08); }
.bx-feedback__shell {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.bx-feedback__shell[hidden] { display: none !important; }
.bx-feedback__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.55);
}
.bx-feedback__modal {
  position: relative;
  width: min(34rem, 100%);
  background: #121820;
  color: #e8eef5;
  border: 1px solid #2a3544;
  border-radius: 0.7rem;
  padding: 1rem 1.1rem 0.9rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-family: Sora, sans-serif;
}
.bx-feedback__header { display: flex; justify-content: space-between; gap: 0.75rem; }
.bx-feedback__title { margin: 0; font-size: 1.15rem; }
.bx-feedback__sub { margin: 0.25rem 0 0; font-size: 0.78rem; color: #8a97a8; }
.bx-feedback__close {
  border: 0; background: transparent; color: #8a97a8; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.bx-feedback__context {
  margin: 0.75rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid #2a3544;
  background: #0d1218;
  font-size: 0.72rem;
}
.bx-feedback__context span { color: #8a97a8; display: block; }
.bx-feedback__context strong { font-weight: 600; word-break: break-word; }
.bx-feedback__label { display: block; font-size: 0.78rem; margin-bottom: 0.3rem; }
.bx-feedback__textarea {
  width: 100%;
  border: 1px solid #2a3544;
  border-radius: 0.4rem;
  background: #0d1218;
  color: #e8eef5;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  resize: vertical;
}
.bx-feedback__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.bx-feedback__actions { display: flex; gap: 0.4rem; }
.bx-feedback__status { margin: 0; font-size: 0.72rem; color: #8a97a8; min-height: 1em; }
.bx-feedback__status.is-danger { color: #ff7b72; }
.bx-os__suggest { cursor: pointer; border: 1px solid #c9a227; color: #ffe9a8; background: #1f1a0d; }

.bx-board__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .bx-board__layout { grid-template-columns: 1fr; }
  .bx-feedback__context { grid-template-columns: 1fr; }
}
.bx-board__list { display: grid; gap: 0.55rem; }
.bx-board__card {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.55rem;
  padding: 0.75rem 0.85rem;
  background: var(--bs-body-bg, #fff);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bx-board__card:hover, .bx-board__card.is-active {
  border-color: #c9a227;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35);
}
.bx-board__card-top { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.bx-board__quote { margin: 0 0 0.45rem; font-size: 0.92rem; }
.bx-board__meta { display: flex; flex-wrap: wrap; gap: 0.55rem; font-size: 0.72rem; color: var(--bs-secondary-color, #6c757d); }
.bx-board__status {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #eef1f4;
}
.bx-board__status--pending { background: #fff3cd; color: #664d03; }
.bx-board__status--approved { background: #cfe2ff; color: #084298; }
.bx-board__status--rewarded { background: #d1e7dd; color: #0f5132; }
.bx-board__status--dismissed { background: #e2e3e5; color: #41464b; }
.bx-board__inspector {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.55rem;
  padding: 1rem;
  background: var(--bs-body-bg, #fff);
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
}
.bx-board__full-quote { font-size: 1rem; white-space: pre-wrap; }
.bx-board__dl { display: grid; grid-template-columns: 6rem 1fr; gap: 0.3rem 0.6rem; font-size: 0.82rem; }
.bx-board__dl dt { color: var(--bs-secondary-color, #6c757d); margin: 0; }
.bx-board__dl dd { margin: 0; word-break: break-word; }
.bx-board__json {
  max-height: 16rem;
  overflow: auto;
  font-size: 0.7rem;
  background: #0d1218;
  color: #d7e0ea;
  border-radius: 0.4rem;
  padding: 0.65rem;
}
.bx-board__reward {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}
.bx-board__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

/* ── App Store ── */
.bx-store__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.bx-store__tab {
  border: 1px solid var(--os-line, #2a3544);
  background: #0d1218;
  color: var(--os-ink, #e8eef5);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.bx-store__tab.is-active {
  background: #1a3a5c;
  border-color: var(--os-accent, #4aa3ff);
}
.bx-store__platform {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--os-muted, #8a97a8);
}
.bx-store__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 0.75rem;
  align-items: start;
}
@media (max-width: 900px) {
  .bx-store__layout { grid-template-columns: 1fr; }
}
.bx-store__card {
  border: 1px solid var(--os-line, #2a3544);
  border-radius: 0.5rem;
  padding: 0.7rem;
  background: rgba(8, 12, 18, 0.55);
  display: grid;
  gap: 0.3rem;
}
.bx-store__card.is-featured { border-color: rgba(201, 162, 39, 0.55); }
.bx-store__card h3 { margin: 0; font-size: 0.92rem; }
.bx-store__card p { margin: 0; font-size: 0.75rem; color: var(--os-muted, #8a97a8); min-height: 2.4em; }
.bx-store__cat {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-good, #5dff9f);
}
.bx-store__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.7rem;
}
.bx-store__actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.bx-store__inspector {
  border: 1px solid var(--os-line, #2a3544);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: rgba(8, 12, 18, 0.7);
  position: sticky;
  top: 0;
  max-height: 28rem;
  overflow: auto;
}
.bx-store__inspector[hidden] { display: none !important; }
.bx-store__inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
}
.bx-store__inspector-head h3 { margin: 0; font-size: 1rem; }
.bx-store__reviews { margin: 0; padding-left: 1.1rem; font-size: 0.78rem; }
.bx-store__dev-list { display: grid; gap: 0.4rem; margin-bottom: 0.75rem; }
.bx-store__dev-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--os-line, #2a3544);
  border-radius: 0.4rem;
  padding: 0.45rem 0.6rem;
}
.bx-store__dev-form {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.bx-store__dev-form textarea { grid-column: 1 / -1; }
