/* Fifth Format design system. Shared by every studio workspace. */
:root{
  color-scheme:dark;
  --ff-bg:#0b0d14;--ff-panel:#11151f;--ff-panel-raised:#171c28;--ff-field:#0d111b;
  --ff-line:#262d3e;--ff-line-soft:#1e2533;--ff-text:#f1f3fa;--ff-muted:#97a1b7;
  --ff-cyan:#48baff;--ff-blue:#3a85ff;--ff-rail:224px;--ff-radius:14px;
  --bg:var(--ff-bg);--panel:var(--ff-panel);--panel-2:var(--ff-panel-raised);--panel-3:#1c2231;
  --field:var(--ff-field);--text:var(--ff-text);--muted:var(--ff-muted);--quiet:#8993aa;
  --line:var(--ff-line);--line-soft:var(--ff-line-soft);--cyan:var(--ff-cyan);--blue:#8bcde9;
  --radius:12px;--gold:var(--ff-cyan);--shadow:none;
}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#3d465a transparent}
html{scroll-behavior:smooth;scroll-padding-top:82px}
body{margin:0;background:var(--ff-bg);color:var(--ff-text);font:14px/1.55 "Segoe UI",Inter,Arial,sans-serif;min-height:100vh}
body:has(>.ff-nav){padding-left:var(--ff-rail)}
body::before{display:none}
a{color:var(--ff-cyan);text-decoration:none}
a:hover{color:#d5eaff}
h1,h2,h3,p{overflow-wrap:anywhere}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea,summary{ -webkit-tap-highlight-color:transparent }
:focus-visible{outline:2px solid var(--ff-cyan);outline-offset:4px}
[hidden]{display:none!important}
.ff-icon{flex-shrink:0;vertical-align:middle}
.ff-nav{position:fixed;inset:0 auto 0 0;width:var(--ff-rail);z-index:40;background:#0e111b;border-right:1px solid var(--ff-line-soft);display:flex;flex-direction:column;padding:28px 15px 18px;color:var(--ff-muted);font:13px/1.5 "Segoe UI",sans-serif;overflow-y:auto}
.ff-brand{display:flex;align-items:center;gap:9px;color:#f4faff;font-size:13px;font-weight:750;letter-spacing:1px;white-space:nowrap;padding:0 2px 30px}
.ff-brand img{width:38px;height:38px}
.ff-brand small{display:block;font-size:8px;letter-spacing:2px;color:#79859e;font-weight:500;margin-top:3px}
/* The full chrome lockup replaces the small navigation glyph. */
.ff-brand.ff-brand-lockup{display:block;padding:0 0 22px}
.ff-brand.ff-brand-lockup img{display:block;width:100%;height:auto}
.gate-brand-lockup{display:block;width:100%;height:auto;margin:0 0 22px}
.ff-nav-group{margin-bottom:20px}
.ff-nav-label{display:block;color:#69758d;text-transform:uppercase;letter-spacing:1.6px;font-size:9px;font-weight:650;padding:0 13px 10px}
.ff-links{display:flex;flex-direction:column;gap:5px}
.ff-links a{min-height:43px;display:flex;gap:12px;align-items:center;padding:10px 13px;border:1px solid transparent;border-radius:8px;color:#a6aec3;transition:background .15s,color .15s}
.ff-links a:hover{background:#191e2c;color:#eef2ff}
.ff-links a[aria-current=page]{color:#cceaff;background:linear-gradient(90deg,#168dff26,#168dff09);border-color:#278bdf52;box-shadow:inset 2px 0 var(--ff-cyan),0 0 16px #168dff0c}
.ff-links a small{margin-left:auto;font-size:8px;color:#818aa2;letter-spacing:.8px}
.ff-nav-bottom{margin-top:auto}
.ff-engine{display:flex;align-items:center;gap:10px;border:1px solid var(--ff-line);border-radius:10px;padding:13px;margin:10px 1px 15px;font-size:11px;color:#d2d9eb;background:#121723}
.ff-engine small{display:block;font-size:10px;color:#8894ad;margin-top:2px}
.status-dot{width:6px;height:6px;background:#7b859d;border-radius:50%;flex-shrink:0}
.status-dot.is-ready{background:var(--ff-cyan);box-shadow:0 0 10px #48baff80}
.status-dot.is-loading{background:#96cfff;box-shadow:0 0 7px #48baff40}
.ff-edition{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--ff-line-soft);margin:16px 5px 0;padding-top:17px;font-size:9px;color:#737f98}
.ff-version{font-size:10px;color:#a3b5c7!important}
.ff-topbar{height:65px;border-bottom:1px solid var(--ff-line-soft);background:#0b0d14ed;backdrop-filter:blur(16px);position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;padding:0 38px;color:#ced4e4;font-size:11px}
.ff-topbar>div{display:flex;align-items:center;gap:18px}
.ff-top-label{font-size:9px;letter-spacing:1.7px;color:#7a879e}
.ff-divider{color:#374155}
.ff-private{font-size:8px;letter-spacing:1.3px;color:#758099}
.ff-avatar{width:29px;height:29px;border:1px solid #35414d;border-radius:50%;background:#1c2732;display:grid;place-items:center;color:#a5cdf6;font-size:11px}
.ff-main,.shell,body>.page{max-width:1550px;width:100%;margin:0 auto;padding:34px 38px 40px}
.ff-main h1,.studio-heading h1{font-size:34px;line-height:1.12;letter-spacing:-1.3px;font-weight:600;margin:9px 0 12px;color:#f1f3fc}
.ff-eyebrow,.eyebrow,.track-kicker{font-size:9px;font-weight:650;line-height:1.5;letter-spacing:1.6px;color:#a3b4c6;text-transform:uppercase;margin:0 0 5px}
.heading-period{color:var(--ff-blue)}
.ff-intro{font-size:13px;color:var(--ff-muted);max-width:640px;line-height:1.7;margin:0}
.studio-heading,.overview-heading{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:28px}
.overview-heading h1{font-size:29px;margin-bottom:0}
.heading-symbol{display:grid;place-items:center;width:68px;height:68px;border:1px solid #303f4f;border-radius:18px;color:var(--ff-blue);background:radial-gradient(at top right,#39638e24,transparent),#141a21;flex-shrink:0}
.btn,.button,.launch-button,.small-link,.generate-button,.primary,.secondary,.file-picker,.icon-button{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:39px;padding:10px 16px;border:1px solid #343e53;border-radius:8px;background:#1a2030;color:#dce3f4;font:600 11px/1.4 "Segoe UI",sans-serif;letter-spacing:.15px;text-transform:none;text-decoration:none;box-shadow:none;cursor:pointer;transition:background .15s,border-color .15s,transform .15s;width:auto;
}
.btn:hover,.button:hover,.launch-button:hover,.small-link:hover,.file-picker:hover{background:#252d40;border-color:#62718e;color:#fff;transform:translateY(-1px)}
.btn.primary,.generate-button,.primary{background:var(--ff-cyan);border-color:#82d1ff;color:#061426;font-weight:700;box-shadow:0 0 18px #168dff26}
.btn.primary:hover,.generate-button:hover,.primary:hover{background:#a5ccf4;border-color:#a5ccf4;color:#071422}
.btn.ghost,.btn.secondary,.secondary{background:#102034;border-color:#284f75;color:#c5e4ff}
.btn.full{width:100%}
.btn.small,.small-link{min-height:32px;padding:7px 11px;font-size:10px}
button:disabled,.btn:disabled{opacity:.42;cursor:not-allowed;transform:none}
.icon-button{width:36px;height:36px;min-height:36px;padding:8px;flex-shrink:0}
input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{
  background:var(--ff-field);border:1px solid #2b354b;border-radius:8px;color:var(--ff-text);padding:10px 12px;min-height:40px;max-width:100%;font-size:12px;box-shadow:none
}
textarea{width:100%;resize:vertical;line-height:1.7}
input::placeholder,textarea::placeholder{color:#69768f}
input[type=range]{accent-color:var(--ff-cyan);height:20px}
input[type=checkbox],input[type=radio]{accent-color:var(--ff-blue)}
input[type=file]{font-size:11px;color:var(--ff-muted);max-width:100%}
input[type=file]::file-selector-button{background:#222b3e;border:1px solid #3f4b62;color:#dfeafa;padding:8px 12px;border-radius:6px;margin-right:10px;cursor:pointer}
label{color:#b4bfd5}
audio{height:34px;width:100%;max-width:100%;color-scheme:dark}
pre{background:#090d15;border:1px solid var(--ff-line);border-radius:10px;padding:20px;color:#a9b8d4;font:11px/1.65 Consolas,monospace}
.ff-muted,.note,.inline-meta{color:var(--ff-muted);font-size:12px}
.ff-status,.forge-status{font-size:12px;color:#aab9ce;background:#101b23;border:1px solid #263c47;border-radius:9px;padding:12px 16px}
.ff-source{background:#122128;border:1px solid #294751;border-radius:10px;padding:15px 18px;color:#c2d8ee;margin-bottom:20px}
.ff-source audio{display:block;margin-top:10px}
.studio-hero{position:relative;display:grid;grid-template-columns:1fr 1fr;min-height:330px;overflow:hidden;border:1px solid #303c48;border-radius:17px;background:radial-gradient(ellipse at 80% 60%,#2e537820,transparent 60%),linear-gradient(125deg,#151827,#10141e)}
.studio-hero-copy{z-index:1;padding:38px 38px}
.hero-overline{display:flex;align-items:center;gap:8px;color:#9eafc0;font-size:8px;font-weight:600;letter-spacing:2px}
.hero-overline i{display:block;width:5px;height:5px;border-radius:50%;background:var(--ff-blue)}
.studio-hero h2{font-size:clamp(32px,3.5vw,52px);letter-spacing:-2px;line-height:1.12;font-weight:550;margin:19px 0 15px}
.studio-hero h2 span{color:#a3cdf7}
.studio-hero p{font-size:12px;line-height:1.8;color:#9ca8bf;margin-bottom:22px}
.hero-console{position:relative;min-height:300px;display:flex;align-items:center;justify-content:center;isolation:isolate}
.console-grid{position:absolute;inset:0;background-image:linear-gradient(#8396c208 1px,transparent 1px),linear-gradient(90deg,#8396c208 1px,transparent 1px);background-size:34px 34px;mask-image:radial-gradient(ellipse,#000,transparent 72%)}
.console-brand{width:200px;height:200px;z-index:2;filter:drop-shadow(8px -4px 24px #57c9ef44) drop-shadow(-6px 8px 25px #65a8eb40);margin-top:-27px}
.console-orbit{position:absolute;left:50%;top:45%;border:1px solid #627b9428;border-radius:50%;transform:translate(-50%,-50%) rotate(-22deg)}
.orbit-one{width:310px;height:250px}
.orbit-two{width:385px;height:305px;border-style:dashed;border-color:#7c86a421}
.console-caption{position:absolute;bottom:38px;z-index:3;text-align:center;font-weight:650;letter-spacing:5px;font-size:12px;color:#cfd8ec}
.console-caption span{display:block;letter-spacing:2px;font-size:7px;color:#737f9a;margin-top:9px}
.console-wave{position:absolute;left:-35%;width:160%;top:38%;z-index:0;opacity:.7}
.hero-identity{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-width:0;padding:24px 32px 24px 0;background:radial-gradient(ellipse at center,#1679df13,transparent 68%)}
.hero-identity>img{display:block;width:100%;max-width:430px;height:auto;filter:drop-shadow(0 10px 24px #03061160)}
.hero-brand-credit{font-size:8px;letter-spacing:2.8px;color:#8bbce8}
.hero-brand-signature{display:flex;align-items:center;gap:10px;font-size:9px;letter-spacing:.7px;color:#8d9eb7}
.hero-brand-signature i{width:3px;height:3px;border-radius:50%;background:var(--ff-cyan)}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:30px 0 16px}
.section-title h2{font-size:19px;letter-spacing:-.4px;font-weight:550;margin:4px 0 0}
.section-title a{font-size:10px;display:flex;align-items:center;gap:7px;color:#9cb7d3}
.section-caption{font-size:10px;color:#6f7d95}
.ff-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.tool-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.ff-tool{--tool-accent:#83b6ea;position:relative;display:flex;flex-direction:column;min-width:0;padding:22px;border:1px solid #2a3040;border-radius:12px;background:linear-gradient(150deg,#181e2b,#121620);text-decoration:none;color:var(--tool-accent);transition:transform .2s,border-color .2s;overflow:hidden}
a.ff-tool:hover{transform:translateY(-4px);border-color:var(--tool-accent)}
.tool-forge,.tool-stems,.tool-blend,.tool-mash{--tool-accent:var(--ff-cyan)}
.tool-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tool-top span{font-size:8px;letter-spacing:1.2px;color:#78849c}
.tool-signal{height:70px;width:100%;margin:17px 0 10px;opacity:.85}
.ff-tool h2{color:#e9edf8;font-size:20px;font-weight:600;letter-spacing:-.5px;margin:0 0 8px}
.ff-tool p{font-size:11px;line-height:1.7;color:#8d9ab2;margin:0 0 20px;flex:1}
.ff-open{border-top:1px solid #ffffff0d;padding-top:14px;display:flex;align-items:center;justify-content:space-between;font-size:10px;font-weight:600;color:var(--tool-accent)}
.dashboard-lower{display:grid;grid-template-columns:1.35fr 1fr;gap:20px;margin-top:28px}
.session-panel{background:#10151f;border:1px solid var(--ff-line);border-radius:12px;padding:22px;min-width:0}
.session-panel .section-title{margin:0 0 20px}
.session-panel h2{font-size:17px}
.recent-song{display:flex;gap:13px;align-items:flex-start;padding:18px 0;border-top:1px solid #242c3b}
.song-art{width:44px;height:44px;flex-shrink:0;border:1px solid #415161;border-radius:9px;background:linear-gradient(135deg,#27415c,#153244);color:#a0c7ee;display:grid;place-items:center}
.song-info{flex:1;min-width:0}
.song-info h3{font-size:12px;margin:0 0 4px;font-weight:600}
.song-info p{font-size:8px;color:#7e8da7;letter-spacing:.6px;margin:0 0 10px}
.song-info p span{margin:0 6px}
.song-info audio{height:30px}
.ff-job-row{display:flex;align-items:center;gap:12px;padding:17px 0;border-bottom:1px solid #252d3b;text-decoration:none;color:#d3dbea;font-size:12px}
.job-symbol{color:#8997c8}.job-name{flex:1}.job-name small{display:block;color:#75849e;font-size:9px;margin-top:4px}
.state-badge{display:inline-flex;align-items:center;gap:5px;border:1px solid #354158;border-radius:5px;padding:3px 7px;font-size:9px;color:#a0aec7;text-transform:capitalize}
.state-completed{color:#85a7ca;background:#212d3950;border-color:#2c3a49}.state-failed{color:#eca7ac;background:#222d3950;border-color:#654049}
.state-running,.state-queued{color:#b0d3f7;background:#2c3c4c60;border-color:#425971}
.activity-all{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-top:23px;color:#9bb6d1}
.studio-footer{display:flex;justify-content:space-between;gap:15px;margin-top:36px;padding-top:18px;border-top:1px solid var(--ff-line-soft);color:#5f6e88;font-size:9px;letter-spacing:.5px}
.studio-footer>span:first-child{font-weight:650;letter-spacing:1px}.studio-footer span span{font-weight:400;margin-left:9px;letter-spacing:0}
.empty-state{padding:26px 10px;text-align:center;color:#8cb9e6}.empty-state h3{color:#d9deed;font-size:15px}.empty-state p{color:var(--ff-muted);font-size:12px}
.ff-main>.ff-section{border:1px solid var(--ff-line);background:var(--ff-panel);padding:24px;border-radius:12px;margin-top:20px}
.ff-main>.ff-section h2{font-size:18px}
.ff-main>.ff-section p,.ff-main>p{color:var(--ff-muted)}
/* Common engineering surfaces: the original audio form contracts are retained. */
.workspace,.result,.board,.pre-panel,.track-panel,.control-section,.control-section.tuning,.automation-panel,.blend-options,.master-rack,.add-stems,.change-report,.ai-panel,.ai-notes{
  border:1px solid var(--ff-line);border-radius:12px;background:var(--ff-panel);box-shadow:none;padding:22px;
}
.track-panel,.control-section,.control-section.tuning,.result,.board,.automation-panel{background:var(--ff-panel);border-color:var(--ff-line)}
.workspace{gap:20px;padding:0;background:none;border:0}
.pregrid{gap:20px;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);align-items:start;margin-top:20px}
.track-grid,.analysis-grid{gap:20px}
.track-panel{padding:22px;min-width:0}
.track-panel:nth-child(2){border-top-color:#74a0cd}.track-panel:first-child{border-top-color:#51769b}
.track-panel .waveform,.waveform{background:#0b101b;border:1px solid #263349;border-radius:8px;height:110px}
.section-head,.track-head,.result-head,.board-head,.automation-head{border-color:var(--ff-line);padding-bottom:15px;margin-bottom:16px}
.section-head h2,.track-head h2,.result-head h2,.board-head h2{font-size:18px;line-height:1.3;font-weight:550;letter-spacing:-.3px}
.hint,.status-chip{color:#a5aec4;background:#161c29;border:1px solid #30394d;padding:5px 9px;min-height:25px;font-size:9px;letter-spacing:.3px;text-transform:none;white-space:normal}
.preset-card,.preset-card:nth-child(n),.model-card,.model-card:nth-child(n),.route-card,.flow-step,.flow-step:nth-child(n){background:#151b28;border:1px solid #2b3448;border-radius:9px;box-shadow:none}
.preset-card,.model-card{padding:15px}
.preset-card:has(input:checked),.model-card:has(input:checked){background:#10243a;border-color:#399ee0;box-shadow:inset 0 0 0 1px #48baff22,0 0 14px #168dff12}
.preset-card:focus-within,.model-card:focus-within{outline:2px solid var(--ff-cyan);outline-offset:2px}
.preset-grid{gap:9px}.preset-name{font-size:11px;color:#e3e7f1}.preset-summary{font-size:10px;color:#8e9bb5;line-height:1.6}
.dial,.utility-grid label,.fader,.big-dial,.lever,.studio-grid label,.control-rack label,.stem-controls label:not(.mute-check),.mini-knobs label,.mute-check,.master-knobs label{background:#101520!important;border:1px solid #293347!important;border-radius:9px;padding:14px}
.dial-grid,.utility-grid,.studio-grid,.control-rack,.mini-knobs,.master-knobs{gap:12px}
.control-rack span,.dial span,.utility-grid span,.fader span,.studio-grid span,.master-knobs span{font-size:11px;font-weight:500;color:#abbad1}
output{font-family:Consolas,monospace;color:var(--ff-cyan);font-size:12px}
.track-panel .track-kicker,.control-section .eyebrow,.control-section.tuning .eyebrow,.board .eyebrow,.result .eyebrow{color:#a2b8ce}
.stem-list article{background:#151a27;border:1px solid #2a3346;padding:18px;border-radius:10px;grid-template-columns:minmax(130px,.55fr) minmax(180px,1fr) minmax(220px,1fr)}
.stem-list article h3{color:#c5dcf4;font-weight:600}
.advanced-stem,.advanced-stem summary{background:#0d1420;color:#a7b6cf;text-transform:none;font-weight:500}
.launch-button,.small-link{background:#202c38;border-color:#3d536a;color:#bbd7f4}
.wide-picker{width:100%;min-height:88px;background:#111b27;border:1px dashed #415570;border-radius:9px;color:#b7cfe7}
.file-picker input{width:100%;height:100%}
.file-picker:focus-within{outline:2px solid var(--ff-cyan);outline-offset:3px}
.route-list p,.route-card p,.flow-step p{color:var(--ff-muted);font-size:12px;line-height:1.8}
.studio-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}
.flow-step{padding:17px}.flow-step h2{font-size:14px}.flow-step p{font-size:10px;margin-bottom:0}
.stem-button,.blendinator-form>.generate-button{width:100%}
.stem-result{grid-template-columns:minmax(0,1fr)}
.stem-result>.change-report{grid-column:1}
.shell>.result:not(.stem-result){display:block}
.control-help{margin-top:18px;color:#889bb8;font-size:11px}.control-help summary{cursor:pointer}.control-help .knob-library{margin-top:15px}
.add-stems input{margin-top:8px}.add-stems label>span{font-size:12px;color:#c9d9eb}
.workflow-strip{display:flex;align-items:center;gap:20px;padding:13px 18px;border:1px solid #2c3448;border-radius:9px;background:#121824;font-size:10px;color:#9cacbf;margin-bottom:20px}.workflow-strip i{color:#5b6e80;font-style:normal}
.actions{gap:12px}.actions .primary{width:auto}
.alert{background:#1c2630;border:1px solid #3c4f63;border-radius:9px;padding:14px;color:#f0c4cb}
/* Collection and account pages use the same panel and control language. */
.ff-collection .filters{display:flex;gap:14px;background:#111722;border:1px solid var(--ff-line);border-radius:12px;padding:20px}
.ff-collection .filter-group{flex:1;min-width:0}
.ff-collection .filter-group label{font-size:10px}
.ff-collection .filter-group input,.ff-collection .filter-group select{width:100%}
.exp-package,.exp-package-card,.exp-card,.upload-card{background:var(--ff-panel);border:1px solid var(--ff-line);border-radius:12px;box-shadow:none}
.exp-card{background:#171d2a;padding:18px}
.exp-package-triangle{border-left-color:var(--ff-blue)}
.ff-collection .exp-package-triangle{width:64px;height:64px;border:0;flex-shrink:0;background:url('/static/studio/brand-mark.svg') center/contain no-repeat;filter:none;transform:none}
.ff-collection .exp-package-card{background:#131925;border-color:#30384c;border-radius:12px}
.ff-collection .exp-package.is-open .exp-package-triangle{transform:rotate(20deg);filter:drop-shadow(0 0 10px #87baed44)}
.ff-collection .filters select{border-radius:8px;background:#0d111b}
.exp-package-label,.exp-id{color:#a0b6cd}.exp-package-title{color:#e5eafa}
.exp-package-header{background:#111724;border-radius:10px}.exp-title{color:#e1e7f5}
.exp-vibe,.exp-meta,.exp-package-hint,.exp-package-author,.exp-package-voice,.exp-package-count{color:#99a6bc}
.upload-card{padding:26px}.upload-card h2{font-size:21px}.upload-card p{color:#97a7bf;font-size:12px}
.field label{font-size:11px;color:#b4bfd5}
.ff-player .ff-overlay{left:var(--ff-rail);top:65px;z-index:1;padding:18px 24px}
.ff-player #ff-visualizer{left:var(--ff-rail);width:calc(100% - var(--ff-rail))}
.ff-player .ff-top-bar{background:#141a27d9;border-color:#3b425b;border-radius:12px;box-shadow:none}
.ff-player .ff-bottom a{border:1px solid #404b61;border-radius:8px;padding:10px 18px;background:#171d2b;color:#bdc9df;font-size:11px}
.studio-player-desk{display:flex;flex-direction:column;align-items:center;gap:22px}
.player-brand{width:170px;height:170px;filter:drop-shadow(0 0 24px #71b1f22a)}
.studio-player-desk.is-playing .player-brand{filter:drop-shadow(0 0 30px #6aa8e77a)}
.player-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;background:#121927e8;border:1px solid #343d54;padding:10px;border-radius:12px}
.player-controls .btn{font-size:10px;min-height:35px;padding:9px 12px}
.ff-gate{display:grid;place-items:center;background:radial-gradient(ellipse at 50% 10%,#30465c50,transparent 60%),#0b0d14}
.ff-gate .gate-card{width:min(430px,calc(100vw - 40px));background:#131825;border:1px solid #30394d;padding:40px;border-radius:18px;box-shadow:0 30px 100px #0005}
.gate-mark{width:70px;height:70px;margin-bottom:20px}.ff-gate h1{font-size:28px;font-weight:550;letter-spacing:-1px}.ff-gate p{font-size:12px;color:#98a5be}.ff-gate .gate-input{width:100%;margin:18px 0}
.ff-gate .gate-form label{display:block;margin-top:14px;font-size:13px;text-align:left}
.ff-gate .gate-form .gate-input{margin:6px 0 10px}
.ff-gate .gate-form button[type="submit"]{margin-top:8px}
@media(min-width:1800px){:root{--ff-rail:240px}.ff-main,.shell,body>.page{padding-left:50px;padding-right:50px}.studio-hero{min-height:355px}}
@media(max-width:1250px){:root{--ff-rail:196px}.ff-brand{font-size:11px}.ff-brand img{width:32px;height:32px}.ff-main,.shell,body>.page{padding:28px 26px}.ff-topbar{padding:0 26px}.tool-grid{gap:12px}.ff-tool{padding:17px}.tool-top span{font-size:7px}.studio-hero-copy{padding:30px}.console-brand{width:165px}.orbit-one{width:260px;height:210px}.orbit-two{width:320px;height:260px}.stem-list article{grid-template-columns:1fr 1fr}.stem-controls{grid-column:1/-1}}
@media(max-width:1050px){.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-signal{height:68px}.dashboard-lower{grid-template-columns:1fr}.pregrid{grid-template-columns:1fr}.blendinator-panel{display:none}.preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.console-caption{font-size:9px;letter-spacing:3px}.studio-hero-copy{padding:28px}.studio-hero h2{font-size:36px}.board-layout{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  :root{--ff-rail:0px}body:has(>.ff-nav){padding-left:0}
  .ff-nav{position:relative;width:100%;padding:15px 18px;overflow:visible;border-right:0;border-bottom:1px solid var(--ff-line);display:grid;grid-template-columns:1fr auto;gap:12px}
  .ff-brand{padding:0;font-size:12px}.ff-brand img{width:34px;height:34px}
  .ff-brand.ff-brand-lockup{padding:0;width:205px;max-width:100%}
  .hero-identity{grid-row:1;padding:24px 22px 8px;gap:6px}
  .hero-identity>img{max-width:270px}
  .hero-brand-credit{font-size:7px;letter-spacing:2px}
  .hero-brand-signature{font-size:8px;gap:8px}
  .ff-nav-group{margin:0;grid-column:1/-1;min-width:0}.ff-nav-label{display:none}
  .ff-links{flex-direction:row;gap:4px;overflow-x:auto}.ff-links a{flex-shrink:0;min-height:36px;padding:8px 11px;gap:7px;font-size:11px}.ff-links a small{display:none}.ff-links .ff-icon{width:15px;height:15px}
  .ff-nav-group:nth-of-type(2){display:block;grid-column:1;grid-row:3}
  .ff-nav-bottom{display:contents}.ff-nav-bottom .ff-links{grid-column:2;grid-row:3}.ff-nav-bottom .ff-links a{font-size:0;gap:0}.ff-nav-bottom .ff-links a svg{width:17px;height:17px}.ff-nav-bottom .ff-links::before{content:none}
  .ff-engine{display:none}.ff-edition{position:absolute;right:18px;top:22px;border:0;padding:0;margin:0}.ff-edition>span{display:none}
  .ff-topbar{position:relative;height:45px;padding:0 20px}.ff-private{display:none}
  .ff-main,.shell,body>.page{padding:24px 20px}.overview-heading h1,.ff-main h1{font-size:27px}.overview-heading .btn{font-size:0;padding:10px}.overview-heading .btn .ff-icon{width:17px}
  .studio-hero{grid-template-columns:1fr;min-height:0}.studio-hero-copy{padding:28px;z-index:2}.studio-hero h2{font-size:39px}.hero-console{position:absolute;right:-80px;top:0;width:300px;height:100%;opacity:.2;pointer-events:none}.console-caption{display:none}
  .section-caption{display:none}.ff-grid{grid-template-columns:1fr 1fr}.ff-tool{padding:16px}.ff-tool h2{font-size:18px}.ff-tool p{font-size:10px}.tool-top span{font-size:7px}.tool-signal{height:55px}
  .dashboard-lower{gap:16px}.session-panel{padding:18px}.studio-footer{font-size:8px}.studio-footer>span:last-child{display:none}
  .heading-symbol{width:48px;height:48px;border-radius:12px}.heading-symbol svg{width:26px}
  .track-grid,.analysis-grid,.studio-flow{grid-template-columns:1fr}.workspace,.result,.board,.pre-panel,.track-panel,.control-section{padding:18px}.workspace{padding:0}
  .dial-grid,.control-rack,.utility-grid,.studio-grid,.master-knobs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stem-list article{grid-template-columns:1fr}.stem-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.mini-knobs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ff-collection .filters{flex-direction:column}.ff-player .ff-overlay{top:240px}.ff-player .ff-center{max-height:calc(100vh - 320px)}.ff-player .ff-circle-wrapper{transform:scale(.7)}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-width:760px){
  .ff-player .ff-center{min-height:0;max-height:none;gap:14px}
  .ff-player #lyric-stage{height:120px;min-height:45px;max-height:190px;flex:1}
  .ff-player .player-brand{width:110px;height:110px}
  .ff-player .studio-player-desk{gap:12px;margin-bottom:16px}
  .ff-player .ff-bottom{flex-shrink:0}
}

.library-toolbar,.library-tabs,.library-selection,.library-manage{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.library-toolbar{margin:0 0 22px}.library-tabs{margin-right:auto}.library-tabs span{font-variant-numeric:tabular-nums;opacity:.8}
.library-selection{padding:12px 14px;border:1px solid #294463;border-radius:9px;background:#102034}
.library-selection label,.library-select{display:flex;align-items:center;gap:8px;font-size:12px}.library-selection>span{font-size:11px;color:#93b5d6}
.library-select .ff-eyebrow{margin:0}.library-manage{margin-top:14px;padding-top:12px;border-top:1px solid #294463}
.library-manage .btn{min-height:32px;padding:7px 11px;font-size:11px}
.library-dialog{width:min(480px,calc(100% - 32px));padding:26px;border:1px solid #4386bc;border-radius:14px;color:var(--ff-text);background:#111c2c;box-shadow:0 20px 80px #0009}
.library-dialog::backdrop{background:#030914c9}.library-dialog h2{margin-top:0}.library-dialog p{font-size:13px;line-height:1.7;color:#b9cde3}.library-dialog .library-actions{margin-bottom:0}
#library-delete-song{color:#e3f1ff;font-weight:650;overflow-wrap:anywhere}#library-delete-error{color:#a6d7ff}
/* Portable Ableton sessions */
.ableton-workspace{max-width:1400px}.ableton-panel{padding:28px;max-width:980px}.ableton-panel h2{overflow-wrap:anywhere}.ableton-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.ableton-actions a{margin:0!important}.ableton-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0}.ableton-flow>span{border:1px solid #28374b;border-radius:10px;padding:18px;color:#72afed;font-size:12px}.ableton-flow strong{display:block;color:#e5ebf5;font-size:14px;margin-top:10px}.ableton-tempo{display:flex;align-items:center;gap:12px;margin-top:26px}.ableton-tempo input{width:110px!important}.ableton-notes{display:grid;grid-template-columns:1fr 1fr;gap:28px;max-width:980px;margin-top:26px}.ableton-notes p,.ableton-panel>p{color:#a7b4c9;line-height:1.65}.ableton-tracks{display:grid;gap:8px;margin:24px 0}.ableton-tracks>div{display:flex;align-items:center;gap:14px;padding:16px;background:#0c111b;border:1px solid #233044;border-radius:8px}.ableton-tracks span{font-size:11px;color:#72afed}.ableton-tracks strong{flex:1}.ableton-tracks small{font-size:10px;color:#8d9eb9}.ableton-tracks i{width:60px;height:12px;background:repeating-linear-gradient(90deg,#72afed 0 2px,transparent 2px 5px);opacity:.5}.ableton-panel [role=status]{font-size:13px}.recent-song .small-link{display:inline-block;margin-top:8px}.result-head{flex-wrap:wrap;gap:14px}
@media(max-width:650px){.ableton-panel{padding:18px}.ableton-flow,.ableton-notes{grid-template-columns:1fr}.ableton-flow{gap:8px}.ableton-flow>span{display:flex;gap:12px;padding:12px}.ableton-flow strong{margin:0}.ableton-actions{align-items:stretch;flex-direction:column}.ableton-tracks i{display:none}.ableton-tracks strong{font-size:13px}}
/* KASTASIDE is the remix lab within Fifth Format, not a replacement studio identity. */
.music-library{max-width:1700px}.library-search{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:22px}.library-search label{display:grid;gap:7px;font-size:11px;color:#aac3df}.library-search input,.library-search select,.phrase-form input,.phrase-form select,.phrase-form textarea{background:#0b1422!important;border:1px solid #2b4765!important;border-radius:7px;padding:10px;color:#e5f1ff!important;width:100%;font:inherit}.library-search input{min-width:230px}.library-search>span{margin-left:auto;font-size:11px;color:#8dabc9;padding-bottom:12px}.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.library-card{min-width:0;padding:18px;border:1px solid #293c55;border-radius:12px;background:linear-gradient(125deg,#122136,#0d1420)}.library-card-top{display:flex;justify-content:space-between;font-size:10px;color:#819cbb}.library-card h2{font-size:19px;margin:13px 0 18px;overflow-wrap:anywhere}.library-card h2 a{color:#e3efff;text-decoration:none}.library-card audio{width:100%;height:34px}.library-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0 22px}.library-card .library-actions{margin:14px 0 0}.song-columns{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:18px;margin-top:20px}.music-library .session-panel{padding:22px;margin-bottom:18px;min-width:0}.music-library .session-panel h2{font-size:21px}.library-file{padding:12px 0;border-bottom:1px solid #24364c}.library-file>div{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.library-file strong{font-size:13px;overflow-wrap:anywhere}.library-file a{font-size:11px;display:inline-flex;gap:5px;align-items:center;color:#7dbef6}.library-file audio{width:100%;height:35px}.quality-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0}.quality-grid dt{font-size:10px;color:#92a8c2;margin-bottom:6px}.quality-grid dd{margin:0;font-size:14px;color:#d5e8fc}.song-lyrics{font-family:inherit;white-space:pre-wrap;color:#b9cbe0;font-size:14px;line-height:1.8;max-height:420px;overflow:auto}.phrase-form{display:grid;gap:16px}.phrase-form label{display:grid;gap:7px;font-size:12px;color:#b9cce3}.phrase-range{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.phrase-form textarea{resize:vertical;line-height:1.6}.phrase-form .btn{justify-self:start}.phrase-form summary{cursor:pointer;color:#80bffa;margin-bottom:12px}.music-library .ff-muted{font-size:12px;line-height:1.7}.music-library audio{color-scheme:dark}.music-library .ff-job-row{gap:18px}.music-library .ff-job-row>span:first-child{flex:1;overflow-wrap:anywhere}
@media(max-width:1200px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.song-columns{grid-template-columns:1fr}}
@media(max-width:600px){.library-grid{grid-template-columns:1fr}.library-search{display:grid;grid-template-columns:1fr}.library-search>span{margin:0}.library-search input{min-width:0}.phrase-range{grid-template-columns:1fr 1fr}.music-library .session-panel{padding:16px}.library-actions .btn{font-size:11px;padding:10px}.quality-grid{gap:12px}}
.kastaside-identity{display:flex;flex-direction:column;align-items:center;width:280px;max-width:100%;flex:0 0 auto;text-decoration:none!important;border-radius:10px;padding:0 5px 7px;color:#a9d5fa;transition:background .15s}
.kastaside-identity:hover{background:#48baff08}.kastaside-identity:focus-visible{outline:2px solid var(--ff-cyan);outline-offset:5px}
.kastaside-identity img{display:block;width:100%;height:auto;object-fit:contain}
.kastaside-identity>span{font-size:8px;letter-spacing:1.1px;text-align:center;line-height:1.5;color:#8cbbdf}.kastaside-identity i{font-style:normal;color:#48baff;margin:0 4px}
.kastaside-studio-strip{scroll-margin-top:100px;display:grid;grid-template-columns:250px minmax(0,1fr);align-items:center;gap:26px;margin:16px 0 24px;padding:12px 22px;border:1px solid #29415b;border-radius:12px;background:radial-gradient(ellipse at 12% 40%,#17619b20,transparent 60%),#0b1320}
.kastaside-studio-strip>img{display:block;width:100%;height:auto}.kastaside-studio-strip h2{font-size:19px;letter-spacing:-.4px;margin:5px 0 7px;color:#e2efff}.kastaside-studio-strip p{font-size:12px;line-height:1.6;margin:0;color:#9caec4}.kastaside-studio-strip .ff-eyebrow{font-size:9px;color:#79bdeb}
@media(max-width:1100px){.has-remix-brand{flex-wrap:wrap}.kastaside-identity{width:250px}.kastaside-studio-strip{grid-template-columns:210px minmax(0,1fr);gap:18px}}
@media(max-width:760px){.has-remix-brand{flex-direction:column-reverse;align-items:flex-start;gap:12px}.kastaside-identity{width:250px;padding:0;align-self:flex-start}.kastaside-studio-strip{grid-template-columns:1fr;gap:7px;padding:15px}.kastaside-studio-strip>img{width:230px;max-width:100%}.kastaside-studio-strip h2{font-size:18px}}
.studio-time{color:#9db5d1;font-size:11px;font-variant-numeric:tabular-nums}.studio-time time{color:#bcd6ee}.task-times{display:flex;flex-wrap:wrap;gap:8px 24px;margin:0 0 16px;padding:10px 12px;border:1px solid #27465e;border-radius:7px;background:#101e30}.library-created{margin:5px 0 12px;line-height:1.6}
/* Astra permission: the same blue studio controls, separate from engine status. */
.ff-studio .astra-access-toggle {width:100%;margin:10px 0;padding:9px 12px;border:1px solid #284b70;border-radius:8px;background:#101e30;color:#99d9ff;font:inherit;font-size:12px;cursor:pointer;text-align:left;}
.ff-studio .astra-access-toggle:hover,.ff-studio .astra-access-toggle:focus-visible {border-color:#49baff;box-shadow:0 0 0 2px #49baff24;}
.ff-studio .astra-access-toggle.is-unlocked {color:#65caff;border-color:#398dc0;}
.ff-studio .astra-access-dialog {box-sizing:border-box;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:28px;color:#e6f3ff;background:#0e1726;border:1px solid #3184b7;border-radius:16px;box-shadow:0 0 60px #168ad82b,0 24px 80px #000b;}
.ff-studio .astra-access-dialog::backdrop {background:#030814cc;backdrop-filter:blur(5px);}
.ff-studio .astra-access-heading {display:flex;gap:10px;align-items:center;color:#65caff;font-size:10px;letter-spacing:1.6px;}
.ff-studio .astra-access-symbol svg {width:22px;height:22px;}
.ff-studio .astra-access-dialog h2 {font-size:26px;margin:17px 0 10px;letter-spacing:-.5px;}
.ff-studio .astra-access-dialog p {color:#acbed3;line-height:1.55;font-size:13px;}
.ff-studio .astra-access-dialog label {display:block;font-size:12px;color:#ccdef1;margin:18px 0 7px;}
.ff-studio .astra-access-dialog input {box-sizing:border-box;display:block;width:100%;min-height:44px;border:1px solid #344b66;border-radius:8px;background:#080f1c;color:#e6f3ff;padding:10px 12px;font:inherit;}
.ff-studio .astra-access-dialog input:focus {outline:2px solid #49baff;outline-offset:2px;}
.ff-studio .astra-access-actions {display:flex;gap:10px;justify-content:flex-end;margin-top:12px;}
.ff-studio .astra-access-dialog .astra-access-error {color:#ffb7c3;min-height:20px;margin:10px 0;}
.ff-studio .astra-access-dialog .astra-access-footnote {font-size:11px;color:#91a6be;margin:18px 0 0;}
@media(max-width:540px){.ff-studio .astra-access-dialog{padding:22px;}.ff-studio .astra-access-actions .btn{flex:1;}}
/* Stem sound design: source, audition and controls share one compact track strip. */
.stem-workspace .stem-result{grid-template-columns:minmax(0,1fr)}
.stem-workspace .stem-result>div,.stem-workspace .stem-result>.change-report{grid-column:1;grid-row:auto;position:static}
.stem-workspace .stem-fx-intro{color:#aec6de;font-size:13px;line-height:1.6;margin:8px 0}
.stem-workspace .stem-fx-list{gap:20px}
.stem-workspace .stem-fx-list .stem-strip{display:block;padding:18px;border:1px solid #2c4661;background:#101722;border-radius:12px;min-width:0}
.stem-workspace .stem-strip-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.stem-workspace .stem-strip-heading>div{flex:1;min-width:190px}
.stem-workspace .stem-strip-heading h3{font-size:22px;margin:3px 0 5px;color:#e5f5ff}
.stem-workspace .stem-strip-heading p{margin:0;font-size:12px;color:#a5bad1;line-height:1.5}
.stem-workspace .stem-preset-label{display:grid;gap:5px;font-size:11px;color:#a5bad1}
.stem-workspace .stem-preset-label select,.stem-workspace .stem-fx-control select{min-height:36px;background:#0b1321;color:#c7e7ff;border:1px solid #315477;border-radius:6px;padding:7px 9px;font:inherit}
.stem-workspace .stem-mute{display:flex;align-items:center;gap:7px;font-size:12px;color:#b7cee4}
.stem-workspace .stem-mute input{width:17px;height:17px;accent-color:#4cbfff}
.stem-workspace .stem-listen-row{display:grid;grid-template-columns:minmax(210px,.7fr) minmax(0,1fr);gap:16px;margin-bottom:14px;padding:12px;background:#0b1220;border:1px solid #263c54;border-radius:8px}
.stem-workspace .stem-source>span{display:block;font-size:11px;letter-spacing:.3px;color:#a6c3df;margin-bottom:8px}
.stem-workspace .stem-listen-row audio{width:100%;height:36px;margin:0 0 5px}
.stem-workspace .stem-listen-row .small-link{font-size:11px}
.stem-workspace .stem-preview-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.stem-workspace .stem-preview-actions label{display:grid;gap:5px;font-size:10px;color:#a6c3df}
.stem-workspace .stem-preview-actions input{width:118px;box-sizing:border-box;min-height:35px;padding:5px 8px;color:#e1efff;background:#101d2c;border:1px solid #355270;border-radius:6px}
.stem-workspace .stem-preview-actions .btn{padding:10px;font-size:11px}
.stem-workspace [data-stem-state]{font-size:11px;line-height:1.5;color:#9ebed9;margin:8px 0}
.stem-workspace .stem-fx-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}
.stem-workspace .stem-fx-grid .stem-fx-control{box-sizing:border-box;display:grid;grid-template-columns:1fr;align-content:start;gap:7px;min-width:0;background:#111c2b!important;border:1px solid #2b415b!important;padding:12px!important;border-radius:8px}
.stem-workspace .stem-fx-control>span{font-size:12px;font-weight:650;color:#e0f0ff}
.stem-workspace .stem-fx-control output{font-size:11px;font-variant-numeric:tabular-nums;color:#6ecbff;min-height:16px}
.stem-workspace .stem-fx-control input[type=range]{width:100%;margin:3px 0 5px;accent-color:#48baff;height:20px}
.stem-workspace .stem-fx-control small{font-size:11px;font-weight:400;line-height:1.5;color:#a0b7d1;letter-spacing:0;text-transform:none}
.stem-workspace .stem-fx-control input[type=file]{font-size:11px;width:100%}
.stem-workspace .stem-fx-section{margin:12px 0 0;border:1px solid #253e57;border-radius:8px;background:#0d1522}
.stem-workspace .stem-fx-section summary{padding:11px 12px;font-size:12px;font-weight:600;color:#9bd6ff;cursor:pointer}
.stem-workspace .stem-fx-section summary>span{font-weight:400;color:#89a3bd;font-size:10px;margin-left:10px}
.stem-workspace .stem-fx-section>.stem-fx-grid{padding:0 10px 10px}
.stem-workspace .stem-fx-master{padding:16px;background:#0c1828}
.stem-workspace [hidden]{display:none!important}
@media(max-width:1100px){.stem-workspace .stem-listen-row{grid-template-columns:1fr}.stem-workspace .stem-fx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.stem-workspace .stem-fx-list .stem-strip{padding:12px}.stem-workspace .stem-fx-grid{grid-template-columns:1fr}.stem-workspace .stem-strip-heading{gap:10px}.stem-workspace .stem-strip-heading>div{flex-basis:100%}.stem-workspace .stem-fx-section summary>span{display:block;margin:5px 0 0}.stem-workspace .stem-preview-actions .btn{flex:1}.stem-workspace .stem-preview-actions label{flex-basis:100%}}
