.studio-room {
  --room-bg: #171916;
  --room-line: #363a32;
  --room-text: #f3eee1;
  --room-muted: #b9bcaa;
  --room-accent: #d1daab;
  max-width: 1540px;
  padding: 0 36px 56px;
  margin: auto;
  color: var(--room-text);
}
.studio-room button:focus-visible, .studio-room textarea:focus-visible { outline: 2px solid #e1eeb7; outline-offset: 4px; }
.room-top, .room-top > div, .room-top nav, .room-caption, .room-player-title, .producer-heading, .producer-send { display: flex; align-items: center; }
.room-top { gap: 14px; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--room-line); }
.room-top > div, .room-top nav { gap: 16px; flex-wrap: wrap; }
.room-top > div { color: var(--room-muted); font-size: .9rem; }
.room-top nav .secondary { min-height: 36px; }
.room-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.68fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 32px); align-items: start; padding-top: 30px; }
.room-cover { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #292b24; }
.room-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-button { position: absolute; inset: auto 10px 10px auto; border: 1px solid #ffffff50; color: #fffef7; background: #171912df; border-radius: 7px; padding: 7px 10px; font-size: .84rem; cursor: pointer; }
.room-caption { justify-content: space-between; padding: 13px 0; color: var(--room-muted); gap: 8px; font-size: .85rem; }
.room-caption p { margin: 0; }
.room-tracks { display: grid; gap: 4px; }
.room-tracks button { width: 100%; border: 1px solid transparent; background: transparent; color: inherit; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; padding: 12px 9px; border-radius: 8px; cursor: pointer; }
.room-tracks button:hover { background: #1e211b; }
.room-tracks button[aria-current="true"] { background: #293022; border-color: #4a5940; }
.room-tracks strong, .room-tracks small { display: block; }
.room-tracks strong { font-size: .94rem; font-weight: 680; }
.room-tracks small, .track-list-number, .track-list-time, .room-repeat { color: var(--room-muted); font-size: .81rem; }
.track-list-number, .track-list-time { font-variant-numeric: tabular-nums; }
.room-repeat { line-height: 1.5; }
.room-title { margin: 4px 0 24px; }
.room-title h1 { margin: 5px 0 12px; font: 400 clamp(2rem, 3.2vw, 3.7rem)/1.04 Gloock, Georgia, serif; letter-spacing: -.025em; }
.room-title > p:last-child { color: var(--room-muted); line-height: 1.55; margin: 0; max-width: 49ch; }
.room-player { border: 1px solid var(--room-line); background: radial-gradient(ellipse at 4% 0%, #262f24, #181a17 68%); padding: clamp(15px, 2vw, 26px); border-radius: 14px; }
.room-player-title { justify-content: space-between; color: var(--room-accent); font-size: .85rem; gap: 12px; }
.room-player h2 { font: 400 clamp(1.65rem, 2.6vw, 2.55rem)/1.1 Gloock, Georgia, serif; margin: 16px 0 8px; }
.room-player > p { color: var(--room-muted); margin: 0 0 12px; }
.room-player .player-controls { max-width: 100%; }
.room-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.room-edit-actions .secondary { min-height: 38px; font-size: .88rem; }
.room-player .room-sound-label { font-size: .84rem; margin: 12px 0 0; }
.room-status { margin: 0 0 12px; color: var(--room-accent); font-size: .88rem; display: grid; gap: 8px; }
.room-status progress { width: 100%; height: 6px; accent-color: var(--room-accent); }
.room-transcript { border-bottom: 1px solid var(--room-line); padding: 15px 0; }
.room-transcript summary { cursor: pointer; color: var(--room-text); font-weight: 640; }
.room-passages { max-height: 40vh; overflow-y: auto; margin: 14px 0; }
.room-passages > div { display: flex; gap: 12px; align-items: baseline; padding: 8px 7px; }
.room-passages p { margin: 0; line-height: 1.7; color: var(--room-muted); }
.room-timestamp { font-variant-numeric: tabular-nums; color: var(--room-accent); }
.room-approval { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-size: .85rem; padding-top: 6px; color: var(--room-muted); }
.producer { border: 1px solid var(--room-line); background: var(--room-bg); border-radius: 14px; padding: 15px; min-width: 0; }
.producer-heading { gap: 11px; border-bottom: 1px solid var(--room-line); padding-bottom: 12px; }
.producer-heading h2 { font-family: inherit; font-size: 1rem; font-weight: 720; margin: 0; }
.producer-heading p { font-size: .83rem; color: var(--room-muted); margin: 4px 0 0; overflow-wrap: anywhere; }
.producer-mark { width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid #b4c28c; border-radius: 50%; background: radial-gradient(circle at 62% 38%, #d6d9a4, #78875b 43%, #2e3821 72%); box-shadow: 0 0 12px #c7dd9d28; }
.producer-thread { max-height: min(460px, 53vh); overflow-y: auto; padding-top: 12px; scroll-padding-bottom: 12px; }
.producer-intro, .producer-consent p, .producer-note p, .your-note p, .producer-proposal p { font-size: .95rem; line-height: 1.48; overflow-wrap: anywhere; }
.producer-intro, .producer-consent p { color: var(--room-muted); margin: 1px 0 14px; }
.your-note, .producer-note, .producer-proposal { padding: 10px 11px; border-radius: 9px; margin: 0 0 9px; }
.your-note { background: #2b3425; margin-left: 10px; }
.producer-note { background: #222620; margin-right: 10px; }
.your-note small, .producer-note small, .producer-send small { color: var(--room-muted); font-size: .8rem; }
.your-note p, .producer-note p, .producer-proposal p { margin: 4px 0 0; white-space: pre-wrap; }
.producer-proposal { background: #30372a; border: 1px solid #566444; }
.producer-proposal button { margin-top: 10px; }
.producer-status, .producer-error { font-size: .9rem; color: var(--room-accent); }
.producer-error { color: #ffc4aa; }
.producer-status i { display: inline-block; width: .55rem; height: .55rem; margin-right: .55rem; border-radius: 50%; background: var(--room-accent); }
.producer-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.producer-suggestions button { border: 1px solid #535c49; border-radius: 999px; background: transparent; color: var(--room-accent); font: inherit; font-size: .82rem; padding: 5px 9px; cursor: pointer; }
#studio-chat textarea { display: block; resize: vertical; width: 100%; box-sizing: border-box; border: 1px solid #4a5243; border-radius: 9px; background: #10120f; color: #f4f3e6; font: inherit; font-size: 1rem; padding: 10px; }
.producer-send { justify-content: space-between; margin-top: 8px; }
.producer-send .primary, .producer-proposal .primary { min-height: 34px; padding: 7px 11px; font-size: .88rem; }
.producer-consent .secondary { width: 100%; }
#studio-chat-error:empty { display: none; }
.studio-format-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.library-list { display: grid; gap: 6px; }
.library-list > * { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; text-align: left; color: inherit; font: inherit; background: #23271e; border: 1px solid #414834; border-radius: 8px; padding: 12px; }
.library-list small { color: #bfc5b2; }
.library-list button { cursor: pointer; }
.studio-library-actions { flex-wrap: wrap; margin-top: 12px; }
.cover-preview { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; }
.cover-preview img { width: 100%; border-radius: 8px; }
@media (max-width: 1040px) {
  .studio-room { padding-inline: 22px; }
  .room-grid { grid-template-columns: minmax(165px, .8fr) minmax(0, 1.7fr); }
  .producer { grid-column: 2; }
  .room-rail { grid-row: span 2; }
}
@media (max-width: 640px) {
  .studio-room { padding-inline: 15px; }
  .room-top { display: grid; padding-block: 10px; }
  .room-top > div, .room-top nav { gap: 10px; }
  .room-top > div > span:last-child { display: none; }
  .room-grid { display: flex; flex-direction: column; padding-top: 18px; }
  .room-listen, .producer, .room-rail { width: 100%; }
  .room-listen { order: 0; }
  .room-rail { display: grid; grid-template-columns: 70px minmax(0, 1fr); column-gap: 10px; order: 1; }
  .room-tracks, .room-repeat { grid-column: 1 / -1; }
  .room-tracks button { padding: 9px 8px; }
  .room-cover { width: 70px; border-radius: 8px; }
  .cover-button { inset: auto 1px 1px; padding: 4px 2px; font-size: .68rem; }
  .producer { order: 2; }
}

/* Match the app's dark listening room, warm metal controls, and voice colours. */
.studio-room {
  --room-bg: #171613;
  --room-line: #3a342d;
  --room-text: #f4efe6;
  --room-muted: #c2b6a8;
  --room-accent: #e0b996;
  max-width: 1480px;
}
.room-top { padding-block: 13px; }
.room-top nav .text-button { min-height: 38px; }
.room-top nav .text-button span { margin-left: 4px; color: var(--room-accent); }
.room-grid { grid-template-columns: minmax(0, 228px) minmax(0, 1fr) minmax(275px, 337px); gap: clamp(18px, 3vw, 44px); padding-top: 27px; }
.room-cover { width: min(100%, 199px); border-radius: 8px; }
.room-cover .cover-button { font-size: .81rem; }
.room-caption { padding: 12px 0 4px; }
.room-tracks button { padding: 9px 8px; border-radius: 5px; }
.room-tracks button[aria-current=true] { background: #332920; border: 1px solid #584636; }
.room-title { margin-block: 5px 26px; }
.room-title h1 { font-size: clamp(2.15rem, 3.6vw, 3.6rem); }
.room-title > p:last-child { max-width: 52ch; }
.room-player { background: #211b16; border: 0; border-top: 2px solid #755840; border-radius: 0 0 10px 10px; }
.room-player .room-sound-label { color: var(--room-accent); margin-top: 12px; }
.room-edit-actions { align-items: center; }
.room-edit-actions .text-button { margin-left: 4px; min-height: 38px; }
.room-mobile-producer { display: none; }
.producer { padding: 15px 0 0 18px; border: 0; border-left: 1px solid var(--room-line); background: none; border-radius: 0; position: sticky; top: 16px; }
.producer-heading { justify-content: space-between; border-bottom: 0; padding-bottom: 10px; }
.producer-heading h2 { font: 400 1.65rem/1.15 Gloock, Georgia, serif; }
.producer-heading p { font-size: .92rem; }
.producer-help { min-height: 36px; }
.producer-scope { display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; gap: 3px; background: #1c1915; border: 1px solid #3c3228; border-radius: 8px; padding: 3px; }
.producer-scope button { border: 0; border-radius: 5px; background: transparent; color: var(--room-muted); padding: 8px 3px; font: inherit; cursor: pointer; font-size: .88rem; min-height: 38px; }
.producer-scope button[aria-pressed=true] { background: #4c3729; color: #fff1e3; }
.producer-scope button:disabled { opacity: .5; }
.producer-intro { margin: 6px 0 12px; }
.producer-context { color: var(--room-muted); margin-top: 11px; font-size: .8rem; }
.producer-suggestions button { color: var(--room-accent); border-color: #524536; min-height: 33px; }
.your-note { background: #32261e; }
.producer-note { background: #211e19; }
.producer-proposal { background: #2d261e; border-color: #624b38; }
.producer-proposal .proposal-voice { display: block; min-height: 33px; color: var(--room-accent); }
#studio-chat textarea { border-color: #524338; background: #171411; }
.producer-consent .secondary { width: auto; }
.version-list button { min-height: 58px; }
.library-list span strong, .library-list span small { display: block; }
.library-list span small { margin-top: 4px; }

.voice-room { padding-top: 5px; }
.voice-stage { --voice-hue: 153; display: grid; grid-template-columns: minmax(104px, .8fr) 1.2fr; align-items: center; gap: clamp(17px, 5vw, 40px); padding: 12px 6px 23px; }
.voice-stage h3 { font-family: inherit; font-size: clamp(2rem, 6vw, 3.3rem); margin: 0; font-weight: 350; color: hsl(var(--voice-hue) 65% 85%); letter-spacing: -.025em; }
.voice-stage p { color: #cfc3b5; margin: 6px 0 13px; }
.voice-orb, .voice-dial i { aspect-ratio: 1; border-radius: 50%; background:
  radial-gradient(ellipse at 34% 23%, hsl(var(--voice-hue) 68% 82% / .92), transparent 32%),
  radial-gradient(ellipse at 68% 62%, hsl(calc(var(--voice-hue) + 24) 52% 49%), transparent 55%),
  conic-gradient(from 190deg at 48% 53%, hsl(var(--voice-hue) 55% 23%), hsl(calc(var(--voice-hue) + 19) 47% 51%), hsl(var(--voice-hue) 62% 28%), hsl(calc(var(--voice-hue) - 25) 54% 58%), hsl(var(--voice-hue) 55% 23%)); }
.voice-orb { width: min(100%, 165px); margin: auto; box-shadow: inset 0 0 20px #0b0909a0, 0 0 25px hsl(var(--voice-hue) 80% 56% / .16); border: 1px solid hsl(var(--voice-hue) 35% 74% / .36); }
.voice-dial { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid #40362b; padding: 6px 0 10px; }
.voice-dial button { border: 1px solid transparent; color: #d7c9b9; background: transparent; font: inherit; font-size: .83rem; padding: 9px 2px; cursor: pointer; border-radius: 7px; }
.voice-dial button[aria-pressed=true] { color: #f7ece1; border-color: #66513e; background: #2d231a; }
.voice-dial i { display: block; width: 27px; margin: 0 auto 6px; }
.voice-scope { margin-top: 16px; }
.voice-connect { display: block; margin-bottom: 11px; min-height: 32px; }

.sound-lab { color: #f4efe6; }
.lab-presets, .lab-sounds, .bowl-pads, .lab-footer { display: flex; flex-wrap: wrap; gap: 7px; }
.lab-presets button, .lab-sounds button { color: #dac8b5; border: 1px solid #5a493b; padding: 6px 10px; border-radius: 6px; background: transparent; font: inherit; font-size: .88rem; min-height: 36px; cursor: pointer; }
.lab-sounds button[aria-pressed=true] { background: #57402d; border-color: #a67d56; color: #fff3e6; }
.lab-master, .lab-layers, .lab-library, .lab-bowls { padding: 12px 0; border-bottom: 1px solid #4c3e31; }
.lab-layers > div { display: flex; align-items: center; gap: 12px; }
.lab-layers > div .text-button { font-size: 1.3rem; width: 28px; flex: 0 0 28px; min-height: 36px; }
.mix-level { flex: 1; display: grid; grid-template-columns: minmax(95px, 1fr) minmax(60px, 1.5fr) 3ch; align-items: center; gap: 9px; min-height: 38px; font-size: .91rem; }
.mix-level input { width: 100%; accent-color: #dcaa7c; }
.mix-level output { color: #e0b996; font-variant-numeric: tabular-nums; font-size: .82rem; text-align: right; }
.lab-duck { margin: 5px 0 0; font-size: .86rem; }
.lab-library { display: grid; gap: 9px; }
.lab-library h3, .lab-bowls h3 { margin: 0 0 6px; font-family: inherit; font-size: .93rem; font-weight: 630; color: #e6cdb5; }
.lab-bowls p { font-size: .9rem; margin: 0 0 10px; }
.bowl-pads { flex-wrap: nowrap; margin-bottom: 10px; }
.bowl-pads button { flex: 1; min-width: 0; border: 1px solid #684e38; color: #f2decb; background: #33251a; border-radius: 7px; cursor: pointer; font: inherit; font-size: .85rem; min-height: 53px; }
.bowl-pads span { display: block; margin: 3px auto; width: 23px; height: 10px; border: 1px solid #e1af77; border-top: 0; border-radius: 0 0 12px 12px; }
.bowl-pads button:active { background: #735336; }
.lab-footer { margin-top: 14px; align-items: center; }
.lab-footer .primary, .lab-footer .secondary { min-height: 41px; }
@media (max-width: 1100px) {
  .room-grid { grid-template-columns: minmax(155px, .66fr) minmax(0, 1.66fr); column-gap: 20px; }
  .producer { grid-column: 2; position: static; border-left: 0; border-top: 1px solid var(--room-line); padding: 17px 0 0; }
  .room-mobile-producer { display: inline-flex; margin-top: 8px; min-height: 40px; }
}
@media (max-width: 640px) {
  .room-path { display: none; }
  .room-grid { display: flex; flex-direction: column; gap: 17px; padding-top: 15px; }
  .room-top { gap: 1px; }
  .room-top nav .text-button { font-size: .87rem; }
  .room-title { margin-bottom: 15px; }
  .room-title h1 { font-size: clamp(2rem, 7vw, 2.65rem); }
  .room-title > p:last-child { line-height: 1.45; }
  .room-cover { width: 70px; }
  .room-cover .cover-button { font-size: .63rem; }
  .producer { order: 1; }
  .room-rail { order: 2; }
  .room-edit-actions { gap: 6px; }
  .room-edit-actions .secondary { padding-inline: 10px; }
  .voice-dial { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .voice-dial button { font-size: .76rem; }
  .studio-format-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sheet:has(.sound-lab) .lab-footer {
  position: sticky;
  bottom: -20px;
  z-index: 1;
  padding: 9px 0;
  margin-top: 4px;
  background: #17130f;
  border-top: 1px solid #4c3e31;
}
@media (max-width: 640px) {
  .lab-footer .text-button { margin-right: auto; }
}

.room-track-jump { display: none; }
@media (max-width: 640px) {
  .room-track-jump { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; align-items: center; margin: 0 0 10px; font-size: .88rem; color: var(--room-muted); }
  .room-track-jump select { padding: 7px 8px; min-height: 36px; min-width: 0; color: var(--room-text); background: #211b16; border: 1px solid #5a4735; border-radius: 5px; font: inherit; }
}
