/* SampleNova v0.13 — final-product refinement: compact broken orbit, tiered metadata and audible lineage. */

:root {
  --v13-night: #100d15;
  --v13-panel: #17121d;
  --v13-paper: #f5f0e8;
  --v13-copy: #c9c1ca;
  --v13-muted: #938a98;
  --v13-pink: #ff4fa3;
  --v13-pink-soft: #ff9fce;
  --v13-violet: #8062ff;
  --v13-yellow: #edf36a;
}

/* The first scene teaches the two actions before asking anyone to interpret the mock source page. */
.prototype-steps {
  width: min(1180px, calc(100% - 64px));
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  color: rgba(245, 240, 232, .7);
  font: 11px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .035em;
}

.prototype-steps span { display: inline-flex; align-items: center; gap: 7px; }
.prototype-steps b {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #110d15;
  border-radius: 50%;
  background: var(--v13-pink-soft);
  font-size: 10px;
  font-weight: 600;
}
.prototype-steps span:nth-of-type(2) b { background: var(--v13-yellow); }
.prototype-steps i { width: 42px; height: 1px; background: linear-gradient(90deg, rgba(255,159,206,.18), rgba(128,98,255,.65), rgba(237,243,106,.18)); }
.prototype-steps strong { color: var(--v13-pink-soft); font-size: 17px; font-weight: 400; }
.host-page { padding-top: 16px !important; }

/* Compact B: a broken orbit still groups every destination, without becoming a large pill. */
.companion {
  width: 66px !important;
  height: 274px !important;
}

.companion::before {
  right: 3px !important;
  bottom: -3px !important;
  width: 60px !important;
  height: 268px !important;
  border: 1px solid transparent !important;
  border-radius: 36px !important;
  background:
    linear-gradient(rgba(16, 13, 21, .965), rgba(16, 13, 21, .965)) padding-box,
    conic-gradient(from 205deg, transparent 0 8%, rgba(255, 101, 176, .46) 18%, transparent 34% 57%, rgba(128, 98, 255, .52) 69%, rgba(237, 243, 106, .34) 77%, transparent 88%) border-box !important;
  box-shadow: 0 20px 54px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

.dock-actions {
  right: 15px !important;
  bottom: 54px !important;
  gap: 4px !important;
  padding-bottom: 4px !important;
}

.dock-action { width: 36px !important; height: 36px !important; }

.orb-hint {
  right: 70px !important;
  bottom: 8px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: 180px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  color: var(--v13-paper) !important;
  border-color: rgba(255, 159, 206, .26) !important;
  border-radius: 10px !important;
  background: rgba(16, 13, 21, .94) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(128, 98, 255, .08) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: -.01em;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  box-sizing: border-box !important;
}

.companion.is-flipped::before { top: -3px !important; bottom: auto !important; }
.companion.is-flipped .dock-actions { top: 55px !important; bottom: auto !important; }

.project-orbit-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border: 1px dashed rgba(237, 243, 106, .72);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.project-orbit-icon::before {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 10px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--v13-violet), var(--v13-pink-soft));
  transform: rotate(26deg);
  transform-origin: center;
}

.project-orbit-icon i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--v13-paper);
  box-shadow: 0 0 7px rgba(255, 255, 255, .45);
}

.project-orbit-icon i:nth-child(1) { left: 2px; top: 10px; }
.project-orbit-icon i:nth-child(2) { left: 9px; top: 5px; background: var(--v13-pink-soft); }
.project-orbit-icon i:nth-child(3) { right: 2px; bottom: 4px; background: var(--v13-yellow); }

/* Quiet celestial motion: slow, shallow, and disabled when reduced motion is preferred. */
.workspace-body::before {
  animation: v13-star-drift 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
  opacity: .39;
  filter: blur(.22px) drop-shadow(0 0 2px rgba(175, 156, 255, .22));
}

.workspace-body::after {
  position: absolute;
  inset: 70px 0 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(118deg, transparent 13%, rgba(128, 98, 255, .045) 36%, rgba(255, 79, 163, .035) 51%, transparent 74%),
    radial-gradient(ellipse 58% 38% at 16% 24%, rgba(128, 98, 255, .17), transparent 66%),
    radial-gradient(ellipse 32% 24% at 73% 23%, rgba(237, 243, 106, .13), rgba(237, 243, 106, .035) 46%, transparent 72%),
    radial-gradient(ellipse 52% 41% at 82% 57%, rgba(255, 79, 163, .12), transparent 68%),
    radial-gradient(ellipse 42% 30% at 48% 92%, rgba(237, 243, 106, .075), transparent 72%);
  filter: blur(28px);
  opacity: .96;
  pointer-events: none;
  animation: v13-nebula-breathe 20s ease-in-out infinite alternate;
}

.workspace-topbar,
.workspace-content { z-index: 1; }

.workspace-content::before {
  position: absolute;
  z-index: -1;
  top: 42px;
  right: -5%;
  width: min(720px, 72vw);
  aspect-ratio: 1.65;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, transparent 0 45%, rgba(175, 156, 255, .09) 45.25%, transparent 45.7% 60%, rgba(255, 159, 206, .055) 60.25%, transparent 60.7%),
    radial-gradient(circle at 29% 37%, rgba(255, 159, 206, .42) 0 1px, transparent 2.4px),
    radial-gradient(circle at 66% 48%, rgba(237, 243, 106, .34) 0 1px, transparent 2.2px),
    radial-gradient(circle at 78% 24%, rgba(175, 156, 255, .38) 0 1px, transparent 2.3px);
  filter: blur(.18px) drop-shadow(0 0 7px rgba(128, 98, 255, .09));
  opacity: .55;
  transform: rotate(-8deg);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 18%, rgba(0,0,0,.78) 58%, transparent 79%);
  mask-image: radial-gradient(ellipse at center, #000 18%, rgba(0,0,0,.78) 58%, transparent 79%);
}

/* A small yellow cluster keeps the dark sky from feeling empty without sitting behind text. */
.workspace-content::after {
  position: absolute;
  z-index: -1;
  top: 4%;
  right: 2%;
  bottom: auto;
  left: auto;
  width: min(560px, 52vw);
  aspect-ratio: 1.45;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle at 22% 54%, rgba(237, 243, 106, .82) 0 1px, rgba(237, 243, 106, .22) 1.5px, transparent 5px),
    radial-gradient(circle at 37% 31%, rgba(255, 247, 180, .72) 0 1px, rgba(237, 243, 106, .18) 1.5px, transparent 4.5px),
    radial-gradient(circle at 54% 58%, rgba(237, 243, 106, .68) 0 1.2px, rgba(237, 243, 106, .16) 2px, transparent 5px),
    radial-gradient(circle at 68% 38%, rgba(255, 159, 206, .5) 0 1px, transparent 4px),
    radial-gradient(circle at 77% 67%, rgba(237, 243, 106, .62) 0 1px, rgba(237, 243, 106, .14) 2px, transparent 5px),
    radial-gradient(circle at 88% 44%, rgba(255, 247, 180, .56) 0 1px, transparent 4px),
    linear-gradient(17deg, transparent 28%, rgba(237, 243, 106, .075) 28.25%, transparent 28.6% 51%, rgba(237, 243, 106, .055) 51.2%, transparent 51.55%),
    radial-gradient(ellipse at center, rgba(237, 243, 106, .13), rgba(237, 243, 106, .035) 38%, transparent 72%);
  filter: blur(.3px) drop-shadow(0 0 11px rgba(237, 243, 106, .14));
  opacity: .78;
  transform: rotate(-8deg);
  pointer-events: none;
  animation: v13-yellow-cluster 15s ease-in-out infinite alternate;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 14%, rgba(0,0,0,.86) 57%, transparent 79%);
  mask-image: radial-gradient(ellipse at center, #000 14%, rgba(0,0,0,.86) 57%, transparent 79%);
}

@keyframes v13-star-drift {
  from { transform: translate3d(-2px, 1px, 0); opacity: .28; }
  to { transform: translate3d(5px, -4px, 0); opacity: .36; }
}

@keyframes v13-nebula-breathe {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .62; }
  to { transform: translate3d(-5px, 3px, 0) scale(1.015); opacity: .82; }
}

@keyframes v13-yellow-cluster {
  from { transform: translate3d(-2px, 2px, 0) rotate(-8deg); opacity: .62; }
  to { transform: translate3d(4px, -3px, 0) rotate(-7deg); opacity: .82; }
}

/* Identity belongs at the entrance; the mark and promise close the navigation. */
.account-card--top { flex: 0 0 auto; }
.workspace-sidebar > .account-card--top { order: 0 !important; }
.workspace-sidebar > .workspace-nav { order: 1 !important; }
.workspace-sidebar > .workspace-sidebar-bottom { order: 2 !important; margin-top: auto; }
.workspace-brand--bottom {
  border-color: transparent !important;
  background: transparent !important;
  padding: 8px 4px !important;
}

.workspace-brand--bottom .workspace-brand-copy { gap: 1px; }
.brand-trail {
  display: block;
  margin-top: 5px;
  color: var(--v13-pink-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}
.brand-trail b { color: inherit; font-weight: 700; }

/* The optional drawer should be easy to find without competing with the primary save action. */
.capture-details--more {
  border-color: rgba(255, 79, 163, .3) !important;
  background: linear-gradient(115deg, rgba(255, 79, 163, .075), rgba(128, 98, 255, .065)) !important;
  box-shadow: inset 3px 0 rgba(255, 79, 163, .62);
}
.capture-details--more > summary {
  color: var(--v13-pink-soft) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}
.capture-details--more > summary small { color: var(--v13-yellow) !important; }

/* Capture fields: one compact core, followed by expandable groups made for multi-value language. */
.capture-popover .source-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.capture-popover .source-facts > span:first-child { grid-column: auto; }
.capture-popover .metadata-grid { align-items: start; }
.capture-popover .metadata-grid > label {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(38px, auto) 44px;
  align-self: start;
  gap: 6px;
}
.capture-popover .metadata-grid label > span {
  display: grid;
  align-content: end;
  gap: 2px;
}
.capture-popover .metadata-grid label > span small {
  color: var(--v13-muted);
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
}
.moment-field > span small { order: -1; color: var(--v13-pink-soft) !important; font-size: 9.5px !important; letter-spacing: .015em; }

.capture-popover .metadata-grid > .metadata-choice-field {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: minmax(38px, auto) 44px;
  align-self: start;
  gap: 6px;
}
.capture-popover .metadata-choice-field > label {
  min-width: 0;
  display: grid;
  align-content: end;
}
.capture-popover .metadata-choice-field > label > span {
  display: grid;
  align-content: end;
  gap: 2px;
}
.capture-popover .metadata-choice-field > label > span small {
  color: var(--v13-muted);
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
}
.single-choice-editor {
  min-width: 0;
  position: relative;
  height: 44px;
}
.capture-popover .single-choice-editor > input:not([type="hidden"]) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 34px 10px 12px;
  color: var(--v13-paper);
  border: 1px solid rgba(255, 159, 206, .24);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(255, 79, 163, .06), rgba(128, 98, 255, .035)), rgba(7, 6, 10, .62);
  font-size: 13px !important;
  line-height: 1.35;
}
.capture-popover .single-choice-editor > input:not([type="hidden"])::placeholder { color: #756f7b; }
.capture-popover .single-choice-editor > input:not([type="hidden"]):focus {
  outline: 1px solid rgba(255, 159, 206, .68);
  outline-offset: 1px;
}
.single-choice-toggle {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--v13-yellow);
  border: 0;
  border-left: 1px solid rgba(245, 240, 232, .08);
  border-radius: 0 7px 7px 0;
  background: rgba(9, 7, 12, .42);
  font: 14px/1 "IBM Plex Mono", monospace;
  cursor: pointer;
}
.single-choice-toggle:hover,
.single-choice-toggle[aria-expanded="true"] { color: var(--v13-night); background: var(--v13-yellow); }
.single-choice-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 260px);
  max-height: 188px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255, 159, 206, .24);
  border-radius: 12px;
  background: rgba(16, 13, 21, .985);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(18px);
}
.single-choice-editor[data-single-choice="signature"] .single-choice-menu { right: 0; left: auto; }
.single-choice-editor[data-single-choice="genre"] .single-choice-menu { right: auto; left: 0; }
.single-choice-menu[hidden] { display: none; }
.single-choice-menu button {
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  overflow: hidden;
  color: var(--v13-copy);
  border: 1px solid rgba(245, 240, 232, .09);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.single-choice-menu button:hover { color: var(--v13-night); border-color: var(--v13-pink-soft); background: var(--v13-pink-soft); }
.single-choice-menu button.is-selected { color: var(--v13-night); border-color: var(--v13-yellow); background: var(--v13-yellow); }
.single-choice-menu button[hidden] { display: none; }
.single-choice-menu.is-empty::after {
  grid-column: 1 / -1;
  padding: 9px 8px;
  color: var(--v13-yellow);
  content: "Keep this as your own value";
  font: 10px/1.4 "IBM Plex Mono", monospace;
}
.single-choice-menu--keys { grid-template-columns: repeat(3, minmax(0, 1fr)); width: max(100%, 310px); }

/* Keep the empty state in the same visual rhythm as playable audio rows. */
.folder-audio-shelf.is-empty > header { align-items: flex-start; }
.folder-audio-empty {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 11px 13px;
  border: 1px solid rgba(245, 240, 232, .08);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}
.folder-audio-empty-play {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: rgba(16, 13, 21, .88);
  border-radius: 50%;
  background: rgba(255, 159, 206, .72);
  font-size: 11px;
  padding-left: 2px;
}
.folder-audio-empty > span:last-child { min-width: 0; display: grid; gap: 2px; }
.folder-audio-empty strong { color: var(--v13-paper); font-size: 13px; font-weight: 500; }
.folder-audio-empty small { color: var(--v13-muted); font-size: 11.5px; line-height: 1.45; }

@media (max-width: 560px) {
  .single-choice-menu,
  .single-choice-menu--keys { width: min(290px, calc(100vw - 52px)); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.descriptor-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

/* A compact sampler strip: archival, quiet and distinct from a generic streaming player. */
.nova-wave-player {
  --wave-progress: 0%;
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 31px minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid rgba(245, 240, 232, .095);
  border-left-color: rgba(237, 243, 106, .36);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(237, 243, 106, .035), transparent 24%, rgba(255, 79, 163, .025)),
    rgba(7, 6, 10, .56);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.nova-wave-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--v13-night);
  border: 1px solid var(--v13-paper);
  border-radius: 4px;
  background: var(--v13-paper);
  box-shadow: 3px 3px 0 rgba(128, 98, 255, .18);
  font: 9px/1 "IBM Plex Mono", monospace;
}
.nova-wave-toggle:hover { color: #100d15; border-color: var(--v13-pink-soft); background: var(--v13-pink-soft); }
.nova-wave-player.is-playing .nova-wave-toggle { color: #100d15; border-color: var(--v13-yellow); background: var(--v13-yellow); box-shadow: 3px 3px 0 rgba(255, 79, 163, .2); }
.nova-waveform {
  position: relative;
  min-width: 0;
  height: 31px;
  display: flex;
  align-items: center;
  gap: 1.5px;
  overflow: hidden;
  padding: 4px 5px;
  border-top: 1px solid rgba(255, 159, 206, .14);
  border-bottom: 1px solid rgba(255, 159, 206, .09);
  border-radius: 1px;
  background:
    repeating-linear-gradient(90deg, rgba(245, 240, 232, .025) 0 1px, transparent 1px 12px),
    rgba(11, 8, 14, .72);
  opacity: .94;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}
.nova-waveform::before { position: absolute; left: 5px; right: 5px; top: 50%; height: 1px; content: ""; background: rgba(245, 240, 232, .1); }
.nova-waveform::after {
  position: absolute;
  z-index: 2;
  top: 3px;
  bottom: 3px;
  left: var(--wave-progress);
  width: 1px;
  content: "";
  background: var(--v13-yellow);
  box-shadow: 0 0 6px rgba(237, 243, 106, .55);
  opacity: 0;
  transition: left 80ms linear;
}
.nova-wave-player.is-playing .nova-waveform::after { opacity: .9; }
.nova-waveform i {
  position: relative;
  z-index: 1;
  width: 1px;
  height: var(--wave-height);
  min-height: 4px;
  flex: 1 1 1px;
  border-radius: 0;
  background: rgba(245, 240, 232, .67);
  box-shadow: none;
  transform-origin: center;
}
.nova-waveform i:nth-child(4n) { background: rgba(255, 159, 206, .78); }
.nova-waveform i:nth-child(11n) { background: rgba(237, 243, 106, .72); }
.nova-wave-player.is-playing .nova-waveform i { animation: v13-wave-pulse .58s ease-in-out infinite alternate; }
.nova-wave-player.is-playing .nova-waveform i:nth-child(3n) { animation-delay: -.21s; }
.nova-wave-player.is-playing .nova-waveform i:nth-child(4n) { animation-delay: -.38s; }
.nova-wave-time { min-width: 48px; color: var(--v13-yellow); font: 10px/1.2 "IBM Plex Mono", monospace; text-align: right; letter-spacing: .035em; }
.nova-wave-player audio { display: none; }
@keyframes v13-wave-pulse { to { transform: scaleY(.68); opacity: .72; } }

.attachment-card--audio .nova-wave-player { margin-top: 13px; padding-top: 10px; border-top: 1px solid rgba(245, 240, 232, .07); }
.derived-version-item .nova-wave-player { width: 100%; }

.descriptor-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(175, 156, 255, .16);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}

.descriptor-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--v13-paper);
  cursor: pointer;
  list-style: none;
}
.descriptor-card > summary::-webkit-details-marker { display: none; }
.descriptor-card > summary::after { content: "+"; color: var(--v13-pink-soft); font-size: 17px; font-weight: 300; }
.descriptor-card[open] > summary::after { content: "−"; }
.descriptor-card > summary > span { display: grid; gap: 3px; }
.descriptor-card > summary strong,
.descriptor-heading strong { color: var(--v13-paper); font-size: 14px; font-weight: 500; }
.descriptor-card > summary small,
.descriptor-heading small { color: var(--v13-muted); font-size: 12px; line-height: 1.42; }
.descriptor-card > summary em,
.descriptor-heading > span { color: var(--v13-yellow); font: 10px/1.35 "IBM Plex Mono", monospace; font-style: normal; }

.descriptor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.descriptor-heading > div { display: grid; gap: 3px; }

.descriptor-card > input,
.descriptor-mini > input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--v13-paper);
  border: 1px solid rgba(245, 240, 232, .12);
  border-radius: 11px;
  background: rgba(7, 6, 10, .5);
  font-size: 13px;
}
.descriptor-card input::placeholder { color: #756d7b; }

.descriptor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 240, 232, .07);
}

.descriptor-mini { min-width: 0; display: grid; align-content: start; gap: 7px; }
.descriptor-mini--wide { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid rgba(245, 240, 232, .07); }
.descriptor-mini > label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--v13-copy); font-size: 12px; }
.descriptor-mini > label small { color: var(--v13-muted); font-size: 10px; }

.descriptor-common,
.tag-bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.descriptor-common button,
.tag-bank-list button,
.detected-tags--mine button {
  min-height: 31px;
  padding: 5px 9px;
  color: var(--v13-copy);
  border: 1px solid rgba(245, 240, 232, .11);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: 11px;
}
.descriptor-common button:hover,
.descriptor-common button.is-selected,
.tag-bank-list button:hover,
.tag-bank-list button.is-selected { color: #100d15; border-color: var(--v13-yellow); background: var(--v13-yellow); }
.tag-bank { border: 0; }
.tag-bank > summary { padding: 2px 0; color: var(--v13-pink-soft); font-size: 11px; cursor: pointer; }
.tag-bank-list { max-height: 146px; overflow-y: auto; margin-top: 7px; padding-right: 3px; }

.origin-block--suggestions { border-color: rgba(128, 98, 255, .18); background: rgba(128, 98, 255, .04); }
.detected-tags--mine:empty { display: none; }
.detected-tags--mine button { color: #100d15; border-color: var(--v13-pink-soft); background: var(--v13-pink-soft); }
.prototype-audio-note { margin-top: 7px !important; color: var(--v13-yellow) !important; font: 10px/1.4 "IBM Plex Mono", monospace !important; }

/* The Galaxy exposes stable decision fields first, with optional source/admin filters below. */
.library-toolbar--tiered {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(300px, 1fr) minmax(380px, 1.25fr);
  align-items: stretch;
  gap: 10px;
}
.library-toolbar--tiered .library-search-control { min-height: 76px; }
.filter-tier {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 19px 8px 8px;
  border: 1px solid rgba(245, 240, 232, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .018);
}
.filter-tier--sound { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-tier legend {
  margin-left: 7px;
  padding: 0 6px;
  color: var(--v13-yellow);
  font: 10px "IBM Plex Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.library-toolbar--tiered .filter-control { min-height: 54px; }
.library-more-filters {
  grid-column: 1 / -1;
  border: 1px solid rgba(245, 240, 232, .09);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
}
.library-more-filters > summary { padding: 11px 13px; color: var(--v13-copy); font-size: 13px; cursor: pointer; }
.library-more-filters > summary small { margin-left: 8px; color: var(--v13-muted); font-size: 11px; }
.library-more-filters > div { display: grid; grid-template-columns: 1.4fr .65fr .65fr 1fr; gap: 8px; padding: 0 8px 8px; }
.library-more-filters input { width: 100%; min-height: 30px; padding: 2px 0 0; color: var(--v13-paper); border: 0; background: transparent; font-size: 14px; }
.filter-rationale {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 3px;
  color: var(--v13-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Map semantics and drag affordance. */
.sample-sky-viewport {
  position: relative;
  overflow: auto hidden;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 159, 206, .35) transparent;
}
.sample-sky-viewport.is-panning { cursor: grabbing; user-select: none; }
.sample-sky-viewport:focus-visible { outline: 1px solid var(--v13-pink-soft); outline-offset: -2px; }
.sample-sky-viewport .sample-sky-canvas { min-width: 980px; }
.sample-star.source-lead-only .sample-star-glyph { color: var(--v13-paper); opacity: .82; }
.sample-star.has-local-audio .sample-star-glyph { color: var(--v13-violet); filter: drop-shadow(0 0 10px rgba(128, 98, 255, .55)); }
.sample-star--good::after {
  position: absolute;
  inset: -6px;
  content: "";
  border: 1px solid rgba(237, 243, 106, .72);
  border-radius: 50%;
  pointer-events: none;
}
.sample-star--warn::before,
.sample-star--risk::before {
  position: absolute;
  right: -8px;
  top: -8px;
  z-index: 2;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  content: "!";
  color: #130e16;
  border-radius: 50%;
  background: var(--v13-pink);
  font: 700 10px "IBM Plex Mono", monospace;
}
.key-source { color: var(--v13-paper); }
.key-audio { color: var(--v13-violet); }
.key-evidence { color: var(--v13-yellow); border: 1px solid rgba(237, 243, 106, .72); border-radius: 50%; }
.sky-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 390px; }

/* Processed versions sit inside a connection, so nested sampling stays traceable. */
.folder-relationship-card .derived-version-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 240, 232, .08);
}
.derived-version-heading { color: var(--v13-yellow); font: 10px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.derived-version-item {
  display: grid;
  grid-template-columns: 24px minmax(180px, 1fr) minmax(220px, .7fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(128, 98, 255, .18);
  border-radius: 12px;
  background: rgba(128, 98, 255, .055);
}
.derived-version-mark { color: var(--v13-pink-soft); font-size: 18px; }
.derived-version-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.derived-version-item strong { overflow: hidden; color: var(--v13-paper); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.derived-version-item small { color: var(--v13-muted); font-size: 11px; }
.derived-version-item p { margin: 0; color: var(--v13-copy); font-size: 12px; line-height: 1.4; }
.derived-version-item audio { width: 100%; height: 36px; accent-color: var(--v13-pink); }
.relationship-card-actions .is-accent { color: var(--v13-yellow); border-color: rgba(237, 243, 106, .24); }
.relationship-constellation line.derived-line { stroke: var(--v13-yellow); stroke-dasharray: 2 5; opacity: .72; }
.relationship-star-node.is-derived > span { color: var(--v13-yellow); border-style: dashed; border-color: rgba(237, 243, 106, .5); }

.derived-parent-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 9px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(175, 156, 255, .17);
  border-radius: 15px;
  background: rgba(128, 98, 255, .045);
}
.derived-parent-strip > span { min-width: 0; display: grid; gap: 4px; }
.derived-parent-strip small { color: var(--v13-muted); font-size: 10px; }
.derived-parent-strip strong { overflow: hidden; color: var(--v13-paper); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.derived-parent-strip > i,
.derived-parent-strip > b { color: var(--v13-pink-soft); font-style: normal; font-weight: 400; }
.derived-parent-strip .is-result { padding: 8px; border-radius: 10px; background: rgba(237, 243, 106, .07); }
.derived-parent-strip .is-result small { color: var(--v13-yellow); }

.lineage-panel > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.lineage-panel > div > button { min-width: 180px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px; color: var(--v13-paper); border: 1px solid rgba(175, 156, 255, .17); border-radius: 12px; background: rgba(128, 98, 255, .045); text-align: left; }
.lineage-panel .asset-art { width: 38px; height: 38px; border-radius: 10px; }
.lineage-panel > div > i { color: var(--v13-yellow); font-style: normal; }

/* Readable final-product type sizes. */
.workspace-content .page-header p { font-size: 14px; line-height: 1.6; }
.workspace-nav-item .nav-copy small { font-size: 11px; }
.asset-primary span,
.asset-secondary span,
.asset-evidence span { font-size: 12px; }
.folder-relationship-panel > header p { font-size: 14px; }
.relationship-sound strong { font-size: 13px; }
.relationship-bridge > span,
.relationship-bridge small { font-size: 12px; }
.folder-list-heading > span { font-size: 12px; }

/* The workflow is explanatory UI, so its type cannot behave like tiny metadata. */
.flight-route { width: 100%; min-width: 0; overflow-x: auto; padding-bottom: 10px; }
.flight-route-step { min-width: 108px; flex: 1 1 108px; gap: 7px; }
.flight-route-line { min-width: 14px; flex: 1 1 24px; }
.flight-route-step strong { font-size: 14px; line-height: 1.3; }
.flight-route-step small { font-size: 12px; line-height: 1.35; }
.flight-route-index { font-size: 10.5px; }
.flight-orbit-step strong { font-size: 14px; }
.flight-orbit-step small { font-size: 11.5px; }
.guide-step-detail dt { font-size: 11px; }
.guide-step-detail dd { font-size: 14px; }

@media (max-width: 1220px) {
  .library-toolbar--tiered { grid-template-columns: 1fr 1fr; }
  .library-toolbar--tiered .library-search-control { grid-column: 1 / -1; min-height: 60px; }
  .filter-tier--sound { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .workspace-brand--bottom { width: 42px; }
  .workspace-brand--bottom .workspace-brand-copy { display: none; }
  .library-toolbar--tiered { grid-template-columns: 1fr; }
  .library-toolbar--tiered .library-search-control { grid-column: auto; }
  .filter-tier--sound { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-more-filters > div { grid-template-columns: 1fr 1fr; }
  .derived-version-item { grid-template-columns: 24px minmax(0, 1fr); }
  .derived-version-item audio,
  .derived-version-file-note { grid-column: 2; }
  .derived-version-item .nova-wave-player { grid-column: 2; }
  .workspace-sidebar > .account-card--top { grid-column: 1; }
  .workspace-sidebar > .workspace-nav { grid-column: 2; }
  .workspace-sidebar > .workspace-sidebar-bottom { grid-column: 3; margin-top: 0; }
}

@media (max-width: 560px) {
  .prototype-steps {
    width: calc(100% - 24px);
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    justify-content: stretch;
    gap: 6px 8px;
    overflow: visible;
    font-size: 10px;
    white-space: normal;
  }
  .prototype-steps span:first-child { grid-column: 1 / -1; }
  .prototype-steps i { display: none; }
  .prototype-steps strong { align-self: center; }
  .host-page { padding-top: 10px !important; }
  .companion { width: 64px !important; height: 268px !important; }
  .companion::before { width: 58px !important; height: 262px !important; border-radius: 30px !important; }
  .dock-actions { right: 15px !important; bottom: 49px !important; gap: 3px !important; }
  .dock-action { width: 34px !important; height: 34px !important; }
  .companion[data-panel-open="true"] { opacity: 0; pointer-events: none; }
  .prototype-caption {
    left: 12px;
    bottom: 14px;
    max-width: calc(100vw - 88px);
    display: flex;
    align-items: flex-start;
    padding: 7px 9px;
    border-radius: 14px;
    font-size: 10.5px;
    line-height: 1.4;
  }
  .workspace-nav-item .nav-copy {
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: grid !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
  }
  .workspace-nav-item .nav-copy strong { font-size: 10.5px !important; line-height: 1.15; }
  .workspace-nav-item .nav-copy small { display: none; }
  .companion.is-flipped .dock-actions { top: 49px !important; bottom: auto !important; }
  .descriptor-grid { grid-template-columns: 1fr; }
  .descriptor-card > summary { align-items: flex-start; }
  .descriptor-card > summary em { display: none; }
  .filter-tier,
  .filter-tier--sound,
  .library-more-filters > div { grid-template-columns: 1fr; }
  .sky-legend { grid-template-columns: 1fr; min-width: 0; width: 100%; }
  .sample-sky-viewport .sample-sky-canvas { min-width: 760px; }
  .derived-parent-strip { grid-template-columns: 1fr; }
  .derived-parent-strip > i,
  .derived-parent-strip > b { transform: rotate(90deg); justify-self: center; }
  .derived-version-item { grid-template-columns: 1fr; }
  .derived-version-item audio,
  .derived-version-file-note { grid-column: auto; }
  .derived-version-item .nova-wave-player { grid-column: auto; }
  .nova-wave-player { grid-template-columns: 34px minmax(96px, 1fr); }
  .nova-wave-time { grid-column: 2; text-align: left; }
  .flight-route-step { min-width: 118px; flex: 0 0 118px; }
  .flight-route-line { min-width: 20px; flex: 0 0 20px; }
}

@media (max-width: 480px) {
  .browser-chrome .source-switcher > span { display: none; }
  .browser-chrome .source-switcher { padding-left: 7px; }
  .browser-chrome .source-switcher select { font-size: 11.5px; }
  .sample-sky-head > div { min-width: 0; width: 100%; }
  .sample-sky-head h2 { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-body::before,
  .workspace-body::after,
  .workspace-content::after { animation: none !important; }
}
