/* Responsive surfaces: narrow fold covers through unfolded/tablet workspaces. */
.hub-main,.hub-top-actions,.crm-stat>*,.crm-card-title>*,.ls-controls,.ls-preview{min-width:0}
.crm-stat{grid-template-columns:43px minmax(0,1fr)}
.crm-stat strong{overflow-wrap:anywhere}
.crm-card-title{flex-wrap:wrap}
.music-segments{max-width:100%;box-sizing:border-box}
.crm-chart>button{min-width:0}
.crm-chart>button>span:last-child{overflow-wrap:anywhere;hyphens:auto}
.hub-top-actions{flex-shrink:0}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box}

/* Fold interiors and portrait tablets: leave sufficient room for the editor. */
@media(min-width:761px) and (max-width:1024px){
 .ls-workspace{grid-template-columns:minmax(0,1fr)}
 .ls-controls,.ls-preview{width:100%;max-width:100%;position:static}
 .music-hero{flex-direction:column;align-items:stretch}
 .music-deck{width:100%;grid-template-columns:140px minmax(0,1fr)}
 .music-deck .music-record,.music-deck:has(.wmp-compact) .music-record{width:140px}
}
@media(max-width:760px){
 html{scroll-padding-bottom:110px}
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,
 .ls-controls input,.ls-controls select,.ls-controls textarea{font-size:16px!important;max-width:100%;min-width:0}
 .hub-top-actions{gap:6px}
 .crm-stat{grid-template-columns:30px minmax(0,1fr)}
 .crm-stat strong{font-size:clamp(20px,5.6vw,25px)}
 .crm-card-title{gap:8px}
 .crm-card-title h2{font-size:18px}
 .music-toolbar-actions{flex-wrap:wrap;min-width:0}
 .music-toolbar>*{max-width:100%;min-width:0}
 .business-package-top{flex-wrap:wrap}
 .business-package-price{max-width:100%;overflow-wrap:anywhere}
 dialog{margin:auto;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);overscroll-behavior:contain}
}
@media(max-width:480px){
 .music-segments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;overflow:visible}
 .music-segments button{min-width:0;white-space:normal;min-height:44px;padding:10px 8px}
}
@media(max-width:379px){
 .header.studio-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px 14px}
 .studio-header>.brand{grid-column:1/-1;justify-self:center}
 .studio-header>.studio-nav{width:auto;min-width:0;justify-content:flex-start}
 .studio-header>.nav-actions{min-width:0;justify-content:flex-end}
 .studio-header .studio-nav>[data-explore-menu]{min-height:44px;padding:10px 14px;font-size:12px}
}
@media(max-width:359px){
 .crm-stat{grid-template-columns:minmax(0,1fr);gap:7px;padding:14px 12px;align-content:start}
 .crm-stat>.crm-glyph{grid-row:auto}
 .crm-stat strong{font-size:24px;line-height:1.15}
 .crm-stat>span:last-child{font-size:11px;line-height:1.4}
 .crm-card{padding:15px}
 .crm-chart{gap:8px}
 .crm-chart>button>span:last-child{font-size:10px;line-height:1.4}
 .hub-top{flex-wrap:wrap}
 .hub-top>div:first-child{flex:1 1 100px}
 .music-hero{padding:18px}
 .music-hero h1{font-size:32px!important}
 .music-hero .music-stats{gap:16px}
 .music-deck{grid-template-columns:54px minmax(0,1fr);gap:9px}
 .music-deck .music-record,.music-deck:has(.wmp-compact) .music-record{width:54px}
 .music-deck .music-record-label{width:32px}
 .music-toolbar-actions{gap:6px}
 .crm-offers-view .crm-mini-stats{grid-template-columns:minmax(0,1fr)}
 .crm-offers-view .crm-mini-stats>div:last-child{grid-column:auto}
}
/* Landscape phones retain room for content above the safe-area dock. */
@media(min-width:761px) and (max-height:650px){
 #accountHub .hub-shell:not(.business-hub):not(.cw-hub) .hub-rail nav{position:static!important;max-height:none!important;overflow:visible!important}
 #accountHub .hub-shell:not(.business-hub):not(.cw-hub) .hub-rail>.hub-browse{position:static!important;margin-top:18px;flex-shrink:0}
}
@media(max-width:760px) and (max-height:500px){
 #accountHub .hub-shell:not(.business-hub):not(.cw-hub) .hub-rail nav button{min-height:46px!important;padding-block:4px!important}
 #accountHub .hub-shell:not(.business-hub):not(.cw-hub) .hub-rail nav button .icon{width:19px;height:19px}
 #accountHub .hub-shell:not(.business-hub):not(.cw-hub) .hub-main{padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))!important}
}
