/**
 * StudioSwarm Design System
 * Restrained, high-precision monochrome obsidian interface inspired by Linear and Apple Notes.
 */

:root {
  --bg-canvas: #09090B;
  --surface-workspace: #101013;
  --surface-elevated: #16161A;
  --surface-hover: #1C1C21;
  --surface-subtle: rgba(255, 255, 255, 0.03);

  --border-hairline: rgba(255, 255, 255, 0.075);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-highlight: rgba(255, 255, 255, 0.14);

  --accent-indigo: #6366F1;
  --accent-sky: #38BDF8;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;

  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;

  --scrollbar-thumb: #27272A;
  --scrollbar-track: #09090B;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  color-scheme: dark;
}

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

html,
body {
  width: 100%;
  height: 100vh;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.011em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.tabular-metric {
  font-variant-numeric: tabular-nums;
}

.heavy-component {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 500px;
}

.scroller {
  --scrollbar-thumb: #27272A;
  --scrollbar-track: #09090B;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  .scroller::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  .scroller::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
  }
  .scroller::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

#gravitational-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transform: translateZ(0);
}

/* Drag & Drop Overlay */
#drag-overlay-banner {
  position: fixed;
  inset: 16px;
  z-index: 90;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(9, 9, 11, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

body.is-dragging-folder #drag-overlay-banner {
  opacity: 1;
}

.drag-overlay-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  font-size: 14px;
}

.drag-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Status Dots */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-emerald {
  background-color: var(--accent-emerald);
}

.dot-amber {
  background-color: var(--accent-amber);
}

.dot-cyan {
  background-color: var(--accent-sky);
}

/* Main Workspace */
#kinetic-workspace {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top Navigation */
.studio-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #FAFAFA;
  color: #09090B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.room-status-pill,
.live-speed-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.speed-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.speed-metric strong {
  font-weight: 500;
  color: var(--text-primary);
}

.speed-icon {
  color: var(--text-muted);
  font-size: 11px;
}

.speed-sep {
  width: 1px;
  height: 10px;
  background: var(--border-hairline);
}

/* Buttons */
.btn-sleek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.btn-sleek-primary {
  background: #FAFAFA;
  color: #09090B;
}

.btn-sleek-primary:hover {
  background: #E4E4E7;
}

.btn-sleek-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

.btn-sleek-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-highlight);
}

.btn-sleek-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-sleek-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Surface Card */
.studio-surface-card {
  flex: 1;
  min-height: 0;
  background: var(--surface-workspace);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateZ(0);
}

/* Hero Transfer Header & Magnetic Portal Stages */
:root {
  view-transition-name: none;
}

/* Disable full-page root crossfade so view transitions strictly isolate to named component stages */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

.hero-portal-container {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-portal-container.is-drop-portal-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: none;
  padding: 36px 28px;
}

.hero-portal-content {
  width: 100%;
}

/* Stage 1A: The Drop Portal (Sender-First) */
.drop-portal-stage {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.drop-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
}

.drop-portal-icon-ring {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  margin-top: 4px;
}

.drop-portal-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  outline: none;
}

.drop-portal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 390px;
}

.drop-portal-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
}

.drop-portal-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-portal-hero {
  height: 38px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

.drop-portal-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.drop-portal-divider {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-demo-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.btn-demo-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Stage 1B: The Incoming Capsule (Receiver-First) */
.incoming-capsule-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incoming-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.incoming-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.btn-text-subtle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.btn-text-subtle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Stage 2A: Live Broadcast Deck (Seeder) */
.seeder-broadcast-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.broadcast-invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border-radius: 9px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
}

.invite-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.invite-lock-icon {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.invite-bar-url {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-invite-copy {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  flex-shrink: 0;
}

.recipient-radar-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
}

.recipient-radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recipient-radar-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipient-radar-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.recipient-radar-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

@keyframes pulseRadarDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.88);
  }
}

.status-dot.is-pulsing {
  opacity: 0.9;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-portal-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hero-icon-well {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-icon-well.is-active {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
}

.hero-icon-well.is-seeding {
  color: var(--accent-sky);
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.08);
}

.hero-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.hero-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.hero-portal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hero-mounted-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-pct-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-pct-badge.is-complete {
  color: var(--accent-emerald);
}

.hero-master-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hero-master-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--text-primary);
  transition: width 0.2s ease;
}

.hero-master-progress-fill.is-complete {
  background: var(--accent-emerald);
}

/* File List */
.studio-file-list {
  flex: 1;
  min-height: 0;
  padding: 10px 14px;
  overflow-y: auto;
  display: block;
}

.studio-file-list:where(.hidden, [hidden]) {
  display: none;
}

.empty-timeline-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.file-rows-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-file-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  contain: layout style;
  cursor: pointer;
  transition: background-color 0.04s ease;
}

.studio-file-row:hover {
  background: var(--surface-elevated);
}

.studio-file-row.is-selected {
  background: var(--surface-elevated);
  border-color: var(--border-subtle);
}

.file-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-type-icon.is-video {
  color: var(--text-primary);
}

.file-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* File Row Progress Bar */
.file-row-center {
  display: flex;
  align-items: center;
  height: 24px;
}

.file-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background-color 0.04s ease;
}

.file-progress-track:hover {
  background: rgba(255, 255, 255, 0.16);
}

.file-scrub-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.04s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.file-progress-track.is-scrubbable:hover .file-scrub-tooltip {
  opacity: 1;
}

.file-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--text-secondary);
  transition: width 0.14s ease-out;
}

.file-progress-fill.is-complete {
  background: var(--accent-emerald);
}

.file-priority-pin {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2.5px;
  border-radius: 2px;
  background: var(--accent-amber);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  .studio-file-list {
    translate: none;
    transition-duration: 0.1s;
  }

  @starting-style {
    .studio-file-list {
      translate: none;
    }
  }

  .studio-file-list:where(.hidden, [hidden]) {
    translate: none;
  }
}

.file-row-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 148px;
  flex-shrink: 0;
}

.file-status-pill {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.file-status-pill.is-syncing {
  color: var(--text-secondary);
}

.file-status-pill.is-saved {
  color: var(--accent-emerald);
}

.btn-file-preview {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.04s ease, color 0.04s ease, border-color 0.04s ease;
}

.btn-file-preview:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

.btn-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.04s ease, background-color 0.04s ease, border-color 0.04s ease;
  padding: 0;
}

.btn-file-remove:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
}

.file-timeline-add-bar {
  display: flex;
  justify-content: center;
  padding: 12px 0 6px 0;
}

.btn-timeline-add {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: color 0.04s ease, background-color 0.04s ease, border-color 0.04s ease;
}

.btn-timeline-add:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn-timeline-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: solid;
}

/* Footer */
.studio-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-top: 1px solid var(--border-subtle);
}

.collaborators-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collab-avatar-stack {
  display: flex;
  align-items: center;
}

.collab-avatar {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1.5px solid var(--surface-workspace);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
}

.collab-avatar:first-child {
  margin-left: 0;
}

.collab-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  border: 1px solid var(--surface-workspace);
}

.collab-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* Preferences Bar */
.studio-preferences-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speed-limit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
}

.pref-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.speed-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.step-btn {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.step-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.speed-val {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 64px;
  text-align: center;
}

.studio-toggles-slot {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sleek-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.sleek-toggle-pill.is-engaged {
  color: var(--text-primary);
}

.sleek-switch-track {
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  transition: background-color 0.14s ease;
}

.sleek-toggle-pill.is-engaged .sleek-switch-track {
  background: var(--text-primary);
}

.sleek-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #09090B;
  transition: transform 0.14s ease;
}

.sleek-toggle-pill.is-engaged .sleek-switch-thumb {
  transform: translateX(10px);
}

/* Video Preview Monitor */
.zero-ram-monitor {
  position: fixed;
  right: 28px;
  bottom: 84px;
  width: 360px;
  z-index: 50;
  background: var(--surface-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: none;
}

.zero-ram-monitor.is-open {
  display: block;
}

.monitor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.monitor-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.monitor-clip-name {
  font-size: 12px;
  font-weight: 500;
}

.btn-monitor-ctrl {
  padding: 2px 6px;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 12px;
  cursor: pointer;
}

.btn-monitor-ctrl:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.monitor-screen-wrap {
  height: 196px;
  background: #050507;
}

#monitor-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

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

.monitor-tc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-transport {
  height: 24px;
  padding: 0 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

/* Modal Dialog (light-dismiss-a-dialog) */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.72);
}

.ticket-dialog {
  margin: auto;
  width: min(520px, 92vw);
  padding: 20px 22px;
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-highlight);
  border-radius: 14px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.7);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-title {
  font-size: 14px;
  font-weight: 600;
}

.dialog-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.share-url-row {
  display: flex;
  gap: 8px;
}

.share-url-input {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.crypto-audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
}

.audit-label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.audit-val {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.darkroom-toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%) translateY(-8px);
  z-index: 95;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.darkroom-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
