:root { --mobile-header-height:64px;--mobile-nav-height:68px;--app-height:100dvh;--keyboard-inset:0px; }
.mobile-bottom-nav { display:none; }
.sidebar-close { display:none; }
@media(max-width:1024px){
 html[data-theme] #view { animation:mobile-view-in 180ms ease both;transform:none; }
 @keyframes mobile-view-in { from{opacity:0;}to{opacity:1;} }
 html[data-theme] .workspace { margin-left:0;max-width:none;padding-top:0; }
 html[data-theme] .topbar { position:sticky;top:0;z-index:45;min-height:calc(var(--mobile-header-height) + env(safe-area-inset-top,0px));margin:0 0 18px;padding:env(safe-area-inset-top,0px) 2px 0;background:var(--canvas);border-bottom:1px solid var(--line); }
 html[data-theme] .mobile-menu { display:grid!important;place-items:center;flex-shrink:0;min-width:44px;min-height:44px;margin-right:4px; }
 html[data-theme] .topbar :is(.credit-pill,.icon-btn,.avatar) { min-width:44px;min-height:44px; }
 html[data-theme] :is(.home-prompt-row .v2-button,.style-options button,.track-meta,.text-button,.v2-text-link,.work-title) { min-width:44px;min-height:44px; }
 html[data-theme] .sidebar { z-index:90;width:min(300px,calc(100vw - 28px));max-height:100dvh;padding-top:calc(22px + env(safe-area-inset-top,0px));padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-101%);visibility:hidden;overscroll-behavior:contain;overflow-y:auto; }
 html[data-theme] .sidebar.is-open { transform:translateX(0);visibility:visible; }
 html[data-theme] .sidebar-close { display:grid;place-items:center;position:absolute;right:10px;top:calc(8px + env(safe-area-inset-top,0px));width:44px;height:44px;border:0;border-radius:12px;color:var(--muted);background:transparent; }
 html[data-theme] .sidebar>.brand { padding-right:35px; }
 html[data-theme] .mobile-overlay { z-index:85; }
 html[data-theme] .mobile-overlay.visible { position:fixed;inset:0;display:block;visibility:visible;opacity:1;background:#020713b3;backdrop-filter:blur(4px); }
 body.nav-open { overflow:hidden; }
 html[data-theme] .sidebar .nav-item { min-height:46px;font-size:14px; }
 html[data-theme] .sidebar .profile-btn { min-height:64px; }
 html[data-theme] .sidebar .brand-tag { font-size:11px;white-space:nowrap; }
 html[data-theme] .sidebar-create { min-height:46px;font-size:14px; }
 .modal-backdrop { padding:max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px)); }
 html[data-theme] .modal { max-height:calc(var(--app-height,100dvh) - 24px);overscroll-behavior:contain; }
 html[data-theme] .modal .icon-btn,html[data-theme] .modal .button { min-height:44px; }
 html[data-theme] .modal-close { min-width:44px;min-height:44px; }
 html[data-theme] .modal input,html[data-theme] .modal textarea,html[data-theme] .modal select { font-size:16px; }
 .model-option { min-height:76px; }
}
@media(max-width:767px){
 html[data-theme] .workspace { padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom,0px) + 24px);padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px)); }
 html[data-theme] .topbar { gap:8px;margin-bottom:18px; }
 html[data-theme] .breadcrumbs { min-width:0;gap:5px; }
 html[data-theme] .breadcrumbs>span { display:none; }
 html[data-theme] .breadcrumbs>strong { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px; }
 html[data-theme] .topbar-actions { margin-left:auto;gap:5px; }
 html[data-theme] .credit-pill { display:flex;min-height:44px;padding:0 10px;border-radius:12px;gap:6px;font-size:12px; }
 html[data-theme] .credit-pill>strong { font-variant-numeric:tabular-nums; }
 html[data-theme] .credit-pill>span,.topbar-actions>.demo-badge,.topbar-actions>.avatar,.topbar-actions>.notification-btn { display:none!important; }
 html[data-theme] .credit-pill>svg { width:16px;height:16px; }
 .mobile-bottom-nav { position:fixed;z-index:60;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom,0px));padding:5px max(6px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));border-top:1px solid var(--line);background:var(--surface);box-shadow:0 -8px 30px #03081624; }
 .mobile-bottom-nav>a,.mobile-bottom-nav>button { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:48px;padding:5px 1px;border:0;border-radius:11px;background:transparent;color:var(--muted);font-size:11px;font-weight:650;line-height:1.1;text-align:center;text-decoration:none; }
 .mobile-bottom-nav svg { width:21px;height:21px; }
 .mobile-bottom-nav>.active { background:var(--primary-soft);color:var(--primary); }
 body.keyboard-open .mobile-bottom-nav { display:none!important; }
 body.keyboard-open .workspace { padding-bottom:12px; }
 html[data-theme] .toast-container { z-index:140;right:12px;left:12px;bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom,0px) + 12px);max-width:none; }
 body.keyboard-open .toast-container { bottom:12px; }
 html[data-theme] .toast { font-size:13px;padding:13px 15px; }
 html[data-theme] .modal { border-radius:22px; }
 html[data-theme] .modal-backdrop { align-items:flex-end; }
 html[data-theme] .modal-header { padding:18px 18px 12px; }
 html[data-theme] .modal-body { padding:0 18px 18px; }
 html[data-theme] .modal-footer { padding:14px 18px max(18px,env(safe-area-inset-bottom,0px));flex-wrap:wrap; }
 html[data-theme] .modal-footer>.button,html[data-theme] .modal-footer>.v2-button { flex:1;min-height:46px;font-size:13px; }
 html[data-theme] .model-option { padding:13px 10px;gap:10px; }
 .model-option-info { min-width:0; }
 .model-option-info>strong { flex-wrap:wrap; }
 .model-option-info>span { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px; }
 .model-option-info>em { display:none; }
 .model-option-price { flex-shrink:0;font-size:12px; }
 .model-option-price svg { width:16px;height:16px; }
}
@media(max-width:359px){
 html[data-theme] .workspace { padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px)); }
 html[data-theme] .breadcrumbs>strong { max-width:110px;font-size:12px; }
 .mobile-bottom-nav>a,.mobile-bottom-nav>button { font-size:10px; }
}
@media(max-width:1024px) and (max-height:500px){
 :root { --mobile-header-height:48px; }
 html[data-theme] .topbar { margin-bottom:10px; }
 html[data-theme] .modal { max-height:calc(var(--app-height,100dvh) - 16px); }
}
@media(min-width:768px) and (max-width:1024px) and (max-height:500px){:root{--mobile-nav-height:0px;}}
/* Put playback ahead of the introductory copy on a phone. */
@media(max-width:767px){
 html[data-theme] .music-studio[data-mobile-panel="preview"] .v2-intro { margin-bottom:14px; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .v2-intro :is(.v2-kicker,.v2-subtitle,.v2-inline-actions) { display:none; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .v2-title { font-size:24px;line-height:1.2; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-preview-top { margin-bottom:16px; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-art { width:min(42vw,180px);margin-bottom:14px; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-wave { height:40px;margin-top:14px; }
}
@media(max-width:767px) and (min-height:501px) and (max-height:700px){
 html[data-theme] .music-studio[data-mobile-panel="preview"] .v2-intro { display:none; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-preview { display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px 16px;padding:16px;text-align:left; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-preview-top { grid-column:1/-1;margin:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-art { grid-column:1;grid-row:2;width:104px;height:104px;margin:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-details { grid-column:2;grid-row:2;min-width:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-title { font-size:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-model { justify-content:flex-start; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-wave { display:none; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] :is(.music-timeline,.music-transport,.music-bottom-note) { grid-column:1/-1;margin:0; }
}
@media(max-width:1024px) and (max-height:500px){
 html[data-theme] .music-studio[data-mobile-panel="preview"] .v2-intro { display:none; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-preview { grid-template-columns:110px minmax(0,1fr);gap:4px 20px;padding:12px 18px; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] :is(.music-preview-top,.music-wave,.record-model) { display:none; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-art { grid-column:1;grid-row:1/4;width:110px;height:110px;margin:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-details { grid-column:2;grid-row:1; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .record-title { margin:0;font-size:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-timeline { grid-column:2;grid-row:2;margin:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-transport { grid-column:2;grid-row:3;margin:0; }
 html[data-theme] .music-studio[data-mobile-panel="preview"] .music-bottom-note { grid-column:1/-1;grid-row:4;margin:8px 0 0; }
}
@media(prefers-reduced-motion:reduce){.mobile-bottom-nav *,.mobile-overlay,.sidebar{transition:none!important;}}
