:root {
  --bg: #111312;
  --surface: #1b1e1c;
  --line: #ffffff18;
  --muted: #a9b0aa;
  --text: #f2f4ef;
  --chrome: #ffffff08;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}
body { -webkit-font-smoothing: antialiased; }
.header-inner, main { width: min(1200px, calc(100% - 64px)); }
.topbar { height: 58px; background: #161917; }
.topbar .brandmark { border-radius: 10px; }
.server-studio .gallery-entry { border-radius: 999px; background: #c9f7970b; border-color: #c9f7972d; }
main { padding-top: clamp(19px, 2vw, 29px); }
.page-top { margin-bottom: 16px; gap: 16px; }
.studio-heading { min-width: 0; }
.page-top h1 { margin: 0; font-weight: 660; font-size: clamp(26px, 2.45vw, 35px); }
#work-origin { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.studio-actions, .quick-play, .workspace-head, .workspace-name, .preset-picker,
.edit-bar, .view-tabs, .curve-options, .curve-view-tools, .play-strip,
.deck-transport, .play-scope, .scrub-strip { display: flex; align-items: center; }
.studio-actions { gap: 8px; flex: none; }
.archive-nav { padding: 0; border: 0; }
.quick-play, .archive-nav button {
  min-height: 37px; padding: 7px 15px; border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.quick-play { color: #e5e9e1; gap: 6px; border: 1px solid #ffffff22; background: var(--chrome); }
.quick-play svg { width: 15px; height: 15px; }
.quick-play:hover:enabled { background: #ffffff12; }
.archive-nav button { color: #202818; background: #d1efad; border: 1px solid #e4f7cd; }
.archive-nav button:hover:enabled { background: #e1f6c5; }

.deck-grid { gap: 12px; margin-bottom: 16px; }
.deck { padding: 12px 17px 0; border-radius: 16px; }
.deck-kind { font-family: inherit; }
.deck-topline { background: transparent; }
.track-main { margin: 7px 0 10px; }
.cover { width: 42px; height: 42px; border-radius: 8px; }
.track-info h3 { font-size: clamp(16px, 1.4vw, 20px); font-weight: 620; }
.pick { border-radius: 999px; padding: 6px 12px; border-color: #ffffff24; background: var(--chrome); }
.source-sheet { border-top: 1px solid var(--line); }
.source-sheet > summary, .plan-sheet > summary {
  display: flex; align-items: center; width: 100%; cursor: pointer;
  list-style: none; user-select: none; -webkit-user-select: none;
}
.source-sheet > summary::-webkit-details-marker, .plan-sheet > summary::-webkit-details-marker { display: none; }
summary:focus-visible, [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--lime); outline-offset: -2px; border-radius: 5px;
}
.source-sheet > summary { min-height: 31px; gap: 7px; color: #b7beb7; font-size: 11px; }
.disclosure-chevron {
  width: 6px; height: 6px; margin-left: 4px; margin-bottom: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
details[open] > summary .disclosure-chevron { transform: rotate(225deg); margin: 3px 0 0 4px; }
.deck .source-range { padding: 0 0 12px; border: 0; }
.source-range .mixrange { margin-top: 1px; }

.workspace { border-radius: 18px; box-shadow: 0 9px 36px -28px #000b; }
.workspace-head { justify-content: space-between; padding: 14px 21px; gap: 12px; }
.workspace-name { gap: 12px; min-width: 0; flex-wrap: wrap; }
.workspace-head h2 { font-size: 18px; font-weight: 650; letter-spacing: -.45px; }
#sync-status { font-size: 11px; color: #abb7a6; }
.preset-picker { gap: 10px; }
#preset-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.workspace .presets, .view-tabs {
  display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line);
  border-radius: 12px; background: #131614;
}
.workspace .preset, .view-tabs button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: none; border-radius: 9px; color: #b8beb8;
  background: transparent; text-align: center; white-space: nowrap;
}
.workspace .preset { padding: 5px 11px; }
.workspace .preset strong { color: inherit; font-size: 12px; font-weight: 540; }
.workspace .preset-glyph, .workspace .preset small, .workspace .preset[aria-pressed="true"]::after { display: none; }
.workspace .preset[aria-pressed="true"], .view-tabs button[aria-selected="true"] {
  color: #f4f6f0; background: #363b36;
  box-shadow: inset 0 1px 0 #ffffff14, 0 1px 3px #0004;
}
.workspace .preset:hover:enabled, .view-tabs button:hover { color: white; }

.plan-sheet { margin: 0 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-sheet > summary { gap: 8px; min-height: 36px; font-size: 12px; color: #dce3d8; }
.plan-sheet > summary:hover, .source-sheet > summary:hover { color: white; }
.sheet-mark { color: #c0d8ae; font-size: 14px; }
.plan-caption { color: #a8b2a4; margin-left: auto; font-size: 11px; }
.workspace .auto-panel { margin: 0 0 10px; border-radius: 10px; background: var(--chrome); }
.workspace .auto-body, .workspace .auto-exits, .workspace .auto-bottom { background: none; padding: 10px 12px; }
.auto-copy h2 { margin: 0; font-size: 15px; }
.auto-copy p { margin-top: 3px; }
.auto-bottom { flex-wrap: wrap; }
.auto-bottom details[open] { flex-basis: 100%; }
.auto-panel[data-state="manual"] .auto-feedback:has(#auto-reset:disabled) { display: none; }

.edit-bar { padding: 12px 21px; justify-content: space-between; gap: 8px; }
.view-tabs button { padding: 6px 12px; font-size: 12px; font-weight: 590; }
.view-tabs svg { width: 15px; height: 15px; }
#arr-snap { padding: 6px 9px; background: none; border-radius: 8px; }
#arr-snap[aria-pressed="true"] { color: #c9dfb8; background: #bbdd9c0c; }
.workspace [role="tabpanel"] { padding: 0 21px; }
.workspace [role="tabpanel"][hidden] { display: none; }
.workspace .arr { border-radius: 11px; }
.workspace .arr-tools { gap: 7px; padding: 6px 10px; background: #202420; }
.workspace .arr-zoom { margin-left: auto; }
.workspace .arr-scroll:not(:has(input:disabled)) + .arr-zoom { margin-left: 4px; }
.arr-scroll:has(input:disabled), .pan-label:has(input:disabled) { display: none; }
.workspace .arr-zoom button, .workspace .zoom-group button {
  min-height: 25px; border-color: transparent; background: #ffffff08; border-radius: 6px;
}
.workspace .arr-zoom button:not(:disabled):hover, .workspace .zoom-group button:not(:disabled):hover { background: #ffffff16; }
.workspace .arr-fit:disabled, .workspace #zoom-fit:disabled { display: none; }
.workspace .arr-lane { height: clamp(46px, 4.5vw, 61px); }
.arr-bottom { padding: 9px 1px 12px; background: transparent; border: none; }
.arr-bottom output { color: #c4d0bf; }
.arr-bottom .arr-help { margin: 0; padding: 0; font-size: 11px; color: var(--muted); }
.curve-options { justify-content: space-between; gap: 10px; margin: 0 0 9px; }
.band { padding: 4px 9px; border-radius: 7px; }
.curve-options .bar-label select, .play-scope select {
  border: 1px solid var(--line); border-radius: 8px; background: #2b302c; color: var(--text);
  padding: 5px 7px; font: inherit; font-variant-numeric: tabular-nums;
}
.curve-view-tools { justify-content: flex-end; gap: 12px; padding: 7px 0 10px; }
.curve-view-tools .voice-legend { margin-right: auto; }
.curve-view-tools .zoom-group { gap: 4px; }
.workspace .handoff-strip { padding: 0 0 10px; background: transparent; }
.workspace .handoff-strip:has(.handoff-list[hidden]) { display: none; }

.player-desk { border-top: 1px solid var(--line); background: linear-gradient(135deg, #ffffff05, transparent), #202420; padding: 11px 21px 12px; }
.play-strip { gap: 14px; }
.deck-transport { gap: 2px; padding: 2px 4px; border-radius: 999px; background: #ffffff09; border: 1px solid #ffffff18; }
.deck-transport .icon-button { width: 32px; height: 32px; border-radius: 50%; }
.deck-transport .icon-button svg { width: 15px; height: 15px; }
.deck-transport .icon-button[aria-pressed="true"] { color: var(--lime); background: #bde69e15; }
.deck-transport .transport-play { width: 33px; height: 33px; color: #202b1a; background: #d9ecc6; }
.play-scope { gap: 7px; font-size: 11px; color: var(--muted); }
.play-strip .vol { margin-left: auto; }
.scrub-strip { gap: 10px; margin-top: 3px; }
.scrub-strip .seek { margin-block: 12px; }
.scrub-strip .time { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.scrub-strip .time:last-child { text-align: right; }
footer { padding-block: 11px 18px; }

@media (max-width: 760px) {
  .header-inner, main { width: calc(100% - 32px); }
  .workspace-head, .edit-bar, .player-desk { padding-inline: 14px; }
  .plan-sheet { margin-inline: 14px; }
  .workspace [role="tabpanel"] { padding-inline: 14px; }
  .arr-bottom .arr-help { display: none; }
}
@media (max-width: 600px) {
  .header-inner, main { width: calc(100% - 24px); }
  .topbar { height: 52px; }
  .page-top { gap: 8px; margin-bottom: 12px; }
  .studio-actions { gap: 5px; }
  .quick-play, .archive-nav button { min-height: 33px; padding: 6px 10px; font-size: 11px; }
  #work-origin { font-size: 10px; }
  .deck-grid { gap: 7px; grid-template-columns: minmax(0,1fr); margin-bottom: 10px; }
  .deck { padding: 6px 12px 0; border-radius: 12px; }
  .track-main { flex-wrap: nowrap; gap: 8px; margin: 3px 0 6px; }
  .track-info h3 { font-size: 14px; }
  .cover { width: 30px; height: 30px; }
  .track-main .pick { width: auto; height: auto; margin: 0; order: initial; min-height: 27px; padding: 4px 9px; }
  .source-sheet > summary { min-height: 25px; font-size: 10px; }
  .workspace { border-radius: 13px; }
  .workspace-name { display: grid; gap: 2px; }
  .workspace-head { padding-block: 10px; }
  .workspace-head h2 { font-size: 15px; }
  #sync-status { font-size: 9px; }
  #preset-label { display: none; }
  .workspace .presets { gap: 0; }
  .workspace .preset { padding: 4px 7px; }
  .plan-sheet > summary { min-height: 31px; }
  .edit-bar { padding-block: 9px; }
  .view-tabs button { font-size: 11px; padding: 6px 8px; }
  .view-tabs svg { width: 12px; height: 12px; }
  #arr-snap { padding: 6px 4px; }
  .workspace .arr-tools { padding: 4px 6px; gap: 4px; }
  .workspace .arr-clock { flex: 1 1 auto; order: 0; }
  .workspace .arr-zoom { margin-left: auto; }
  .workspace .arr-lane { height: 43px; }
  .curve-options { margin-bottom: 6px; }
  .player-desk { padding-block: 8px; }
  .play-strip { gap: 8px; }
  .play-scope > span { display: none; }
  .workspace .vol svg { display: block; width: 13px; }
  .workspace .vol input { width: 36px; }
  .scrub-strip { margin: 0; }
}
@media (max-width: 370px) {
  .topbar .brand { gap: 5px; }
  .topbar .brand strong { font-size: 15px; }
  .topbar .brandmark { width: 25px; height: 25px; }
  .header-actions { gap: 4px; }
  .server-studio .gallery-entry { padding-inline: 9px; font-size: 12px; }
  .workspace-head, .edit-bar, .player-desk, .workspace [role="tabpanel"] { padding-inline: 9px; }
  .plan-sheet { margin-inline: 9px; }
  .quick-play { gap: 0; min-width: 33px; justify-content: center; }
  .quick-play span { position: absolute; clip-path: inset(50%); }
  .workspace .arr-clock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
