:root {
  color-scheme: dark;
  --bg-0: #07111a;
  --bg-1: #0d1721;
  --bg-2: #111d2a;
  --panel: rgba(12, 19, 28, 0.86);
  --panel-strong: rgba(16, 26, 36, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(167, 190, 209, 0.14);
  --line-strong: rgba(191, 210, 227, 0.22);
  --text: #ecf3f8;
  --muted: #95a8b8;
  --faint: #6c7f91;
  --accent: #59d6c5;
  --accent-2: #f0bb69;
  --accent-3: #8cacec;
  --danger: #f48f8f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 14px;
  --focus: 0 0 0 3px rgba(89, 214, 197, 0.22);
  --track-width: 1000px;
  --thumb-width: 114px;
  --thumb-height: 118px;
  --thumb-track-height: 176px;
  --thumb-card-top: 10px;
  --timeline-leading-gutter: 64px;
  --content-pad: 16px;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(89, 214, 197, 0.16), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(240, 187, 105, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(140, 172, 236, 0.1), transparent 32%),
    linear-gradient(180deg, #09111a 0%, #0b141e 45%, #0b1118 100%);
  color: var(--text);
}

body {
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
  font-size: 0.78rem;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid rgba(184, 206, 221, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(89, 214, 197, 0.35);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.preview-dropzone:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button.primary {
  border-color: rgba(89, 214, 197, 0.5);
  background: linear-gradient(180deg, rgba(89, 214, 197, 0.26), rgba(89, 214, 197, 0.1));
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 14px;
  gap: 12px;
}

.topbar,
.panel,
.footer-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  border-radius: calc(var(--radius) + 2px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-block {
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 38px;
}

.eyebrow {
  letter-spacing: 0.06em;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
  font-size: 0.78rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.topbar-actions,
.panel-actions,
.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 12px;
  overflow: hidden;
}

.editor-column,
.right-column,
.inspector-panel {
  min-height: 0;
  overflow: hidden;
}

.editor-column {
  display: grid;
  grid-template-rows: minmax(225px, 1fr) minmax(0, 1.08fr);
  gap: 12px;
}

.right-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.panel {
  border-radius: var(--radius);
  padding: var(--content-pad);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.preview-panel-head {
  align-items: center;
  min-height: 22px;
  gap: 8px;
}

.preview-panel-head .panel-title {
  margin-bottom: 0;
  line-height: 1;
}

.panel-head,
.wave-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.panel-title {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-dropzone {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(184, 206, 221, 0.14);
  background:
    radial-gradient(circle at 50% 20%, rgba(89, 214, 197, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(12, 18, 25, 0.95), rgba(8, 12, 18, 0.95));
}

.preview-stage {
  position: relative;
  margin: auto;
  width: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
}

.preview-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  text-align: center;
  padding: 18px;
}

.preview-full {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 4, 8, 0.82);
}

.preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(1.05) contrast(1.05);
}

.preview-footer {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(4, 8, 12, 0.76));
  color: #f4f9fc;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  font-size: 0.78rem;
}

.preview-timeline-label {
  font-variant-numeric: tabular-nums;
}

.wave-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.wave-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.wave-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

.timeline-overview-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}

.wave-meta {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.wave-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}

.wave-actions button {
  padding: 6px 9px;
  white-space: nowrap;
}

.timeline-overview {
  position: relative;
  flex: 0 1 clamp(140px, 20vw, 220px);
  width: clamp(140px, 20vw, 220px);
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(184, 206, 221, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  cursor: default;
  touch-action: none;
  user-select: none;
}

.timeline-overview-zoom-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.timeline-overview-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timeline-overview[data-hover-mode="move"] {
  cursor: grab;
}

.timeline-overview[data-hover-mode="resize-left"],
.timeline-overview[data-hover-mode="resize-right"],
.timeline-overview[data-drag-mode="resize-left"],
.timeline-overview[data-drag-mode="resize-right"] {
  cursor: ew-resize;
}

.timeline-overview[data-drag-mode="move"]:active {
  cursor: grabbing;
}

.timeline-overview.is-disabled {
  opacity: 0.46;
  cursor: default;
}

.timeline-overview.is-static {
  cursor: default;
}

.timeline-overview-track {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(140, 172, 236, 0.28), rgba(89, 214, 197, 0.3));
}

.timeline-overview-viewport {
  position: absolute;
  top: 3px;
  left: 0;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(89, 214, 197, 0.55);
  background: linear-gradient(180deg, rgba(89, 214, 197, 0.44), rgba(89, 214, 197, 0.2));
  box-shadow: 0 0 0 1px rgba(89, 214, 197, 0.12), 0 4px 14px rgba(0, 0, 0, 0.22);
  transform: translateX(0);
  will-change: transform, width;
  --overview-left-grip-inset: 5px;
  --overview-right-grip-inset: 5px;
}

.timeline-overview-viewport::before,
.timeline-overview-viewport::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2px;
  height: 10px;
  transform: translateY(-50%);
  background: rgba(236, 243, 248, 0.74);
  box-shadow: 0 0 0 1px rgba(4, 8, 12, 0.16);
}

.timeline-overview-viewport::before {
  left: var(--overview-left-grip-inset);
}

.timeline-overview-viewport::after {
  right: var(--overview-right-grip-inset);
}

.wave-status,
.pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wave-status {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  border: 1px solid rgba(184, 206, 221, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.pill-soft {
  color: var(--accent-2);
}

.timeline-scroll,
.wave-scroll,
.thumb-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  scrollbar-color: rgba(89, 214, 197, 0.36) transparent;
  scrollbar-width: thin;
  border-radius: 16px;
}

.timeline-scroll {
  scrollbar-width: none;
}

.timeline-scroll::-webkit-scrollbar {
  display: none;
  height: 0;
}

.timeline,
.timeline-track {
  min-height: 22px;
}

.timeline {
  height: 22px;
  position: relative;
  width: calc(100% - var(--timeline-leading-gutter));
  margin-left: var(--timeline-leading-gutter);
}

.wave-scroll {
  border: 1px solid rgba(184, 206, 221, 0.08);
  background: rgba(4, 8, 12, 0.44);
}

.timeline-track,
.wave-canvas,
.thumb-track {
  position: relative;
  width: max(100%, var(--track-width));
}

.waveform {
  min-height: 42px;
}

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

.thumb-scroll {
  border: 1px solid rgba(184, 206, 221, 0.08);
  background: rgba(4, 8, 12, 0.34);
  min-height: 0;
  height: 100%;
}

.thumb-track {
  min-height: var(--thumb-track-height);
  height: var(--thumb-track-height);
}

.thumb-card {
  position: absolute;
  top: var(--thumb-card-top);
  transform: translateX(-50%);
  width: var(--thumb-width);
  height: var(--thumb-height);
  border-radius: 16px;
  border: 1px solid rgba(184, 206, 221, 0.14);
  background: linear-gradient(180deg, rgba(18, 26, 35, 0.98), rgba(7, 11, 16, 0.96));
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px;
  gap: 6px;
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.thumb-card:hover {
  border-color: rgba(89, 214, 197, 0.45);
}

.thumb-card.is-dragging {
  opacity: 0.58;
  border-color: rgba(240, 187, 105, 0.72);
}

.thumb-card.selected {
  border-color: rgba(255, 220, 64, 0.98);
  box-shadow: 0 0 0 2px rgba(255, 220, 64, 0.2), 0 16px 28px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.thumb-card.selected .thumb-image {
  border-color: rgba(255, 220, 64, 0.72);
}

.thumb-card.selected .thumb-meta {
  border-color: rgba(255, 220, 64, 0.28);
}

.thumb-card.playing-current {
  border-color: rgba(255, 220, 64, 0.98);
  box-shadow: 0 0 0 2px rgba(255, 220, 64, 0.2), 0 18px 30px rgba(0, 0, 0, 0.28);
  z-index: 3;
}

.thumb-card.playing-current .thumb-image {
  border-color: rgba(255, 220, 64, 0.72);
}

.thumb-card.playing-current .thumb-meta {
  border-color: rgba(255, 220, 64, 0.28);
}

.thumb-card.is-timeline-dragging {
  cursor: grabbing;
  border-color: rgba(240, 187, 105, 0.82);
  box-shadow: 0 0 0 2px rgba(240, 187, 105, 0.16), 0 18px 30px rgba(0, 0, 0, 0.3);
}

.thumb-image {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 0;
  flex: 1 1 auto;
}

.thumb-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
  font-size: 0.7rem;
  color: #b5c5d2;
  font-variant-numeric: tabular-nums;
  padding: 4px 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(184, 206, 221, 0.08);
}

.thumb-code {
  font-weight: 700;
  color: #f5f9fc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.thumb-time {
  color: rgba(236, 243, 248, 0.74);
  flex: 0 0 auto;
}

.inspector-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  position: static;
  max-height: none;
  overflow: hidden;
}

.inspector-head {
  align-items: flex-start;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inspector-tab {
  justify-content: center;
  border-radius: 16px;
  padding: 9px 12px;
}

.inspector-tab.is-active {
  border-color: rgba(89, 214, 197, 0.46);
  background: linear-gradient(180deg, rgba(89, 214, 197, 0.22), rgba(89, 214, 197, 0.08));
}

.inspector-tab-panels {
  min-height: 0;
  overflow: hidden;
}

.inspector-tab-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.inspector-tab-panel[hidden] {
  display: none;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label > span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea,
.field-value {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(184, 206, 221, 0.16);
  background: rgba(7, 12, 18, 0.92);
  padding: 10px 12px;
}

input,
textarea {
  color: var(--text);
}

.field-value {
  min-height: 46px;
  display: flex;
  align-items: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.field-value-plain {
  min-height: 0;
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
}

.field-value.is-empty {
  color: var(--faint);
}

input[disabled] {
  color: var(--muted);
  opacity: 0.9;
}

textarea {
  resize: none;
  min-height: 92px;
  line-height: 1.45;
}

.textarea-field {
  gap: 10px;
}

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

.meta-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(184, 206, 221, 0.08);
}

.meta-block span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.meta-block strong,
.footer-path {
  color: var(--text);
  word-break: break-word;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 6, 10, 0.78);
  backdrop-filter: blur(14px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  width: min(920px, 100%);
  max-height: min(82vh, 860px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(184, 206, 221, 0.16);
  background: rgba(8, 14, 21, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.modal-copy .panel-title {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.modal-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(184, 206, 221, 0.16);
  color: var(--muted);
  text-align: center;
}

.batch-review-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.batch-review-item {
  display: grid;
  grid-template-columns: auto minmax(0, 132px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(184, 206, 221, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.batch-review-item:hover {
  border-color: rgba(89, 214, 197, 0.34);
}

.batch-review-item.is-dragging {
  opacity: 0.56;
  border-color: rgba(240, 187, 105, 0.68);
}

.batch-review-item.is-drop-target {
  border-color: rgba(89, 214, 197, 0.7);
  box-shadow: 0 0 0 2px rgba(89, 214, 197, 0.12);
}

.batch-review-item.is-overflow {
  opacity: 0.66;
  border-color: rgba(244, 143, 143, 0.26);
  background: rgba(244, 143, 143, 0.05);
}

.batch-review-handle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(184, 206, 221, 0.12);
  color: var(--muted);
  cursor: grab;
  user-select: none;
}

.thumb-card.origin-thumb-card {
  border-color: rgba(255, 220, 64, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 220, 64, 0.12);
}

.batch-review-item:active .batch-review-handle {
  cursor: grabbing;
}

.batch-review-thumb {
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(184, 206, 221, 0.1);
}

.batch-review-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.batch-review-name {
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.batch-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(184, 206, 221, 0.12);
}

.batch-review-badge.is-keep {
  color: var(--accent);
  border-color: rgba(89, 214, 197, 0.34);
  background: rgba(89, 214, 197, 0.1);
}

.batch-review-badge.is-drop {
  color: var(--danger);
  border-color: rgba(244, 143, 143, 0.32);
  background: rgba(244, 143, 143, 0.08);
}

.batch-review-remove {
  padding: 7px 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.footer-bar {
  border-radius: calc(var(--radius) + 2px);
  padding: 10px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.status-message {
  color: var(--muted);
  min-height: 1.2em;
}

.footer-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  word-break: normal;
}

.status-message[data-kind="error"] {
  color: var(--danger);
}

.status-message[data-kind="success"] {
  color: var(--accent);
}

.status-message[data-kind="info"] {
  color: var(--muted);
}

.waveform .regions-container [part~="region"],
.waveform .regions-container [part~="marker"] {
  cursor: col-resize !important;
}

.waveform .regions-container [part~="marker"] {
  width: 18px !important;
  margin-left: -9px !important;
  border-left-width: 3px !important;
  border-left-color: rgba(89, 214, 197, 0.92) !important;
  background: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(50% - 2px),
    rgba(89, 214, 197, 0.14) calc(50% - 2px),
    rgba(89, 214, 197, 0.14) calc(50% + 2px),
    transparent calc(50% + 2px),
    transparent 100%
  ) !important;
  opacity: 1 !important;
}

.waveform .regions-container [part~="marker"]:hover,
.waveform .regions-container [part~="marker"]:active {
  border-left-width: 4px !important;
  border-left-color: rgba(240, 187, 105, 1) !important;
  background: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(50% - 3px),
    rgba(240, 187, 105, 0.18) calc(50% - 3px),
    rgba(240, 187, 105, 0.18) calc(50% + 3px),
    transparent calc(50% + 3px),
    transparent 100%
  ) !important;
}

.waveform .regions-container [part~="marker"].selected-marker {
  border-left-color: rgba(240, 187, 105, 1) !important;
  box-shadow: 0 0 0 1px rgba(240, 187, 105, 0.16);
}

.waveform .regions-container [part~="marker"].origin-marker,
.waveform .regions-container [part~="marker"].origin-marker:hover,
.waveform .regions-container [part~="marker"].origin-marker:active,
.waveform .regions-container [part~="marker"].origin-marker.selected-marker {
  border-left-color: rgba(255, 220, 64, 1) !important;
  box-shadow: 0 0 0 1px rgba(255, 220, 64, 0.18);
}

.waveform .regions-container [part~="marker"]::after {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(89, 214, 197, 0.96);
  box-shadow: 0 0 0 4px rgba(89, 214, 197, 0.08);
}

.waveform .regions-container [part~="marker"].selected-marker::after {
  background: rgba(240, 187, 105, 1);
  box-shadow: 0 0 0 4px rgba(240, 187, 105, 0.16);
}

.waveform .regions-container [part~="marker"].origin-marker::after,
.waveform .regions-container [part~="marker"].origin-marker.selected-marker::after {
  background: rgba(255, 220, 64, 1);
  box-shadow: 0 0 0 4px rgba(255, 220, 64, 0.16);
}

.preview-dropzone.drag-over,
.thumb-card.drag-over {
  outline: 2px solid rgba(89, 214, 197, 0.5);
  outline-offset: -2px;
}

@media (max-width: 1040px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

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

  .editor-column {
    display: flex;
    flex-direction: column;
  }

  .right-column {
    display: flex;
    flex-direction: column;
  }

  .inspector-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    padding: 12px;
  }

  .topbar,
  .panel,
  .footer-bar {
    border-radius: 18px;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions {
    justify-content: flex-end;
  }

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

  .topbar-actions,
  .panel-head,
  .wave-panel-head,
  .wave-meta,
  .footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .wave-status {
    justify-content: flex-start;
  }

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

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

  .preview-dropzone,
  .preview-stage {
    min-height: 260px;
  }

  .preview-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-path {
    white-space: normal;
    text-align: left;
  }

  .batch-review-item {
    grid-template-columns: 1fr;
  }

  .batch-review-thumb {
    width: 100%;
  }

}
