.studio-locked body { visibility: hidden !important; pointer-events: none !important; }
:root {
  color-scheme: dark;
  --paper: #000000;
  --paper-deep: #000000;
  --surface: #0a0a0b;
  --surface-raised: #111113;
  --ink: #f4f3f0;
  --muted: #aaa9a5;
  --faint: #85837f;
  --line: #27272a;
  --line-strong: #626269;
  --accent: #f2f0eb;
  --accent-bright: #ffffff;
  --accent-soft: #18181b;
  --accent-glow: rgba(242, 240, 235, 0.14);
  --accent-ring: rgba(242, 240, 235, 0.62);
  --success: #4de3c2;
  --warning: #ffad42;
  --danger: #ff6b9d;
  --blue: #3b82f6;
  --plum: #ff72b7;
  --on-accent: #080808;
  --placeholder: #7d7c78;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.62);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper-deep);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html.frame-check-pending {
  visibility: hidden;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--paper-deep);
  scroll-padding-bottom: calc(152px + env(safe-area-inset-bottom));
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

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

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
[contenteditable="true"]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}

::selection {
  color: var(--paper-deep);
  background: var(--warning);
}

button,
summary {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: calc(8px + env(safe-area-inset-top));
  left: 8px;
  padding: 10px 14px;
  color: var(--paper-deep);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
}

main {
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

body.has-persistent-player main {
  padding-bottom: calc(148px + env(safe-area-inset-bottom));
}

.view {
  display: none;
  width: 100%;
  padding: calc(24px + env(safe-area-inset-top)) 20px 28px;
  animation: view-in 240ms ease both;
}

.view.is-active {
  display: block;
}

.view:focus {
  outline: 0;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-heading {
  max-width: 620px;
}

.create-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.create-heading h1 { margin: 0; font-size: 30px; }
.create-heading .text-button { color: var(--muted); }

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

.create-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  transition: background 140ms ease, border-color 140ms ease;
}

.create-action:active { background: var(--surface-raised); border-color: var(--muted); }
.create-action svg { width: 24px; height: 24px; margin-bottom: 8px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.create-action strong { font-size: 14px; font-weight: 600; }
.create-action small { font-size: 11px; color: var(--muted); }
.create-recent { margin-top: 30px; }
.create-recent h2 { color: var(--muted); font-family: var(--sans); font-size: 12px; letter-spacing: 0; }
.create-recent-project {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  min-height: 72px;
  padding: 16px 0;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.create-recent-project strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 550; }
.create-recent-project span { color: var(--muted); font-size: 11px; }
.import-project-name { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.project-empty { padding: 28px 0; color: var(--muted); font-size: 14px; }
.create-dialog { max-height: 90dvh; overflow-y: auto; }
.create-dialog select, .create-dialog textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}
.create-dialog textarea { resize: vertical; }
.create-dialog .primary-action { margin-top: 22px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-bright);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 540px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.refine-dialog textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  resize: none;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
}

.refine-dialog textarea::placeholder {
  color: var(--placeholder);
}

.refine-dialog textarea:focus {
  outline: 0;
}

.play-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.play-button:active {
  transform: scale(0.96);
}

.play-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.refine-options button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.refine-options button:active {
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.section-heading,
.page-heading.projects-heading,
.studio-heading,
.dialog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-button {
  min-height: 44px;
  padding: 0;
  color: var(--accent-bright);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.chevron {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-heading {
  align-items: center;
  margin-bottom: 18px;
}

#view-studio {
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

.studio-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.studio-heading h1 {
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  font-size: 28px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 14px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.play-button {
  width: 52px;
  height: 52px;
  color: var(--on-accent);
  background: var(--accent);
}

.pause-icon,
.play-button.is-playing .play-icon {
  display: none;
}

.play-button.is-playing .pause-icon {
  display: block;
}

.transport-label {
  display: block;
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tempo-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tempo-control button,
.key-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.tempo-control button {
  font-size: 21px;
}

.tempo-control output,
.key-button {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.key-detail {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}

.key-button {
  padding: 0;
}

.step-legend {
  display: flex;
  justify-content: space-between;
  margin: 22px 2px 10px;
  color: var(--muted);
  font-size: 12px;
}

.sequencer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 10px;
}

.track-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 13px 12px 12px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.track-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.track-swatch {
  width: 9px;
  height: 9px;
  background: var(--track-color);
  border-radius: 50%;
}

.track-actions {
  display: flex;
  gap: 5px;
}

.track-actions button {
  min-width: 44px;
  min-height: 44px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.track-actions button[aria-pressed="true"] {
  color: var(--accent-bright);
  background: var(--accent-soft);
}

.steps-scroll {
  width: calc(100% + 24px);
  max-width: calc(100% + 24px);
  margin: -3px -12px;
  padding: 3px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.steps-scroll::-webkit-scrollbar {
  display: none;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(16, 44px);
  gap: 6px;
  width: max-content;
}

.step {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
}

.step:nth-child(4n + 1)::after {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 3px;
  height: 3px;
  background: var(--line-strong);
  border-radius: 50%;
  content: "";
  transform: translateX(-50%);
}

.step.is-on {
  background: var(--track-color);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 0 12px color-mix(in srgb, var(--track-color) 20%, transparent);
}

.step.is-current {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink);
}

.track-card.is-muted .track-title {
  opacity: 0.48;
}

.refine-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.refine-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: 13px;
}

.refine-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.refine-card strong,
.refine-card small {
  display: block;
}

.export-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 12px;
}

.export-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.export-action:disabled {
  opacity: 0.58;
  cursor: wait;
}

.audio-export-ready {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.audio-export-ready[hidden] {
  display: none;
}

.audio-export-ready strong,
.audio-export-ready span {
  display: block;
}

.audio-export-ready strong {
  margin-bottom: 3px;
  font-family: var(--serif);
}

.audio-export-ready span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.audio-export-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.audio-export-actions .secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
}

.refine-card strong {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 15px;
}

.refine-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.page-heading {
  margin-bottom: 8px;
}

.page-heading h1 {
  margin-bottom: 14px;
}

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

.mixer-tile {
  position: relative;
  display: grid;
  grid-template-rows: 44px minmax(68px, 1fr);
  min-width: 0;
  min-height: 128px;
  gap: 0;
  padding: 8px 10px;
  overflow: hidden;
  color: var(--ink);
  background: #070708;
  border: 1px solid color-mix(in srgb, var(--track-color) 14%, var(--line));
  border-radius: 16px;
  contain: paint;
  contain-intrinsic-size: auto 128px;
  content-visibility: auto;
  cursor: pointer;
  isolation: isolate;
  scroll-margin-bottom: calc(152px + env(safe-area-inset-bottom));
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mixer-tile::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: #000000;
  border-radius: inherit;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mixer-tile-header,
.mixer-gesture {
  position: relative;
  z-index: 1;
}

.mixer-tile.is-active,
.mixer-tile:focus-within {
  background: color-mix(in srgb, var(--track-color) 3%, #070708);
  border-color: color-mix(in srgb, var(--track-color) 52%, var(--line));
  outline: 0;
}

.mixer-native-range:focus-visible {
  outline: 0;
}

.mixer-tile:has(.mixer-native-range:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--track-color) 76%, white);
  outline-offset: 2px;
}

.mixer-tile.is-adjusting {
  border-color: color-mix(in srgb, var(--track-color) 76%, white);
}

.mixer-tile-header {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mixer-tile-label {
  display: flex;
  min-width: 0;
  align-items: center;
}

.mixer-tile-label strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mixer-gesture {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 8px;
  cursor: ns-resize;
  touch-action: none;
}

.mixer-amount {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1;
}

.mixer-amount-unit {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 9px;
  font-weight: 680;
  letter-spacing: 0;
}

.mixer-hint {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.mixer-mode-buttons {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  margin-right: -5px;
}

.mix-mode-button {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, 0.58);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.48) 0 15px, transparent 15.5px);
  border: 0;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.mix-mode-button:hover {
  color: var(--ink);
}

.mix-mode-button:focus-visible {
  color: var(--ink);
  outline: 2px solid color-mix(in srgb, var(--track-color) 76%, white);
  outline-offset: -7px;
}

.mix-mode-button[aria-pressed="true"] {
  color: color-mix(in srgb, var(--track-color) 82%, white);
  background: radial-gradient(circle, color-mix(in srgb, var(--track-color) 18%, rgba(0, 0, 0, 0.62)) 0 15px, transparent 15.5px);
}

.mixer-tile.is-muted .mixer-amount {
  color: rgba(255, 255, 255, 0.44);
}

.mixer-tile.is-solo-suppressed .mixer-amount,
.mixer-tile.is-solo-suppressed .mixer-hint {
  color: rgba(255, 255, 255, 0.32);
}

.mixer-tile-header,
.mixer-gesture {
  opacity: 1;
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mixer-tile.is-solo-suppressed::after {
  opacity: 0.68;
}

.mixer-tile.is-solo-suppressed .mixer-tile-header,
.mixer-tile.is-solo-suppressed .mixer-gesture {
  opacity: 0.48;
}

.mixer-tile.is-soloed {
  border-color: color-mix(in srgb, var(--track-color) 62%, white);
}

.secondary-action,
.primary-action,
.primary-small {
  min-height: 48px;
  padding: 0 19px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.secondary-action {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
}

#reset-mix {
  width: 100%;
  margin-top: 18px;
}

.primary-action,
.primary-small {
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.primary-small {
  min-height: 44px;
  padding: 0 17px;
}

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

.projects-heading h2 {
  margin: 0;
  font-size: 21px;
}

.workspace-section {
  margin-top: 28px;
}

.workspace-status {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.4;
}

.workspace-kicker {
  margin: 30px 0 0;
  color: var(--faint);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.projects-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 12px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.project-load {
  min-width: 0;
  min-height: 50px;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
}

.project-load strong,
.project-load span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-load strong {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 16px;
}

.project-load span {
  color: var(--muted);
  font-size: 12px;
}

.project-delete {
  width: 44px;
  height: 44px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.project-delete svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.empty-state {
  padding: 32px 24px;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
}

.empty-state h2 {
  font-size: 19px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.offline-card {
  display: grid;
  gap: 18px;
  margin-top: 10px;
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.account-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.sync-card {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.sync-card h2 {
  margin-bottom: 7px;
  font-size: 19px;
}

.sync-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sync-card .secondary-action {
  width: 100%;
}

.settings-card {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.settings-card h2 {
  margin-bottom: 8px;
  font-size: 19px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 70px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.setting-row > div:first-child {
  min-width: 0;
}

.setting-row strong,
.setting-row span {
  display: block;
}

.setting-row strong {
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
}

.setting-row > div:first-child > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.setting-segment {
  display: flex;
  overflow: hidden;
  background: #050506;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.setting-segment button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 760;
}

.setting-segment button + button {
  border-left: 1px solid var(--line);
}

.setting-segment button[aria-pressed="true"] {
  color: var(--paper-deep);
  background: var(--ink);
}

.setting-switch {
  position: relative;
  width: 52px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
}

.setting-switch::before {
  position: absolute;
  top: 11px;
  right: 0;
  left: 0;
  height: 22px;
  background: var(--line-strong);
  border-radius: 999px;
  content: "";
  transition: background-color 160ms ease;
}

.setting-switch span {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 160ms ease, background-color 160ms ease;
}

.setting-switch[aria-checked="true"]::before {
  background: color-mix(in srgb, var(--success) 44%, var(--surface));
}

.setting-switch[aria-checked="true"] span {
  background: var(--success);
  transform: translateX(30px);
}

.setting-switch:focus-visible {
  outline-offset: 0;
}

.account-card-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: 50%;
}

.account-card-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-card-mark.is-signed-in {
  color: var(--on-accent);
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-card h2 {
  margin-bottom: 7px;
  font-size: 20px;
}

.account-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.account-card .secondary-action {
  grid-column: 1 / -1;
  width: 100%;
}

.offline-card h2 {
  font-size: 21px;
}

.offline-card p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.offline-card .secondary-action {
  width: 100%;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.offline-card[hidden] {
  display: none;
}

.about-details {
  margin-top: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.about-details summary {
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.about-details p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.about-details .fine-print {
  margin-bottom: 0;
  color: var(--faint);
  font-size: 11px;
}

.click-audition > span:last-child {
  min-width: 0;
}

.click-audition strong,
.click-audition small {
  display: block;
}

.stem-import-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--success);
  background: rgba(77, 227, 194, 0.08);
  border: 1px solid rgba(77, 227, 194, 0.22);
  border-radius: 12px;
}

.stem-import-icon svg,
.back-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.import-view {
  padding-top: calc(16px + env(safe-area-inset-top));
}

.import-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.import-heading h1 {
  font-size: clamp(27px, 7vw, 34px);
}

.back-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.import-panel {
  margin-top: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.import-panel > .primary-action,
.import-panel > .secondary-action {
  width: 100%;
}

.import-panel-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.import-panel-heading > div {
  min-width: 0;
}

.import-panel-heading h2 {
  margin-bottom: 5px;
  font-size: 18px;
}

.import-panel-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stage-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--success);
  background: rgba(77, 227, 194, 0.08);
  border: 1px solid rgba(77, 227, 194, 0.18);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.file-picker {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 56px;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 7px;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker:focus-within {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}

.file-picker-action {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 13px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
}

#stem-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-panel .fine-print {
  margin: 10px 0 14px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
}

.process-state {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 6px;
  padding: 5px 8px;
  color: var(--success);
  background: rgba(77, 227, 194, 0.08);
  border: 1px solid rgba(77, 227, 194, 0.18);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.process-panel {
  --process-motion-color: var(--success);
  --process-motion-glow: rgba(77, 227, 194, 0.38);
  position: relative;
}

.process-panel[data-status="inspect_queued"],
.process-panel[data-status="analysis_queued"],
.process-panel[data-status="proposal_queued"],
.process-panel[data-status="render_queued"] {
  --process-motion-color: var(--warning);
  --process-motion-glow: rgba(255, 173, 66, 0.34);
}

.process-panel[data-status="proposing"],
.process-panel[data-status="rendering"] {
  --process-motion-color: var(--danger);
  --process-motion-glow: rgba(255, 107, 157, 0.32);
}

.process-panel[data-kind="active"] .process-state::before {
  width: 5px;
  height: 5px;
  background: var(--process-motion-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--process-motion-glow);
  content: "";
  animation: process-pulse 1.4s ease-in-out infinite;
}

.process-state[data-kind="waiting"] {
  color: var(--warning);
  background: rgba(255, 173, 66, 0.08);
  border-color: rgba(255, 173, 66, 0.2);
}

.process-state[data-kind="terminal"] {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: var(--line-strong);
}

.process-progress {
  margin-top: 16px;
}

.process-progress-track {
  height: 4px;
  overflow: hidden;
  background: var(--line);
  border-radius: 999px;
}

.process-progress-track span {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
  border-radius: inherit;
  transition: width 160ms linear;
}

.process-panel[data-kind="active"] .process-progress-track span::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28px;
  background: rgba(255, 255, 255, 0.58);
  content: "";
  transform: translateX(-36px) skewX(-18deg);
  animation: process-progress-glint 1.9s ease-in-out infinite;
}

.process-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.indeterminate-copy {
  position: relative;
  overflow: hidden;
  margin: 14px 0 0;
  padding: 10px 12px;
  color: var(--muted);
  background: var(--paper);
  border-left: 2px solid var(--warning);
  font-size: 11px;
  line-height: 1.45;
}

.process-panel[data-kind="active"] .indeterminate-copy::before {
  position: absolute;
  top: 0;
  left: -2px;
  width: 2px;
  height: 14px;
  background: var(--process-motion-color);
  box-shadow: 0 0 9px var(--process-motion-glow);
  content: "";
  transform: translateY(-18px);
  animation: process-scan 2.2s ease-in-out infinite;
}

.process-events {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.process-event {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-transform: capitalize;
}

.process-event-marker {
  width: 6px;
  height: 6px;
  background: var(--faint);
  border-radius: 50%;
}

.process-event.is-completed .process-event-marker,
.process-event.is-approved .process-event-marker {
  background: var(--success);
  box-shadow: 0 0 8px rgba(77, 227, 194, 0.35);
}

.process-event.is-failed .process-event-marker {
  background: var(--danger);
}

.process-event.is-current {
  color: var(--ink);
}

.process-event.is-current .process-event-marker {
  background: var(--process-motion-color);
  box-shadow: 0 0 0 0 var(--process-motion-glow);
  animation: process-marker-pulse 1.7s ease-out infinite;
}

.import-panel button.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.import-panel button.is-busy::after {
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  opacity: 0.68;
  animation: process-button-spin 800ms linear infinite;
}

.cancel-import.is-busy {
  display: flex;
  width: max-content;
}

@keyframes process-pulse {
  0%, 100% { opacity: 0.42; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes process-progress-glint {
  0%, 18% { opacity: 0; transform: translateX(-36px) skewX(-18deg); }
  42% { opacity: 0.7; }
  76%, 100% { opacity: 0; transform: translateX(2400%) skewX(-18deg); }
}

@keyframes process-scan {
  0%, 10% { opacity: 0; transform: translateY(-18px); }
  30% { opacity: 0.72; }
  80% { opacity: 0.4; transform: translateY(66px); }
  100% { opacity: 0; transform: translateY(66px); }
}

@keyframes process-marker-pulse {
  0% { box-shadow: 0 0 0 0 var(--process-motion-glow); }
  65%, 100% { box-shadow: 0 0 0 5px transparent; }
}

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

.cancel-import {
  display: block;
  min-height: 44px;
  margin: 8px auto -8px;
  color: var(--faint);
}

.stem-review-list,
.region-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.stem-review-row {
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.stem-review-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.stem-review-heading strong,
.stem-review-heading span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stem-review-heading strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.stem-review-heading span {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.stem-included,
.confirmation-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--success);
}

.stem-review-controls,
.proposal-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.46fr);
  gap: 8px;
  margin-top: 10px;
}

.stem-review-controls label,
.proposal-controls label,
.field-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stem-review-controls select,
.stem-review-controls input,
.proposal-controls select,
.proposal-controls input,
#stem-reference-method,
.grid-event-row select,
.grid-event-row input,
.grid-settings select,
.grid-settings input {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px;
}

.stem-hash {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-label {
  margin-top: 16px;
}

#stem-reference-method {
  margin-top: 6px;
}

.confirmation-list {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.confirmation-list legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.confirmation-list label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.analysis-issue {
  margin-top: 14px;
  padding: 12px;
  color: var(--warning);
  background: rgba(255, 173, 66, 0.07);
  border: 1px solid rgba(255, 173, 66, 0.22);
  border-radius: 12px;
}

.timing-suggestion {
  position: relative;
  margin-top: 14px;
  padding: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(77, 227, 194, 0.1), transparent 42%),
    radial-gradient(circle at 96% 100%, rgba(255, 107, 157, 0.08), transparent 44%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.timing-suggestion-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timing-suggestion-label i {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(77, 227, 194, 0.42);
}

.timing-suggestion[data-state="loading"] .timing-suggestion-label i {
  animation: process-pulse 1.4s ease-in-out infinite;
}

.timing-suggestion[data-state="ambiguous"] .timing-suggestion-label {
  color: var(--warning);
}

.timing-suggestion[data-state="manual"] .timing-suggestion-label {
  color: var(--danger);
}

.timing-suggestion strong {
  display: block;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.timing-suggestion p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.analysis-issue strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.analysis-issue p,
.grid-editor > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.grid-editor {
  margin-top: 12px;
  padding: 0 12px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.grid-editor summary {
  min-height: 48px;
  padding: 15px 0;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.grid-editor summary:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}

.grid-event-list {
  display: grid;
  max-height: 360px;
  gap: 5px;
  margin-top: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.grid-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.grid-settings label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grid-settings label:last-child {
  grid-column: 1 / -1;
}

.grid-event-row {
  display: grid;
  grid-template-columns: 24px minmax(82px, 0.8fr) minmax(94px, 1fr) 44px;
  gap: 5px;
  align-items: center;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.grid-event-row.is-flagged {
  background: rgba(255, 173, 66, 0.06);
  border-color: rgba(255, 173, 66, 0.2);
}

.grid-event-number {
  color: var(--faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.grid-event-remove {
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 22px;
}

.add-grid-event {
  width: 100%;
  margin-top: 10px;
}

.reset-grid {
  display: block;
  min-height: 44px;
  margin: 5px auto -5px;
  padding: 0 8px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.proposal-controls {
  margin: 14px 0;
}

.proposal-controls.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.advanced-mode-control {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advanced-mode-control select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px;
  text-transform: none;
}

.click-audition {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
}

.click-audition:disabled {
  opacity: 0.55;
}

.click-audition-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 900;
}

.click-audition strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.click-audition small {
  color: var(--muted);
  font-size: 10px;
}

.region-card {
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.region-card.is-flagged {
  border-color: rgba(255, 173, 66, 0.34);
}

.region-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.region-heading strong {
  font-family: var(--serif);
  font-size: 14px;
}

.region-heading span {
  padding: 4px 7px;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.region-card.is-flagged .region-heading span {
  color: var(--warning);
  background: rgba(255, 173, 66, 0.09);
}

.region-card > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

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

.region-metrics > div {
  min-width: 0;
  padding: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.region-metrics dt,
.region-metrics dd {
  margin: 0;
}

.region-metrics dt {
  color: var(--faint);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.region-metrics dd {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ready-panel {
  text-align: center;
}

.ready-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  color: var(--paper-deep);
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(77, 227, 194, 0.15);
  font-size: 20px;
  font-weight: 900;
}

.ready-panel > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tempo-control.is-readonly button {
  display: none;
}

.tempo-control.is-readonly {
  justify-content: flex-start;
}

.stem-studio {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

.studio-window-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px;
  background: #050506;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.studio-window-actions,
.studio-window-size,
.studio-window-navigation {
  display: grid;
  min-width: 0;
}

.studio-window-actions {
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 6px;
}

.studio-window-size {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px;
  background: var(--paper-deep);
  border-radius: 10px;
}

.studio-window-navigation {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
}

.studio-window-size button,
.studio-window-loop,
.studio-window-navigation button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 5px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  touch-action: manipulation;
}

.studio-window-size button[aria-pressed="true"],
.studio-window-loop[aria-pressed="true"] {
  color: #050506;
  background: var(--ink);
}

.studio-window-loop {
  border: 1px solid var(--line);
}

.studio-window-loop:disabled {
  opacity: 0.36;
}

.studio-window-navigation button {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.studio-window-navigation button:disabled {
  opacity: 0.24;
}

.studio-window-navigation output {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stem-arrangement {
  display: grid;
  grid-template-columns: repeat(var(--studio-columns, 1), minmax(0, 1fr));
  align-items: start;
  gap: 7px;
}

.arrangement-track {
  display: grid;
  grid-template-rows: 25px 50px;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 5px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.arrangement-track-heading {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-content: center;
  column-gap: 6px;
  min-width: 0;
  padding: 0 3px;
}

.arrangement-track-heading .track-swatch {
  grid-row: 1 / span 2;
  align-self: center;
  width: 8px;
  height: 8px;
}

.arrangement-track-heading strong,
.arrangement-track-heading > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrangement-track-heading strong {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 600;
}

.arrangement-track-heading > span:last-child {
  color: var(--faint);
  font-size: 7px;
  text-transform: capitalize;
}

.arrangement-track.is-muted .arrangement-track-heading strong {
  color: var(--muted);
}

.arrangement-window-toggle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 8px;
  overflow: hidden;
  color: var(--faint);
  background: color-mix(in srgb, var(--track-color) 5%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--track-color) 18%, var(--line));
  border-radius: 8px;
  touch-action: manipulation;
}

.arrangement-window-texture {
  position: absolute;
  inset: 8px 6px;
  opacity: 0.16;
  background: repeating-linear-gradient(90deg, var(--track-color) 0 1px, transparent 1px 5px);
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 76%, transparent);
}

.arrangement-window-halves {
  position: absolute;
  z-index: 1;
  top: 6px;
  right: 8px;
  left: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 3px;
  height: 2px;
  pointer-events: none;
}

.arrangement-window-halves i {
  background: color-mix(in srgb, var(--track-color) 12%, transparent);
  border-radius: 999px;
}

.arrangement-window-halves i.is-on {
  background: color-mix(in srgb, var(--track-color) 88%, white 12%);
}

.arrangement-window-toggle small,
.arrangement-window-toggle b {
  position: relative;
  z-index: 1;
}

.arrangement-window-toggle small {
  min-width: 0;
  overflow: hidden;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrangement-window-toggle b {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.arrangement-window-toggle.is-enabled {
  color: var(--ink);
  background: color-mix(in srgb, var(--track-color) 13%, var(--paper));
  border-color: color-mix(in srgb, var(--track-color) 52%, var(--line));
}

.arrangement-window-toggle.is-enabled .arrangement-window-texture {
  opacity: 0.28;
}

.arrangement-window-toggle.is-enabled b {
  color: var(--ink);
}

.arrangement-window-toggle.is-mixed {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--track-color) 34%, var(--line));
  border-style: dashed;
}

.arrangement-window-toggle:disabled {
  opacity: 0.4;
}

.arrangement-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  text-align: center;
}

.stem-studio > .secondary-action {
  width: 100%;
  margin-top: 8px;
}

#view-studio.is-stem-project {
  padding-top: calc(14px + env(safe-area-inset-top));
}

#view-studio.is-stem-project .studio-heading {
  margin-bottom: 10px;
}

#view-studio.is-stem-project .studio-heading h1 {
  min-height: 34px;
  font-size: clamp(21px, 6.3vw, 25px);
}

#view-studio.is-stem-project .studio-heading .eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
}

#view-studio.is-stem-project .transport-card {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
  padding: 6px 9px;
  border-radius: 14px;
  box-shadow: none;
}

#view-studio.is-stem-project .play-button {
  width: 44px;
  height: 44px;
}

#view-studio.is-stem-project .transport-label {
  margin-bottom: 2px;
  font-size: 8px;
}

#view-studio.is-stem-project .tempo-control output {
  font-size: 12px;
}

#view-studio.is-large-stem-project {
  padding-right: 14px;
  padding-left: 14px;
}

.stem-studio[data-density="compact"] {
  margin-top: 6px;
}

.stem-studio[data-density="compact"] .step-legend {
  margin: 0 2px 6px;
  font-size: 10px;
}

.stem-studio[data-density="compact"] .arrangement-track {
  grid-template-rows: 18px 44px;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
}

.stem-studio[data-density="compact"] .arrangement-track-heading {
  grid-template-columns: 7px minmax(0, 1fr);
  align-content: center;
  gap: 4px;
  padding: 0 3px;
}

.stem-studio[data-density="compact"] .arrangement-track-heading .track-swatch {
  grid-row: auto;
  width: 7px;
  height: 7px;
}

.stem-studio[data-density="compact"] .arrangement-track-heading strong {
  font-size: 9px;
}

.stem-studio[data-density="compact"] .arrangement-track-heading > span:last-child {
  display: none;
}

.stem-studio[data-density="compact"] .arrangement-track.is-muted .arrangement-track-heading > span:last-child {
  display: block;
  color: #ff718d;
}

.stem-studio[data-density="compact"] .arrangement-window-toggle {
  min-height: 44px;
  padding: 6px;
}

.stem-studio[data-density="compact"] > .secondary-action {
  min-height: 44px;
  margin-top: 8px;
}

.persistent-player {
  --player-accent: #45ffd8;
  position: fixed;
  z-index: 29;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 0;
  padding: 0;
  color: var(--ink);
  background: #030304;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 0;
  box-shadow: none;
  transform: translateX(-50%);
  animation: player-in 180ms ease both;
}

.persistent-player::after {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: calc(50% - 18px);
  width: 3px;
  height: 2px;
  background: #ff718d;
  box-shadow: 11px 0 #d998ff, 22px 0 #45ffd8, 33px 0 #ffba61;
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.persistent-player.is-buffering::after {
  animation: player-buffering 880ms steps(4, end) infinite;
}

.persistent-player.is-retrying::after {
  background: #ffba61;
  animation-duration: 480ms;
}

@keyframes player-buffering {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

.persistent-player[hidden] {
  display: none;
}

@keyframes player-in {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.persistent-play-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 47px;
  padding: 0;
  color: rgba(244, 243, 240, 0.82);
  background: #050506;
  border: 0;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.persistent-play-button::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--player-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--player-accent) 55%, transparent);
  content: "";
  opacity: 0;
  transform: translateX(-50%);
  transition: width 160ms ease, opacity 160ms ease;
}

.persistent-play-button.is-playing {
  color: #ffffff;
  background: #09090b;
}

.persistent-play-button.is-playing::after {
  width: 18px;
  opacity: 1;
}

.persistent-play-button:active {
  color: #ffffff;
  background: #000000;
}

.persistent-play-button:focus-visible,
.persistent-seek:focus-visible {
  position: relative;
  z-index: 4;
  outline: 2px solid var(--accent-ring);
  outline-offset: -4px;
}

.persistent-play-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.persistent-play-button .pause-icon,
.persistent-play-button.is-playing .play-icon {
  display: none;
}

.persistent-play-button.is-playing .pause-icon {
  display: block;
}

.persistent-player-detail {
  display: grid;
  min-width: 0;
  height: 47px;
}

.persistent-player-heading,
.persistent-seek {
  grid-area: 1 / 1;
}

.persistent-player-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  z-index: 1;
  align-self: start;
  padding: 6px 12px 0;
  pointer-events: none;
}

.persistent-player-heading strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persistent-player-time {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  color: rgba(170, 169, 165, 0.78);
  font-size: 9px;
  line-height: 13px;
  font-variant-numeric: tabular-nums;
}

.persistent-time-divider {
  color: var(--faint);
}

.persistent-seek {
  --seek-progress: 0%;
  display: block;
  width: 100%;
  align-self: stretch;
  height: 47px;
  margin: 0;
  padding: 20px 12px 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.persistent-seek::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background:
    linear-gradient(rgba(244, 243, 240, 0.88), rgba(244, 243, 240, 0.88)) 0 / var(--seek-progress) 100% no-repeat,
    rgba(255, 255, 255, 0.14);
  border-radius: 0;
}

.persistent-seek::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--player-accent);
  border: 2px solid #030304;
  border-radius: 3px;
  box-shadow: 0 0 7px color-mix(in srgb, var(--player-accent) 34%, transparent);
}

.persistent-seek::-moz-range-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 0;
}

.persistent-seek::-moz-range-progress {
  height: 2px;
  background: rgba(244, 243, 240, 0.88);
  border-radius: 0;
}

.persistent-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--player-accent);
  border: 2px solid #030304;
  border-radius: 3px;
  box-shadow: 0 0 7px color-mix(in srgb, var(--player-accent) 34%, transparent);
}

body.has-persistent-player .bottom-nav[data-pixel-dock] {
  border-top-color: rgba(255, 255, 255, 0.065);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  min-height: calc(72px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding: 2px;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.is-active {
  color: var(--accent-bright);
  background: var(--accent-soft);
}

.refine-dialog {
  width: min(100%, 680px);
  max-width: none;
  margin: auto auto 0;
  padding: 0;
  background: var(--surface);
  border: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

.account-dialog {
  width: min(100%, 680px);
  max-width: none;
  margin: auto auto 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

.profile-dialog {
  max-height: min(92dvh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(3px);
}

.account-dialog[open] {
  animation: sheet-in 220ms ease both;
}

.account-dialog-inner {
  width: 100%;
}

.account-intro {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-dialog label {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-dialog input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 16px;
}

.account-dialog input:focus {
  border-color: var(--accent);
  outline: 0;
}

.account-dialog input[readonly] {
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 76%, var(--surface));
  cursor: default;
}

.account-dialog input[aria-invalid="true"] {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--line));
}

.account-dialog .primary-action,
.account-dialog .secondary-action {
  width: 100%;
}

.account-dialog #account-submit {
  margin-top: 20px;
}

.account-switch {
  display: block;
  margin: 8px auto 0;
}

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

.form-note {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.signed-in-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 4px auto 18px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-raised) 84%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.profile-summary .signed-in-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
}

.profile-summary > div {
  min-width: 0;
}

.profile-summary strong,
.profile-summary span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.profile-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.profile-pending-email {
  margin: 8px 2px 0;
  padding: 9px 11px;
  color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent-soft) 68%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.profile-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.profile-section-heading h3 {
  margin: 3px 0 4px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.profile-dialog form .primary-action {
  margin-top: 16px;
}

.profile-dialog .profile-form-note {
  margin-top: 8px;
  text-align: left;
}

.form-status {
  margin: 12px 0 0;
  color: var(--success);
  font-size: 12px;
  line-height: 1.4;
}

.profile-data-section > p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.profile-actions .secondary-action {
  width: 100%;
}

.profile-sign-out {
  width: 100%;
  min-height: 44px;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

.refine-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(3px);
}

.refine-dialog[open] {
  animation: sheet-in 220ms ease both;
}

@keyframes sheet-in {
  from { transform: translateY(18px); opacity: 0; }
}

.refine-dialog form {
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
}

.dialog-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 20px;
  background: var(--line-strong);
  border-radius: 999px;
}

.dialog-heading {
  align-items: flex-start;
}

.dialog-heading h2 {
  font-size: 22px;
}

.refine-dialog textarea {
  min-height: 96px;
  margin-top: 14px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 16px;
}

.refine-options {
  display: flex;
  gap: 8px;
  margin: 14px -20px 22px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.refine-dialog .primary-action {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  color: var(--paper-deep);
  background: var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: normal;
}

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

body.has-persistent-player .toast {
  bottom: calc(140px + env(safe-area-inset-bottom));
}

@media (min-width: 680px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    max-width: 680px;
    min-height: calc(100dvh - 36px);
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    box-shadow: 0 24px 78px rgba(0, 0, 0, 0.48);
  }

  .view {
    padding-right: 38px;
    padding-left: 38px;
  }

  .mood-row {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .bottom-nav {
    right: auto;
    left: 50%;
    max-width: 678px;
    transform: translateX(-50%);
  }

  .persistent-player {
    max-width: 678px;
  }

  .refine-dialog {
    bottom: 18px;
    border-radius: 24px;
  }

  .account-dialog {
    bottom: 18px;
    border-radius: 24px;
  }
}

@media (max-width: 370px) {

  .mixer {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-event-row {
    grid-template-columns: 18px minmax(0, 1fr) minmax(76px, 0.8fr) 44px;
    gap: 4px;
  }

  .grid-event-row input,
  .grid-event-row select {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
  }

  .transport-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 9px;
  }

  .play-button {
    grid-row: 1 / span 2;
  }

  .key-detail {
    grid-column: 2;
    padding: 7px 0 0;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .key-detail .transport-label {
    display: inline;
    margin: 0 8px 0 0;
  }

  .tempo-control {
    justify-content: space-between;
  }

  .tempo-control output,
  .key-button {
    font-size: 12px;
  }

}

@media (prefers-contrast: more) {
  .persistent-player {
    border-top-color: rgba(255, 255, 255, 0.32);
    border-bottom-color: rgba(255, 255, 255, 0.22);
  }

  .persistent-play-button {
    color: #ffffff;
    border-inline-end-color: rgba(255, 255, 255, 0.28);
  }

  .persistent-player-time {
    color: rgba(255, 255, 255, 0.82);
  }
}

@media (forced-colors: active) {
  .mixer-tile,
  .mixer-tile.is-active,
  .mixer-tile:focus-within,
  .mix-mode-button,
  .studio-window-controls,
  .studio-window-actions,
  .studio-window-size,
  .studio-window-size button,
  .studio-window-loop,
  .studio-window-navigation button,
  .setting-segment,
  .setting-segment button,
  .setting-switch,
  .arrangement-track,
  .arrangement-window-toggle,
  .arrangement-window-toggle.is-enabled,
  .arrangement-window-toggle.is-mixed,
  .persistent-player,
  .persistent-play-button,
  .persistent-play-button.is-playing {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
  }

  .persistent-player::after,
  .persistent-play-button::after,
  .arrangement-window-texture,
  .arrangement-window-halves {
    display: none;
  }

  .studio-window-size button[aria-pressed="true"],
  .studio-window-loop[aria-pressed="true"],
  .setting-segment button[aria-pressed="true"],
  .setting-switch[aria-checked="true"],
  .arrangement-window-toggle.is-enabled {
    color: HighlightText;
    background: Highlight;
  }

  .mixer-hint,
  .mixer-tile.is-active .mixer-hint,
  .mixer-tile.is-adjusting .mixer-amount {
    color: CanvasText;
  }

  .mixer-tile:has(.mixer-native-range:focus-visible) {
    outline-color: Highlight;
  }

  .mix-mode-button[aria-pressed="true"] {
    color: HighlightText;
    background: Highlight;
  }

  .mix-mode-button {
    border: 1px solid CanvasText;
  }

  .persistent-player-time,
  .persistent-time-divider {
    color: CanvasText;
  }

  .persistent-seek::-webkit-slider-runnable-track,
  .persistent-seek::-moz-range-track {
    background: CanvasText;
  }

  .persistent-seek::-webkit-slider-thumb,
  .persistent-seek::-moz-range-thumb {
    background: Highlight;
    border-color: Canvas;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .persistent-player.is-buffering::after {
    animation: none;
    opacity: 0.82;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
