:root {
  --bg: #101011;
  --bg-deep: #0B0B0C;
  --surface: rgba(23, 23, 24, .94);
  --surface-solid: #171718;
  --surface-raised: #262628;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);
  --text: #F3F3F2;
  --muted: #A7A7AA;
  --dim: #858589;
  --accent: #D0D0D2;
  --accent-ink: #1E1E20;
  --accent-soft: rgba(208, 208, 210, .13);
  --image: #B8B8BC;
  --video: #D0D0D2;
  --audio: #B8B8BC;
  --violet: #A7A7AA;
  --danger: #A7A7AA;
  --nav-h: 54px;
  --dock-h: 286px;
  --sans: "IBM Plex Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Fraunces, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 12, .92);
  backdrop-filter: blur(22px) saturate(1.15);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--dim);
  font: 500 13.5px var(--sans);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface-raised);
  color: var(--text);
}

.nav .brand {
  letter-spacing: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.save-state {
  color: var(--dim);
  font: 500 10px/1 var(--mono);
}

.save-state.saving {
  color: var(--image);
}

.save-state.error {
  color: var(--danger);
}

.icon-btn,
.primary-btn,
.secondary-btn,
.danger-btn,
.zoom-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}

.icon-btn {
  width: 40px;
  padding: 0;
}

.icon-btn:hover,
.secondary-btn:hover,
.zoom-value:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.primary-btn {
  gap: 7px;
  padding: 0 15px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.primary-btn:hover {
  background: #D0D0D2;
  transform: translateY(-1px);
}

.primary-btn:disabled {
  cursor: default;
  opacity: .42;
  transform: none;
}

.secondary-btn,
.danger-btn {
  padding: 0 15px;
}

.danger-btn {
  border-color: rgba(167, 167, 170, .35);
  color: var(--danger);
}

.icon-btn svg,
.primary-btn svg,
.secondary-btn svg,
.danger-btn svg,
.segmented svg,
.search-box svg,
.board-empty svg,
.mix-launch svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.board-viewport {
  position: fixed;
  inset: var(--nav-h) 0 var(--dock-h);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background-color: #101011;
  background-image:
    radial-gradient(circle at 50% -20%, rgba(208, 208, 210, .08), transparent 42%),
    radial-gradient(rgba(226, 226, 228, .13) .8px, transparent .8px);
  background-size: auto, 24px 24px;
  background-position: center, 0 0;
}

.board-viewport::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(11, 11, 12, .32), transparent 180px);
  content: "";
  pointer-events: none;
}

.board-viewport.panning {
  cursor: grabbing;
}

.board-tools {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 23, 24, .9);
  backdrop-filter: blur(16px);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 232px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 23, 24, .9);
  color: var(--dim);
  backdrop-filter: blur(16px);
}

.scope-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 23, 24, .9);
  color: var(--muted);
  cursor: pointer;
  font: 500 10px/1 var(--mono);
  backdrop-filter: blur(16px);
}

.scope-toggle:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.scope-toggle svg {
  width: 15px;
  height: 15px;
}

.search-box:focus-within {
  border-color: rgba(208, 208, 210, .45);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 11px var(--mono);
}

.search-box input::placeholder {
  color: var(--dim);
}

.search-box svg {
  flex: 0 0 auto;
}

.board-tools > .icon-btn {
  min-height: 42px;
  width: 42px;
  background: rgba(23, 23, 24, .9);
  backdrop-filter: blur(16px);
}

.board-tools > .drop-guide-toggle[aria-expanded="true"] {
  border-color: rgba(208, 208, 210, .48);
  background: var(--accent-soft);
  color: var(--accent);
}

.board-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  color: #858589;
  font: 500 10px/1 var(--mono);
}

.board-hint svg {
  width: 14px;
  height: 14px;
}

.hint-dot {
  color: #58585E;
}

.drop-guide {
  position: absolute;
  top: 64px;
  right: 16px;
  z-index: 48;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(16, 16, 17, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  backdrop-filter: blur(22px);
}

.drop-guide > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 15px 12px;
  border-bottom: 1px solid var(--line);
}

.drop-guide > header > span {
  display: grid;
  gap: 3px;
}

.drop-guide > header strong {
  color: var(--text);
  font-size: 13px;
}

.drop-guide > header small {
  color: var(--dim);
  font-size: 10px;
}

.drop-guide > header .icon-btn {
  width: 30px;
  min-height: 30px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
}

.drop-guide-rules {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.drop-rule {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.drop-rule > svg {
  width: 17px;
  height: 17px;
  justify-self: center;
}

.drop-rule > span {
  display: grid;
  gap: 2px;
}

.drop-rule strong {
  color: var(--text);
  font-size: 10.5px;
}

.drop-rule small {
  color: var(--dim);
  font-size: 9px;
}

.image-rule > svg { color: var(--image); }
.video-rule > svg { color: var(--video); }
.audio-rule > svg { color: var(--audio); }

.drop-guide > footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 9px/1.35 var(--mono);
}

.drop-guide > footer svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--accent);
}

.drag-coach {
  position: absolute;
  right: 50%;
  bottom: 18px;
  z-index: 54;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(620px, calc(100vw - 36px));
  padding: 10px 13px 10px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(11, 11, 12, .94);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .42);
  transform: translateX(50%);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.drag-coach-kind {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--card-accent, var(--accent-soft));
  color: var(--text);
  font: 700 9px/1 var(--mono);
  text-transform: uppercase;
}

.drag-coach strong {
  overflow: hidden;
  color: var(--muted);
  font: 500 10px/1.3 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drag-coach.image { --card-accent: rgba(184, 184, 188, .2); }
.drag-coach.video { --card-accent: rgba(208, 208, 210, .18); }
.drag-coach.audio { --card-accent: rgba(184, 184, 188, .19); }

.board-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 12000px;
  height: 12000px;
  transform-origin: 0 0;
  will-change: transform;
}

.lane-guides {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stage-lane {
  position: absolute;
  top: 320px;
  width: 318px;
  height: 3350px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.image-lane {
  left: 164px;
}

.video-lane {
  left: 514px;
}

.audio-lane {
  left: 864px;
}

.board-world.archive-view .lane-guides {
  display: none;
}

.lane-heading {
  position: absolute;
  top: -18px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 9px 0 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(16, 16, 17, .92);
  color: var(--muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.lane-heading:hover,
.lane-heading.active {
  border-color: var(--line-strong);
  background: rgba(30, 30, 32, .96);
  color: var(--text);
}

.lane-heading.active {
  box-shadow: inset 2px 0 var(--card-accent, var(--accent)), 0 8px 24px rgba(0, 0, 0, .2);
}

.lane-index {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .045);
  color: var(--card-accent, var(--dim));
  font: 600 8px/1 var(--mono);
}

.lane-heading strong {
  font-size: 11px;
  font-weight: 600;
}

.lane-count {
  min-width: 20px;
  color: var(--dim);
  font: 600 9px/1 var(--mono);
  text-align: right;
}

.mix-launch.active {
  color: var(--text);
}

.image-lane { --card-accent: var(--image); }
.video-lane { --card-accent: var(--video); }
.audio-lane { --card-accent: var(--audio); }

.lane-drop-action {
  position: absolute;
  top: 34px;
  right: 8px;
  left: 8px;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px dashed color-mix(in srgb, var(--card-accent) 58%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-accent) 8%, transparent);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .15s, transform .15s;
}

.lane-drop-action b {
  color: var(--text);
  font-size: 10px;
}

.lane-drop-action small {
  color: var(--muted);
  font-size: 8.5px;
}

.stage-lane.drop-eligible {
  border-color: color-mix(in srgb, var(--card-accent) 58%, transparent);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--card-accent) 8%, transparent),
    transparent 720px);
}

.stage-lane.drop-eligible .lane-drop-action {
  opacity: 1;
  transform: none;
}

.stage-lane.drop-hover {
  border-color: var(--card-accent);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--card-accent) 14%, transparent),
    transparent 840px);
}

.lane-heading.drop-eligible,
.mix-launch.drop-eligible {
  border-color: rgba(208, 208, 210, .38);
  background: rgba(208, 208, 210, .09);
  box-shadow: inset 0 0 0 1px rgba(208, 208, 210, .1), 0 8px 24px rgba(0, 0, 0, .2);
}

.lane-heading.drop-hover,
.mix-launch.drop-hover {
  border-color: var(--accent);
  background: rgba(208, 208, 210, .16);
  box-shadow: inset 0 0 0 2px rgba(208, 208, 210, .24), 0 0 34px rgba(208, 208, 210, .1);
}

.connections {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.connection-shadow,
.connection-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.connection-line.audio-connection {
  stroke: var(--audio);
  stroke-dasharray: 2 4;
}

.connection-shadow {
  stroke: rgba(0, 0, 0, .66);
  stroke-width: 7;
}

.connection-line {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: .76;
  stroke-dasharray: 5 4;
}

.node-layer {
  position: absolute;
  inset: 0;
}

.media-node {
  --card-accent: var(--accent);
  position: absolute;
  width: 248px;
  height: 276px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #171718;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
  cursor: grab;
  user-select: none;
  touch-action: none;
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 248px 276px;
  transition: border-color .15s, box-shadow .15s, filter .15s;
}

.media-node.image-node {
  --card-accent: var(--image);
}

.media-node.video-node {
  --card-accent: var(--video);
}

.media-node.audio-node {
  --card-accent: var(--audio);
}

.media-node:hover {
  border-color: rgba(255, 255, 255, .3);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .4);
}

.media-node.selected {
  border-color: var(--card-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-accent) 18%, transparent), 0 24px 60px rgba(0, 0, 0, .43);
  z-index: 3;
}

.media-node.approved {
  border-color: rgba(184, 184, 188, .45);
}

.media-node.approved::after {
  position: absolute;
  top: 10px;
  right: 42px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(208, 208, 210, .35);
  border-radius: 999px;
  background: rgba(30, 30, 32, .86);
  color: #D0D0D2;
  content: "✓";
  font: 700 11px/1 var(--sans);
  pointer-events: none;
}

.media-node.dragging {
  z-index: 20;
  cursor: grabbing;
  filter: brightness(1.04);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .52);
  will-change: transform;
}

.media-node.drop-candidate {
  border-color: rgba(184, 184, 188, .54);
  box-shadow: 0 0 0 2px rgba(184, 184, 188, .13), 0 22px 58px rgba(0, 0, 0, .4);
}

.media-node.drop-hover {
  border-color: var(--audio);
  box-shadow: 0 0 0 4px rgba(184, 184, 188, .22), 0 26px 66px rgba(0, 0, 0, .5);
}

body.media-dragging .board-viewport,
body.media-dragging .media-node {
  cursor: grabbing;
}

.node-media {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: 100%;
  height: 142px;
  overflow: hidden;
  background: var(--bg-deep);
}

.node-media img,
.node-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-deep);
}

.node-media video {
  cursor: pointer;
}

.audio-preview {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 42px 12px 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(184, 184, 188, .22), transparent 42%),
    linear-gradient(145deg, #171718, #171718 70%);
}

.audio-kind-icon {
  position: absolute;
  top: 45px;
  left: calc(50% - 22px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(184, 184, 188, .3);
  border-radius: 14px;
  background: rgba(184, 184, 188, .09);
  color: var(--audio);
}

.audio-kind-icon svg {
  width: 20px;
  height: 20px;
}

.audio-preview audio {
  position: relative;
  z-index: 4;
  display: block;
  width: 100%;
  height: 30px;
  filter: invert(.9) hue-rotate(150deg) saturate(.55);
}

.node-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 11, 12, .68), transparent 38%, transparent 68%, rgba(11, 11, 12, .42));
}

.node-head {
  position: absolute;
  inset: 9px 9px auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  pointer-events: none;
}

.node-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 7px;
  background: rgba(11, 11, 12, .7);
  color: #FFF;
  backdrop-filter: blur(8px);
}

.node-kind svg {
  width: 13px;
  height: 13px;
}

.node-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .9);
  font: 500 9px/1.2 var(--mono);
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .86);
  white-space: nowrap;
}

.node-enhanced {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--image);
}

.node-enhanced svg {
  width: 13px;
  height: 13px;
}

.node-drag,
.node-more {
  display: inline-flex;
  margin-left: auto;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: rgba(11, 11, 12, .56);
  color: rgba(255, 255, 255, .62);
  backdrop-filter: blur(8px);
}

.node-drag svg,
.node-more svg {
  width: 14px;
  height: 14px;
}

.node-more {
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  cursor: pointer;
  pointer-events: auto;
}

.node-more:hover,
.node-more:focus-visible {
  background: rgba(16, 16, 17, .9);
  color: #FFF;
}

.board-viewport.panning .media-node {
  pointer-events: none;
}

.node-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(208, 208, 210, .15), transparent 48%), var(--bg-deep);
  color: var(--muted);
  text-align: center;
}

.node-state > span {
  display: grid;
  justify-items: center;
  gap: 9px;
  font: 500 10px/1.3 var(--mono);
  text-transform: uppercase;
}

.node-state svg {
  width: 23px;
  height: 23px;
  color: var(--accent);
}

.node-state.generating svg,
.node-progress svg {
  animation: spin 1.2s linear infinite;
}

.node-state.failed,
.node-state.failed svg {
  color: var(--danger);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.node-details {
  position: absolute;
  inset: 142px 0 auto;
  height: 75px;
  padding: 11px 12px 8px;
}

.node-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.node-stage {
  color: var(--card-accent);
  font: 600 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.node-status {
  position: relative;
  padding-left: 10px;
  color: var(--dim);
  font: 500 9px/1 var(--mono);
}

.node-status::before {
  position: absolute;
  top: 2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.node-status.ready {
  color: #B8B8BC;
}

.node-status.active {
  color: var(--accent);
}

.node-status.failed {
  color: var(--danger);
}

.node-prompt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #D0D0D2;
  font-size: 11.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.node-actions {
  position: absolute;
  right: 9px;
  bottom: 9px;
  left: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.node-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .14s, color .14s;
}

.node-actions svg {
  width: 14px;
  height: 14px;
}

.node-actions .node-primary {
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 10px;
  background: color-mix(in srgb, var(--card-accent) 16%, transparent);
  color: var(--card-accent);
  font-size: 11px;
  font-weight: 650;
}

.node-actions .node-primary:hover {
  background: color-mix(in srgb, var(--card-accent) 25%, transparent);
}

.node-actions .node-primary.in-cut {
  color: #D0D0D2;
}

.node-actions .node-secondary {
  width: 34px;
  flex: 0 0 34px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
}

.node-actions .node-secondary:hover {
  background: rgba(255, 255, 255, .09);
  color: var(--text);
}

.node-actions .node-secondary.approve {
  color: #D0D0D2;
}

.node-actions .node-reject {
  flex: 0 0 auto;
  padding: 0 8px;
  background: transparent;
  color: #858589;
  font-size: 10px;
}

.node-actions .node-reject:hover {
  background: rgba(167, 167, 170, .09);
  color: var(--danger);
}

.node-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 34px;
  flex: 1 1 auto;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.line-port {
  position: absolute;
  top: calc(50% - 6px);
  z-index: 4;
  width: 12px;
  height: 12px;
  border: 3px solid #101011;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(208, 208, 210, .5);
  pointer-events: none;
}

.line-port.in {
  left: -7px;
}

.line-port.out {
  right: -7px;
}

.trim-editor {
  position: absolute;
  right: 9px;
  bottom: 142px;
  left: 9px;
  z-index: 6;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  background: rgba(11, 11, 12, .84);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(11px);
  transition: opacity .14s;
}

.media-node.selected.video-node .trim-editor {
  opacity: 1;
  pointer-events: auto;
}

.trim-track {
  position: absolute;
  inset: 4px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #29292C;
  background-position: center;
  background-size: cover;
}

.trim-dim {
  position: absolute;
  inset-block: 0;
  background: rgba(11, 11, 12, .68);
  pointer-events: none;
}

.trim-dim.left { left: 0; }
.trim-dim.right { right: 0; }

.trim-range {
  position: absolute;
  inset-block: 0;
  border-top: 2px solid var(--image);
  border-bottom: 2px solid var(--image);
  pointer-events: none;
}

.trim-handle {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 11px;
  border: 0;
  border-radius: 3px;
  background: var(--image);
  cursor: ew-resize;
  transform: translateX(-50%);
}

.trim-handle::after {
  position: absolute;
  top: 9px;
  left: 4px;
  width: 3px;
  height: 9px;
  border-right: 1px solid rgba(30, 30, 30, .7);
  border-left: 1px solid rgba(30, 30, 30, .7);
  content: "";
}

.trim-time {
  position: absolute;
  top: -18px;
  right: 0;
  color: rgba(255, 255, 255, .84);
  font: 500 9px/1 var(--mono);
  text-shadow: 0 1px 4px #000;
}

.zoom-tools {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 23, 24, .9);
  backdrop-filter: blur(16px);
}

.zoom-tools .icon-btn {
  width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
}

.board-minimap {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 30;
  width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 16, 17, .94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .34);
  backdrop-filter: blur(16px);
  transition: width .16s, bottom .2s;
}

.board-minimap > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding-left: 11px;
  border-bottom: 1px solid var(--line);
}

.board-minimap > header > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 600 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.board-minimap > header > span svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.board-minimap > header .icon-btn {
  width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.board-minimap > svg {
  display: block;
  width: 100%;
  height: 120px;
  outline: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(208, 208, 210, .08), transparent 72%),
    #101011;
  cursor: crosshair;
  touch-action: none;
}

.board-minimap > svg.dragging {
  cursor: grabbing;
}

.minimap-node {
  fill: rgba(184, 184, 188, .38);
  stroke: rgba(184, 184, 188, .72);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.minimap-node.video {
  fill: rgba(208, 208, 210, .34);
  stroke: rgba(208, 208, 210, .72);
}

.minimap-node.audio {
  fill: rgba(184, 184, 188, .34);
  stroke: rgba(184, 184, 188, .72);
}

.minimap-node.selected {
  fill: var(--accent);
  stroke: #FFF;
  stroke-width: 3;
}

.minimap-viewport {
  fill: rgba(208, 208, 210, .08);
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.minimap-viewport.off-content {
  stroke: var(--danger);
  stroke-dasharray: 5 4;
}

.board-minimap.collapsed {
  width: 44px;
}

.board-minimap.collapsed > header {
  padding: 0;
  border-bottom: 0;
}

.board-minimap.collapsed > header > span,
.board-minimap.collapsed > svg {
  display: none;
}

.board-minimap.collapsed > header .icon-btn svg {
  transform: rotate(180deg);
}

.zoom-value {
  min-width: 54px;
  min-height: 32px;
  border: 0;
  background: transparent;
  font: 500 10px/1 var(--mono);
}

.board-empty {
  position: absolute;
  inset: 150px 0 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  color: var(--muted);
  text-align: center;
}

.board-empty > svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.board-empty strong {
  color: var(--text);
  font: 600 20px/1.2 var(--serif);
}

.board-empty small {
  max-width: 360px;
  margin-bottom: 8px;
  color: var(--dim);
}

.edit-dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  height: var(--dock-h);
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(16, 16, 17, .97);
  box-shadow: 0 -18px 56px rgba(0, 0, 0, .28);
  backdrop-filter: blur(22px);
  overflow: hidden;
  transition: height .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.edit-dock.collapsed {
  display: none;
  height: 0;
  border-top-color: transparent;
  box-shadow: none;
}

.edit-dock.collapsed .timeline-shell {
  display: none;
}

body.edit-collapsed .board-viewport {
  bottom: 0;
}

.edit-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.mix-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 23, 24, .9);
  color: var(--muted);
  cursor: pointer;
  font: 500 11px/1 var(--sans);
  backdrop-filter: blur(16px);
  transition: border-color .15s, background .15s, color .15s;
}

.mix-launch:hover,
.mix-launch[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.mix-launch > svg:first-child {
  color: var(--accent);
}

.clip-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  color: var(--muted);
  font: 500 9px/1 var(--mono);
}

.edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-actions .icon-btn {
  min-height: 38px;
  width: 38px;
}

.publish-btn {
  gap: 7px;
  min-height: 40px;
  color: var(--text);
}

.publish-btn svg {
  width: 16px;
  height: 16px;
}

.final-cut-btn {
  gap: 7px;
  min-height: 40px;
  color: var(--text);
}

.final-cut-btn svg {
  width: 16px;
  height: 16px;
  color: #B8B8BC;
}

.final-cut-btn.exporting svg {
  animation: spin 1.2s linear infinite;
}

.export-btn {
  min-height: 40px;
}

.export-btn.rendering svg {
  animation: spin 1.2s linear infinite;
}

.timeline-shell {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: calc(var(--dock-h) - 52px);
  overflow: hidden;
}

.timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.timeline-track:last-child {
  border-bottom: 0;
}

.timeline-track.drop-eligible {
  background: color-mix(in srgb, var(--drop-color, var(--accent)) 6%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--drop-color, var(--accent)) 24%, transparent);
}

.timeline-track.drop-hover {
  background: color-mix(in srgb, var(--drop-color, var(--accent)) 12%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--drop-color, var(--accent)) 52%, transparent);
}

.picture-track { --drop-color: var(--video); }
.audio-track { --drop-color: var(--audio); }

.track-label {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  color: var(--dim);
  font: 600 8px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.track-label svg {
  width: 16px;
  height: 16px;
}

.picture-track .track-label svg {
  color: var(--video);
}

.audio-track .track-label svg {
  color: var(--audio);
}

.timeline-list {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  height: 100%;
  padding: 11px 20px;
  overflow-x: auto;
  overflow-y: hidden;
}

.timeline-clip {
  position: relative;
  width: 126px;
  height: 76px;
  flex: 0 0 auto;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-deep);
  cursor: grab;
}

.timeline-clip.has-transition {
  margin-left: 52px;
}

.timeline-clip.drop-candidate {
  border-color: rgba(184, 184, 188, .52);
  box-shadow: 0 0 0 2px rgba(184, 184, 188, .12);
}

.timeline-clip.drop-hover {
  border-color: var(--audio);
  box-shadow: 0 0 0 4px rgba(184, 184, 188, .22);
}

.timeline-clip:not(:last-child)::after {
  position: absolute;
  top: 37px;
  right: -69px;
  width: 68px;
  height: 2px;
  background: rgba(208, 208, 210, .45);
  content: "";
}

.timeline-transition {
  position: absolute;
  top: 14px;
  left: -59px;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  width: 46px;
  min-height: 48px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #171718;
  color: var(--muted);
  font: 600 8px/1 var(--mono);
  cursor: pointer;
}

.timeline-transition:hover,
.timeline-transition:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}

.timeline-transition.dip {
  border-color: rgba(208, 208, 210, .42);
  color: var(--accent);
}

.timeline-transition svg {
  width: 15px;
  height: 15px;
}

.timeline-clip.sortable-ghost {
  opacity: .25;
}

.timeline-clip.sortable-chosen {
  border-color: var(--accent);
  cursor: grabbing;
}

.timeline-clip img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.timeline-index {
  position: absolute;
  top: -8px;
  left: -8px;
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 5px;
  border: 2px solid #101011;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 9px/1 var(--mono);
}

.timeline-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(11, 11, 12, .8);
  color: #FFF;
  font: 500 9px/1 var(--mono);
}

.timeline-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(11, 11, 12, .8);
  color: #FFF;
  cursor: pointer;
  opacity: 0;
}

.timeline-clip:hover .timeline-remove,
.timeline-clip:focus-within .timeline-remove {
  opacity: 1;
}

.timeline-remove svg {
  width: 13px;
  height: 13px;
}

.soundtrack-list {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 100%;
  padding: 10px 20px;
  overflow-x: auto;
  overflow-y: hidden;
}

.soundtrack-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 110px 76px 92px 30px;
  align-items: center;
  gap: 8px;
  min-width: 470px;
  height: 82px;
  flex: 0 0 auto;
  padding: 8px 9px;
  border: 1px solid rgba(184, 184, 188, .24);
  border-radius: 11px;
  background: rgba(184, 184, 188, .055);
}

.soundtrack-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.soundtrack-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.soundtrack-identity strong,
.soundtrack-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soundtrack-identity strong {
  color: var(--text);
  font-size: 10px;
}

.soundtrack-identity small {
  color: var(--dim);
  font-size: 8px;
}

.soundtrack-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border: 1px solid rgba(184, 184, 188, .25);
  border-radius: 9px;
  color: var(--audio);
}

.soundtrack-icon svg {
  width: 14px;
  height: 14px;
}

.soundtrack-control {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--dim);
  font: 500 8px/1 var(--mono);
}

.soundtrack-control select,
.soundtrack-control input[type="number"] {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #101011;
  color: var(--text);
  font: 500 9px var(--mono);
}

.soundtrack-control input[type="number"] {
  padding: 0 7px;
}

.soundtrack-control.compact {
  position: relative;
}

.soundtrack-control.compact small {
  position: absolute;
  right: 6px;
  bottom: 11px;
  color: var(--dim);
  font-size: 7px;
  pointer-events: none;
}

.soundtrack-control.volume input {
  width: 100%;
  accent-color: var(--audio);
}

.soundtrack-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  color: var(--dim);
  cursor: pointer;
}

.soundtrack-remove:hover {
  background: rgba(167, 167, 170, .1);
  color: var(--danger);
}

.soundtrack-remove svg {
  width: 13px;
  height: 13px;
}

.sheet,
.review-sheet,
.publish-sheet,
.confirm-sheet,
.spotlight-sheet,
.transition-sheet {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #171718;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .68);
}

.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: min(740px, calc(100dvh - 28px));
}

.sheet::backdrop,
.review-sheet::backdrop,
.publish-sheet::backdrop,
.confirm-sheet::backdrop,
.spotlight-sheet::backdrop,
.transition-sheet::backdrop {
  background: rgba(11, 11, 12, .72);
  backdrop-filter: blur(8px);
}

.review-sheet,
.publish-sheet {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
}

.spotlight-sheet {
  width: min(680px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - 24px));
  padding: 0;
}

.spotlight-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(620px, calc(100dvh - 24px));
}

.spotlight-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding-left: 18px;
  border-bottom: 1px solid var(--line);
}

.spotlight-search > svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.spotlight-search input {
  min-width: 0;
  height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 16px/1.2 var(--sans);
}

.spotlight-search input::placeholder {
  color: var(--dim);
}

.spotlight-search .icon-btn {
  width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
}

.spotlight-results {
  min-height: 110px;
  max-height: 474px;
  overflow-y: auto;
  padding: 6px;
}

.spotlight-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.spotlight-result:hover,
.spotlight-result.active {
  border-color: var(--line);
  background: rgba(255, 255, 255, .045);
  color: var(--text);
}

.spotlight-result-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.spotlight-result-icon.media {
  background: rgba(184, 184, 188, .11);
  color: var(--image);
}

.spotlight-result-icon svg {
  width: 17px;
  height: 17px;
}

.spotlight-result-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.spotlight-result-copy strong,
.spotlight-result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-result-copy strong {
  color: currentColor;
  font-size: 12px;
  font-weight: 600;
}

.spotlight-result-copy small {
  color: var(--dim);
  font-size: 10px;
}

.spotlight-result-kind {
  color: var(--dim);
  font: 600 8px/1 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.spotlight-empty {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 142px;
  color: var(--dim);
  text-align: center;
}

.spotlight-empty svg {
  width: 24px;
  height: 24px;
}

.spotlight-empty strong {
  color: var(--muted);
  font-size: 12px;
}

.spotlight-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font: 500 9px/1.3 var(--mono);
}

.spotlight-shell kbd {
  min-width: 18px;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font: inherit;
  text-align: center;
}

.transition-sheet {
  width: min(540px, calc(100vw - 24px));
  padding: 0;
}

.transition-sheet form {
  padding: 22px;
}

.transition-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.transition-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.transition-choices > button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.transition-choices > button:hover,
.transition-choices > button.active {
  border-color: var(--accent);
  background: rgba(208, 208, 210, .07);
  color: var(--text);
}

.transition-choices svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.transition-choices strong,
.transition-choices small {
  display: block;
}

.transition-choices strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.transition-choices small {
  color: var(--dim);
  font-size: 10px;
}

.transition-duration-group {
  margin-top: 16px;
}

.transition-duration-group > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font: 500 9px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.transition-durations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.transition-durations button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font: 600 11px/1 var(--mono);
  cursor: pointer;
}

.transition-durations button.active {
  border-color: var(--accent);
  background: rgba(208, 208, 210, .08);
  color: var(--accent);
}

.transition-truth {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}

.transition-truth p {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  font-size: 11px;
}

.transition-truth strong {
  color: var(--text);
}

.transition-truth span {
  color: var(--dim);
}

.transition-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.transition-sheet .sheet-head .icon-btn {
  width: 44px;
  height: 44px;
}

.transition-actions .primary-btn,
.transition-actions .secondary-btn {
  min-height: 44px;
}

.review-shell,
.publish-shell {
  padding: 22px;
}

.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.review-head h2 {
  margin: 0;
  font: 600 24px/1.2 var(--serif);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 20px;
  min-height: 560px;
}

.review-media {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(208, 208, 210, .08), transparent 46%),
    #0B0B0C;
}

.review-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: contain;
}

.review-decision {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(11, 11, 12, .82);
  color: var(--image);
  font: 600 9px/1 var(--mono);
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.review-decision.approved {
  border-color: rgba(208, 208, 210, .35);
  background: rgba(30, 30, 32, .88);
  color: #D0D0D2;
}

.review-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--dim);
  font: 500 9px/1.3 var(--mono);
}

.review-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .02);
}

.rating-block > div:first-child {
  display: grid;
  gap: 2px;
}

.rating-block strong {
  font-size: 12px;
}

.rating-block small {
  color: var(--dim);
  font-size: 10px;
}

.review-rating {
  display: flex;
  gap: 2px;
}

.review-rating button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #58585E;
  cursor: pointer;
}

.review-rating button:hover,
.review-rating button.active {
  background: rgba(184, 184, 188, .11);
  color: var(--image);
}

.review-rating button.active svg {
  fill: currentColor;
}

.review-rating svg {
  width: 16px;
  height: 16px;
}

.review-notes {
  margin-top: 13px;
}

.review-panel .field textarea {
  min-height: 94px;
}

.review-notes textarea {
  min-height: 78px !important;
}

.review-actions-secondary,
.review-actions-primary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-actions-secondary {
  margin-top: auto;
  padding-top: 16px;
}

.review-actions-primary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.review-actions-secondary .secondary-btn,
.review-actions-primary > button {
  gap: 7px;
  min-height: 42px;
}

.review-actions-primary > button {
  flex: 1 1 0;
}

.approve-btn.approved {
  border-color: rgba(208, 208, 210, .35);
  background: rgba(208, 208, 210, .1);
  color: #D0D0D2;
}

.danger-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  margin-right: auto;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #858589;
  cursor: pointer;
}

.danger-link:hover {
  background: rgba(167, 167, 170, .09);
  color: var(--danger);
}

.danger-link svg {
  width: 15px;
  height: 15px;
}

.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .8fr);
  gap: 20px;
}

.publish-preview {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0B0B0C;
}

.publish-preview video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: contain;
}

.publish-preview > span {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(11, 11, 12, .78);
  color: var(--muted);
  font: 500 9px/1 var(--mono);
}

.publish-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.publish-panel .field textarea {
  min-height: 126px;
}

.publish-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.publish-primary button {
  gap: 7px;
  min-height: 44px;
}

.channel-block {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.channel-block > div:first-child {
  display: grid;
  gap: 2px;
  margin-bottom: 11px;
}

.channel-block strong {
  font-size: 12px;
}

.channel-block small {
  color: var(--dim);
  font-size: 10px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.channel-grid button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  text-align: left;
}

.channel-grid button:disabled {
  opacity: .55;
}

.sheet form {
  overflow-y: auto;
  max-height: inherit;
  padding: 22px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.sheet-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font: 600 9px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sheet-head h2,
.confirm-sheet h2 {
  margin: 0;
  font: 600 24px/1.2 var(--serif);
}

.source-preview {
  position: relative;
  height: 138px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-deep);
}

.source-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-preview span {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(11, 11, 12, .78);
  font: 500 9px/1 var(--mono);
}

.mode-switch {
  width: fit-content;
  margin-bottom: 17px;
}

.mode-switch button {
  min-width: 98px;
}

.source-preview:not([hidden]) + .mode-switch {
  display: none;
}

.field {
  display: block;
  min-width: 0;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font: 500 9px/1 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field textarea,
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: #101011;
  color: var(--text);
}

.field textarea:focus,
.field input:focus,
.field select:focus {
  border-color: rgba(208, 208, 210, .58);
  box-shadow: 0 0 0 3px rgba(208, 208, 210, .08);
}

.field textarea {
  min-height: 126px;
  padding: 13px;
  resize: vertical;
  line-height: 1.5;
}

.field input {
  height: 46px;
  padding: 0 12px;
}

.field select {
  height: 46px;
  padding: 0 11px;
}

.prompt-field {
  margin-bottom: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 11px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 13px;
  color: var(--text);
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.quote {
  color: var(--muted);
  font: 500 11px/1.4 var(--mono);
}

.quote.ready {
  color: var(--accent);
}

.generate-submit {
  min-width: 136px;
  min-height: 44px;
}

.form-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.confirm-sheet {
  width: min(410px, calc(100vw - 28px));
}

.confirm-sheet form {
  padding: 24px;
}

.confirm-sheet p {
  margin: 12px 0 22px;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  top: 68px;
  left: 50%;
  z-index: 300;
  max-width: min(440px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(30, 30, 32, .97);
  color: var(--text);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .42);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .16s, transform .16s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.context-menu {
  position: fixed;
  z-index: 120;
  width: 260px;
  max-width: calc(100vw - 16px);
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  background: rgba(23, 23, 24, .98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58), 0 0 0 1px rgba(0, 0, 0, .32);
  color: var(--text);
  contain: layout paint;
  transform-origin: top left;
  animation: context-in .1s ease-out;
}

.context-menu[hidden] {
  display: none;
}

@keyframes context-in {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(.985);
  }
}

.context-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.context-head > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.context-head strong,
.context-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-head strong {
  font-size: 12px;
  font-weight: 650;
}

.context-head small {
  color: var(--dim);
  font: 500 9px/1.2 var(--mono);
}

.context-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(208, 208, 210, .22);
  border-radius: 8px;
  background: rgba(208, 208, 210, .08);
  color: var(--accent);
}

.context-icon.video {
  border-color: rgba(184, 184, 188, .22);
  background: rgba(184, 184, 188, .08);
  color: var(--video);
}

.context-icon.audio {
  border-color: rgba(184, 184, 188, .26);
  background: rgba(184, 184, 188, .09);
  color: var(--audio);
}

.context-icon svg {
  width: 15px;
  height: 15px;
}

.context-actions {
  display: grid;
  gap: 2px;
  padding: 6px 0 2px;
}

.context-actions button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 35px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #E2E2E4;
  font-size: 11px;
  text-align: left;
}

.context-actions button:hover,
.context-actions button:focus-visible {
  background: rgba(255, 255, 255, .07);
  color: #FFF;
}

.context-actions button:disabled {
  color: #858589;
  cursor: default;
}

.context-actions button:disabled:hover {
  background: transparent;
}

.context-actions button.danger {
  color: #A7A7AA;
}

.context-actions button svg {
  width: 14px;
  height: 14px;
}

.context-shortcut {
  color: #858589;
  font: 500 9px/1 var(--mono);
}

.context-separator {
  height: 1px;
  margin: 5px 7px;
  background: var(--line);
}

.context-menu footer {
  padding: 7px 8px 5px;
  color: #58585E;
  font: 500 8px/1.2 var(--mono);
}

@media (hover: none) {
  .timeline-remove {
    opacity: 1;
  }

  .context-menu footer {
    display: none;
  }
}

@media (max-width: 920px) {
  .board-hint {
    display: none;
  }

  .search-box {
    width: 190px;
  }

  .save-state,
  .nav-studio {
    display: none;
  }

  .nav-voice {
    width: 40px;
    padding: 0;
  }

  .nav-voice span:last-child {
    display: none;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-h: 92px;
    --dock-h: 250px;
  }

  .nav {
    align-content: flex-start;
    flex-wrap: wrap;
    height: var(--nav-h);
    padding: 8px 10px 6px;
    background: rgba(11, 11, 12, .98);
  }

  .nav .brand,
  .nav-right {
    height: 38px;
  }

  .nav-right .primary-btn {
    min-height: 38px;
    padding: 0 11px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .board-tools {
    top: 8px;
    right: 8px;
    left: 8px;
  }

  .drop-guide {
    top: 60px;
    right: 8px;
    width: min(390px, calc(100vw - 16px));
  }

  .drag-coach {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    border-radius: 12px;
    transform: none;
  }

  .drag-coach strong {
    white-space: normal;
  }

  .scope-toggle {
    width: 42px;
    padding: 0;
  }

  .scope-toggle span {
    display: none;
  }

  .segmented button {
    padding: 0 8px;
  }

  .segmented button span:last-child {
    display: none;
  }

  .mix-launch {
    width: 42px;
    padding: 0;
  }

  .mix-launch > span:not(:first-child) {
    display: none;
  }

  .search-box {
    width: 42px;
    margin-left: auto;
    padding: 0 12px;
    overflow: hidden;
    transition: width .18s;
  }

  .search-box:focus-within {
    width: min(210px, calc(100vw - 168px));
  }

  .search-box input {
    min-width: 170px;
    opacity: 0;
  }

  .search-box:focus-within input {
    opacity: 1;
  }

  .stage-lane {
    width: 318px;
  }

  .image-lane {
    left: 164px;
  }

  .video-lane {
    left: 544px;
  }

  .audio-lane {
    left: 924px;
  }

  .edit-head {
    padding-right: 8px;
  }

  .edit-actions .icon-btn {
    display: none;
  }

  .export-btn {
    padding: 0 11px;
  }

  .publish-btn {
    width: 40px;
    padding: 0;
  }

  .publish-btn span:last-child,
  .final-cut-btn span:last-child {
    display: none;
  }

  .final-cut-btn {
    width: 40px;
    padding: 0;
  }

  .timeline-list {
    padding-left: 15px;
  }

  .timeline-track {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .track-label {
    font-size: 0;
  }

  .soundtrack-item {
    grid-template-columns: 120px 100px 72px 82px 28px;
    min-width: 448px;
  }

  .sheet {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .review-sheet,
  .publish-sheet,
  .spotlight-sheet,
  .transition-sheet {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 8px);
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .board-minimap {
    right: 8px;
    bottom: 8px;
    width: 150px;
  }

  .board-minimap > svg {
    height: 100px;
  }

  .spotlight-shell {
    max-height: calc(100dvh - 8px);
  }

  .spotlight-search {
    min-height: 62px;
    padding-left: 14px;
  }

  .spotlight-results {
    max-height: calc(100dvh - 132px);
  }

  .spotlight-result {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 62px;
  }

  .spotlight-result-kind {
    display: none;
  }

  .spotlight-shell > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .transition-sheet form {
    overflow-y: auto;
    max-height: calc(100dvh - 8px);
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .transition-choices {
    grid-template-columns: 1fr;
  }

  .transition-truth p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .review-shell,
  .publish-shell {
    overflow-y: auto;
    max-height: calc(100dvh - 8px);
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .review-layout,
  .publish-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .review-media,
  .review-media img,
  .publish-preview,
  .publish-preview video {
    min-height: 280px;
    max-height: 48dvh;
  }

  .review-actions-secondary {
    margin-top: 16px;
  }

  .rating-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .publish-primary {
    grid-template-columns: 1fr;
  }

  .sheet form {
    padding: 18px 15px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .sheet-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .generate-submit {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .board-tools {
    gap: 5px;
  }

  .board-tools > .icon-btn {
    width: 38px;
  }

  .board-tools > .spotlight-toggle {
    width: 44px;
    min-height: 44px;
  }

  .board-tools > #arrangeBoard {
    display: none;
  }

  .board-tools > .drop-guide-toggle {
    display: none;
  }

  .nav-right .primary-btn span:last-child {
    display: none;
  }

  .nav-right .primary-btn {
    width: 38px;
    padding: 0;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
