/* Mobile density is shared by every page; the same components reflow on wide windows. */
:root{--mobile-width:420px;--radius:20px;--app-viewport-height:100svh}
@supports(height:100dvh){:root{--app-viewport-height:100dvh}}
body{font-size:15px}
.chat-list-layout,.conversation-layout,.me-shell{width:100%;height:100%;margin-inline:auto}
.chat-list-page:not(.embedded-list),.chat-window-page{height:calc(var(--app-viewport-height) / var(--appearance-scale,1));min-height:0}
.chat-list-layout,.conversation-layout{display:block;overflow:hidden;border:0}
.chat-list-empty-pane,.conversation-sidebar{display:none}

/* The music landing page reserves its first screen for the main entry. */
html:has(#music-home){scrollbar-gutter:auto}
#music-home{display:flex;flex-direction:column;justify-content:space-between;gap:10px;width:min(calc(100% - 28px),392px);min-height:calc(100svh / var(--appearance-scale,1));margin-inline:auto;padding:14px 0 max(10px,env(safe-area-inset-bottom));--home-flow-gap:9px}
#music-home .home-header{min-height:0;padding:0}
#music-home .brand-line{gap:12px;min-height:40px}
#music-home .brand-line h1{font-size:36px;line-height:1.1;letter-spacing:.09em}
#music-home .brand-wave{width:42px;height:34px;gap:4px;transform:scale(.65);transform-origin:left center;margin:0}
#music-home .brand-copy{font-size:11px;line-height:1.6;letter-spacing:.04em;margin:7px 0 0;white-space:normal}
#music-home .brand-rule{display:none}
#music-home .login-pill{font-size:13px;line-height:1.4;padding:8px 17px;gap:8px;letter-spacing:0}
#music-home .login-pill svg{width:17px;height:17px}
#music-home .player{display:block;margin:0;padding:25px 14px 12px;border-radius:20px;min-width:0}
#music-home .player-tools{top:5px;right:8px;gap:0}
#music-home .player-tools .icon-button{min-width:32px;min-height:32px;padding:7px}
#music-home .player-tools svg{width:18px;height:18px}
#music-home .player-stage{display:grid;grid-template-columns:43% minmax(0,1fr);gap:13px;align-items:center;flex:none;padding:0}
#music-home .record-stage{width:100%;max-width:145px;aspect-ratio:1.12;align-self:center}
#music-home .album-sleeve{width:81%;border-radius:10px}
#music-home .vinyl{width:76%;top:6%}
#music-home .track-copy{padding:0;align-self:center}
#music-home .track-copy h2{font-size:16px;line-height:1.3;height:2.6em;min-height:2.6em;margin:0 0 4px;letter-spacing:0}
#music-home .curator{font-size:10px;line-height:1.4;gap:5px}
#music-home .curator svg{width:11px;height:11px}
#music-home .lyrics-caption{font-size:8px;line-height:1.4;margin:6px 0 1px}
#music-home :is(.lyrics-viewport,.lyrics-empty){height:44px}
#music-home .lyric-line{font-size:10px;line-height:1.6;padding:3px 0}
#music-home .lyrics-empty p{font-size:11px;margin:0}
#music-home .lyrics-empty small{font-size:8px}
#music-home .timeline{padding:0;margin-top:7px}
#music-home .time-labels{font-size:10px;line-height:1.3;margin-top:4px}
#music-home .transport{padding:3px 0 0;gap:8px}
#music-home .transport .icon-button{min-width:40px;min-height:40px;padding:8px}
#music-home .transport .skip svg,#music-home .secondary-control svg{width:21px;height:21px}
#music-home .play-button{width:44px;height:44px}
#music-home .play-button svg{width:23px;height:23px}
#music-home>.recommendations{display:block;margin-top:0;padding:9px 10px;border-radius:18px}
#music-home .section-heading{margin-bottom:7px;gap:6px}
#music-home .section-heading h2{font-size:14px;line-height:1.3;letter-spacing:0}
#music-home .section-heading>button{font-size:10px;line-height:1.5;gap:1px}
#music-home .section-heading>button svg{width:12px;height:12px}
#music-home .recommendation-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:auto;gap:6px;flex:none}
#music-home .scene-card{display:block;position:relative;min-height:0;aspect-ratio:.76;padding:0;border-radius:8px;box-shadow:none}
#music-home .scene-card>img{position:absolute;inset:0;width:100%;height:100%;border-radius:0}
#music-home .scene-card:after{display:block;inset:20% 0 0}
#music-home .scene-card-copy{position:absolute;left:4px;right:4px;bottom:5px;display:block;white-space:normal}
#music-home .scene-card-copy strong{font-size:9px;line-height:1.35;min-height:2.7em;letter-spacing:0;-webkit-line-clamp:2}
#music-home .scene-card-copy small{font-size:8px;line-height:1.3;margin-top:2px}
#music-home .card-play{position:absolute;top:4px;right:4px;bottom:auto;width:19px;height:19px;min-width:19px;margin:0;z-index:2}
#music-home .card-play svg{width:10px;height:10px}
#music-home>.music-navigation{display:grid;margin-top:0;padding:10px 0;border-radius:17px}
#music-home .music-navigation>button{flex-direction:column;font-size:10px;line-height:1.4;gap:4px;padding:0 2px;letter-spacing:0}
#music-home .music-navigation>button svg{width:20px;height:20px}
#music-home .music-navigation>button+button:before{top:2px;bottom:2px}
#music-home>*{flex-shrink:0}
#music-home>.home-footer{display:block;margin-top:0;padding:0;text-align:center}
#music-home .enter-button{width:70%;min-height:44px;padding:8px 16px;font-size:18px;line-height:1.4;letter-spacing:1px;gap:12px}
#music-home .enter-button svg{width:19px;height:19px}
#music-home .enter-button.is-timeout{font-size:13px}
#music-home .home-footer>p{font-size:10px;line-height:1.4;margin:6px 0 0;letter-spacing:.04em;gap:8px}
#music-home .home-footer>p>span{width:22px}
@media(max-height:700px){
 #music-home{padding-top:10px}
 #music-home .home-header{padding-bottom:0}
 #music-home .brand-line h1{font-size:32px}
 #music-home .brand-line{min-height:36px}
 #music-home .player{padding-top:23px;padding-bottom:9px}
 #music-home .lyrics-caption{display:none}
 #music-home :is(.lyrics-viewport,.lyrics-empty){height:36px;margin-top:5px}
 #music-home .home-footer>p{display:none}
}

/* Match conversation density to the comfortable contact rows. */
.chat-list-page:not(.embedded-list){--list-avatar-size:56px;--list-name-size:17px;--list-summary-size:14px;--list-time-size:12px;--list-row-height:82px;--list-row-gap:12px;--list-row-padding:12px 6px;--list-brand-size:32px;--list-action-width:38px;--list-action-height:40px;--list-action-glyph:24px;--list-search-height:44px;--list-unread-size:21px;--list-unread-font:12px}
.chat-list-page:not(.embedded-list) .chat-list-shell{width:100%;max-width:none;height:100%;border:0;padding:max(12px,env(safe-area-inset-top)) 14px max(9px,env(safe-area-inset-bottom))}
.chat-list-page .chat-list-header{padding:0 3px 12px}
.chat-list-page .list-brand{gap:10px}
.chat-list-page .list-search{margin:0 3px 7px;padding:0 13px;border-radius:24px}
.chat-list-page .list-search input{font-size:15px}
.chat-list-page .list-search svg{width:21px;height:21px}
.chat-list-page .conversation-meta{min-width:34px;gap:7px}
.chat-list-page .conversation-copy p{margin-top:3px}
.chat-list-page .preview-unread{min-width:23px;height:23px;font-size:12px}
.chat-list-page .preview-online{width:7px;height:7px}
.chat-list-page:not(.embedded-list) .list-bottom-navigation{display:grid;height:51.2px;min-height:51.2px;margin-top:7px;padding:2.5px 6px;border-radius:21px}
.chat-list-page .list-bottom-navigation :is(button,a){min-height:44px;font-size:11px;line-height:1.4;gap:2px;padding:2px 0}
.chat-list-page .list-bottom-navigation svg{width:20px;height:20px}
.contacts-page-header{margin:0 3px;padding:10px 0}
.contacts-page-header h2{font-size:22px}
.contacts-page-body{padding-inline:3px;--contact-row-y:12px;--contact-row-x:6px}
.contacts-page-body .preview-contact-search{min-height:44px;margin:12px 0 3px;font-size:15px}
.contacts-page-body .preview-contact-row{min-height:82px;gap:12px}
.contacts-page-body .preview-contact-main{gap:12px;min-height:56px}
.contacts-page-body .preview-contact-main .preview-avatar{width:56px;height:56px}
.contacts-page-body .preview-contact-copy strong{font-size:17px}
.contacts-page-body .preview-contact-copy small{font-size:13px;margin-top:4px}

.chat-window-page{--chat-body-size:17px;--chat-title-size:18px;--chat-secondary-size:12px;--chat-meta-size:11px;--chat-menu-size:15px;--chat-avatar-size:32px;--chat-audio-size:14px;--chat-file-size:15px;--chat-check-size:12px}
.chat-window-shell{width:100%;max-width:none;height:100%;margin:0;border:0}
.chat-window-header{min-height:64px;gap:9px;padding:max(9px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 9px max(5px,env(safe-area-inset-left))}
.chat-back{display:grid;width:34px;height:44px;padding:5px}
.chat-back svg{width:27px;height:27px}
.chat-peer-avatar{width:42px;height:42px}
.chat-peer-copy h1{font-size:18px}
.chat-peer-copy p,.chat-online-label{font-size:12px}
.chat-online-label{display:inline}
.chat-menu-anchor>.list-icon-button{width:36px;height:44px;padding:6px}
.chat-menu-anchor>.list-icon-button svg{width:26px;height:26px}
.chat-message-area{padding:14px 12px}
.chat-preview-row{gap:10px;margin-bottom:13px}
.preview-bubble{padding:10px 12px;line-height:1.6}
.chat-composer-wrap{padding:7px 8px max(9px,env(safe-area-inset-bottom))}
.preview-composer{gap:3px;padding:5px;--composer-icon-size:24px;--composer-plus-size:27px;--composer-send-size:25px}
.preview-composer .composer-icon,.preview-composer .preview-send-button{width:36px;height:42px}
.preview-composer .composer-plus,.preview-composer .preview-send-button{width:42px;height:42px;flex:0 0 42px;aspect-ratio:1;border-radius:50%}
.preview-composer textarea{min-height:42px;padding:9px 10px;font-size:var(--appearance-chat-font,17px);line-height:1.4}
.conversation-menu{width:min(230px,calc(100vw - 28px))}

/* Personal settings use the same row rhythm rather than oversized cards. */
.me-shell{max-width:none;padding:12px 14px 9px}
.me-content,.me-page-content .me-content{grid-template-columns:minmax(0,1fr);gap:12px}
.me-profile,.me-page-content .me-profile{padding:15px 14px 0;border-radius:20px}
.me-profile-top,.me-page-content .me-profile-top{gap:12px;padding-bottom:14px;flex-wrap:nowrap}
.me-avatar-button,.me-page-content .me-avatar-button,.me-page-content .me-avatar{width:56px;height:56px}
.me-identity h2,.me-page-content .me-identity h2{font-size:18px}
.me-account{font-size:12px}
.me-tagline{font-size:12px}
.me-profile-footer{min-height:42px}
.me-options,.me-page-content .me-options{padding:2px 14px;border-radius:20px}
.me-option,.me-page-content .me-option{min-height:66px;gap:12px;padding:12px 0}
.me-option-icon{width:36px;height:38px;border-radius:12px}
.me-option-icon svg{width:23px;height:23px}
.me-option-copy strong{font-size:16px}
.me-option-copy small{font-size:12px;margin-top:2px}
.me-logout{min-height:44px;font-size:15px}
.list-dialog h2{font-size:18px}
.login-shell{max-width:var(--mobile-width);margin-inline:auto;gap:24px;padding:24px 20px}
.login-brand h1{font-size:40px}
.login-brand p{font-size:13px;margin-top:9px}
.login-card{max-width:360px;padding:24px 22px 21px}
.listening-emblem{width:72px;height:72px}
.lock-shell{max-width:var(--mobile-width)}
@media(max-height:740px){
 html[data-layout=portrait] .login-shell{gap:18px;padding-block:18px}
 html[data-layout=portrait] .login-brand h1{font-size:32px}
 html[data-layout=portrait] .login-brand p{font-size:12px;margin-top:7px}
 html[data-layout=portrait] .login-card{padding:18px 22px}
 html[data-layout=portrait] .listening-emblem{width:56px;height:56px}
 html[data-layout=portrait] .login-card h2{margin:10px 0 16px}
 html[data-layout=portrait] .login-divider{margin-block:12px}
 html[data-layout=portrait] .login-card-footer{margin-top:14px}
}


/* A single ratio decision is shared with chat loading, including keyboard protection. */
html[data-layout=wide] :is(.chat-list-layout,.conversation-layout){width:100%;display:grid;grid-template-columns:clamp(min(180px,38%),32%,340px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);border-inline:0}
html[data-layout=wide] .chat-list-layout>.chat-list-shell{min-width:0;border-right:1px solid #d3fff13d}
html[data-layout=wide] .chat-list-empty-pane{display:grid;place-items:center;min-width:0;padding:20px}
html[data-layout=wide] .chat-list-empty-pane p{margin:0;padding:12px 18px;border:1px solid #dcfff03d;border-radius:24px;font-size:14px;color:var(--appearance-backdrop-ink,#e1f4ed);text-align:center}
html[data-layout=wide] .conversation-sidebar{display:block;min-width:0;min-height:0;border-right:1px solid #d3fff13d}
html[data-layout=wide] .chat-window-shell{min-width:0;min-height:0;background:#c6eded0a}
html[data-layout=wide] .chat-message-area{padding-inline:clamp(12px,2vw,28px)}
html[data-layout=wide] .chat-composer-wrap{padding-inline:12px}
html[data-layout=wide] .chat-back{display:none}
/* The embedded list uses the same compact rows without rendering a second navigation. */
.chat-list-page.embedded-list{--list-avatar-size:48px;--list-name-size:16px;--list-summary-size:13px;--list-time-size:11px;--list-row-height:78px;--list-row-gap:10px;--list-row-padding:12px 6px;--list-brand-size:30px;--list-action-width:33px;--list-action-height:40px;--list-action-glyph:23px;--list-search-height:44px;--list-unread-size:22px;--list-unread-font:12px}
.chat-list-page.embedded-list .chat-list-layout{display:block;width:100%;border:0}
.chat-list-page.embedded-list .list-bottom-navigation{display:none}
.chat-list-page.embedded-list .chat-list-empty-pane{display:none}
.chat-list-page.embedded-list .chat-list-shell{padding:12px 10px 9px;border:0}
.chat-list-page.embedded-list .list-search{margin-inline:0}
.chat-list-page.embedded-list .list-search input{font-size:14px}
/* Compact panes must fit both the unfolded cover variants and a narrow split window. */
@media(max-width:680px){
 html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list{
  --list-avatar-size:36px;--list-row-gap:6px;--list-row-padding:8px 3px;--list-row-height:60px;--list-name-size:14px;
  --list-summary-size:12px;--list-brand-size:24px;--list-action-width:36px;--list-action-glyph:21px;
 }
 html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]) .chat-list-shell,.lt-compact-sidebar .chat-list-page.embedded-list .chat-list-shell{padding-inline:7px}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .chat-list-header{flex-wrap:wrap;gap:0;padding:0 0 6px}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-brand{flex:0 1 100%;gap:5px}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-brand-logo{width:20px;height:28px}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-brand-copy p{display:none}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-header-actions{width:100%;justify-content:space-between;gap:0}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .plus-anchor{position:static}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .plus-menu{width:min(184px,100%);top:100%}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-search{margin-inline:0;padding-inline:6px;gap:5px}
 :is(html[data-layout=wide] .chat-list-page:not([data-nav-page=profile]),.lt-compact-sidebar .chat-list-page.embedded-list) .list-search input{font-size:13px}
 html[data-layout=wide] .chat-window-header{gap:4px;padding-inline:6px}
 html[data-layout=wide] .chat-window-header .chat-peer-avatar{width:34px;height:34px}
 html[data-layout=wide] .chat-window-header .list-icon-button{width:31px;min-width:0;padding-inline:4px}
 html[data-layout=wide] .chat-window-header .list-icon-button svg{width:22px;height:22px}
 html[data-layout=wide] .chat-menu-anchor{position:static}
 html[data-layout=wide] .conversation-menu{right:4px;max-width:calc(100% - 8px)}
 html[data-layout=wide] .chat-composer-wrap{padding-inline:6px}
}
@media(max-width:420px){
 html[data-layout=wide] :is(.chat-list-layout,.conversation-layout){grid-template-columns:clamp(min(124px,36%),32%,180px) minmax(0,1fr)}
}
.me-page .me-navigation{max-width:none}
html[data-layout=wide] .me-shell{width:100%;max-width:none;padding:20px}
html[data-layout=wide] .me-shell .me-content{width:min(100%,960px);margin-inline:auto;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px}
html[data-layout=wide] .me-shell .me-navigation{max-width:420px}
html[data-layout=wide] .chat-list-page[data-nav-page=profile] .chat-list-layout{display:block;width:100%}
html[data-layout=wide] .chat-list-page[data-nav-page=profile] .chat-list-shell{border:0;padding-inline:20px}
html[data-layout=wide] .chat-list-page[data-nav-page=profile] .chat-list-empty-pane{display:none}
html[data-layout=wide] .chat-list-page[data-nav-page=profile] .me-content{width:min(100%,960px);margin-inline:auto;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px}
html[data-layout=wide] .chat-list-page[data-nav-page=profile] .list-bottom-navigation{width:min(100%,420px);margin-inline:auto}

/* Music keeps the same type scale and controls, with recommendations alongside. */
html[data-layout=wide] #music-home{display:grid;width:min(calc(100% - 32px),1000px);grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-rows:auto auto auto auto;grid-template-areas:'brand brand' 'player songs' 'navigation navigation' 'footer footer';column-gap:12px;row-gap:12px;align-content:space-between;padding-top:14px}
html[data-layout=wide] #music-home .home-header{grid-area:brand;padding-bottom:2px}
html[data-layout=wide] #music-home .player{grid-area:player;display:flex;flex-direction:column;padding:28px 16px 14px}
html[data-layout=wide] #music-home .player-stage{flex:1}
html[data-layout=wide] #music-home .record-stage{max-width:230px}
html[data-layout=wide] #music-home .track-copy h2{font-size:18px}
html[data-layout=wide] #music-home .curator{font-size:12px}
html[data-layout=wide] #music-home :is(.lyrics-viewport,.lyrics-empty){height:72px}
html[data-layout=wide] #music-home .lyric-line{font-size:12px;padding:4px 0}
html[data-layout=wide] #music-home>.recommendations{grid-area:songs;margin:0;padding:12px;display:flex;flex-direction:column}
html[data-layout=wide] #music-home .recommendation-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(5,minmax(48px,1fr));gap:6px;flex:1}
html[data-layout=wide] #music-home .scene-card{display:flex;align-items:center;gap:8px;aspect-ratio:auto;padding:5px;background:#c8f5ee0b}
html[data-layout=wide] #music-home .scene-card>img{position:static;width:42px;height:42px;flex-shrink:0;border-radius:6px}
html[data-layout=wide] #music-home .scene-card:after{display:none}
html[data-layout=wide] #music-home .scene-card-copy{position:static;flex:1;min-width:0}
html[data-layout=wide] #music-home .scene-card-copy strong{font-size:12px;min-height:0;line-height:1.4}
html[data-layout=wide] #music-home .scene-card-copy small{font-size:10px}
html[data-layout=wide] #music-home .card-play{position:static;flex-shrink:0;width:23px;height:23px;min-width:23px}
html[data-layout=wide] #music-home>.music-navigation{grid-area:navigation;margin:0;padding:12px 0}
html[data-layout=wide] #music-home .music-navigation>button{font-size:12px}
html[data-layout=wide] #music-home>.home-footer{grid-area:footer;align-self:end;margin:0;padding:10px 0 0}
html[data-layout=wide] #music-home .enter-button{width:250px;max-width:80%}

/* Authentication and lock reuse their forms in two columns on wide windows. */
html[data-layout=wide] .login-shell,html[data-layout=wide] .lock-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,360px);align-content:center;align-items:center;width:min(100%,960px);max-width:960px;min-height:calc(100svh / var(--appearance-scale,1));gap:24px;padding:24px}
html[data-layout=wide] :is(.login-card,.lock-card){width:100%;max-width:360px;padding:24px 22px 21px}
html[data-layout=wide] .login-brand{text-align:center}
html[data-layout=wide] .login-brand h1{font-size:40px;letter-spacing:.14em}
html[data-layout=wide] .login-brand p{font-size:13px;letter-spacing:.2em;margin-top:12px}
html[data-layout=wide] .login-card .listening-emblem{width:72px;height:72px}
html[data-layout=wide] .login-field input{font-size:16px}
html[data-layout=wide] .discovery-heading{width:100%;display:flex;flex-direction:column;gap:14px;transform:none;padding:0}
html[data-layout=wide] .discovery-heading>.headphone-mark{margin:0;width:48px;height:52px}
html[data-layout=wide] .discovery-heading h1{font-size:23px;white-space:normal;flex-wrap:wrap}
html[data-layout=wide] .discovery-heading p{font-size:12px;white-space:normal}
html[data-layout=wide] .lock-emblem{width:60px;height:68px;margin-bottom:20px}
html[data-layout=wide] .lock-card h2{font-size:26px}

@media(max-width:640px){
 html[data-layout=wide] #music-home{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:9px}
 html[data-layout=wide] #music-home .player-stage{grid-template-columns:minmax(0,1fr);gap:8px;justify-items:center}
 html[data-layout=wide] #music-home .record-stage{max-width:120px}
 html[data-layout=wide] #music-home .track-copy{width:100%}
 html[data-layout=wide] #music-home .track-copy h2{font-size:16px;height:auto;min-height:0}
 html[data-layout=wide] #music-home :is(.lyrics-viewport,.lyrics-empty){height:36px}
 html[data-layout=wide] #music-home .scene-card>img{width:32px;height:32px}
 html[data-layout=wide] #music-home .scene-card{gap:6px;padding:4px}
 html[data-layout=wide] #music-home .scene-card-copy strong{font-size:11px}
 html[data-layout=wide] #music-home .scene-card-copy small{font-size:9px}
 html[data-layout=wide] #music-home .card-play{width:20px;height:20px;min-width:20px}
 html[data-layout=wide] #music-home .transport{gap:0}
 html[data-layout=wide] #music-home .transport .icon-button{min-width:28px;padding:4px}
 html[data-layout=wide] #music-home .section-heading{flex-wrap:wrap}
 html[data-layout=wide] :is(.login-shell,.lock-shell){grid-template-columns:minmax(0,.65fr) minmax(0,1fr);gap:14px;padding:16px}
 html[data-layout=wide] :is(.login-card,.lock-card){padding-inline:16px}
 html[data-layout=wide] .me-shell .me-content{width:min(100%,960px);margin-inline:auto;grid-template-columns:minmax(0,1fr)}
 html[data-layout=wide] .chat-list-page[data-nav-page=profile] .me-content{width:min(100%,960px);margin-inline:auto;grid-template-columns:minmax(0,1fr)}
}
@media(max-height:500px){
 html[data-layout=wide] #music-home{padding-top:10px}
 html[data-layout=wide] #music-home .recommendation-grid{grid-template-rows:repeat(5,minmax(30px,1fr));gap:3px}
 html[data-layout=wide] #music-home>.recommendations{padding:8px}
 html[data-layout=wide] #music-home .scene-card>img{width:24px;height:24px}
 html[data-layout=wide] #music-home .scene-card{padding:3px}
 html[data-layout=wide] #music-home .scene-card-copy strong{font-size:11px}
 html[data-layout=wide] #music-home .card-play{width:19px;height:19px;min-width:19px}
 html[data-layout=wide] #music-home .scene-card-copy small{display:none}
 html[data-layout=wide] #music-home .record-stage{max-width:110px}
 html[data-layout=wide] #music-home .player{padding:24px 12px 9px}
 html[data-layout=wide] #music-home>.music-navigation{padding:10px 0}
 html[data-layout=wide] #music-home .music-navigation>button{flex-direction:row;gap:6px;font-size:11px}
 html[data-layout=wide] #music-home :is(.lyrics-viewport,.lyrics-empty){height:36px}
 html[data-layout=wide] :is(.login-shell,.lock-shell){align-content:start;padding-block:16px}
}

/* Login and invitation registration occupy one stable card; only its contents reflow. */
.auth-page{--auth-card-height:537px}
html[data-layout=wide] .auth-page{--auth-card-height:523px}
.login-page.auth-page .login-card{height:var(--auth-card-height);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto auto;row-gap:0}
.auth-page #auth-form{display:flex;flex-direction:column;gap:12px;min-height:0;overflow:visible;padding-block:2px}
.login-page.auth-page .login-field{height:50px;min-height:50px;flex-shrink:0;margin:0}
.auth-page #auth-form>.login-field:first-child{margin-top:auto}
.auth-page #auth-submit{min-height:50px;flex-shrink:0;margin-bottom:auto}
.login-page.auth-page .login-options{min-height:24px;flex-shrink:0;margin-top:-8px;padding-block:0}
.login-page.auth-page .login-divider{font-size:11px;line-height:1.5;margin:12px 0}
.login-page.auth-page .register-button{min-height:46px;line-height:1.5}
.login-page.auth-page .login-card-footer{min-height:22px;margin-top:16px}
.login-page.auth-page .login-error{flex-shrink:0;margin:0;padding-block:4px}
.login-page.auth-page.is-register .login-card{padding-block:20px}
.login-page.auth-page.is-register .listening-emblem{width:64px;height:64px}
.login-page.auth-page.is-register .login-card h2{font-size:13px;line-height:1.6;margin:10px -7px 12px}
.auth-page.is-register #auth-form{gap:8px}
.login-page.auth-page.is-register .login-field{height:44px;min-height:44px;margin:0}
.auth-page.is-register #auth-submit{min-height:46px;padding-block:9px}
.login-page.auth-page.is-register .login-divider{margin:8px 0}
.login-page.auth-page.is-register .register-button{min-height:44px}
.login-page.auth-page.is-register .login-card-footer{margin-top:12px}
@media(max-height:740px){
 .auth-page,html[data-layout=wide] .auth-page{--auth-card-height:496px}
 .login-page.auth-page.is-register .login-card{padding-block:16px}
 .login-page.auth-page.is-register .listening-emblem{width:48px;height:48px}
}

/* Authentication notices never take space from the fixed login/register card. */
.auth-page #auth-error{
 position:fixed;z-index:1100;
 left:50%;bottom:max(72px,calc(env(safe-area-inset-bottom) + 64px));
 transform:translateX(-50%);
 width:max-content;max-width:calc(100vw - 36px);
 padding:12px 18px;margin:0;
 border:1px solid #e5ffef6e;border-radius:16px;
 background:#27434deF;color:#fff9ef;
 box-shadow:0 12px 34px #061d2b99,0 1px 0 #ffffff27 inset;
 backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
 font-size:13px;line-height:1.6;font-weight:500;letter-spacing:.02em;
 text-align:center;overflow-wrap:anywhere;pointer-events:none;
 animation:auth-notice-in .2s ease-out both;
}
@keyframes auth-notice-in{from{opacity:0;transform:translate(-50%,9px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-height:480px){.auth-page #auth-error{bottom:max(12px,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.auth-page #auth-error{animation:none}}

/* Five visible recommendations; overflow scrolls horizontally without shrinking cards. */
html:not([data-layout=wide]) #music-home .recommendation-grid{
 display:grid;
 grid-auto-flow:column;
 grid-template-columns:none;
 grid-template-rows:minmax(0,1fr);
 grid-auto-columns:calc((100% - 24px)/5);
 gap:6px;
 overflow-x:auto;
 overflow-y:hidden;
 overscroll-behavior-x:contain;
 scroll-snap-type:x proximity;
 scrollbar-width:none;
 -webkit-overflow-scrolling:touch;
 touch-action:pan-x pan-y;
 padding:2px 0;
}
html:not([data-layout=wide]) #music-home .recommendation-grid::-webkit-scrollbar{display:none}
html:not([data-layout=wide]) #music-home .recommendation-grid>.scene-card{
 min-width:0;
 width:100%;
 scroll-snap-align:start;
}
