@import url("/fonts.css");

/* Palette du studio natif : noir profond, crème et sauge lumineuse. */
:root {
  color-scheme: dark;
  --ink: #f0f0df;
  --muted: #a5b2b0;
  --paper: #0e1214;
  --nav: #0c1012;
  --surface: #171d1f;
  --surface-raised: #20282a;
  --line: #303a3c;
  --mint: #b6ed9f;
  --accent: var(--mint);
  --gold: var(--mint);
  --blue: #9bb8c8;
  --white: var(--surface);
  --radius: 18px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .5; }
input:disabled { opacity: .5; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
::selection { background: #4c7045; color: #fff; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2, .brand { font-family: 'Manrope', sans-serif; }
h1 { font-size: clamp(30px, 3vw, 43px); font-weight: 650; letter-spacing: -1.8px; line-height: 1.2; }
h2 { font-size: 18px; letter-spacing: -.4px; font-weight: 700; }
button, input, select, textarea { accent-color: var(--mint); }
input:not([type=range]):not([type=checkbox]), select { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; min-width: 0; }
input::placeholder, textarea::placeholder { color: #859392; opacity: 1; }
select option { background: var(--surface); color: var(--ink); }
svg.studio-icon { display: block; width: 24px; height: 24px; flex: 0 0 auto; overflow: visible; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shell { display: flex; min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: 226px; background: var(--nav); border-right: 1px solid #222c2e; color: var(--ink); display: flex; flex-direction: column; padding: 36px 16px 25px; overflow-y: auto; }
.brand { display: flex; gap: 9px; align-items: center; text-decoration: none; font-size: 20px; font-weight: 650; letter-spacing: -.8px; padding-left: 5px; }
.brand img { width: 40px; height: 40px; }
.brand .brand-name { line-height: 1.25; }
.brand-light { font-weight: 400; color: var(--mint); }
.brand small { display: block; font: 9px 'DM Sans', sans-serif; letter-spacing: 1.8px; color: var(--muted); margin-top: 6px; }
.rail nav { display: grid; gap: 7px; margin-top: 50px; }
.nav { border: 1px solid transparent; background: none; color: #b3bfba; display: flex; gap: 14px; align-items: center; padding: 14px 13px; min-height: 54px; border-radius: 12px; text-align: left; font-size: 14px; }
.nav>span:first-child { font-size: 26px; line-height: 26px; width: 28px; color: #aabbb0; }
.nav .studio-icon { width: 28px; height: 28px; }
.nav:hover:not(:disabled) { background: #1b2425; color: var(--ink); }
.nav.active { color: #172315; background: var(--mint); border-color: var(--mint); font-weight: 650; }
.nav.active>span:first-child { color: #253e22; }
.nav-count { margin-left: auto; font-size: 11px; background: #2d3839; color: var(--ink); padding: 2px 6px; border-radius: 5px; }
.nav.active .nav-count { background: #88b779; color: #152112; }
.rail-bottom { margin-top: auto; padding: 35px 8px 0; }
.local-mark { border-top: 1px solid var(--line); padding-top: 23px; display: flex; gap: 12px; font-size: 12px; line-height: 1.5; }
.local-mark>span { font-size: 28px; color: var(--mint); align-self: flex-start; }
.local-mark small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.edition { display: block; color: #8c9b98; font-size: 10px; letter-spacing: 1.5px; margin-top: 24px; }
main { margin-left: 226px; flex: 1; min-width: 0; }
.topbar { min-height: 80px; border-bottom: 1px solid #222c2e; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 48px; }
.breadcrumb { font-size: 10px; letter-spacing: 1.7px; font-weight: 600; color: #94a29e; }
.breadcrumb span:first-child { margin: 0 18px; color: #5e6e68; }
.breadcrumb span:last-child { letter-spacing: 0; font-size: 13px; color: #c8d0c8; }
.quiet { padding: 7px 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.quiet:hover { color: var(--mint); }
.quiet span { margin-left: 8px; }
.view { padding: 38px 48px 24px; max-width: 1580px; margin: auto; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 31px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: 700; color: #a8c49c; margin-bottom: 11px; }
.gold { color: var(--mint); }
.intro { color: var(--muted); font-size: 16px; margin-top: 13px; line-height: 1.65; }
.engine-badge { white-space: nowrap; font-size: 11px; color: #cfdfc9; background: #19231b; padding: 10px 13px; border: 1px solid #32452d; border-radius: 24px; display: flex; gap: 8px; align-items: center; }
.status-dot { width: 6px; height: 6px; border-radius: 100%; background: var(--mint); box-shadow: 0 0 10px #b6ed9f22; }
.mobile-break { display: none; }
.scope-note { font-size: 12px; line-height: 1.7; color: #a7b5af; margin: -15px 0 25px; max-width: 900px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.writing-column { min-width: 0; }
.editor-card, .direction-card, .voice-panel, .profile-card, .note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.editor-card { overflow: hidden; box-shadow: 0 8px 28px #00000012; }
.editor-tabs { display: flex; gap: 26px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.source-tab { border: 0; background: transparent; font-size: 14px; color: var(--muted); padding: 18px 2px; position: relative; }
.source-tab.active { color: var(--mint); font-weight: 600; }
.source-tab.active:after { content: ''; position: absolute; bottom: -1px; height: 2px; left: 0; right: 0; background: var(--mint); }
.editor-toolbar { display: flex; align-items: center; padding: 19px 24px 4px; gap: 10px; }
.editor-toolbar label { font-size: 12px; color: var(--muted); }
.editor-toolbar select { background: #232c2e; padding: 7px 10px; border-radius: 7px; font-size: 12px; max-width: 160px; }
.editor-toolbar .quiet { margin-left: auto; font-size: 12px; }
textarea { resize: vertical; display: block; border: 0; width: 100%; min-height: 235px; background: transparent; padding: 22px 25px; color: var(--ink); line-height: 1.85; font-size: 20px; font-weight: 400; outline-offset: -4px; }
.editor-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px; color: #9aa9a4; font-size: 12px; border-top: 1px solid #293233; }
.direction-card { margin-top: 19px; padding: 21px 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading .eyebrow { margin-bottom: 7px; font-size: 10px; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 27px; margin-top: 22px; }
.sliders label { display: flex; justify-content: space-between; font-size: 13px; color: #bfccc3; gap: 8px; }
.sliders output { color: var(--mint); font-size: 12px; white-space: nowrap; }
input[type=range] { appearance: none; width: 100%; height: 5px; background: #384542; border: 0; border-radius: 3px; margin: 17px 0 10px; cursor: pointer; padding: 0; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border: 3px solid var(--ink); border-radius: 100%; background: var(--ink); box-shadow: 0 0 0 3px #ffffff08; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 100%; background: var(--ink); }
input[type=range]::-moz-range-progress { background: #709963; height: 5px; }
.range-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.generation-row { display: flex; align-items: center; gap: 17px; margin-top: 23px; }
.primary { border: 1px solid var(--mint); background: var(--mint); color: #152411; padding: 14px 21px; border-radius: 11px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.primary span { color: #35552a; margin-right: 9px; }
.primary [data-icon] { vertical-align: middle; }
.primary .studio-icon { width: 19px; height: 19px; }
.generation-row>span { font-size: 12px; line-height: 1.6; color: var(--muted); max-width: 175px; }
.secondary, .outline { border: 1px solid #47574f; background: #20282a; color: #d4dfd3; padding: 11px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; text-decoration: none; text-align: center; }
.secondary:hover, .outline:hover { border-color: #88a679; }
.full { width: 100%; }
.voice-panel { padding: 23px 19px; align-self: start; min-width: 0; }
.small-chip { font-size: 10px; color: #b6c6b0; border: 1px solid #40503d; padding: 5px 7px; border-radius: 6px; white-space: nowrap; }
.voice-filters { display: flex; gap: 5px; background: #101718; border: 1px solid #2a3434; border-radius: 9px; padding: 4px; margin: 23px 0 18px; }
.filter { border: 0; background: transparent; color: #a2b1aa; font-size: 12px; flex: 1; padding: 8px 4px; border-radius: 6px; }
.filter.active { color: var(--ink); background: #354232; box-shadow: 0 1px 4px #0003; }
.voice-list { display: flex; flex-direction: column; gap: 9px; max-height: 374px; overflow: auto; padding: 2px 2px 5px; scrollbar-width: thin; scrollbar-color: #46584c transparent; }
.voice-option { position: relative; display: flex; align-items: center; width: 100%; padding: 12px 10px; border: 1px solid #35403e; border-radius: 12px; background: #1d2526; text-align: left; gap: 11px; cursor: default; }
.voice-option.selected { background: #293626; border-color: #94c17f; box-shadow: 0 0 0 1px #b6ed9f13; }
.voice-select { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; padding: 0; border: 0; text-align: left; background: transparent; color: var(--ink); }
.voice-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; background: #293b33; color: #bee5ab; font-family: 'Manrope', sans-serif; font-size: 13px; }
.voice-avatar .studio-icon { width: 29px; height: 29px; }
.voice-option[data-gender=F] .voice-avatar { background: #3a3240; color: #debfdf; }
.voice-option:nth-child(3n+2) .voice-avatar { background: #293a43; color: #b7d4e3; }
.voice-option:nth-child(3n) .voice-avatar { background: #403b2b; color: #e8d79d; }
.voice-info { min-width: 0; }
.voice-info strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.voice-info small { display: block; color: #afbeb5; font-size: 12px; margin-top: 4px; line-height: 1.4; }
.voice-preview { border: 1px solid #51664b; background: #18221a; color: var(--mint); border-radius: 50%; width: 30px; height: 30px; font-size: 10px; flex-shrink: 0; }
.voice-check { margin-left: auto; border: 1px solid #62775c; border-radius: 50%; width: 14px; height: 14px; display: grid; place-items: center; font-size: 9px; }
.selected .voice-check { background: var(--mint); color: #182515; border-color: var(--mint); }
.voice-panel>.outline { margin-top: 19px; background: transparent; }
.micro-note { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 13px; }
.voice-panel .micro-note { font-size: 12px; }
.language-note { padding: 0 25px; margin: 0 0 10px; }
.takes-section { margin-top: 41px; }
.empty-session { display: flex; align-items: center; gap: 26px; padding: 28px 0; }
.empty-wave { font-size: 27px; letter-spacing: 3px; color: #6a9360; white-space: nowrap; }
.empty-session strong { font-size: 14px; color: #c5d0c5; font-weight: 500; }
.empty-session p { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.footer { max-width: 1580px; margin: 0 auto; padding: 27px 48px 32px; display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 1.3px; color: #93a29a; }
.footer>span:last-child { letter-spacing: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--mint); }
.take-list { display: grid; gap: 10px; margin-top: 20px; }
.take-row { display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); padding: 16px 18px; background: var(--surface); border-radius: 12px; }
.take-text { min-width: 0; flex: 1; }
.take-text strong { font-size: 14px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.take-text p { font-size: 12px; color: var(--muted); margin-top: 7px; }
.take-actions { display: flex; gap: 10px; align-items: center; }
.round-play { background: #2d3e29; color: var(--mint); border: 1px solid #4d6745; width: 38px; height: 38px; border-radius: 100%; flex-shrink: 0; }
.icon-button { background: transparent; border: 0; font-size: 22px; line-height: 1; color: #b3c3b6; padding: 4px 7px; }
.take-actions .quiet { font-size: 12px; }
.profiles-grid, .about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.profile-card, .note-card { padding: 26px; }
.profile-card h2 { margin-bottom: 12px; }
.profile-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.profile-card .secondary { margin-top: 20px; }
.profile-card .profile-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; }
.note-card { margin-bottom: 20px; }
.note-card h2 { margin-bottom: 16px; }
.note-card p { font-size: 14px; line-height: 1.9; color: #b0bdb5; margin-top: 12px; }
.note-card a { color: var(--mint); }
.view>.note-card { margin-top: 24px; }
.library-toolbar { display: flex; gap: 16px; align-items: center; }
.library-toolbar input { flex: 1; max-width: 500px; padding: 13px 17px; background: var(--surface); font-size: 14px; }
.library-toolbar span { font-size: 12px; color: var(--muted); }
.player { position: fixed; bottom: 19px; left: 252px; right: 26px; z-index: 10; padding: 15px 19px; background: #202b29; color: var(--ink); border: 1px solid #50634a; border-radius: 15px; box-shadow: 0 12px 60px #0009; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.player-play { border: 0; background: var(--mint); color: #263321; width: 39px; height: 39px; border-radius: 100%; flex-shrink: 0; }
.player-meta { width: 175px; flex-shrink: 0; overflow: hidden; }
.player-meta strong { display: block; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.player-meta span { display: block; font-size: 12px; margin-top: 6px; color: #b0c2b3; }
.player canvas { width: 100%; height: 40px; min-width: 40px; flex: 1; max-width: 300px; }
.player>#player-time { font-size: 11px; white-space: nowrap; color: #c1d2c1; }
.player .secondary { white-space: nowrap; background: #2e3c30; color: #d7e6cd; border-color: #53694b; font-size: 12px; }
.player-open { padding-bottom: 135px; }
.progress-area { margin-top: 19px; font-size: 12px; }
.progress-area>div { display: flex; justify-content: space-between; gap: 10px; }
.progress-area progress { width: 100%; height: 5px; accent-color: var(--mint); margin-top: 12px; }
.progress-area p { font-size: 12px; line-height: 1.65; color: var(--muted); margin-top: 8px; }
.error { margin-top: 16px; font-size: 13px; color: #ffd1c6; background: #3b2221; border: 1px solid #88534d; padding: 14px; border-radius: 10px; line-height: 1.6; }
#capture-area { padding: 20px 24px; background: #141b1d; border-bottom: 1px solid var(--line); }
.capture-copy strong { font-size: 14px; }
.capture-copy p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
.capture-buttons { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.file-label { cursor: pointer; }
audio { max-width: 100%; }
#source-audio { margin-top: 15px; width: 100%; height: 36px; }
.recording { color: #ffb5ae!important; border-color: #ba746e!important; }
dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border: 1px solid #465747; border-radius: 20px; padding: 28px; color: var(--ink); box-shadow: 0 30px 140px #000b; }
dialog::backdrop { background: #050a0ccc; backdrop-filter: blur(7px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
dialog label { font-size: 13px; display: block; margin-bottom: 10px; }
dialog input { width: 100%; }
dialog .primary { margin-top: 22px; }
.listening-guide { padding-left: 21px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.listening-guide li { padding: 0 0 18px 6px; }
.listening-guide strong { color: var(--ink); }
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 50; background: #304329; color: #eef4e6; border: 1px solid #718e60; padding: 13px 23px; border-radius: 10px; box-shadow: 0 8px 32px #0006; font-size: 13px; max-width: 90vw; line-height: 1.6; }
.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; }
[hidden] { display: none!important; }

/* Space Agent et finition partagent les surfaces du studio. */
.agent-star { color: var(--mint); font-size: 20px; margin: 0 7px 0 0!important; }
#help-button { display: flex; align-items: center; white-space: nowrap; color: #ceddc4; }
#help-button .studio-icon { width: 22px; height: 22px; }
#space-agent { width: min(550px, calc(100vw - 24px)); max-height: calc(100dvh - 28px); padding: 25px; overflow: auto; }
.agent-header { display: flex; gap: 13px; align-items: center; }
.agent-header .eyebrow { font-size: 9px; margin-bottom: 5px; }
.agent-header h2 { font-size: 23px; }
.agent-header>.icon-button { margin-left: auto; }
.agent-orbit { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border: 1px solid #68835c; background: #24341f; color: var(--mint); border-radius: 50%; font-size: 31px; box-shadow: 0 0 0 5px #202b21; }
.agent-orbit .studio-icon { width: 30px; height: 30px; }
.agent-intro { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 18px 0; }
.agent-messages { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 2px 7px 12px 0; scrollbar-width: thin; }
.agent-message { border: 1px solid #39433f; background: #1e2828; padding: 13px 15px; border-radius: 13px; max-width: 95%; align-self: flex-start; }
.agent-message.user { background: #304229; border-color: #506445; color: #edf2e3; align-self: flex-end; max-width: 85%; }
.agent-speaker { font-size: 10px; letter-spacing: .4px; color: #bad2ad; font-weight: 600; }
.agent-message.user .agent-speaker { color: #c9e3b2; }
.agent-message p { font-size: 14px; line-height: 1.75; margin-top: 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.agent-topics { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.agent-topic { font-size: 12px; padding: 8px 11px; background: #222e25; border: 1px solid #45573e; border-radius: 20px; color: #d5e3cd; }
.agent-action { display: block; border: 0; background: none; padding: 0; margin-top: 10px; color: var(--mint); font-size: 12px; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.agent-form { display: flex; gap: 8px; align-items: center; }
.agent-form input { flex: 1; min-width: 0; font-size: 13px; }
.agent-form .primary { margin: 0; padding: 10px 16px; font-size: 20px; }
.agent-disclosure { font-size: 11px; color: var(--muted); line-height: 1.65; margin-top: 11px; }
.render-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 17px 0 0; font-size: 12px; }
.render-choice label { color: #bdcabb; }
.render-choice select { padding: 8px; background: var(--surface); font-size: 12px; }
.render-choice p { width: 100%; font-size: 12px; line-height: 1.7; color: var(--muted); }
.finish-copy { font-size: 14px; line-height: 1.8; color: #b0beb4; }
.finish-label { display: flex; justify-content: space-between; margin-top: 23px; margin-bottom: 0; }
.finish-label output { color: var(--mint); }
.finish-versions { display: flex; gap: 9px; margin: 18px 0 12px; }
.finish-versions [aria-pressed=true] { background: var(--mint); color: #23331c; border-color: var(--mint); }
#finish-audio { width: 100%; height: 40px; }
.finish-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.finish-actions .primary { margin: 0; font-size: 12px; }
#finish-amount { padding: 0; border: 0; height: 5px; min-height: 0; border-radius: 3px; }

@media (min-width: 1550px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .voice-list { max-height: 405px; }
  textarea { min-height: 270px; }
}
@media (max-width: 1200px) {
  .rail { width: 196px; padding: 30px 12px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .brand small { font-size: 8px; }
  .nav { gap: 11px; padding: 13px 10px; }
  .rail-bottom { padding-left: 3px; padding-right: 3px; }
  main { margin-left: 196px; }
  .topbar { padding: 16px 29px; }
  .view { padding: 30px 29px; }
  .footer { padding: 25px 29px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr) 275px; gap: 18px; }
  .engine-badge { display: none; }
  .player { left: 215px; }
  .voice-panel { padding: 22px 15px; }
  .sliders { gap: 16px; }
  .generation-row>span { display: none; }
}
@media (max-width: 1000px) and (min-width: 701px) {
  .rail { width: 90px; padding: 22px 7px; align-items: center; }
  .brand { padding: 0; }
  .brand img { width: 40px; height: 40px; }
  .brand>span, .rail-bottom { display: none; }
  .rail nav { margin-top: 30px; width: 100%; }
  .nav { font-size: 10px; flex-direction: column; gap: 7px; padding: 11px 2px; justify-content: center; }
  .nav-count { display: none; }
  .nav .studio-icon { width: 28px; height: 28px; }
  main { margin-left: 90px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr) 246px; }
  .view { padding: 28px 24px; }
  .topbar { min-height: 64px; padding: 13px 24px; }
  .breadcrumb { font-size: 9px; }
  .player { left: 105px; gap: 12px; }
  .player-meta { width: 130px; }
  .player canvas { display: none; }
  h1 { font-size: 32px; }
  .editor-tabs { gap: 19px; padding: 0 20px; }
  .editor-toolbar { padding-left: 20px; padding-right: 20px; }
  .direction-card { padding: 20px; }
  .sliders { grid-template-columns: 1fr; gap: 18px; }
  .voice-list { max-height: 425px; }
  .voice-avatar { width: 36px; height: 40px; }
  .voice-avatar .studio-icon { width: 27px; }
  .voice-preview { width: 27px; height: 27px; }
  .voice-info strong { font-size: 13px; }
  .voice-info small { font-size: 11px; }
  .footer { padding: 20px 24px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .rail { position: sticky; inset: auto; top: 0; width: 100%; height: auto; min-height: 115px; flex-direction: column; padding: 12px 12px 8px; z-index: 20; align-items: stretch; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { padding: 0 5px; align-self: flex-start; gap: 9px; }
  .brand>span { display: block; font-size: 18px; }
  .brand small { display: block; font-size: 8px; letter-spacing: 1.7px; margin-top: 3px; }
  .brand img { width: 32px; height: 32px; }
  .rail-bottom { display: none; }
  .rail nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin: 0; width: 100%; }
  .nav { font-size: 10px; font-weight: 500; flex-direction: column; gap: 4px; min-width: 0; min-height: 55px; padding: 6px 2px; border-radius: 9px; justify-content: center; white-space: nowrap; }
  .nav>span:first-child { width: 24px; height: 24px; }
  .nav .studio-icon { width: 24px; height: 24px; }
  .nav-count { display: none; }
  main { margin-left: 0; }
  .topbar { min-height: 53px; padding: 12px 20px; }
  .topbar .quiet { font-size: 12px; }
  .breadcrumb { font-size: 8px; letter-spacing: .7px; }
  .breadcrumb span:first-child { margin: 0 7px; }
  .breadcrumb span:last-child { font-size: 11px; }
  .view { padding: 27px 20px 15px; }
  .page-title { margin-bottom: 25px; align-items: flex-start; }
  .page-title .eyebrow { font-size: 10px; }
  h1 { font-size: 30px; letter-spacing: -1.25px; }
  .intro { font-size: 14px; line-height: 1.6; }
  .scope-note { font-size: 12px; margin-bottom: 22px; }
  .studio-grid { display: flex; flex-direction: column; }
  .voice-panel { order: -1; padding: 18px 17px; width: 100%; align-self: stretch; }
  .voice-panel>.section-heading h2 { font-size: 17px; }
  .voice-panel .eyebrow { display: none; }
  .voice-filters { margin: 15px 0 12px; width: 290px; max-width: 100%; }
  .voice-list { display: flex; flex-direction: row; max-height: none; overflow-x: auto; padding-bottom: 10px; gap: 9px; scroll-snap-type: x proximity; }
  .voice-option { width: 245px; min-width: 245px; padding: 12px 10px; scroll-snap-align: start; }
  .voice-select { gap: 10px; }
  .voice-info strong { font-size: 14px; }
  .voice-info small { font-size: 12px; }
  .voice-check { display: none; }
  .voice-panel>.outline { margin-top: 10px; padding: 10px; }
  .voice-panel .micro-note { font-size: 12px; margin-top: 10px; }
  .editor-tabs { gap: 24px; padding: 0 19px; }
  .source-tab { padding: 16px 2px; }
  .editor-toolbar { padding: 16px 19px 3px; }
  .editor-toolbar select { max-width: 135px; }
  textarea { font-size: 18px; min-height: 205px; padding: 21px; }
  .editor-footer { padding: 14px 20px; font-size: 11px; }
  .sliders { grid-template-columns: 1fr 1fr; gap: 16px; }
  .sliders label { font-size: 12px; min-height: 30px; }
  .direction-card { padding: 19px; }
  .generation-row { margin-top: 18px; }
  .generation-row .primary { flex: 1; }
  .takes-section { margin-top: 32px; }
  .takes-section h2 { font-size: 16px; }
  .takes-section .quiet { font-size: 11px; }
  .empty-session { gap: 17px; }
  .empty-wave { font-size: 19px; letter-spacing: 1px; }
  .empty-session strong { font-size: 13px; }
  .empty-session p, .micro-note { font-size: 12px; }
  .footer { padding: 24px 20px; font-size: 10px; letter-spacing: .8px; gap: 20px; line-height: 1.6; }
  .player { left: 10px; right: 10px; bottom: 10px; padding: 12px; gap: 10px; }
  .player-meta { width: auto; flex: 1; }
  .player-meta span { font-size: 10px; }
  .player canvas { display: none; }
  .player>#player-time { font-size: 10px; }
  .player .secondary { padding: 8px; font-size: 11px; }
  .player-play { width: 36px; height: 36px; }
  .player .icon-button { font-size: 20px; padding: 4px; }
  .profiles-grid, .about-grid { grid-template-columns: 1fr; }
  .page-title>.primary, .page-title>.secondary { padding: 10px; font-size: 11px; white-space: normal; }
  .take-row { gap: 10px; padding: 13px 12px; flex-wrap: wrap; }
  .take-text strong { font-size: 13px; }
  .take-text p { font-size: 11px; }
  .take-actions { margin-left: auto; }
  .take-actions .quiet { font-size: 12px; }
  .library-toolbar { display: block; }
  .library-toolbar input { width: 100%; margin-bottom: 10px; }
  .note-card { padding: 22px; }
  .note-card p { font-size: 13px; }
  #space-agent { padding: 20px; }
  .agent-messages { max-height: 34dvh; }
  .agent-message p { font-size: 13px; }
}
@media (max-width: 380px) {
  .rail { padding-left: 8px; padding-right: 8px; }
  .nav { font-size: 9px; }
  .nav .studio-icon { width: 23px; height: 23px; }
  .view { padding-left: 14px; padding-right: 14px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .breadcrumb { font-size: 7px; }
  .sliders { grid-template-columns: 1fr; }
  .sliders label { min-height: auto; }
  .editor-tabs { gap: 19px; }
  .editor-toolbar { gap: 7px; padding-left: 15px; padding-right: 15px; }
  .editor-toolbar select { max-width: 115px; }
  .agent-topic { font-size: 11px; padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto!important; transition: none!important; animation: none!important; }
}
@media (max-width: 700px) {
  .rail nav:has(.nav:nth-child(7)) { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.topbar-actions{display:flex;align-items:center;gap:12px}.topbar-actions [data-icon]{display:inline-flex;width:18px;height:18px;vertical-align:middle}.topbar-actions [data-icon] svg{width:100%;height:100%}
body.account-switching>*{display:none!important}body.account-switching>.account-switch-shield{display:block!important;padding:48px;font-size:18px}
@media(max-width:600px){.topbar-actions{gap:4px}.topbar-actions .quiet{padding:8px;font-size:11px}.topbar .breadcrumb{font-size:9px}.topbar-actions [data-icon]{width:15px;height:15px}}
.hosted-note{font-size:12px;line-height:1.6;opacity:.85;margin:8px 0 0}
