.sfx-hero {
  padding: clamp(112px, 16vw, 172px) 0 64px;
}

.sfx-hero__grid {
  align-items: stretch;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.sfx-hero__panel {
  padding: 28px;
  border-radius: 28px;
}

.sfx-shell {
  padding-top: 24px;
}

.timeline-shell {
  margin-bottom: 20px;
  border-radius: 32px;
  padding: 28px;
}

.timeline-shell__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.timeline-shell__copy {
  display: grid;
  gap: 12px;
}

.timeline-shell__copy h2,
.sfx-panel-header h2,
.sfx-panel-header h3,
.layers-panel h3,
.json-card h3 {
  margin: 0;
  font-size: clamp(1.4rem, 1.7vw, 1.95rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.timeline-shell__actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.timeline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(125, 226, 209, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(125, 226, 209, 0.08);
  color: var(--text);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.timeline-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.timeline-insight {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(14, 13, 22, 0.92), rgba(8, 9, 16, 0.94)),
    radial-gradient(circle at top right, rgba(125, 226, 209, 0.1), transparent 46%);
  display: grid;
  gap: 8px;
}

.timeline-insight span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-insight strong {
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.timeline-scroll {
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.timeline-editor {
  position: relative;
  min-width: 920px;
  height: 480px;
}

.timeline-editor canvas {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12, 10, 16, 0.98), rgba(8, 7, 13, 1)),
    radial-gradient(circle at top right, rgba(243, 223, 46, 0.06), transparent 40%);
}

.timeline-layer-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.timeline-node {
  position: absolute;
  left: var(--node-left);
  top: var(--node-top);
  width: var(--node-width);
  height: var(--node-height);
  pointer-events: auto;
  cursor: grab;
}

.timeline-node:focus-visible {
  outline: none;
}

.timeline-node.is-disabled {
  opacity: 0.52;
}

.timeline-node__surface {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(10, 9, 15, 0.9), rgba(18, 18, 28, 0.9)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 52%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 14px 24px rgba(0, 0, 0, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.timeline-node:hover .timeline-node__surface,
.timeline-node.is-selected .timeline-node__surface {
  transform: translateY(-2px);
  border-color: var(--node-color);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 18px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.timeline-node__surface strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.timeline-node__surface span:last-child {
  color: var(--muted);
  font-size: 0.76rem;
}

.timeline-node__pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--node-color);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-node__handle {
  position: absolute;
  border-radius: 999px;
  background: var(--node-color);
  box-shadow: 0 0 0 2px rgba(5, 7, 13, 0.85);
}

.timeline-node__handle--left,
.timeline-node__handle--right {
  top: calc(50% - 18px);
  width: 12px;
  height: 36px;
  cursor: ew-resize;
}

.timeline-node__handle--left {
  left: -7px;
}

.timeline-node__handle--right {
  right: -7px;
}

.timeline-node__handle--top,
.timeline-node__handle--bottom {
  left: calc(50% - 18px);
  width: 36px;
  height: 12px;
  cursor: ns-resize;
}

.timeline-node__handle--top {
  top: -7px;
}

.timeline-node__handle--bottom {
  bottom: -7px;
}

.timeline-footer {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.timeline-legend__swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.timeline-legend__swatch[data-wave="sine"] {
  background: #f3df2e;
}

.timeline-legend__swatch[data-wave="triangle"] {
  background: #ffeb58;
}

.timeline-legend__swatch[data-wave="sawtooth"] {
  background: #ffb347;
}

.timeline-legend__swatch[data-wave="square"] {
  background: #ff7e6b;
}

.timeline-legend__swatch[data-wave="noise"] {
  background: #7de2d1;
}

.timeline-hint {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
}

body.base-sound-modal-open {
  overflow: hidden;
}

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

.base-sound-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.base-sound-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.7);
  backdrop-filter: blur(10px);
}

.base-sound-modal__dialog {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(12, 11, 18, 0.98), rgba(7, 8, 14, 0.98)),
    radial-gradient(circle at top right, rgba(243, 223, 46, 0.08), transparent 44%);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
}

.base-sound-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  flex-wrap: wrap;
}

.base-sound-modal__header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  letter-spacing: -0.04em;
}

.base-sound-modal__summary {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.base-sound-modal__summary-title {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.base-sound-selection-summary,
.layer-base-sound-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.base-sound-selection-chip,
.layer-base-sound-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(243, 223, 46, 0.18);
  border-radius: 999px;
  background: rgba(243, 223, 46, 0.08);
  color: var(--text);
  font-size: 0.8rem;
}

.base-sound-selection-chip strong,
.layer-base-sound-tag strong {
  color: var(--accent);
}

.base-sound-selection-empty,
.layer-base-sound-empty {
  margin: 0;
  color: var(--muted);
}

.base-sound-category-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.base-sound-category {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
}

.base-sound-category__header h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.base-sound-category__header p {
  margin: 0;
  color: var(--muted);
}

.base-sound-category__tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.base-sound-tag {
  width: 100%;
  min-height: 82px;
  justify-content: start;
  align-items: start;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  flex-direction: column;
  gap: 6px;
}

.base-sound-tag span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.base-sound-tag small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.base-sound-tag.is-active {
  border-color: rgba(243, 223, 46, 0.4);
  background:
    linear-gradient(180deg, rgba(243, 223, 46, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px rgba(243, 223, 46, 0.12), 0 12px 26px rgba(0, 0, 0, 0.2);
}

.base-sound-modal__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.layer-base-sound-row {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.layer-base-sound-row__label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sfx-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.84fr) minmax(0, 1.56fr) minmax(280px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.sfx-sidebar,
.sfx-workbench,
.sfx-output {
  border-radius: 28px;
  padding: 24px;
}

.sfx-sidebar,
.sfx-output {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.sfx-panel-header {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.sfx-panel-header--compact {
  margin-top: 8px;
}

.sfx-panel-copy {
  margin: 0;
  color: var(--muted);
}

.sfx-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.sfx-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 11, 20, 0.95), rgba(10, 8, 15, 0.98)),
    radial-gradient(circle at top right, rgba(243, 223, 46, 0.08), transparent 42%);
}

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

.sfx-field {
  display: grid;
  gap: 8px;
}

.sfx-field span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sfx-field input,
.sfx-field select,
.sfx-field textarea,
.sfx-field output,
.sfx-field--search input,
.json-view {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 14px;
}

.sfx-field output {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.sfx-field textarea,
.json-view {
  resize: vertical;
}

.sfx-field--wide {
  grid-column: 1 / -1;
}

.sfx-field--toggle {
  align-content: end;
}

.sfx-field--toggle input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}

.button-row--dense,
.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-stack {
  flex-direction: column;
}

.layer-list,
.preset-catalog,
.preset-library {
  display: grid;
  gap: 14px;
}

.layer-card,
.preset-card,
.saved-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.layer-card.is-disabled {
  opacity: 0.58;
}

.layer-card.is-selected {
  border-color: rgba(243, 223, 46, 0.42);
  box-shadow: 0 0 0 1px rgba(243, 223, 46, 0.14), 0 18px 34px rgba(0, 0, 0, 0.18);
}

.layer-card__header,
.preset-card__header,
.saved-card__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.layer-card__header h4,
.preset-card__header h4,
.saved-card__header h4 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.layer-card__meta,
.preset-card__meta,
.saved-card__meta,
.status-log,
.contract-note,
.layer-card p {
  color: var(--muted);
}

.layer-card__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preset-card button,
.saved-card button,
.layer-card button,
.filter-row button {
  width: 100%;
}

.preset-card__actions,
.saved-card__actions,
.layer-card__actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.layer-card__actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-row button {
  width: auto;
  padding-inline: 14px;
}

.filter-row button.is-active,
.preset-card.is-active,
.saved-card.is-active {
  border-color: rgba(243, 223, 46, 0.34);
  box-shadow: 0 0 0 1px rgba(243, 223, 46, 0.12), 0 12px 30px rgba(0, 0, 0, 0.18);
}

.preset-card__pill,
.saved-card__pill,
.layer-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card {
  display: grid;
  gap: 10px;
}

.json-view {
  min-height: 320px;
  margin-top: 16px;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

.status-log {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  white-space: pre-wrap;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
}

.layer-mini-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.layer-mini-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.layer-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(243, 223, 46, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-footer {
  margin-top: 24px;
}

@supports (scrollbar-color: auto) {
  .sfx-sidebar,
  .sfx-output,
  .timeline-scroll,
  .json-view {
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.08);
  }
}

.sfx-sidebar::-webkit-scrollbar,
.sfx-output::-webkit-scrollbar,
.timeline-scroll::-webkit-scrollbar,
.json-view::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.sfx-sidebar::-webkit-scrollbar-track,
.sfx-output::-webkit-scrollbar-track,
.timeline-scroll::-webkit-scrollbar-track,
.json-view::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sfx-sidebar::-webkit-scrollbar-thumb,
.sfx-output::-webkit-scrollbar-thumb,
.timeline-scroll::-webkit-scrollbar-thumb,
.json-view::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(243, 223, 46, 0.95), rgba(255, 235, 88, 0.72));
  border-radius: 999px;
  border: 2px solid rgba(8, 6, 10, 0.7);
}

@media (max-width: 1220px) {
  .timeline-shell__header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .timeline-shell__actions {
    justify-items: start;
  }

  .sfx-grid {
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  }

  .sfx-output {
    position: static;
    max-height: none;
    overflow: visible;
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .sfx-hero__grid,
  .sfx-grid {
    grid-template-columns: 1fr;
  }

  .timeline-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sfx-sidebar,
  .sfx-output {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .master-grid,
  .layer-card__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sfx-hero {
    padding-top: 104px;
  }

  .base-sound-modal {
    padding: 16px;
  }

  .base-sound-modal__dialog {
    padding: 20px;
    border-radius: 22px;
  }

  .base-sound-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-shell,
  .sfx-sidebar,
  .sfx-workbench,
  .sfx-output,
  .sfx-hero__panel {
    padding: 20px;
    border-radius: 22px;
  }

  .timeline-insights {
    grid-template-columns: 1fr;
  }

  .timeline-editor {
    min-width: 720px;
    height: 430px;
  }

  .master-grid,
  .layer-card__controls,
  .layer-card__actions {
    grid-template-columns: 1fr;
  }

  .timeline-footer {
    flex-direction: column;
  }

  .floating-transport {
    bottom: 12px;
    right: 12px;
    left: 12px;
    border-radius: 18px;
    padding: 12px 16px;
  }

  .floating-transport__shortcuts {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   UX ENHANCEMENT LAYER
   Toast notifications, floating transport,
   collapsible layers, micro-interactions,
   keyboard hints, and visual feedback
   ═══════════════════════════════════════════ */

/* — Global transitions for smoother feel — */
.button,
.button--ghost,
.preset-card,
.saved-card,
.layer-card,
.filter-row button,
.sfx-field input,
.sfx-field select,
.sfx-field textarea,
.timeline-toggle,
.timeline-insight,
.timeline-node__surface,
.base-sound-tag {
  transition:
    transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 200ms ease,
    background 200ms ease,
    opacity 200ms ease;
}

/* — Better button hover/active states — */
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(243, 223, 46, 0.15);
}

.button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 80ms;
}

.button--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.button--ghost:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 80ms;
}

/* — Preset cards: better hover and quick-play — */
.preset-card,
.saved-card {
  position: relative;
  transition:
    transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 220ms ease;
}

.preset-card:hover,
.saved-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.preset-card .quick-play-btn,
.saved-card .quick-play-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(243, 223, 46, 0.3);
  background: rgba(243, 223, 46, 0.12);
  color: var(--accent);
  font-size: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 180ms ease;
  z-index: 2;
}

.preset-card .quick-play-btn::before,
.saved-card .quick-play-btn::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 9px solid var(--accent, #f3df2e);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.preset-card .quick-play-btn.is-playing::before,
.saved-card .quick-play-btn.is-playing::before {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 2px;
  background: var(--accent, #f3df2e);
  margin-left: 0;
}

.preset-card:hover .quick-play-btn,
.saved-card:hover .quick-play-btn {
  opacity: 1;
  transform: scale(1);
}

.preset-card .quick-play-btn:hover,
.saved-card .quick-play-btn:hover {
  background: rgba(243, 223, 46, 0.22);
  border-color: rgba(243, 223, 46, 0.5);
  transform: scale(1.1);
}

/* — Layer card collapsible controls — */
.layer-card__controls {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 350ms cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 250ms ease,
    margin-top 350ms ease;
}

.layer-card.is-expanded .layer-card__controls {
  max-height: 600px;
  opacity: 1;
  margin-top: 14px;
}

.layer-card__expand-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 160ms ease;
}

.layer-card__expand-hint:hover {
  color: var(--text);
}

.layer-card__expand-hint .chevron {
  display: inline-block;
  width: 14px;
  height: 14px;
  transition: transform 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.layer-card.is-expanded .layer-card__expand-hint .chevron {
  transform: rotate(180deg);
}

.layer-card__expand-hint .chevron::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: 1px;
  margin-left: 3px;
}

/* — Layer card enhanced selection — */
.layer-card {
  cursor: pointer;
  transition:
    transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 200ms ease,
    border-color 200ms ease,
    opacity 200ms ease;
}

.layer-card:hover:not(.is-selected) {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.layer-card.is-selected {
  transform: translateX(4px);
}

/* — Floating transport bar — */
.floating-transport {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(16, 14, 22, 0.96), rgba(8, 7, 14, 0.98));
  backdrop-filter: blur(16px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateY(100px);
  opacity: 0;
  transition:
    transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 300ms ease;
  pointer-events: none;
}

.floating-transport.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-transport__preset-name {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-transport__divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.floating-transport .button {
  padding: 8px 14px;
  font-size: 0.78rem;
}

.floating-transport__time {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}

.floating-transport__shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

/* — Playing state visual feedback — */
.timeline-shell.is-playing {
  border-color: rgba(243, 223, 46, 0.2);
  box-shadow: 0 0 0 1px rgba(243, 223, 46, 0.08), 0 8px 32px rgba(0, 0, 0, 0.2);
}

.timeline-shell.is-playing .timeline-editor canvas {
  border-color: rgba(243, 223, 46, 0.18);
}

#preview-btn.is-playing {
  position: relative;
  overflow: hidden;
}

#preview-btn.is-playing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(243, 223, 46, 0.15), transparent);
  animation: playing-shimmer 1.8s ease-in-out infinite;
}

@keyframes playing-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* — Toast notification system — */
.toast-container {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(18, 16, 24, 0.97), rgba(10, 9, 16, 0.98));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  color: var(--text, #f6f1ed);
  font-size: 0.84rem;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 380ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.toast.is-leaving {
  animation: toast-out 280ms cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.toast--success {
  border-color: rgba(125, 226, 209, 0.2);
}

.toast--success .toast__icon {
  color: #7de2d1;
}

.toast--info {
  border-color: rgba(243, 223, 46, 0.2);
}

.toast--info .toast__icon {
  color: #f3df2e;
}

.toast--warn {
  border-color: rgba(255, 179, 71, 0.2);
}

.toast--warn .toast__icon {
  color: #ffb347;
}

.toast__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.toast__text {
  flex: 1;
  min-width: 0;
}

.toast__dismiss {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  transition: background 120ms ease;
}

.toast__dismiss:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateX(40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-out {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(40px) scale(0.92);
  }
}

/* — Undo/Redo bar — */
.undo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.undo-bar .button {
  padding: 7px 12px;
  font-size: 0.76rem;
}

.undo-bar .button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* — Timeline node handle glow on hover — */
.timeline-node:hover .timeline-node__handle {
  box-shadow:
    0 0 0 2px rgba(5, 7, 13, 0.85),
    0 0 8px var(--node-color);
  transform: scale(1.15);
  transition: all 160ms ease;
}

.timeline-node__handle {
  transition: all 160ms ease;
}

/* — Onboarding pulse on first preset — */
@keyframes onboarding-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(243, 223, 46, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(243, 223, 46, 0.12);
  }
}

.preset-card.onboarding-hint {
  animation: onboarding-pulse 2.4s ease-in-out 3;
}

/* — Better focus states — */
.sfx-field input:focus,
.sfx-field select:focus,
.sfx-field textarea:focus {
  outline: none;
  border-color: rgba(243, 223, 46, 0.35);
  box-shadow: 0 0 0 3px rgba(243, 223, 46, 0.08);
}

/* — Input range thumb styling — */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #f3df2e);
  border: 2px solid rgba(8, 6, 10, 0.8);
  cursor: grab;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(243, 223, 46, 0.3);
}

input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #f3df2e);
  border: 2px solid rgba(8, 6, 10, 0.8);
  cursor: grab;
}

/* — Keyboard shortcut hints in timeline header — */
.shortcut-hints {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

/* — Empty state animation — */
.empty-state {
  text-align: center;
  padding: 24px 16px;
}

/* — Section collapse toggle — */
.section-collapse-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 160ms ease;
}

.section-collapse-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* — Better manifest items — */
.manifest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.manifest-item:last-child {
  border-bottom: none;
}

.manifest-item span:first-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.manifest-item span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* — Layer card wave type color indicator — */
.layer-card__wave-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

/* — Auto-preview toggle enhancement — */
.auto-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(125, 226, 209, 0.15);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(125, 226, 209, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 180ms ease;
}

.auto-preview-toggle:has(input:checked) {
  border-color: rgba(125, 226, 209, 0.3);
  background: rgba(125, 226, 209, 0.12);
  color: var(--text);
}

.auto-preview-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #7de2d1;
  cursor: pointer;
}

/* — Smooth scroll for sidebar — */
.sfx-sidebar,
.sfx-output {
  scroll-behavior: smooth;
}

/* — Improved status log for the panel — */
.status-log {
  font-size: 0.8rem;
  line-height: 1.5;
  transition: background 200ms ease;
}

/* — Preset card category color coding — */
.preset-card__pill[data-cat="Weapons"],
.saved-card__pill[data-cat="Weapons"] {
  border-color: rgba(255, 126, 107, 0.2);
  color: #ff7e6b;
}

.preset-card__pill[data-cat="Combat"],
.saved-card__pill[data-cat="Combat"] {
  border-color: rgba(255, 179, 71, 0.2);
  color: #ffb347;
}

.preset-card__pill[data-cat="Economy"],
.saved-card__pill[data-cat="Economy"] {
  border-color: rgba(125, 226, 209, 0.2);
  color: #7de2d1;
}

.preset-card__pill[data-cat="UI"],
.saved-card__pill[data-cat="UI"] {
  border-color: rgba(255, 235, 88, 0.2);
  color: #ffeb58;
}

.preset-card__pill[data-cat="Travel & Alerts"],
.saved-card__pill[data-cat="Travel & Alerts"] {
  border-color: rgba(160, 140, 255, 0.2);
  color: #a08cff;
}

.preset-card__pill[data-cat="Progression"],
.saved-card__pill[data-cat="Progression"] {
  border-color: rgba(243, 223, 46, 0.2);
  color: #f3df2e;
}

.preset-card__pill[data-cat="Ambience"],
.saved-card__pill[data-cat="Ambience"] {
  border-color: rgba(140, 200, 255, 0.2);
  color: #8cc8ff;
}
