:root{font-family:'DM Sans',system-ui,-apple-system,sans-serif;color:#eff2f2;background:#0c0e11;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse 70% 45% at 64% -12%,#1e2424 0,transparent 70%),#0c0e11}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #e8f18c;outline-offset:2px}a{color:inherit;text-decoration:none}.shell{max-width:1600px;margin:auto;padding:0 30px 54px}.topbar{height:87px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #262b2d}.brand{display:flex;align-items:center;gap:13px;font-family:'Space Grotesk',sans-serif;letter-spacing:-.055em;font-size:21px;font-weight:700}.mark{width:37px;height:37px;border-radius:12px;background:#d5f277;color:#111413;display:grid;place-items:center;font-size:25px;box-shadow:0 0 30px #d5f27722}.subbrand{font-size:10px;text-transform:uppercase;letter-spacing:.19em;color:#777f83;margin-top:2px}.topright{display:flex;align-items:center;gap:16px;color:#989fa3;font-size:12px}.statusdot{width:7px;height:7px;border-radius:50%;background:#baf17b;display:inline-block;margin-right:4px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 15px;border:1px solid #363e3f;border-radius:9px;background:#1a1d20;color:#edf0ed;font-size:12px;font-weight:700;transition:background .15s,border-color .15s}.btn:hover{background:#252b2c;border-color:#545d55}.btn-accent{background:#d5f277;color:#19211b;border-color:#d5f277}.btn-accent:hover{background:#e6ff9a;border-color:#e6ff9a}.btn-quiet{border-color:transparent;background:transparent;color:#a8adb0}.btn-small{padding:8px 12px}.hero{padding:42px 0 27px;display:flex;align-items:end;justify-content:space-between;gap:24px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.24em;color:#d5f277;text-transform:uppercase}.hero h1{font-family:'Space Grotesk';font-weight:600;letter-spacing:-.065em;font-size:clamp(32px,4.25vw,61px);margin:9px 0 9px;line-height:1.1}.hero p{font-size:13px;color:#91999a;max-width:640px;line-height:1.7;margin:0}.topline{display:flex;align-items:center;gap:10px}.versionpill{display:inline-block;background:#252d28;color:#cfe99f;border:1px solid #364739;border-radius:100px;padding:5px 10px;font-size:10px;font-weight:700}.metrics{display:flex;gap:24px;align-items:center}.metric{text-align:right}.metric strong{font-family:'Space Grotesk';font-size:21px;display:block;color:#eaf0e8}.metric span{font-size:10px;color:#778083;text-transform:uppercase;letter-spacing:.07em}.presets-header{display:flex;align-items:center;justify-content:space-between;margin:20px 0 12px}.section-label{font-family:'Space Grotesk';font-size:14px;font-weight:700;letter-spacing:-.025em}.muted{color:#798285;font-size:11px}.presets{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}.preset{display:flex;text-align:left;align-items:center;gap:12px;padding:15px 16px;border:1px solid #303536;background:linear-gradient(145deg,#1b2021,#161a1b);border-radius:12px;color:#e8edeb}.preset:hover{border-color:#a9c96b;background:#222923}.preset-icon{width:40px;height:40px;flex:none;border-radius:11px;display:grid;place-items:center;font-size:26px;background:#333f35;color:#d9ec9e}.preset:nth-child(2) .preset-icon{background:#40312c;color:#e9aa87}.preset:nth-child(3) .preset-icon{background:#243443;color:#95cbeb}.preset:nth-child(4) .preset-icon{background:#3a2e42;color:#c2a6ed}.preset-title{font-weight:700;display:block;font-size:12px}.preset-sub{display:block;margin-top:4px;color:#828d8c;font-size:10px}.workspace{display:grid;grid-template-columns:220px minmax(315px,1fr) minmax(360px,1.09fr);gap:14px;align-items:start}.panel{border:1px solid #2b3232;border-radius:14px;background:#171a1d;min-width:0;overflow:hidden}.panel-head{padding:21px 21px 17px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #282e2e}.panel-title{font-family:'Space Grotesk';font-weight:700;letter-spacing:-.03em;font-size:15px}.panel-kicker{font-size:10px;color:#87928d;margin-top:4px}.panel-body{padding:20px}.subtle-icon{font-size:16px;color:#b4c987}.label{display:block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.14em;color:#9da9a6;margin-bottom:10px}.field{margin-bottom:22px}.field:last-child{margin-bottom:0}.control{display:block;width:100%;background:#101416;border:1px solid #363e3f;color:#edf1ec;padding:12px 13px;border-radius:8px;font-size:12px;outline:none}.control:focus{border-color:#b7db75}.select{appearance:none;background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="%23949d98"%3E%3Cpath d="m6 8 4 4 4-4"/%3E%3C/svg%3E');background-repeat:no-repeat;background-position:right 10px center;padding-right:31px}.field-hint{color:#7c8782;font-size:10px;margin-top:7px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:11px}.slider-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.slider-heading .label{margin:0}.slider-value{font-family:'Space Grotesk';font-size:12px;color:#e1eeab;font-weight:700}input[type=range]{width:100%;accent-color:#d5f277;margin:0;cursor:pointer;height:5px}.range-extremes{display:flex;justify-content:space-between;font-size:9px;color:#666f70;margin-top:7px}.vocal-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.choice{padding:10px 5px;border:1px solid #303a37;color:#9ca6a0;background:#121718;border-radius:8px;font-size:10px;white-space:nowrap}.choice.active{background:#30402a;border-color:#a9d377;color:#def3b0}.chips{display:flex;flex-wrap:wrap;gap:7px}.chip{border-radius:7px;border:1px solid #36403e;color:#9ca6a0;background:#101517;font-size:10px;padding:9px 10px}.chip.active{color:#e2f1c7;border-color:#6c8951;background:#29352b}.divider{height:1px;background:#2c3132;margin:17px 0}.sidebar{display:flex;flex-direction:column;gap:0}.project-list{display:flex;flex-direction:column;gap:5px}.project{padding:12px;border:1px solid transparent;border-radius:9px;background:transparent;color:#98a3a0;display:flex;align-items:center;text-align:left;gap:10px;width:100%}.project.active{color:#edf4e6;background:#263126;border-color:#456047}.project:hover:not(.active){background:#212829}.project-glyph{font-size:20px;font-family:'Space Grotesk';color:#b0ca90}.project strong{display:block;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:135px}.project small{display:block;font-size:10px;color:#778783;margin-top:3px}.sidebar-note{margin:4px 20px 20px;padding:13px;background:#202823;border:1px solid #344437;border-radius:9px;color:#a5b5a6;font-size:10px;line-height:1.6}.sidebar-note strong{color:#d5f277}.project-actions{display:flex;gap:7px;margin-top:12px}.project-actions .btn{flex:1;min-width:0}.outputbox{border:1px solid #344436;background:linear-gradient(165deg,#19231c,#131817);padding:16px;border-radius:11px}.output-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.8;color:#d8e4d6;min-height:163px}.output-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:11px;color:#c6daa9;font-size:11px;font-weight:700}.micro{color:#89958d;font-size:10px}.output-footer{margin-top:10px;display:flex;align-items:center;gap:7px;justify-content:space-between}.tag{border-radius:5px;background:#2a3530;color:#aaca99;padding:4px 7px;font-size:9px}.textbox{min-height:105px;resize:vertical;line-height:1.6}.director{border-radius:10px;background:linear-gradient(110deg,#27261d,#24261e);border:1px solid #484433;padding:16px}.director-top{display:flex;gap:8px;align-items:center;margin-bottom:8px}.director-dot{width:22px;height:22px;border-radius:7px;background:#d5f277;color:#111a0e;display:grid;place-items:center;font-size:12px}.director strong{font-size:12px}.director p{font-size:10px;line-height:1.5;color:#a9ac98;margin:0 0 11px}.director-row{display:flex;gap:8px}.director-row .control{flex:1;min-width:0}.suggestion{margin-top:12px;padding:12px;background:#191e1a;border:1px solid #49563c;border-radius:8px;font-size:11px;line-height:1.6;color:#d0dec8}.suggestion .btn{margin-top:9px}.suggestion ul{padding-left:16px;margin:6px 0}.footer{padding-top:28px;display:flex;justify-content:space-between;gap:12px;color:#64706e;font-size:10px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);border:1px solid #60774d;border-radius:9px;background:#283728;color:#e8ffd0;padding:11px 20px;box-shadow:0 15px 35px #0008;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:5}.toast.show{opacity:1;transform:translate(-50%,0)}.hint{font-size:10px;color:#7b8682;margin-top:8px}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.statline{display:flex;gap:8px;align-items:center;color:#8e9b93;font-size:10px}.health{border:1px solid #3e453f;background:#1f2721;border-radius:6px;color:#cce4ae;padding:5px 7px;font-size:9px}.output-panel .panel-body{padding:18px}.output-panel .field{margin-bottom:17px}.mini-divider{border-top:1px solid #2a3230;margin:16px 0}.file-input{display:none} .project-name{width:100%;font-size:11px;margin-top:5px}.desktop-only{display:inline}
@media(max-width:1220px){.workspace{grid-template-columns:200px 1fr 1fr}.shell{padding:0 18px 44px}.panel-body{padding:14px}.panel-head{padding:17px 15px}.output-panel .panel-body{padding:14px}.vocal-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1000px){.workspace{grid-template-columns:230px 1fr}.output-panel{grid-column:2}.sidebar{grid-row:span 2}.presets{grid-template-columns:repeat(2,1fr)}.hero h1{font-size:44px}}
@media(max-width:700px){.shell{padding:0 13px 30px}.topbar{height:66px}.brand{font-size:17px}.topright .desktop-only,.metrics{display:none}.hero{padding:31px 0 18px}.hero h1{font-size:38px}.workspace{display:flex;flex-direction:column}.workspace>.panel{width:100%}.sidebar{order:2}.output-panel{order:1}.settings-panel{order:0}.presets{grid-template-columns:repeat(2,1fr);gap:7px}.preset{padding:11px;gap:9px}.preset-icon{width:30px;height:30px;font-size:20px}.preset-sub{font-size:9px}.footer{flex-direction:column}.vocal-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:380px){.presets{grid-template-columns:1fr}.vocal-grid{grid-template-columns:repeat(2,1fr)}}

/* No-API ChatGPT workflow. The user stays in control of copied data and applied changes. */
.chatgpt-bridge{margin-top:14px;background:linear-gradient(120deg,#1d2527,#1a2224);border-color:#3b5153}
.chatgpt-bridge .director-dot{background:#d5f277}
.bridge-actions{margin:12px 0 18px}
.bridge-label{margin-top:13px}
.bridge-textarea{min-height:112px;margin-bottom:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.6;resize:vertical}
@media(max-width:700px){.bridge-actions .btn{flex:1}.bridge-textarea{min-height:155px}}

/* Lyrics Studio: compact section palette and advisory analysis. */
.lyrics-toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.lyrics-tag{font-size:10px;padding:7px 9px;border-color:#455147}
.lyrics-tag:hover{border-color:#c9e69d}
.lyrics-textarea{min-height:175px;white-space:pre-wrap;line-height:1.65}
.lyrics-insights{margin-top:10px;border:1px solid #344139;border-radius:9px;padding:12px;background:#121915;color:#c2d0c3;font-size:11px}
.lyrics-metrics{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:11px;font-weight:600;color:#d5f277}
.lyrics-hints{margin-top:8px;line-height:1.6}
.lyrics-hints ul{margin:0;padding-left:18px}
.lyrics-hints li{padding:2px 0}
.lyrics-insights p{margin:7px 0 0}
@media(max-width:700px){.lyrics-toolbar{max-height:104px;overflow:auto}.lyrics-textarea{min-height:190px}}

/* Local project history in the existing sidebar. */
.history-root{margin-top:15px;border-top:1px solid #303936;padding-top:12px}
.history-header{display:flex}
.history-toggle{width:100%;justify-content:flex-start;text-align:left}
.history-content{padding-top:10px}
.history-content>.btn{width:100%;font-size:10px}
.history-content>.micro{line-height:1.5}
.history-list{display:flex;flex-direction:column;gap:7px;max-height:280px;overflow:auto}
.history-item{display:flex;align-items:center;justify-content:space-between;gap:7px;border:1px solid #344137;background:#131b17;padding:8px;border-radius:8px;min-width:0}
.history-item>div{min-width:0;overflow-wrap:anywhere}
.history-item strong{font-size:10px;color:#e0f0cf;display:block;line-height:1.4}
.history-item small{display:block;font-size:9px;color:#a0b0a3;line-height:1.5;margin-top:4px}
.history-item .btn{flex:none;min-width:32px}
.history-warning{color:#ffbd9b;line-height:1.5;font-size:10px;overflow-wrap:anywhere}

/* M2.4b — guided song creation. The detailed workspace remains accessible. */
.song-wizard-mode .hero,.song-wizard-mode .presets-header,.song-wizard-mode .presets,.song-wizard-mode .workspace{display:none}
.song-wizard{padding:35px 0 18px;min-height:570px}
.wizard-intro{margin:0 0 24px}
.wizard-intro h1{font-family:'Space Grotesk',sans-serif;font-size:clamp(30px,4vw,49px);line-height:1.15;letter-spacing:-.055em;margin:10px 0}
.wizard-intro p{font-size:13px;color:#98a49d;margin:0;line-height:1.6}
.wizard-layout{display:grid;grid-template-columns:minmax(175px,225px) minmax(320px,1fr) minmax(205px,280px);gap:16px;align-items:start}
.wizard-navigation,.wizard-current,.wizard-assistant{background:#171b1d;border:1px solid #2c3532;border-radius:14px;padding:22px;min-width:0}
.wizard-navigation{padding:14px}
.wizard-stage{display:flex;align-items:center;gap:12px;text-align:left;width:100%;background:transparent;color:#a3ada7;border:1px solid transparent;border-radius:9px;padding:12px 10px;font-size:12px;line-height:1.35}
.wizard-stage>span{font-size:10px;letter-spacing:.1em;color:#7e9183;font-weight:700;min-width:22px}
.wizard-stage:hover{background:#273029;color:#f0f6ea}
.wizard-stage.is-active{background:#2c3a29;border-color:#63875b;color:#eafad0;font-weight:700}
.wizard-project-count{border-top:1px solid #2c3532;margin-top:15px;padding:15px 5px 4px;font-size:10px;color:#92a097}
.wizard-current{padding:26px;min-height:420px}
.wizard-meta{display:flex;justify-content:space-between;color:#9fb3a2;font-size:11px;font-weight:600}
.wizard-track{height:5px;border-radius:20px;background:#323a35;margin:12px 0 25px;overflow:hidden}
.wizard-track span{display:block;height:100%;border-radius:20px;background:#d5f277}
.wizard-fields{min-height:255px}
.wizard-fields .field{margin-bottom:19px}
.wizard-fields p{line-height:1.7}
.wizard-info{background:#1d2920;border:1px solid #384936;border-radius:10px;padding:13px;margin:12px 0 20px;font-size:12px;color:#b7cabb;line-height:1.6}
.wizard-info strong{color:#def3c0}
.wizard-info p{margin:8px 0 0}
.wizard-inline{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.wizard-inline>.control{flex:1;min-width:130px}
.wizard-nav-buttons{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:20px;border-top:1px solid #29322f;margin-top:12px}
.wizard-assistant{background:linear-gradient(150deg,#1f2925,#171d20);border-color:#3f5044}
.wizard-assistant-mark{height:35px;width:35px;border-radius:12px;display:grid;place-items:center;color:#19261a;background:#d5f277;font-size:23px}
.wizard-assistant h2{font-family:'Space Grotesk',sans-serif;font-size:17px;margin:16px 0 8px}
.wizard-assistant p{font-size:12px;color:#a1b1a6;line-height:1.65}
.wizard-assistant .btn{white-space:normal;text-align:center;width:100%;margin:10px 0}
.wizard-summary{display:flex;flex-direction:column;gap:9px;margin-bottom:15px;color:#a9c0ae;font-size:12px;overflow-wrap:anywhere}
.wizard-summary strong{color:#eef3e9;font-size:17px}
@media(max-width:1150px){.wizard-layout{grid-template-columns:minmax(170px,215px) 1fr}.wizard-assistant{grid-column:2}}
@media(max-width:740px){.wizard-layout{display:flex;flex-direction:column}.wizard-layout>*{width:100%}.wizard-navigation{display:flex;overflow-x:auto;gap:5px;scrollbar-width:thin}.wizard-stage{width:155px;min-width:155px;flex:0 0 155px}.wizard-project-count{display:none}.wizard-current{padding:18px;min-height:auto}.wizard-assistant{padding:18px}.song-wizard{padding-top:23px}.wizard-fields{min-height:auto}.wizard-intro h1{font-size:34px}}

/* Browser-local audio reference analysis (file bytes are never uploaded). */
.audio-reference{background:linear-gradient(155deg,#1b2725,#171f20);border:1px solid #3c5548;border-radius:12px;padding:19px;margin:20px 0 2px}
.audio-reference h2{font-family:'Space Grotesk',sans-serif;font-size:16px;letter-spacing:-.02em;margin:0 0 8px;color:#e4f3d7}
.audio-reference>p{font-size:12px;color:#a3b6a6;line-height:1.65}
.audio-reference input[type=file]{color:#c1d0c4;padding:13px;margin:10px 0}
.audio-reference input[type=file]::file-selector-button{border-radius:7px;padding:7px 10px;background:#304234;color:#e3f3d7;border:1px solid #526753;cursor:pointer;margin-right:11px}
.audio-reference .audio-summary{display:flex;flex-direction:column;gap:7px;color:#acc3b0;font-size:11px;margin:14px 0;padding:13px 14px;background:#101b17;border:1px solid #384d3e;border-radius:9px}
.audio-reference .audio-summary strong{color:#e7f5df;font-size:12px;overflow-wrap:anywhere}
.audio-reference #reference-style-prompt{min-height:160px;font-size:12px;color:#dae8d6;line-height:1.7;resize:vertical;margin:8px 0 12px}
.audio-reference .wizard-inline{margin-bottom:10px}
@media(max-width:740px){.audio-reference{padding:14px}.audio-reference .wizard-inline>.btn{flex:1}}

/* M3a: compact energy profile shown as six comparable RMS slices. */
.energy-bars{display:flex;align-items:end;height:55px;gap:6px;padding:7px 6px 0;border-radius:8px;background:#101815;border:1px solid #33493a}
.energy-bars>span{flex:1;min-width:8px;max-width:55px;background:linear-gradient(to top,#587e59,#d5f277);border-radius:4px 4px 0 0;transition:height .2s}
@media(max-width:740px){.energy-bars>span{max-width:none}}

/* Optional personal audio genre prototype: never overrides music settings. */
.genre-model-panel{margin-top:14px;padding:14px;border-radius:10px;border:1px solid #495b45;background:#142019}
.genre-model-panel h3{font-size:13px;letter-spacing:.01em;color:#e0f1d4;margin:0 0 10px}
.genre-model-panel input[type=file]{margin-top:7px;font-size:11px;padding:10px}
.genre-model-panel strong{display:block;color:#deefcb;margin:10px 0 4px}
.genre-model-panel p{font-size:11px;line-height:1.65;color:#b2c1b1;margin:8px 0}

/* AI Integration / authorized remote-connector handoff */
.btn-ai-integration{background:linear-gradient(140deg,#d5f277,#a4d56b);color:#16251a;border-color:#bfe785;font-weight:800;white-space:nowrap;box-shadow:0 0 18px #d5f27714}
.btn-ai-integration:hover{background:#e6ff9a;border-color:#e6ff9a}
.ai-integration-panel{margin:18px 0 24px;border-radius:14px;padding:25px 26px;border:1px solid #64774e;background:linear-gradient(145deg,#1c2821,#151d1c);color:#e9f2e3}
.ai-integration-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}
.ai-integration-head h2{font-family:'Space Grotesk',sans-serif;font-size:clamp(22px,3vw,32px);margin:7px 0 13px;letter-spacing:-.045em}
.ai-integration-panel>p,.ai-integration-panel details p{font-size:12px;line-height:1.7;color:#b9ccba;max-width:850px}
.ai-integration-panel>.control{max-width:660px}
.ai-integration-settings{display:flex;flex-wrap:wrap;gap:10px 18px;margin:17px 0}
.ai-integration-settings label{font-size:11px;line-height:1.65;color:#c8d9c4;display:flex;gap:7px;align-items:start;max-width:310px}
.ai-integration-settings input{accent-color:#d5f277;margin:2px 0}
.ai-integration-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:16px 0 22px}
.ai-integration-command{min-height:145px;max-height:250px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;line-height:1.6;white-space:pre-wrap;resize:vertical}
.ai-integration-panel details{margin-top:14px;font-size:11px;border-top:1px solid #36473b;padding-top:12px}
.ai-integration-panel details summary{cursor:pointer;color:#d5f277;font-weight:700}
@media(max-width:1150px){.topbar .topright{gap:7px}.topbar .versionpill{display:none}}
@media(max-width:700px){.ai-integration-panel{padding:17px;margin:12px 0}.btn-ai-integration{font-size:11px;padding:8px}.ai-integration-actions .btn{flex:1}.topbar .topright>.btn:not(.btn-ai-integration){font-size:0;padding:8px;min-width:34px}.topbar .topright>.btn:not(.btn-ai-integration)::after{content:'≡';font-size:16px}}

/* Validated AI action inbox. Browser-side, per-command confirmation; no inbound network endpoint. */
.ai-command-workbench{margin-top:20px;padding:16px;border:1px solid #3d674c;border-radius:12px;background:#122018}
.ai-command-workbench h3{font-size:15px;margin:0 0 8px;color:#ddf2c5}
.ai-command-workbench>p{font-size:11px;line-height:1.65;color:#a9bba7}
.ai-command-workbench textarea{min-height:86px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.65}
.ai-command-workbench button:disabled{opacity:.43;cursor:not-allowed}
.ai-action-preview{padding:12px;border-radius:9px;border:1px solid #6a8052;background:#1d3022;color:#dfeacb;font-size:12px}
.ai-action-preview p{overflow-wrap:anywhere;line-height:1.6}
.ai-action-preview pre{overflow:auto;max-height:220px;font-size:10px;line-height:1.5;white-space:pre-wrap}

/* Explicit human-operated handoff for approved MCP export/import/audio requests */
.ai-user-handoff{margin:16px 0;padding:18px 20px;border:1px solid #8baa62;border-radius:12px;background:#1a2a21;display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.ai-user-handoff strong{color:#e3f4c1;font-size:14px}
.ai-user-handoff p{color:#afc3ae;font-size:12px;line-height:1.55;flex:1 1 300px;margin:0}
.ai-user-handoff button{white-space:normal}

/* Scoped local AI session audit; metadata only, no lyrics or command payloads. */
.ai-relay-audit{margin:16px 0 20px;padding:14px;border:1px solid #3c5a47;border-radius:10px;background:#14211c}
.ai-relay-audit-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ai-relay-audit-head strong{font-size:13px;color:#e5f4d4}
.ai-relay-audit ol{margin:10px 0;padding-left:22px;max-height:230px;overflow:auto;font-size:11px;color:#c1d3c2;line-height:1.7;overflow-wrap:anywhere}
.ai-relay-audit time{font-variant-numeric:tabular-nums;color:#a7c5a4}
.ai-relay-audit .micro{font-size:11px;line-height:1.55;color:#9db1a2}


/* M3f — stage-scoped AI assistance and editable per-step instruction. */
.wizard-ai-controls{display:flex;flex-direction:column;gap:6px;margin:14px 0}
.wizard-ai-controls>.btn{width:100%;font-weight:750}
.wizard-ai-tools{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.wizard-ai-tools .btn{width:100%;margin:0}
.wizard-clear-project{margin-top:14px;border-color:#8d5a4f;color:#efb4a9}
.wizard-copy-tools{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 10px}
.wizard-copy-tools .btn{white-space:normal}
.wizard-ai-result{margin-top:16px;border-top:1px solid #3b4e40;padding-top:14px;min-width:0;overflow-wrap:anywhere}
.wizard-ai-result strong{color:#d5f277}
.wizard-ai-result details{margin-bottom:12px}
.wizard-ai-result summary{font-size:11px;cursor:pointer;margin:8px 0;color:#bdd9ad}
.wizard-ai-result textarea{min-height:112px;font-size:11px;resize:vertical;display:block;width:100%;margin:8px 0}
.wizard-ai-result #wizard-ai-response{min-height:160px}
.wizard-ai-result .wizard-inline .btn{width:auto}
.wizard-ai-result .wizard-info{max-height:280px;overflow:auto;overflow-wrap:anywhere}
.wizard-ai-result pre{white-space:pre-wrap;word-break:break-word}
.wizard-prompt-backdrop{position:fixed;inset:0;z-index:250;background:rgba(0,0,0,.82);display:flex;justify-content:center;align-items:center;padding:20px}
.wizard-prompt-dialog{width:min(680px,100%);max-height:92vh;overflow:auto;background:#1b2320;border:1px solid #748f66;border-radius:14px;padding:26px;box-shadow:0 20px 70px rgba(0,0,0,.6)}
.wizard-prompt-dialog h2{font-size:21px;margin:0 0 10px;color:#ebf7e3}
.wizard-prompt-dialog textarea{width:100%;min-height:250px;resize:vertical;line-height:1.6}
.wizard-prompt-dialog .wizard-inline{margin-top:15px}
@media(max-width:740px){.wizard-ai-tools{grid-template-columns:1fr 1fr}.wizard-copy-tools{flex-direction:column}.wizard-prompt-dialog{padding:17px}.wizard-prompt-dialog textarea{min-height:200px}}

/* M3g — full-song quick idea, before the eight-step wizard. */
.quick-idea-panel{border:1px solid #547d5a;border-radius:16px;background:linear-gradient(130deg,#21312a,#17211f 68%,#1d2523);padding:23px 27px;margin:22px 0 27px;box-shadow:0 15px 38px rgba(0,0,0,.1)}
.quick-idea-heading{display:flex;align-items:start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.quick-idea-heading h2{font-family:'Space Grotesk',sans-serif;color:#e8f6df;font-size:clamp(21px,3vw,30px);margin:7px 0}
.quick-idea-panel>textarea{min-height:120px;width:100%;font-size:13px;line-height:1.7;resize:vertical;margin:9px 0}
.quick-idea-buttons{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:8px 0 12px}
.quick-idea-buttons>.btn:first-child{font-size:13px;padding:11px 17px}
.quick-idea-panel .micro{line-height:1.65;color:#aabbb0}
.quick-idea-result{border-top:1px solid #47644c;margin-top:19px;padding-top:18px}
.quick-idea-result>strong{color:#d5f277}
.quick-idea-result details{margin:12px 0;font-size:12px;color:#c8e1bd}
.quick-idea-result textarea{display:block;width:100%;min-height:140px;resize:vertical;font-size:12px;margin:9px 0;line-height:1.6}
.quick-idea-result #quick-idea-response{min-height:175px}
.quick-idea-result .wizard-info{max-height:320px;overflow:auto;overflow-wrap:anywhere}
.quick-idea-result pre{white-space:pre-wrap;word-break:break-word}
@media(max-width:740px){.quick-idea-panel{padding:16px;margin:13px 0 22px}.quick-idea-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.quick-idea-buttons .btn:first-child{grid-column:span 2}.quick-idea-buttons .btn{white-space:normal}}

/* M3h — independent Studio Dashboard influenced by sound-design workstation workflows.
   Layout and CSS are original; the reference site's assets and source are not used. */
:root{--studio-accent:#d5f277;--studio-outline:#34423d;--studio-surface:#171d1e;--studio-muted:#91a49a}
body{background:radial-gradient(ellipse 65% 28% at 54% -3%,#23413566,transparent 75%),radial-gradient(ellipse 65% 22% at 0% 52%,#152d2844,transparent 75%),#0c1012}
.shell{max-width:1770px;padding:0 27px 68px}
.topbar{height:82px;border-bottom-color:#32433b}
.topbar .brand{font-size:21px}
.studio-view-switch{display:flex;align-items:stretch;gap:7px;padding:12px;margin:14px 0 16px;border:1px solid #34423d;border-radius:16px;background:#141b1b;min-height:72px}
.studio-view-btn{appearance:none;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:4px;min-width:185px;max-width:230px;flex:1;padding:12px 17px;border-radius:10px;border:1px solid transparent;background:transparent;color:#adc4b4;font-size:13px;font-weight:750;text-align:left}
.studio-view-btn small{font-size:10px;font-weight:500;color:#81948b}
.studio-view-btn.active{color:#ecf9d8;background:linear-gradient(140deg,#2b4633,#1c2a25);border-color:#527b54;box-shadow:inset 0 1px #9ad48622}
.studio-view-btn.active small{color:#b4d2a7}
.studio-view-btn:hover:not(.active){background:#1e2825}
.studio-now{margin-left:auto;padding:8px 14px;display:flex;align-items:center;gap:12px;max-width:320px;min-width:0;border-left:1px solid #34433d}
.studio-live-dot{width:9px;height:9px;border-radius:50%;background:#d5f277;box-shadow:0 0 0 5px #d5f2771b;flex:none}
.studio-now strong,.studio-now small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.studio-now strong{font-size:12px;color:#e8f0df}
.studio-now small{margin-top:4px;font-size:10px;color:#91a99b}
.song-wizard-mode .studio-view-switch{margin-bottom:14px}
.song-wizard-mode .quick-idea-panel{margin-bottom:14px}
.hero{padding:19px 0 22px}
.hero h1{font-size:clamp(31px,3.3vw,49px)}
.hero p{max-width:770px}
.workspace{grid-template-columns:minmax(205px,246px) minmax(440px,1.35fr) minmax(360px,.98fr);gap:15px;align-items:start}
.panel{background:linear-gradient(165deg,#171d1e,#14191b);border-color:#2c3d37;border-radius:16px}
.panel-head{border-bottom-color:#2a3b33}
.output-panel{position:sticky;top:14px;max-height:calc(100vh - 29px);overflow:auto;scrollbar-width:thin}
.settings-panel{overflow:visible}
.settings-panel>.panel-body{padding:15px 19px 22px}
.studio-section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:4px 0 16px}
.studio-section-heading h3{font-family:'Space Grotesk',sans-serif;letter-spacing:-.035em;color:#ebf4e8;font-size:19px;line-height:1.35;margin:5px 0 0;font-weight:750}
.studio-counter{font:700 10px ui-monospace,SFMono-Regular,monospace;letter-spacing:.07em;background:#24352a;color:#d6efb8;padding:9px 11px;border:1px solid #52784d;border-radius:8px;white-space:nowrap}
.studio-style-browser{padding:17px;border:1px solid #32463c;border-radius:14px;background:linear-gradient(165deg,#1a2421,#141c1d);margin:0 0 19px}
.studio-search-row{display:flex;gap:8px;align-items:center}
.studio-search-row>.control{font-size:12px;min-width:0;flex:1;background:#111918;border-color:#344c3c}
.studio-favorites-switch{white-space:nowrap;min-height:39px}
.studio-favorites-switch.is-on{background:#33442b;color:#e2f3bf;border-color:#89ad61}
.studio-favorites-switch span{color:#d5f277}
.studio-families{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:13px 1px 9px;white-space:nowrap}
.studio-family{flex:none;display:flex;align-items:center;gap:8px;background:#11191a;border:1px solid #334239;border-radius:8px;color:#9dafa3;font-size:11px;padding:9px 11px}
.studio-family span{color:#8fb193;font-size:9px;font-family:ui-monospace,monospace}
.studio-family.active{border-color:#93c36d;background:#31452c;color:#e5f4d2}
.studio-style-count{margin:2px 0 10px}
.studio-style-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:325px;overflow-y:auto;padding-right:3px;scrollbar-color:#4d624f #17211d}
.studio-style-tile{min-width:0;display:flex;gap:3px;align-items:center;justify-content:space-between;padding:8px 9px;border:1px solid #324139;border-radius:10px;background:#141d1b}
.studio-style-tile.is-selected{background:#293e2d;border-color:#8cbb6b}
.studio-style-tile:hover{border-color:#6b8c6a}
.studio-style-select{min-width:0;flex:1;border:0;background:transparent;text-align:left;color:#edf3e8;padding:3px 0}
.studio-style-select strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.studio-style-select small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#90a497;margin-top:4px}
.studio-tile-actions{display:flex;align-items:center;gap:1px;flex:none}
.studio-tile-star,.studio-tile-mix{border:0;background:transparent;color:#a5b8a2;cursor:pointer;padding:6px 5px;border-radius:7px}
.studio-tile-star{font-size:18px}
.studio-tile-star[aria-pressed=true]{color:#f2d17b}
.studio-tile-star:hover,.studio-tile-mix:hover{background:#304236}
.studio-tile-mix{font-size:9px;border:1px solid #34483a}
.studio-tile-mix.active{color:#d5f277;border-color:#789c57}
.studio-empty{grid-column:1/-1;padding:22px;text-align:center;font-size:12px;color:#aebdb0}
.studio-control-deck{border:1px solid #394a3d;background:linear-gradient(150deg,#1c2822,#151d1e);border-radius:14px;padding:18px;margin:18px 0}
.studio-dial-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.studio-dial{padding:13px 12px 11px;background:#101b18;border:1px solid #33483b;border-radius:11px;min-width:0}
.studio-dial-heading{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-bottom:15px}
.studio-dial-number{font:700 10px ui-monospace,SFMono-Regular,monospace;color:#87c893;letter-spacing:.06em}
.studio-dial-heading label{font-size:11px;color:#bfcfbe}
.studio-dial-heading strong{margin-left:auto;font-size:14px;color:#e7f5bf;font-family:'Space Grotesk',sans-serif}
.studio-dial input[type=range]{accent-color:#d5f277}
.studio-range-extremes{display:flex;justify-content:space-between;margin-top:7px;font:10px ui-monospace,monospace;color:#788e82}
.studio-option-deck{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.studio-option-block{padding:12px;background:#101a19;border:1px solid #304339;border-radius:10px}
.studio-option-block>.label{display:inline-block;margin:0 0 10px 7px;color:#bfcfbe;letter-spacing:.06em;font-size:10px}
.studio-choice-grid{display:flex;flex-wrap:wrap;gap:5px}
.studio-choice{padding:8px 10px;border:1px solid #38473a;background:#1a2520;color:#a5baaa;font-size:10px;border-radius:7px}
.studio-choice.active{border-color:#a0cc74;background:#32492d;color:#e6f8d1}
.studio-choice:hover{border-color:#83a36f}
.studio-audio-drawer{border:1px solid #395449;border-radius:11px;margin:0 0 20px;overflow:hidden}
.studio-audio-drawer>summary{padding:15px 17px;font-size:12px;font-weight:700;color:#d1e7c9;cursor:pointer;background:#202d26;display:flex;justify-content:space-between;align-items:center;list-style-position:inside}
.studio-audio-drawer>summary span{font-size:10px;color:#879f8e}
.studio-audio-drawer .audio-reference{border:none;margin:0;border-radius:0;background:#171f1d}
.studio-output-intro{padding:13px;margin:0 0 17px;background:linear-gradient(135deg,#283b2d,#1b2a26);border:1px solid #4d6d48;border-radius:11px}
.studio-output-intro strong{display:block;color:#f1f6e8;font-size:16px;line-height:1.25;margin:8px 0}
.studio-output-metadata{display:flex;gap:7px;flex-wrap:wrap}
.studio-output-metadata span{font:700 10px ui-monospace,monospace;padding:5px 8px;background:#15251b;border:1px solid #466044;border-radius:6px;color:#d4e9c3}
.studio-output-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.studio-output-actions .btn{padding:7px 10px;font-size:10px}
.studio-quick-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.studio-quick-actions .btn{padding:8px 11px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:1370px){.workspace{grid-template-columns:205px minmax(385px,1.1fr) minmax(300px,.9fr)}.studio-style-grid{grid-template-columns:1fr}.studio-dial-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.studio-option-deck{grid-template-columns:1fr}}
@media(max-width:1050px){.workspace{grid-template-columns:200px minmax(0,1fr)}.output-panel{position:static;grid-column:2;max-height:none}.sidebar{grid-row:span 2}.studio-style-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:740px){.shell{padding:0 13px 35px}.studio-view-switch{padding:8px;gap:5px;flex-wrap:wrap}.studio-view-btn{min-width:0;flex:1;padding:10px}.studio-view-btn small{font-size:9px}.studio-now{max-width:none;flex-basis:100%;border-left:0;border-top:1px solid #34433d;padding-top:12px}.topright{gap:6px}.topright .btn{padding:8px;font-size:10px}.studio-style-grid{grid-template-columns:1fr}.studio-dial-grid{grid-template-columns:1fr}.studio-option-deck{grid-template-columns:1fr}.studio-quick-actions .btn{font-size:9px}.output-panel{max-height:none}.studio-section-heading h3{font-size:17px}.studio-favorites-switch{font-size:10px}.studio-control-deck,.studio-style-browser{padding:12px}}
@media(max-width:740px){.topbar .topright>.btn[data-action=export]{padding:9px 11px;font-size:13px}}

/* Hosted read-only service boundary: browsing and device-local editing remain available. */
.hosted-site-notice{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:13px 18px;margin:12px 0 2px;border:1px solid #63835a;border-radius:12px;background:linear-gradient(135deg,#24392d,#1b302d);color:#d7e8c9;font-size:12px;line-height:1.65}
.hosted-site-notice strong{font-size:12px;color:#e8f7ce;white-space:nowrap}
.hosted-site-notice span{flex:1;min-width:220px;color:#b8cbb8}
.btn-ai-integration:disabled{opacity:.56;cursor:not-allowed}

/* M3i: public app has no explanatory/demo banners or disabled AI director. */
.hosted-inactive-director{display:none}
.studio-mobile-nav{display:none}

/* Mobile app shell: same visual identity and workflow, compact for iPhone Safari. */
@media(max-width:740px){
 html{scroll-behavior:auto}
 body{min-width:320px;overflow-x:clip}
 .shell{padding:0 12px calc(113px + env(safe-area-inset-bottom))}
 .topbar{height:62px;gap:10px}
 .topbar .brand{font-size:16px;gap:9px;white-space:nowrap;letter-spacing:-.05em}
 .topbar .subbrand{display:none}
 .topbar .mark{width:33px;height:33px;font-size:23px;border-radius:10px;box-shadow:none}
 .topbar .versionpill{display:none}
 .topbar .topright{margin-left:auto;gap:5px}
 .topbar .topright>.btn[data-action=export]{font-size:12px;min-width:40px;min-height:39px;padding:8px 10px}
 .topbar .topright>.btn[data-action=export]::after{content:none}
 .studio-view-switch{min-height:59px;padding:6px;margin:10px 0 12px;border-radius:12px}
 .studio-view-btn{min-height:50px;padding:9px 10px;font-size:12px;white-space:nowrap}
 .studio-view-btn small{font-size:9px}
 .studio-now{display:none}
 .quick-idea-panel{margin:12px 0 18px;padding:17px;border-radius:13px}
 .quick-idea-heading h2{font-size:clamp(19px,5vw,24px);margin:5px 0}
 .quick-idea-panel>textarea{min-height:94px;font-size:14px;line-height:1.5}
 .quick-idea-panel .label{line-height:1.55}
 .hero{padding:4px 0 14px}
 .hero h1{font-size:29px;letter-spacing:-.055em}
 .hero p{display:none}
 .presets-header{align-items:flex-start;gap:9px;flex-direction:column;margin:5px 0 10px}
 .studio-quick-actions{display:flex;gap:6px}
 .studio-quick-actions .btn{padding:7px 10px}
 .presets{display:flex;grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;gap:8px;margin-bottom:15px;padding-bottom:5px;scrollbar-width:none}
 .presets::-webkit-scrollbar{display:none}
 .preset{flex:0 0 168px;scroll-snap-align:start;min-height:66px;padding:10px;gap:8px}
 .preset-icon{width:31px;height:31px}
 .preset-title{font-size:11px}
 .preset-sub{font-size:9px}
 .workspace{gap:12px}
 .workspace>.panel{border-radius:12px}
 .panel-head{padding:15px}
 .settings-panel>.panel-body{padding:12px}
 .studio-style-browser{padding:13px;margin-bottom:14px;border-radius:11px}
 .studio-section-heading{margin:2px 0 10px}
 .studio-section-heading h3{font-size:17px}
 .studio-search-row>.control{height:42px}
 .studio-favorites-switch{padding:9px}
 .studio-style-grid{max-height:272px;grid-template-columns:1fr}
 .studio-control-deck{margin:14px 0;padding:12px}
 .studio-option-deck{grid-template-columns:1fr}
 .studio-dial-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .studio-dial{padding:10px 8px}
 .studio-dial-heading{display:block;margin-bottom:9px}
 .studio-dial-heading label{display:block;margin:5px 0}
 .studio-dial-heading strong{display:block;font-size:13px;margin:5px 0}
 .studio-dial input[type=range]{height:24px}
 .studio-choice{min-height:36px}
 .output-panel{order:1}
 .sidebar{order:2}
 .sidebar-note{display:none}
 .footer{padding-bottom:14px}
 .studio-mobile-nav{position:fixed;z-index:90;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:7px max(8px,env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right));background:rgba(17,24,22,.97);border-top:1px solid #3e5445;box-shadow:0 -10px 28px #07110b66;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
 .studio-mobile-tab{appearance:none;min-width:0;min-height:53px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;background:transparent;border:1px solid transparent;border-radius:10px;color:#96aa9a;font-size:10px;font-weight:650}
 .studio-mobile-tab.active{color:#e0f6b8;background:#2a422d;border-color:#4c7043}
 .mobile-tab-symbol{font-size:20px;line-height:1.1;font-weight:500}
 .studio-mobile-tab:focus-visible{outline-offset:-2px}
 .song-wizard,.settings-panel,.sidebar,#studio-output{scroll-margin-top:12px}
}
@media(max-width:375px){
 .shell{padding-left:9px;padding-right:9px}
 .topbar .brand{font-size:14px}
 .studio-dial-grid{grid-template-columns:1fr}
 .studio-dial-heading{display:flex;align-items:center;gap:7px}
 .studio-dial-heading label,.studio-dial-heading strong{margin:0}
 .studio-dial-heading strong{margin-left:auto}
}
@media(prefers-reduced-motion:reduce){.studio-mobile-nav *{transition:none!important}}
/* Avoid duplicate top and bottom navigation and static instructional banners on phones. */
@media(max-width:740px){.studio-view-switch{display:none}.quick-idea-panel>p.micro{display:none}}


/* M3j — core multi-genre blend mixer, shared by Studio, Wizard, Mac, iPhone, and web. */
.genre-mixer{margin:16px 0 21px;padding:17px;border-radius:14px;border:1px solid #54784a;background:linear-gradient(160deg,#1b2b22,#131e1b)}
.genre-mixer .studio-section-heading{margin:0 0 13px}
.genre-mix-bar{height:12px;width:100%;border-radius:6px;overflow:hidden;display:flex;gap:2px;border:1px solid #2e4933;background:#0c1811}
.genre-mix-segment{display:block;min-width:0;transition:width .15s}
.genre-mix-color-0{background:#d5f277}
.genre-mix-color-1{background:#67b8b2}
.genre-mix-color-2{background:#b7a0e5}
.genre-mix-color-3{background:#e4af72}
.genre-mix-color-4{background:#dd8299}
.genre-mix-rows{display:grid;grid-template-columns:1fr;gap:8px;margin:13px 0 15px}
.genre-mix-row{padding:11px 12px;background:#111c18;border:1px solid #30483b;border-radius:10px}
.genre-mix-heading{display:flex;align-items:center;gap:8px;margin:0 0 8px;min-width:0}
.genre-mix-index{font:700 10px ui-monospace,monospace;color:#95bc84}
.genre-mix-heading strong{font-size:12px;color:#e5f4e0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0}
.genre-mix-percent{font:750 13px ui-monospace,SFMono-Regular,monospace;color:#d5f277;min-width:40px;text-align:right}
.genre-mix-remove{background:#202e26;color:#c9cdbd;border:1px solid #455349;border-radius:7px;padding:1px 7px;font-size:20px;line-height:1.2}
.genre-mix-remove:hover{background:#543b35;color:#ffd9cb}
.genre-mix-row input[type=range]{height:17px;display:block;accent-color:#d5f277}
.genre-mix-add{display:flex;gap:9px;align-items:center}
.genre-mix-add>.control{flex:1;min-width:0}
.genre-mix-add>.btn{flex:none}
.genre-mixer .micro{margin:13px 0 0;line-height:1.5}
@media(min-width:1300px){.genre-mix-rows{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:740px){.genre-mixer{margin:13px 0 17px;padding:12px}.genre-mix-add{gap:7px}.genre-mix-add>.btn{padding:12px 10px}.genre-mix-heading strong{font-size:11px}.genre-mix-rows{grid-template-columns:1fr}.genre-mix-row input[type=range]{height:30px;touch-action:pan-y}}

/* M3k: consistent iPhone layout across all shared Studio/Wizard/AI/Lyrics views.
   Presentation only — all workstations use the same editor, validation and project data. */
@media (max-width:740px){
 html{scroll-padding-bottom:calc(91px + env(safe-area-inset-bottom))}
 html,body,#app,.shell{max-width:100%;min-width:0}
 .shell{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));padding-bottom:calc(95px + env(safe-area-inset-bottom))}
 .shell>*{min-width:0}
 main,.workspace,.workspace>*,.workspace .panel-body,.wizard-layout,.wizard-layout>*,
 .wizard-fields,.wizard-fields>*,.quick-idea-panel,.quick-idea-panel>*,
 .output-panel,.studio-style-browser,.genre-mixer,.ai-integration-panel,.audio-reference{min-width:0;max-width:100%}
 h1,h2,h3,p,li,small,label,strong,.label,.panel-title,.panel-kicker,.micro,
 .studio-section-heading,.field-hint,.wizard-summary,.ai-action-preview{overflow-wrap:anywhere}
 pre,code,.output-text,.bridge-textarea,.wizard-ai-result,.quick-idea-result{overflow-wrap:anywhere;word-break:break-word}
 .topbar{width:100%;min-width:0;gap:6px}
 .topbar .brand{min-width:0;white-space:normal;line-height:1.1;font-size:clamp(13px,3.8vw,17px)}
 .topbar .brand>div{min-width:0}
 .topbar .topright{flex:none;margin-left:auto}
 .topbar .topright>.btn{min-width:42px;min-height:44px}
 .hero{min-width:0;padding:8px 0 14px}
 .hero h1{font-size:clamp(25px,7.4vw,32px);line-height:1.13}
 .presets-header{gap:8px}
 .presets-header .studio-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;gap:8px}
 .studio-quick-actions .btn{white-space:normal;min-height:44px;overflow-wrap:anywhere}
 .presets{width:100%;max-width:100%}
 .preset{min-height:68px;min-width:0}
 .panel-head{gap:10px;min-width:0;align-items:center;flex-wrap:wrap}
 .panel-head>div{min-width:0;flex:1}
 .panel-body,.output-panel .panel-body{min-width:0;max-width:100%}
 .field{min-width:0;margin-bottom:17px}
 .label{letter-spacing:.095em;line-height:1.5}
 .control,select,textarea,input[type=text],input[type=search],input[type=number]{
   min-width:0;max-width:100%;font-size:16px;line-height:1.4
 }
 .control{min-height:44px;padding:11px 12px}
 textarea.control{line-height:1.55}
 .two-col,.studio-option-deck{grid-template-columns:minmax(0,1fr)}
 .btn,.choice,.chip,.wizard-stage,.studio-family,.studio-choice,.studio-tile-star,
 .studio-tile-mix,.genre-mix-remove{touch-action:manipulation}
 .btn,.btn-small,.choice,.chip,.wizard-stage,.studio-family,.studio-choice{
   min-height:44px;max-width:100%;white-space:normal;line-height:1.35
 }
 .btn{padding:10px 12px}
 .btn-small{padding:10px}
 .chips{gap:7px}
 .chip{padding:10px 12px;font-size:11px}
 .vocal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .choice{font-size:12px;padding:12px 6px}
 .inline-actions,.wizard-inline,.project-actions,.output-footer,.director-row,
 .ai-integration-actions,.ai-user-handoff{max-width:100%;min-width:0;gap:8px}
 .inline-actions>.btn,.wizard-inline>.btn,.ai-integration-actions>.btn,
 .ai-user-handoff>.btn{flex:1 1 132px;min-width:0}
 .project-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .project-actions .btn{min-width:0}
 .project{min-height:56px}
 .project strong{max-width:none;overflow-wrap:anywhere}
 .history-content .btn,.history-item .btn{min-height:44px}
 .history-item{padding:10px;gap:8px}
 .history-item strong{font-size:12px}
 .history-item small{font-size:11px}
 .history-list{max-height:320px;overflow-x:hidden}
 .history-toggle{min-height:44px}
 .studio-style-browser{padding:12px}
 .studio-section-heading{align-items:flex-start;flex-wrap:wrap;gap:8px}
 .studio-section-heading>div{min-width:0;flex:1}
 .studio-section-heading h3{line-height:1.35}
 .studio-counter{margin-left:auto}
 .studio-search-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 .studio-search-row>.control{width:100%;min-height:44px}
 .studio-favorites-switch{width:100%;min-height:44px;justify-content:center}
 .studio-families{max-width:100%;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
 .studio-family{flex:none;scroll-snap-align:start;font-size:12px}
 .studio-style-grid{grid-template-columns:minmax(0,1fr);max-height:min(46svh,340px);overflow-x:hidden}
 .studio-style-tile{min-width:0;min-height:62px;gap:7px}
 .studio-style-select{min-height:44px;min-width:0}
 .studio-style-select strong{font-size:13px}
 .studio-style-select small{font-size:11px}
 .studio-tile-actions{gap:4px}
 .studio-tile-star,.studio-tile-mix{min-width:39px;min-height:44px}
 .studio-tile-mix{font-size:10px}
 .genre-mixer{max-width:100%;padding:12px}
 .genre-mix-heading{gap:6px}
 .genre-mix-heading strong{white-space:normal;line-height:1.25}
 .genre-mix-remove{min-width:44px;min-height:44px}
 .genre-mix-row{min-width:0}
 .genre-mix-row input[type=range]{height:38px}
 .genre-mix-add{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 .genre-mix-add .control,.genre-mix-add>.btn{width:100%;min-height:44px}
 .studio-control-deck{padding:12px}
 .studio-dial-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 .studio-dial{min-width:0;padding:12px}
 .studio-dial-heading{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
 .studio-dial-heading label{margin:0}
 .studio-dial-heading strong{margin:0 0 0 auto}
 .studio-dial input[type=range]{min-height:38px}
 .studio-option-block{min-width:0}
 .studio-choice-grid{gap:7px}
 .studio-choice{min-width:0;padding:10px 12px;font-size:11px}
 .studio-output-intro{min-width:0}
 .studio-output-metadata{max-width:100%}
 .studio-output-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .studio-output-actions .btn{width:100%;min-width:0;min-height:44px;font-size:11px}
 .outputbox{max-width:100%;padding:13px}
 .output-text{min-height:100px;max-height:55svh;overflow:auto;overflow-wrap:anywhere;line-height:1.6;-webkit-overflow-scrolling:touch}
 .output-label{min-width:0;gap:8px;flex-wrap:wrap}
 .output-footer{flex-wrap:wrap}
 .output-footer>.btn{flex:1 1 120px}
 .quick-idea-heading{gap:9px;align-items:flex-start}
 .quick-idea-heading>div{min-width:0;flex:1 1 220px}
 .quick-idea-heading h2{font-size:clamp(20px,5.6vw,25px);line-height:1.25}
 .quick-idea-heading .tag{max-width:100%;white-space:normal}
 .quick-idea-panel{padding:14px}
 .quick-idea-panel>textarea{min-height:100px}
 .quick-idea-buttons{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .quick-idea-buttons>.btn{min-height:44px}
 .quick-idea-buttons>.btn:first-child{grid-column:1/-1}
 .quick-idea-result,.wizard-ai-result{min-width:0;max-width:100%}
 .quick-idea-result textarea,.wizard-ai-result textarea{font-size:16px;line-height:1.45;max-width:100%}
 .quick-idea-result pre,.wizard-ai-result pre{overflow:auto;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
 .wizard-intro{margin-bottom:15px}
 .wizard-intro h1{font-size:clamp(25px,7vw,32px)}
 .wizard-navigation{gap:8px;max-width:100%;scroll-snap-type:x proximity;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .wizard-stage{flex:0 0 144px;width:144px;min-width:144px;min-height:51px;scroll-snap-align:center;padding:10px}
 .wizard-current,.wizard-assistant{padding:14px;max-width:100%}
 .wizard-fields{min-height:0}
 .wizard-nav-buttons{gap:9px}
 .wizard-nav-buttons>.btn{min-width:0;flex:1;min-height:44px}
 .wizard-assistant .btn{min-height:44px}
 .wizard-ai-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
 .wizard-ai-tools>.btn{min-width:0}
 .wizard-copy-tools{gap:8px}
 .wizard-copy-tools>.btn{width:100%}
 .wizard-inline{gap:8px}
 .wizard-inline .control{flex:1 1 170px;min-width:0}
 .audio-reference{margin:13px 0;padding:12px}
 .audio-reference .audio-summary,.genre-model-panel{min-width:0;padding:11px}
 .audio-reference input[type=file],.genre-model-panel input[type=file]{font-size:13px;min-width:0;max-width:100%;padding:9px;overflow:hidden}
 .audio-reference input[type=file]::file-selector-button,.genre-model-panel input[type=file]::file-selector-button{min-height:44px;margin-bottom:5px}
 .audio-reference .wizard-inline>.btn{flex:1 1 128px}
 .ai-integration-panel{min-width:0;padding:14px;margin:12px 0}
 .ai-integration-head{flex-wrap:wrap}
 .ai-integration-settings{display:grid;grid-template-columns:minmax(0,1fr)}
 .ai-integration-settings label{max-width:100%;font-size:12px}
 .ai-integration-settings input{min-width:18px;min-height:18px}
 .ai-integration-command{min-height:170px}
 .ai-command-workbench{padding:12px;min-width:0}
 .ai-action-preview{max-width:100%}
 .ai-action-preview pre{max-width:100%;overflow:auto}
 .ai-relay-audit{padding:12px;max-width:100%}
 .ai-user-handoff{padding:12px}
 .director-row{flex-wrap:wrap}
 .director-row>.btn{flex:1 1 130px}
 .lyrics-toolbar{max-height:none;display:flex;flex-wrap:wrap;overflow:visible;gap:6px}
 .lyrics-tag{min-height:44px;padding:10px 12px}
 .lyrics-textarea{font-size:16px;min-height:230px}
 .lyrics-insights{max-width:100%}
 .lyrics-metrics{gap:8px}
 .footer{flex-wrap:wrap;align-items:flex-start;line-height:1.5}
 .toast{z-index:190;bottom:calc(76px + env(safe-area-inset-bottom));width:min(92vw,420px);max-width:calc(100vw - 20px);text-align:center;padding:12px 14px;overflow-wrap:anywhere}
 .studio-mobile-nav{z-index:90}
 .studio-mobile-tab{min-height:55px;min-width:0;touch-action:manipulation}
 .wizard-prompt-backdrop{height:100vh;height:100dvh;max-width:100vw;overflow-y:auto;overscroll-behavior:contain;align-items:center;padding:max(10px,env(safe-area-inset-top)) 10px max(12px,env(safe-area-inset-bottom))}
 .wizard-prompt-dialog{width:100%;min-width:0;max-height:calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:12px;padding:15px;overflow:auto;-webkit-overflow-scrolling:touch}
 .wizard-prompt-dialog textarea{font-size:16px;min-height:160px}
 .wizard-prompt-dialog h2{font-size:19px;line-height:1.35}
 .wizard-prompt-dialog .wizard-inline{gap:8px}
 .wizard-prompt-dialog .wizard-inline>.btn{min-width:0;flex:1 1 110px}
 :is(input:not([type=range]),textarea,select):focus{scroll-margin-bottom:calc(20px + env(safe-area-inset-bottom))}
}
@media(max-width:375px){
 .studio-output-actions{grid-template-columns:minmax(0,1fr)}
 .quick-idea-buttons{grid-template-columns:minmax(0,1fr)}
 .quick-idea-buttons>.btn:first-child{grid-column:1}
 .studio-quick-actions{grid-template-columns:minmax(0,1fr)}
 .topbar .brand{font-size:13px}
 .studio-control-deck .studio-section-heading h3{font-size:16px}
 .wizard-prompt-dialog .wizard-inline>.btn{flex:1 1 100%}
}

@media(max-width:740px){body:has(.wizard-prompt-backdrop){overflow:hidden}.wizard-prompt-dialog:focus-within{scroll-padding-bottom:20px}}
@media(max-width:740px){.topbar .topright>.btn[data-action=export]{min-height:44px;min-width:44px}}
/* Automatic AI connector: only the first connection shows this inline modal. */
.ai-provider-consent{display:flex;align-items:flex-start;gap:10px;margin:16px 0;color:#ccdccd;font-size:12px;line-height:1.55}
.ai-provider-consent input{width:20px;height:20px;flex:none;margin-top:2px;accent-color:#d5f277}
#idea-provider-key{width:100%;font-family:ui-monospace,SFMono-Regular,monospace}
@media(max-width:740px){.ai-provider-consent{font-size:13px}.ai-provider-consent input{min-width:22px;min-height:22px}.quick-idea-buttons .btn[data-idea-action=provider-settings]{grid-column:auto}}

/* M3n — Suno transfer, same controls on Mac and iPhone. */
.suno-import-trigger{grid-column:1 / -1;min-height:48px;font-size:13px}
.suno-transfer-dialog{width:min(92vw,700px);max-width:700px;max-height:min(88dvh,850px);overflow:auto;padding:20px}
.suno-transfer-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.suno-transfer-heading>div{min-width:0}
.suno-transfer-heading h2{font-size:23px;line-height:1.2;margin:6px 0 14px}
.suno-transfer-heading>.btn{min-width:44px;min-height:44px;font-size:20px}
.suno-transfer-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 13px}
.suno-transfer-choice{display:flex;flex-direction:column;text-align:left;gap:7px;padding:15px;background:#18241e;color:#e2efe0;border:1px solid #536356;border-radius:12px;min-width:0;min-height:78px}
.suno-transfer-choice strong{font-size:14px}
.suno-transfer-choice small{font-size:11px;color:#a6bca6;line-height:1.4}
.suno-transfer-choice.active,.suno-transfer-choice:focus-visible{border-color:#d5f277;background:#23372a}
.suno-transfer-boundary{margin:10px 0 15px;line-height:1.55}
.suno-transfer-stage{display:flex;flex-direction:column;gap:5px;margin:12px 0 16px;padding:12px;border:1px solid #64865e;border-radius:10px;background:#20362a;font-size:12px;line-height:1.5}
.suno-transfer-stage span{color:#c5d2c3}
.suno-transfer-fields{display:grid;grid-template-columns:1fr;gap:9px;margin:12px 0}
.suno-transfer-field{min-width:0;padding:12px;border-radius:10px;border:1px solid #374a3b;background:#121d18}
.suno-transfer-field-head{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:10px}
.suno-transfer-field-head strong{font-size:12px}
.suno-transfer-field-head .btn{font-size:12px;min-height:44px;min-width:108px}
.suno-transfer-value{font:12px/1.55 ui-monospace,SFMono-Regular,monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:108px;overflow:auto;color:#d2e6c9}
.suno-transfer-footer{display:flex;gap:9px;justify-content:space-between;flex-wrap:wrap;margin-top:12px}
.suno-transfer-footer .btn{min-height:44px;flex:1}
@media(max-width:740px){
 .suno-transfer-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 25px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:14px}
 .suno-transfer-heading h2{font-size:19px}
 .suno-transfer-choice{min-height:83px;padding:10px;gap:5px}
 .suno-transfer-choice strong{font-size:12px}
 .suno-transfer-choice small{font-size:10px}
 .suno-transfer-value{max-height:95px}
 .suno-transfer-fields{gap:8px}
 .suno-transfer-field{padding:10px}
 .suno-transfer-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:360px){
 .suno-transfer-choices{grid-template-columns:minmax(0,1fr)}
 .suno-transfer-choice{min-height:63px}
 .suno-transfer-footer{grid-template-columns:minmax(0,1fr)}
}

/* M3o: clipboard Style first, share Lyrics only after a second user gesture. */
.suno-transfer-app-actions{display:flex;flex-direction:column;gap:9px;margin:12px 0 14px}
.suno-transfer-app-actions .btn{min-height:48px;width:100%}
.suno-transfer-app-actions .micro{margin:0}

/* Import instructions remain accessible but can be hidden per browser. */
.suno-transfer-notice{padding:13px 15px;margin:12px 0;border:1px solid #526c56;border-radius:11px;background:#1b2b22;line-height:1.5}
.suno-transfer-notice>strong{font-size:14px;color:#e1edce}
.suno-transfer-notice>p{margin:8px 0;font-size:12px;color:#c8dac3}
.suno-transfer-notice b{color:#e5f4db}
.suno-transfer-notice>.suno-transfer-copy-state{color:#cef2a9}
.suno-transfer-notice>.suno-transfer-copy-warning{color:#f2c6a0}
.suno-transfer-hide-label{display:flex;align-items:center;gap:9px;margin-top:12px;font-size:12px;color:#cfdeca;cursor:pointer}
.suno-transfer-hide-label input{width:22px;height:22px;flex:none;accent-color:#d5f277}
.suno-transfer-show-notice{appearance:none;border:0;background:transparent;color:#acc6a6;font-size:12px;text-decoration:underline;text-align:left;margin:10px 0;padding:8px 0;min-height:44px;cursor:pointer}
@media(max-width:740px){.suno-transfer-notice{padding:11px}.suno-transfer-notice>p{font-size:12px}.suno-transfer-hide-label{font-size:13px;line-height:1.35;min-height:44px}}

/* M3q — shared manually editable Suno output cards (Mac and iPhone). */
.studio-output-title-edit{display:block;width:100%;min-width:0;background:#101915;color:#e5f3da;border:1px solid #465d48;border-radius:9px;padding:10px 12px;font:700 17px/1.4 'Space Grotesk',sans-serif;margin:10px 0}
.studio-output-title-edit:focus{border-color:#d5f277;outline:1px solid #d5f277}
.output-text-edit{display:block;width:100%;min-width:0;max-width:100%;height:auto;min-height:175px;max-height:55vh;resize:vertical;border:1px solid #405942;border-radius:9px;background:#0f1713;padding:13px;font:13px/1.75 ui-monospace,SFMono-Regular,monospace;color:#e0eed9;white-space:pre-wrap;overflow-wrap:anywhere}
.output-text-edit:focus{border-color:#d5f277;outline:1px solid #d5f277}
.output-label label{cursor:text}
.output-footer{gap:12px;flex-wrap:wrap}
.output-style-actions{display:flex;flex-wrap:wrap;gap:7px}
.output-exclude-edit{resize:vertical;min-height:80px;font-size:13px;line-height:1.5}
@media(max-width:740px){
 .studio-output-title-edit,.output-text-edit,.output-exclude-edit{font-size:16px}
 .output-text-edit{min-height:185px;max-height:45svh;padding:12px}
 .output-style-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .output-style-actions .btn{min-width:0;min-height:44px;white-space:normal}
 .output-exclude-edit{min-height:86px}
}
@media(max-width:360px){.output-style-actions{grid-template-columns:minmax(0,1fr)}}

/* M3r: direct integer BPM entry for song creation and later editing. */
.quick-idea-tempo,.output-bpm-editor{margin:15px 0 18px;max-width:100%;padding:12px 14px;border:1px solid #42543f;border-radius:11px;background:#19261c}
.bpm-entry-row,.quick-idea-tempo-row{display:flex;align-items:center;gap:11px;min-width:0}
.bpm-direct-input{width:105px;max-width:100%;min-height:46px;text-align:center;font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;color:#e2f5bd;flex:none}
.bpm-entry-row .label{margin:0}
.bpm-entry-row .micro,.quick-idea-tempo-row .micro{font-size:12px;color:#b9c5ac}
.bpm-pin-label{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:12px;line-height:1.4;color:#bacdb6;cursor:pointer}
.bpm-pin-label input{width:20px;height:20px;flex:none;accent-color:#d5f277}
.studio-dial .bpm-entry-row{margin-top:14px;flex-wrap:wrap}
.wizard-fields .bpm-entry-row{margin-top:9px}
.output-bpm-editor{margin-top:12px;margin-bottom:15px}
@media(max-width:740px){
 .quick-idea-tempo,.output-bpm-editor{padding:12px}
 .bpm-direct-input{min-width:92px;min-height:46px;font-size:16px}
 .bpm-pin-label{font-size:13px;min-height:44px}
 .quick-idea-tempo-row,.bpm-entry-row{flex-wrap:wrap}
}

.bpm-manual-style-warning{font-size:11px;color:#ebbd89;margin:9px 0 0;line-height:1.5}

/* M3s — shared Radio Edit / DJ Extended structural selector for electronic music. */
.track-version-selector{min-width:0;max-width:100%;padding:14px;border:1px solid #4e6551;background:linear-gradient(155deg,#1c2e22,#15211a);border-radius:12px;margin:14px 0}
.track-version-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-bottom:11px}
.track-version-heading>strong{font:700 14px/1.4 'Space Grotesk',sans-serif;color:#ebf4df}
.track-version-heading .micro{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#b2c4a9}
.track-version-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.track-version-choice{display:flex;flex-direction:column;gap:7px;min-width:0;min-height:85px;text-align:left;cursor:pointer;background:#131d17;color:#e4f0dc;border:1px solid #536955;border-radius:10px;padding:13px;touch-action:manipulation;white-space:normal}
.track-version-choice strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.track-version-choice small{font-size:11px;color:#adc4ad;line-height:1.45;overflow-wrap:anywhere}
.track-version-choice.active{background:#29442e;border-color:#daf379;box-shadow:inset 0 0 0 1px #daf379}
.track-version-choice:focus-visible{outline:2px solid #daf379;outline-offset:2px}
.track-version-choice.active strong{color:#e6ffb0}
.track-version-hint{margin:12px 0 0;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:740px){
 .track-version-selector{padding:12px;max-width:100%}
 .track-version-heading>strong{font-size:13px}
 .track-version-choice{padding:11px;min-height:87px}
 .track-version-choice strong{font-size:12px}
 .track-version-choice small{font-size:11px}
}
@media(max-width:360px){
 .track-version-choices{grid-template-columns:minmax(0,1fr)}
 .track-version-choice{min-height:67px}
}

/* M3u — Russian arrangement timeline; native, scrollable without horizontal page overflow. */
.arrangement-builder{min-width:0;max-width:100%;overflow:hidden;margin:18px 0 23px;border:1px solid #485d4d;border-radius:15px;padding:16px;background:linear-gradient(145deg,#1b2923,#121a19 75%)}
.arrangement-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:18px}
.arrangement-heading h3{margin:6px 0;font:700 19px/1.2 'Space Grotesk',sans-serif;letter-spacing:-.03em;color:#ecf8df}
.arrangement-heading .micro{line-height:1.5}
.arrangement-total{display:flex;flex-direction:column;align-items:flex-end;flex:none;border:1px solid #5b7554;border-radius:11px;padding:11px 14px;background:#213626}
.arrangement-total strong{font:700 27px/1.1 'Space Grotesk',sans-serif;color:#dbf495;font-variant-numeric:tabular-nums}
.arrangement-total span{font-size:10px;color:#b9c8b4;white-space:nowrap;margin-top:6px}
.arrangement-timeline-scroll{overflow-x:auto;overflow-y:hidden;max-width:100%;overscroll-behavior-x:contain;border:1px solid #2e4638;border-radius:12px;background:#0d1915;scrollbar-color:#617968 #1d2c23;scrollbar-width:thin}
.arrangement-timeline-inner{min-width:680px;padding:13px 12px 11px;max-width:none}
.arrangement-time-ruler{position:relative;height:24px;overflow:visible;border-bottom:1px dashed #527061;margin-bottom:8px}
.arrangement-time-ruler span{position:absolute;bottom:5px;font:10px ui-monospace,SFMono-Regular,monospace;color:#b3c6b2;white-space:nowrap;transform:translateX(-25%);font-variant-numeric:tabular-nums}
.arrangement-time-ruler span:first-child{transform:none}
.arrangement-time-ruler span:last-child{transform:translateX(-100%)}
.arrangement-blocks{display:flex;gap:2px;height:85px}
.arrangement-block{position:relative;min-width:0;border-radius:6px;padding:11px 7px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;overflow:hidden;border:1px solid #ffffff24;background:#537d69;color:#f6ffef}
.arrangement-block strong{font-size:11px;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arrangement-block span{font:10px/1.3 ui-monospace,SFMono-Regular,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#f3ffe6}
.arrangement-type-intro,.arrangement-type-outro{background:#477565}
.arrangement-type-verse{background:#486e8a}
.arrangement-type-prechorus,.arrangement-type-build{background:#a37e44}
.arrangement-type-chorus,.arrangement-type-drop{background:#ad654c}
.arrangement-type-breakdown{background:#565b96}
.arrangement-type-interlude,.arrangement-type-bridge{background:#776a83}
.arrangement-energy{margin-top:11px}
.arrangement-energy-label{text-align:left;font-size:10px;color:#abc6b4;margin-bottom:5px}
.arrangement-energy-track{display:flex;gap:2px;height:22px;border:1px solid #294538;background:#102018;border-radius:4px;overflow:hidden;align-items:flex-end}
.arrangement-energy-cell{height:100%;min-width:0;display:flex;align-items:flex-end;background:#192b21}
.arrangement-energy-cell i{display:block;background:#b6dd81;width:100%;opacity:.82}
.arrangement-editor-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:18px;margin-bottom:10px;flex-wrap:wrap}
.arrangement-editor-title strong{color:#e2f5d1;font-size:12px}
.arrangement-editor-list{display:flex;flex-direction:column;gap:7px;min-width:0}
.arrangement-editor-row{display:grid;grid-template-columns:24px minmax(0,1.2fr) minmax(100px,.8fr) 48px auto;align-items:center;gap:7px;background:#13221b;border:1px solid #354e3d;border-radius:8px;padding:7px;min-width:0}
.arrangement-row-number{font:11px ui-monospace,SFMono-Regular,monospace;color:#acc09d;text-align:center}
.arrangement-editor-row .control{min-width:0;padding:9px 6px;font-size:12px}
.arrangement-row-time{font:11px ui-monospace,SFMono-Regular,monospace;color:#c4d9ac;white-space:nowrap;font-variant-numeric:tabular-nums}
.arrangement-row-actions{display:flex;gap:3px}
.arrangement-row-actions button{display:grid;place-items:center;min-width:29px;min-height:35px;padding:0;border-radius:6px;border:1px solid #526356;background:#25362b;color:#d8e5cc;font-size:14px}
.arrangement-row-actions button:disabled{opacity:.3}
.arrangement-bottom{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.arrangement-bottom .btn{min-height:42px}
.arrangement-disclaimer{line-height:1.55;margin:13px 0 0}
@media(max-width:740px){
 .arrangement-builder{padding:12px;border-radius:12px;margin:16px 0}
 .arrangement-heading h3{font-size:17px}
 .arrangement-heading{flex-wrap:wrap}
 .arrangement-total{min-width:112px;align-items:flex-start}
 .arrangement-total strong{font-size:23px}
 .arrangement-timeline-scroll{width:100%}
 .arrangement-editor-row{grid-template-columns:20px minmax(0,1fr) minmax(84px,.78fr) 42px;gap:5px}
 .arrangement-row-actions{grid-column:2 / -1;justify-content:flex-end}
 .arrangement-row-actions button{min-width:42px;min-height:38px}
 .arrangement-editor-row .control{font-size:16px;min-height:42px}
 .arrangement-block strong{font-size:12px}
 .arrangement-bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .arrangement-bottom .btn{min-width:0;white-space:normal}
}
@media(max-width:360px){.arrangement-bottom{grid-template-columns:1fr}.arrangement-heading{flex-direction:column}.arrangement-total{width:100%}}

/* Wider proportional grid for readable Russian song-part captions. */
.arrangement-editor-row{grid-template-columns:22px minmax(105px,1fr) minmax(100px,.8fr) 44px}
.arrangement-row-actions{grid-column:2/-1;justify-content:flex-end}
.arrangement-row-actions button{min-width:36px;min-height:36px}
.arrangement-scroll-hint{font-size:10px;color:#b4caaa;margin:0 0 8px}
@media(max-width:740px){.arrangement-scroll-hint{font-size:12px}.arrangement-row-actions button{min-width:44px;min-height:42px}}

/* The whole row, including actions, must fit a 320px iPhone screen. */
@media(max-width:740px){
 .arrangement-editor-row{display:grid;grid-template-columns:20px minmax(0,1fr) minmax(0,1fr);gap:8px;padding:9px}
 .arrangement-row-number{grid-column:1;grid-row:1}
 .arrangement-kind{grid-column:2;grid-row:1}
 .arrangement-bars{grid-column:3;grid-row:1}
 .arrangement-row-time{grid-column:2/-1;grid-row:2}
 .arrangement-row-actions{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .arrangement-row-actions button{width:100%;min-width:0;min-height:44px}
 .arrangement-editor-row .control{min-height:44px}
 .arrangement-bottom .btn{min-height:44px}
}

/* M3v — vocal lab: comfortable Russian controls on Mac and iPhone. */
.vocal-lab{margin:22px 0;padding:20px;border:1px solid #486350;border-radius:16px;background:linear-gradient(155deg,#1e3028,#121d1a 63%,#171b22);min-width:0}
.vocal-lab-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.vocal-lab-head h3{font:700 21px/1.2 'Space Grotesk',sans-serif;color:#e2f7c7;margin:8px 0}
.vocal-lab-head p{line-height:1.55}
.vocal-lab-icon{display:grid;place-items:center;border:1px solid #658452;border-radius:14px;color:#d0eb99;width:46px;height:46px;font-size:26px;flex:none}
.vocal-lab-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.vocal-picker{display:grid;gap:8px;min-width:0}
.vocal-picker>span,.vocal-custom>span{font-size:11px;font-weight:700;color:#c7d7be}
.vocal-picker .control{min-height:44px;min-width:0;padding:9px 8px;font-size:12px}
.vocal-nuances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.vocal-control{display:grid;min-width:0;gap:10px;padding:13px;background:#101a17;border:1px solid #334a3a;border-radius:10px}
.vocal-control>span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#dbe9d7}
.vocal-control strong{color:#d3f499;font-size:12px;font-variant-numeric:tabular-nums}
.vocal-control input[type=range]{width:100%;height:30px;accent-color:#c4ef82}
.vocal-control small{font-size:10px;line-height:1.5;color:#92a69a}
.vocal-custom{display:grid;gap:8px;margin-bottom:15px;min-width:0}
.vocal-custom textarea{min-height:77px;resize:vertical;line-height:1.5}
.vocal-arc,.vocal-help{border:1px solid #3e5846;border-radius:10px;margin:12px 0;padding:12px;background:#111e19}
.vocal-arc summary,.vocal-help summary{cursor:pointer;font-weight:700;font-size:12px;color:#d2edc1;min-height:25px}
.vocal-arc>p,.vocal-help p{line-height:1.6}
.vocal-help a{display:inline-block;margin-top:6px;text-decoration:underline;font-size:12px;color:#d4f099}
.vocal-arc-list{display:grid;gap:7px;margin-top:10px}
.vocal-arc-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,1.2fr);align-items:center;gap:9px;font-size:11px;color:#c4ddc8}
.vocal-arc-row .control{min-width:0;min-height:44px;font-size:12px}
.vocal-alternatives{margin:18px 0 12px}
.vocal-alternatives-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.vocal-alternatives-heading strong{font-size:13px;color:#e7f3d3}
.vocal-alternatives-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.vocal-alternative{min-width:0;min-height:96px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:7px;padding:12px;border:1px solid #456449;border-radius:10px;background:#202c24;color:#dbe9d4;white-space:normal}
.vocal-alternative:hover{background:#2b3e30;border-color:#b3dc79}
.vocal-alternative strong{font-size:12px}
.vocal-alternative span{font-size:10px;line-height:1.45;color:#a1b4a4}
.vocal-alternative em{font-style:normal;color:#d0f09e;font-size:10px;margin-top:auto}
.vocal-lab-actions{display:flex;flex-wrap:wrap;gap:8px}
.vocal-lab-actions .btn{min-height:44px;white-space:normal;text-align:center}
.vocal-lab-disclaimer{line-height:1.55;margin:15px 0 0}
@media(max-width:1100px){.vocal-lab-fields{grid-template-columns:1fr}.vocal-alternatives-grid{grid-template-columns:1fr}}
@media(max-width:740px){
 .vocal-lab{padding:12px;margin:18px 0;border-radius:12px}
 .vocal-lab-head h3{font-size:19px}
 .vocal-lab-fields,.vocal-nuances,.vocal-alternatives-grid{grid-template-columns:1fr}
 .vocal-picker .control,.vocal-arc-row .control,.vocal-custom textarea{font-size:16px;min-height:44px}
 .vocal-arc-row{grid-template-columns:minmax(0,1fr);gap:6px}
 .vocal-alternative{min-height:70px}
 .vocal-lab-actions{display:grid;grid-template-columns:1fr}
 .vocal-lab-actions .btn{width:100%;min-height:44px}
}

.vocal-library{margin:16px 0;padding:13px;border:1px solid #416348;border-radius:10px;background:#17261e;min-width:0}
.vocal-library>strong{font-size:13px;color:#e1f1d1}
.vocal-library-save{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:12px 0}
.vocal-library-save .control,.vocal-library-save .btn{min-height:44px}
.vocal-library-items{display:grid;gap:7px}
.vocal-library-items .micro{line-height:1.5}
.vocal-library-item{display:flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid #304a3b;border-radius:8px}
.vocal-library-item>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:11px}
.vocal-library-item .btn{min-height:44px}
@media(max-width:740px){.vocal-library-save{grid-template-columns:1fr}.vocal-library-save .control{font-size:16px}.vocal-library-item .btn{min-width:44px}}

/* M3w — one task at a time, same navigation on desktop, mobile and Mac. */
.shell .studio-workflow-nav{display:flex;align-items:stretch;gap:12px;margin:16px auto 19px;max-width:1150px;min-width:0}
.studio-workflow-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));flex:1;gap:7px;min-width:0}
.workflow-step{display:flex;align-items:center;gap:9px;min-height:61px;min-width:0;text-align:left;border-radius:12px;border:1px solid #37473d;color:#9cae9d;background:#191f1d;padding:10px 12px;font-size:12px;cursor:pointer}
.workflow-step:hover{border-color:#7b9f68;color:#e1eed7}
.workflow-step.active{background:linear-gradient(135deg,#304c35,#25372d);color:#e8f6d2;border-color:#9dc577}
.workflow-step-index{color:#a6ca86;font-variant-numeric:tabular-nums;font-size:12px;font-weight:800}
.workflow-step-name{font-weight:700;overflow-wrap:anywhere}
.workflow-project-link{min-width:132px;min-height:61px;border:1px solid #405248;border-radius:12px;background:#212a26;color:#d6e8d3;padding:10px 13px;font-weight:700;cursor:pointer}
.workflow-project-link span{display:inline-grid;place-items:center;background:#36493b;border-radius:10px;padding:3px 6px;font-size:10px}
.workflow-project-link.active{border-color:#d1ee9c;background:#304936}
.workflow-idea{max-width:1080px;margin:0 auto}
.workflow-idea .presets-header{margin-top:16px}
.workflow-idea .hero{padding:12px 0 15px}
.shell:not(.song-wizard-mode) .workspace{display:block;max-width:1080px;margin:0 auto;min-width:0}
.shell .workspace>.panel{display:none;width:100%;margin:0;max-height:none;position:static}
.shell .workflow-pane{display:none}
.shell[data-flow-stage="sound"] .workspace>.settings-panel,
.shell[data-flow-stage="arrangement"] .workspace>.settings-panel,
.shell[data-flow-stage="vocal"] .workspace>.settings-panel,
.shell[data-flow-stage="result"] .workspace>.output-panel,
.shell[data-flow-stage="projects"] .workspace>.sidebar{display:block}
.shell[data-flow-stage="sound"] [data-flow-content="sound"],
.shell[data-flow-stage="arrangement"] [data-flow-content="arrangement"],
.shell[data-flow-stage="vocal"] [data-flow-content="vocal"]{display:block}
.shell:not([data-flow-stage="idea"]) .workflow-idea{display:none}
.shell[data-flow-stage="idea"] .workspace{display:none}
.workflow-pane{min-width:0}
.workflow-pane>.arrangement-timeline{margin-top:12px}
.workflow-pane [data-vocal-lab]{margin-top:16px}
.workflow-footer{max-width:1080px;margin:16px auto 0;padding:18px 21px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#1b2520;border:1px solid #354e39;border-radius:14px}
.workflow-footer-intro{display:grid;gap:5px;min-width:0}
.workflow-footer-intro strong{font-size:16px;color:#e7f4df}
.workflow-footer-intro small{font-size:11px;color:#a2b6a6;line-height:1.5}
.workflow-footer-buttons{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.workflow-footer-buttons>.btn{min-height:44px}
.shell[data-flow-stage="projects"] .workflow-footer{display:none}
.workflow-idea-action{display:flex;justify-content:flex-end;margin-top:13px}
.workflow-idea-action .btn{min-height:44px}
.workflow-advanced-settings{border:1px solid #344a3a;border-radius:12px;padding:13px;margin:14px 0;background:#18211c}
.workflow-advanced-settings>summary{cursor:pointer;min-height:28px;display:flex;align-items:center;color:#cfe7b7;font-size:12px;font-weight:700}
.workflow-advanced-settings[open]>.field:first-of-type{margin-top:14px}
.shell.song-wizard-mode .studio-workflow-nav,
.shell.song-wizard-mode .workflow-idea,
.shell.song-wizard-mode .workspace,
.shell.song-wizard-mode .workflow-footer{display:none!important}
@media(max-width:850px){
 .shell .studio-workflow-nav{gap:8px}
 .workflow-step{flex-direction:column;align-items:flex-start;gap:3px;padding:9px;min-height:64px;font-size:11px}
 .workflow-project-link{min-width:100px;padding:9px;font-size:11px}
}
@media(max-width:740px){
 .shell .studio-workflow-nav{justify-content:flex-end;margin:8px auto}
 .studio-workflow-steps{display:none}
 .workflow-project-link{min-height:44px;min-width:120px;font-size:12px}
 .studio-view-switch{display:flex;gap:8px;align-items:center}
 .studio-view-btn{min-height:44px;white-space:normal}
 .studio-view-btn small{display:none}
 .studio-now{display:none}
 .studio-mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr));padding-left:5px;padding-right:5px}
 .studio-mobile-tab{min-width:0;min-height:56px;font-size:10px}
 .mobile-tab-symbol{font-size:19px}
 .workflow-footer{padding:13px;gap:10px;flex-direction:column;align-items:stretch}
 .workflow-footer-buttons{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .workflow-footer-buttons>.btn{min-width:0;width:100%;font-size:12px}
 .workflow-footer-buttons>.btn:only-child{grid-column:1/-1}
 .workflow-idea .hero h1{font-size:27px}
 .workflow-idea-action .btn{width:100%}
 .workflow-pane .vocal-lab{margin-bottom:0}
}
@media(max-width:350px){
 .workflow-project-link{min-width:104px}
 .studio-mobile-tab{font-size:9px}
}

.workflow-advanced-tools{margin-top:20px;border:1px solid #3a4b3d;border-radius:12px;padding:15px;background:#161e19}
.workflow-advanced-tools>summary{display:flex;align-items:center;min-height:44px;font-weight:700;font-size:13px;color:#def1c1;cursor:pointer}
.workflow-advanced-tools[open]>.director{margin-top:13px}
.workflow-advanced-tools .director-row,.workflow-advanced-tools .chatgpt-bridge{min-width:0}
@media(max-width:740px){.workflow-advanced-tools{padding:12px}.workflow-advanced-tools .director-row{flex-wrap:wrap}}

/* Secondary adjustments never obscure the core creative action. */
.quick-idea-extra,.workflow-result-adjust{margin:13px 0;border:1px solid #405846;border-radius:11px;padding:11px 13px;background:#1b2a20}
.quick-idea-extra>summary,.workflow-result-adjust>summary{cursor:pointer;display:flex;align-items:center;min-height:44px;font-size:12px;font-weight:700;color:#d6efbf;line-height:1.45}
.quick-idea-extra[open],.workflow-result-adjust[open]{padding-bottom:15px}
.quick-idea-extra .quick-idea-tempo,.workflow-result-adjust .output-bpm-editor{margin-top:14px}
.quick-idea-extra:not([open]) .track-version-selector,.workflow-result-adjust:not([open]) .track-version-selector{display:none}
@media(max-width:740px){.quick-idea-extra,.workflow-result-adjust{padding:10px}.quick-idea-extra>summary,.workflow-result-adjust>summary{font-size:13px}}

/* The idea page has its own prominent heading; suppress the legacy duplicate hero. */
.shell .workflow-idea .hero{display:none}

/* M3x — clearly labeled sound templates, always preview before applying. */
.sound-templates{min-width:0;margin:0 0 17px;padding:17px;border:1px solid #3d604a;border-radius:14px;background:linear-gradient(125deg,#22352b,#17231e)}
.sound-templates-header{display:grid;gap:5px;margin-bottom:13px}
.sound-templates-header h3{color:#e0f2c8;font-size:19px;line-height:1.25;margin:2px 0}
.sound-templates-header p{font-size:12px;line-height:1.6;color:#b1c5b4;max-width:680px;margin:0}
.sound-templates-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sound-template-card{display:grid;justify-items:start;align-content:start;gap:6px;min-width:0;min-height:173px;background:#14231c;border:1px solid #405f46;border-radius:12px;padding:14px;text-align:left;color:#e5f3d7;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
.sound-template-card:hover,.sound-template-card:focus-visible{border-color:#cfed98;background:#1d3326}
.sound-template-symbol{color:#d4f38b;font-size:19px;line-height:1.1}
.sound-template-card strong{font-size:15px;line-height:1.3}
.sound-template-character{font-size:11px;color:#a7bba8}
.sound-template-styles{font-size:11px;line-height:1.4}
.sound-template-facts{font-size:11px;color:#e0f2ae;line-height:1.35}
.sound-template-action{color:#cdec8c;font-size:11px;font-weight:700;align-self:end;margin-top:auto}
.sound-templates-warning{line-height:1.5;margin-top:13px}
.sound-shortcuts{justify-content:flex-end;margin:5px 0 15px}
.preset-preview-backdrop{position:fixed;z-index:250;inset:0;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.82);overflow-y:auto}
.preset-preview-dialog{width:min(720px,100%);max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #b8e287;border-radius:16px;background:#1a281f;padding:21px;color:#e3f3dc;box-shadow:0 20px 75px #000b}
.preset-preview-head{display:flex;justify-content:space-between;align-items:start;gap:10px}
.preset-preview-head h2{font-size:22px;margin:7px 0}
.preset-preview-head p{font-size:12px;color:#bad1ba;line-height:1.5;margin:0 0 15px}
.preset-preview-columns,.preset-preview-row{display:grid;grid-template-columns:minmax(92px,1fr) minmax(0,1.15fr) minmax(0,1.15fr);gap:10px;align-items:start}
.preset-preview-columns{font-size:10px;font-weight:700;color:#cfe59d;padding:10px;border-bottom:1px solid #435c45}
.preset-preview-row{font-size:11px;line-height:1.5;padding:11px 10px;border-bottom:1px solid #34463a;overflow-wrap:anywhere}
.preset-preview-row strong{color:#d7ead1}
.preset-preview-row span:nth-child(2){color:#a1b8a7}
.preset-preview-row.will-change span:last-child{color:#d1ef9b;font-weight:700}
.preset-preview-preserved{font-size:11px;line-height:1.65;color:#b6cbb2;border:1px solid #3d5c42;padding:12px;border-radius:8px;background:#13231a}
.preset-preview-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}
.preset-preview-actions .btn{min-height:44px}
@media(max-width:740px){
 .sound-templates{padding:12px}
 .sound-templates-grid{grid-template-columns:1fr}
 .sound-template-card{min-height:145px;padding:13px}
 .sound-template-card strong{font-size:14px}
 .sound-templates-header h3{font-size:17px}
 .preset-preview-backdrop{padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
 .preset-preview-dialog{max-height:calc(100dvh - 16px - env(safe-area-inset-bottom));padding:14px;border-radius:12px}
 .preset-preview-head h2{font-size:19px}
 .preset-preview-columns{font-size:10px}
 .preset-preview-row{font-size:10px;gap:7px;padding:9px 5px}
 .preset-preview-columns,.preset-preview-row{grid-template-columns:minmax(70px,.75fr) minmax(0,1fr) minmax(0,1fr)}
 .preset-preview-actions{display:grid;grid-template-columns:1fr 1fr}
 .preset-preview-actions .btn{min-width:0;width:100%;padding:9px;font-size:12px}
}

/* Clearer two-column mobile comparison: name over before/after, not three cramped columns. */
.preset-mobile-compare-label{display:none}
@media(max-width:740px){
 .preset-preview-columns{display:none}
 .preset-preview-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px}
 .preset-preview-row>strong{grid-column:1/-1;font-size:12px}
 .preset-preview-row>span{font-size:12px;line-height:1.45}
 .preset-preview-row .preset-mobile-compare-label{display:block;color:#a7bbad;font-size:10px;letter-spacing:.04em;font-weight:700;margin-bottom:5px}
}

/* M3y: prominent project creation adjacent to the project library. */
.workflow-new-project-link{min-height:61px;min-width:186px;padding:10px 13px;border:1px solid #badf83;border-radius:12px;background:#304a32;color:#e9f8d7;font-size:12px;font-weight:750;cursor:pointer;white-space:normal}
.workflow-new-project-link:hover,.workflow-new-project-link:focus-visible{background:#3c5d3d;border-color:#e2f9a8}
.project-row{display:flex;align-items:stretch;gap:7px;min-width:0;margin:7px 0}
.project-row .project{flex:1;min-width:0;margin:0;text-align:left}
.project-row .project-delete{flex:none;min-height:44px;white-space:normal;border-color:#815858;color:#efc5bc}
.project-row .project-delete:hover{background:#54302e}
.archive-projects{display:grid;gap:6px;margin:14px 0}
@media(max-width:850px){.workflow-new-project-link{min-width:143px;max-width:170px;font-size:11px}}
@media(max-width:740px){.shell .studio-workflow-nav{justify-content:stretch;gap:8px}.workflow-project-link,.workflow-new-project-link{flex:1;min-width:0;min-height:44px;font-size:12px}.workflow-new-project-link{max-width:none}.project-row .project-delete{min-width:70px}}
@media(max-width:350px){.workflow-new-project-link,.workflow-project-link{padding:8px 6px;font-size:11px}.project-row .project-delete{min-width:63px;padding:8px 5px;font-size:11px}}

/* M3y: persistent, readable AI status instead of a disappearing toast. */
.quick-idea-notice{margin:12px 0;padding:12px 14px;border:1px solid #8fbd69;border-radius:10px;background:#213623;color:#def3ce;font-size:12px;line-height:1.6;overflow-wrap:anywhere}

/* M3z: persistent viewport-level bottom navigation outside the recreated editor.
   The keyboard offset comes from visualViewport, not from :focus/:has rules. */
#mobile-navigation{pointer-events:none}
#mobile-navigation .studio-mobile-nav{pointer-events:auto}
@media(max-width:740px){
 #mobile-navigation>.studio-mobile-nav{
  position:fixed;
  inset-inline:0;
  bottom:0;
  width:100%;
  z-index:95;
  -webkit-transform:none;
  transform:none;
  transition:none;
  overscroll-behavior:contain;
 }
 #mobile-navigation .studio-mobile-tab{min-height:56px}
 .shell.song-wizard-mode{padding-bottom:calc(95px + env(safe-area-inset-bottom))}
}

/* Producer workstation — local review and future-model contract (M4p). */
.producer-workstation{margin:16px 0 22px;padding:18px;border:1px solid #51734c;border-radius:15px;background:linear-gradient(140deg,#23382a,#16241d)}
.producer-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:12px}
.producer-top h3{margin:4px 0 8px;font-size:20px;line-height:1.3;color:#ecf6d9}
.producer-top p{margin:0;line-height:1.5}
.producer-status{border:1px solid #6e8e64;border-radius:40px;padding:7px 10px;font-size:11px;color:#d2edbd;font-weight:700;white-space:normal}
.producer-metrics{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 14px;margin:16px 0 12px;padding:12px;border-radius:10px;background:#14231c;font-size:12px;line-height:1.5}
.producer-metrics strong{color:#e2f7bd;font-size:13px}
.producer-metrics span{color:#b4c5b6}
.producer-notes{display:grid;gap:8px;margin:0 0 12px}
.producer-note{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #374a3f;border-radius:11px;padding:12px;background:#172820;min-width:0}
.producer-note>div{min-width:0}
.producer-note strong{display:block;font-size:13px;margin:4px 0;color:#f0f5e7}
.producer-note p{margin:0;color:#b9c9bd;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.producer-note-severity{display:block;font-size:10px;letter-spacing:.045em;color:#b9d99b}
.producer-note-check{border-color:#9c8761}
.producer-note-check .producer-note-severity{color:#f0cf85}
.producer-note button{flex:0 0 auto;min-height:43px;max-width:180px;white-space:normal;text-align:center}
.producer-actions{display:flex;flex-wrap:wrap;gap:9px;margin:13px 0}
.producer-actions button{min-height:44px}
.producer-workstation>.micro{line-height:1.55;margin:10px 0 0}
@media(max-width:740px){.producer-workstation{padding:13px;margin:13px 0 18px}.producer-note{align-items:stretch;flex-direction:column}.producer-note button{width:100%;max-width:none}.producer-actions{display:grid;grid-template-columns:minmax(0,1fr)}.producer-actions button{white-space:normal}}
/* M4q: on-demand full-studio, memory-isolated audit and roadmap proposals. */
.technical-diagnostics{margin:18px 0 26px;padding:17px;border:1px solid #536a64;background:#172824;border-radius:15px;min-width:0}
.technical-heading{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin-bottom:12px}
.technical-heading h4,.technical-ideas-heading{margin:0;font-size:17px;color:#e5f7d0}
.technical-heading span{font-size:10px;letter-spacing:.08em;color:#a0c4b9}
.technical-summary{padding:12px;border:1px solid #466557;border-radius:10px;background:#1e372d;color:#cce5cb;line-height:1.55;font-size:12px}
.technical-checks{display:grid;gap:7px}
.technical-check{border:1px solid #385248;padding:10px 12px;border-radius:10px;min-width:0}
.technical-check strong{font-size:12px;color:#e8f5df}
.technical-check p{margin:6px 0 0;font-size:11px;line-height:1.5;color:#b8c9bd;overflow-wrap:anywhere}
.technical-check-error{border-color:#a46f5a}
.technical-check-warning{border-color:#99875b}
.technical-details{border:1px solid #3d5a4d;border-radius:11px;padding:12px;margin:13px 0}
.technical-details>summary{cursor:pointer;min-height:39px;color:#e4f6db;font-weight:700;font-size:13px}
.technical-group{padding:9px 0;border-top:1px solid #3b5149}
.technical-group>strong{color:#cfe8c4;font-size:12px}
.technical-scenario{display:flex;justify-content:space-between;gap:10px;font-size:12px;line-height:1.5;padding:4px 6px;color:#bdd3c2}
.technical-scenario-error{color:#ffcfab}
.technical-scenario small{color:#ffcfab;font-size:11px;overflow-wrap:anywhere}
.technical-ideas-heading{margin:16px 0 8px}
.technical-ideas{display:grid;gap:9px;margin:12px 0}
.technical-idea{border:1px solid #405e54;border-radius:10px;background:#182e26;padding:12px;min-width:0}
.technical-idea strong{display:block;color:#e7f5d3;font-size:12px;line-height:1.4}
.technical-idea span{display:block;font-size:10px;color:#abc3b2;margin-top:5px}
.technical-idea p{margin:7px 0 0;font-size:11px;color:#becfc0;line-height:1.5}
.technical-actions{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}
.technical-actions button,.technical-diagnostics>button{min-height:44px;white-space:normal}
.technical-diagnostics>.micro{font-size:11px;line-height:1.55}
@media(max-width:740px){.technical-diagnostics{padding:12px}.technical-actions{display:grid;grid-template-columns:1fr}.technical-scenario{flex-direction:column;gap:0}.technical-summary{font-size:12px}}

/* Product knowledge shipped with each QA report. */
.technical-product-passport{margin:0 0 13px;border:1px solid #3d5a4d;border-radius:11px;padding:10px 13px;background:#192e25}
.technical-product-passport>summary{font-size:12px;font-weight:700;color:#d9f0cc;cursor:pointer;min-height:38px;display:flex;align-items:center}
.technical-product-passport p{font-size:12px;line-height:1.55;color:#c1d3c3;margin:9px 0 0}
.technical-product-passport .micro{font-size:11px;overflow-wrap:anywhere}

/* On-demand QA report archive: local to this browser, independent of song data. */
.technical-archive-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 0;border-top:1px solid #39554a}
.technical-archive-row strong{font-size:13px;color:#e1f0e5}
.technical-archive-row .micro{margin:4px 0 0}
.technical-archive-actions{display:flex;flex-wrap:wrap;gap:8px}
.technical-archive-actions button{min-height:44px}
@media(max-width:740px){.technical-archive-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.technical-archive-actions button{min-width:0}}
