/* Dream RP v9.2 — stable navbar + persistent music shell */
html[data-route="music"] .page-shell,html[data-route="landing"] #dreamSoundsPage{display:none!important}
#dreamSoundsPage[aria-hidden="true"]{pointer-events:none}
#dreamSoundsPage.music-page{box-sizing:border-box;min-height:100vh;padding-bottom:145px}
/* The shared welcome stays visible on every document entry, including music. */
/* Navbar music access lives in the navigation row; responsive icon joins actions
   only when we hide the whole desktop nav. Never allow orphan/wrapped buttons. */
.header__inner{display:flex!important;align-items:center;flex-wrap:nowrap;min-width:0}
.header__nav{white-space:nowrap;min-width:0}
/* "Músicas" uses the exact same link rules as the other navigation items. */
.header__nav a.header__music-nav{display:inline-flex;align-items:center}
.header .header__music-shortcut{display:none}
.header__actions{display:flex;align-items:center;flex-wrap:nowrap;white-space:nowrap;min-width:0}
.header .header__nav,.header .header__actions{align-self:center}
.header .online-state{display:none!important}
@media(max-width:1370px){.header__nav{gap:clamp(10px,1vw,16px)!important}.header__inner{gap:clamp(10px,1vw,16px)!important}.header__nav a{font-size:11px}.header .nav-cta{padding-inline:13px}}
@media(max-width:1180px){
 .header__nav{display:none!important}
 .header .header__music-shortcut{display:inline-flex;min-height:40px;min-width:40px;justify-content:center}
 .header .menu-toggle{display:flex!important}
 .header__actions{margin-left:auto!important}
}
@media(max-width:650px){
 .header .nav-cta{display:none!important}
 .header .header__music-shortcut{padding-inline:9px}
 .header .header__music-shortcut span{display:none}
}
/* The shared audio controller is never removed during route changes. */
.music-player{display:none}
html[data-route="music"] .music-player,body.has-dream-audio .music-player{display:block}
/* A reserva e medida em tempo real pelo controlador global (ResizeObserver).
   Na landing, o espaco e acrescido DEPOIS do footer para manter links e CTA visiveis.
   Nunca usamos um padding fixo ou aumentamos a pagina antes de existir uma faixa. */
html[data-route="landing"] body.has-dream-audio #pageShell{
 padding-bottom:var(--dream-player-offset, 0px);
}
html[data-route="landing"] body.has-dream-audio{
 scroll-padding-bottom:calc(var(--dream-player-offset, 0px) + 16px);
}
html[data-route="landing"] body.has-dream-audio :is(#pageShell footer,#pageShell .join){
 scroll-margin-bottom:calc(var(--dream-player-offset, 0px) + 16px);
}
/* All tokens are specified even outside .music-page so the bar has a full
   independent light and dark palette when shown over the landing. */
.music-player,.music-toast,.music-dialog{
 --ms-surface:#fff;--ms-surface-2:#faf9fc;--ms-soft:#f1edfa;
 --ms-line:#e9e4ee;--ms-ink:#231b2d;--ms-sub:#746c80;--ms-accent:#7641df;
 color:var(--ms-ink)
}
html[data-theme="dark"] :is(.music-player,.music-toast,.music-dialog){
 --ms-surface:#201a2c;--ms-surface-2:#1b1525;--ms-soft:#2c223e;
 --ms-line:#3c314a;--ms-ink:#f6f0ff;--ms-sub:#b4a8c5;--ms-accent:#ad81ff
}
/* Both theme modes retain readable CTA text and play icon. */
.music-player .music-player__play:not(:disabled){color:var(--ms-surface);background:var(--ms-ink)}
/* O rodape e reservado pelo tamanho REAL do player, tambem no mobile. */
@media(prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none!important}}
::view-transition-old(root){animation:routeOut .18s ease-out both}
::view-transition-new(root){animation:routeIn .32s cubic-bezier(.22,1,.36,1) both}
@keyframes routeOut{to{opacity:.65}}
@keyframes routeIn{from{opacity:.75}to{opacity:1}}

/* Route crossfades should not animate or replace the persistent music controller. */
.music-player{view-transition-name:dream-music-bar}
::view-transition-old(dream-music-bar),::view-transition-new(dream-music-bar){animation:none!important}

/* V9.2.1: text-only Dream Sounds link — no icon and no promotional pill. */
.header .header__music-shortcut {
  background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;
  padding:0 3px!important;min-height:38px;
  font:700 12px/1.45 Manrope,sans-serif;letter-spacing:0;
  color:#5f5a67;transform:none!important;
}
.header .header__music-shortcut:hover,.header .header__music-shortcut:focus-visible {color:var(--violet)}
html[data-theme="dark"] .header .header__music-shortcut {color:#c7bfd2;background:none!important}
html[data-theme="dark"] .header .header__music-shortcut:hover {color:#c5aaff}
.header .header__music-shortcut span {display:inline!important}
@media(max-width:390px){
  .header .header__music-shortcut{font-size:11px;min-width:0;padding:0!important}
}
@media(max-width:345px){
  /* On very narrow devices, the same link remains inside the complete mobile menu. */
  .header .header__music-shortcut{display:none!important}
}

/* V9.2.2 — One navigation system for landing and Dream Sounds.
   Both routes use .header / .header__nav / .header__actions with the same links.
   Position is determined by the shared container and CSS, never by the route. */
#musicHeader.dream-shared-header {
  position:fixed;
  top:0;left:0;right:0;
  width:100%;
  height:var(--header-h);
  border-bottom:1px solid var(--surface-border);
}
#musicHeader.dream-shared-header.scrolled{height:var(--header-scrolled-h)}
#dreamSoundsPage { padding-top:var(--header-h) }
#musicHeader .header__inner {width:min(calc(100% - (var(--layout-gutter) * 2)),var(--container))}
#musicHeader .header__nav {display:flex;align-items:center}
#musicHeader .header__nav a.active {color:var(--violet)}
#musicHeader .header__music-shortcut {display:none}
#musicHeader .music-menu-toggle {display:none}
#musicHeader .header__actions{margin-left:auto}
#musicMobileMenu {top:var(--header-h)}
@media(max-width:1180px){
  #musicHeader .header__nav{display:none!important}
  #musicHeader .music-menu-toggle{display:flex}
  #musicHeader .header__music-shortcut{display:inline-flex;min-height:40px;min-width:40px;justify-content:center}
  #musicHeader .header__actions{margin-left:auto}
}
@media(max-width:650px){
  #musicHeader .nav-cta{display:none!important}
}
@media(max-width:640px){
  #musicHeader.dream-shared-header,#musicHeader.dream-shared-header.scrolled{height:var(--header-h)}
}
@media(max-width:345px){#musicHeader .header__music-shortcut{display:none!important}}
/* Identical navbar appearance, regardless of route and selected theme. */
html[data-theme="dark"] #musicHeader .header__nav a{color:#c7bfd2}
html[data-theme="dark"] #musicHeader .header__nav a:hover,
html[data-theme="dark"] #musicHeader .header__nav a.active {color:#c5aaff}

/* The old music-specific brand tracking was 0.12em, shrinking its width and
   moving centered navigation a few pixels. Brand typography is now identical. */
.music-page #musicHeader .logo__text small{letter-spacing:.16em}
.music-page #musicHeader .logo__text{white-space:normal}

@media(max-width:640px){
 .music-page #musicHeader .logo__text small{letter-spacing:.10em}
 .music-page #musicHeader .logo__text{white-space:nowrap}
}

/* Dream RP V9.3 / Dream Sounds viewport dashboard
   Global document is locked only on the music route, not on the landing.
   Search results own the sole scrollable region. No wheel hijacking / JS layout loops. */
html[data-route="music"] {
 --music-bar-height:106px;
 --dream-player-offset:106px; /* fallback ate o primeiro frame medido */
 height:100%;overflow:hidden;overscroll-behavior:none
}
html[data-route="music"] body {height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none}
html[data-route="music"] #dreamSoundsPage {
  --music-bar-height:106px;
  position:relative;display:flex;flex-direction:column;
  width:100%;height:100dvh;min-height:0;max-height:100dvh;
  padding-top:var(--header-h);padding-bottom:var(--dream-player-offset, 106px);
  overflow:hidden;box-sizing:border-box;
}
html[data-route="music"] #dreamSoundsPage .music-main {
  min-height:0;min-width:0;flex:1 1 auto;
  display:flex;flex-direction:column;overflow:hidden;
}
html[data-route="music"] #dreamSoundsPage .music-heading {
  flex:0 0 auto;display:flex;align-items:center;justify-content:flex-start;
  gap:12px;min-height:0;padding-top:13px;padding-bottom:12px;
}
html[data-route="music"] #dreamSoundsPage .music-kicker {font-size:9px;letter-spacing:.1em;gap:9px}
html[data-route="music"] #dreamSoundsPage .music-heading h1 {
  font-size:clamp(22px,2.6vw,35px);line-height:1.14;letter-spacing:-.065em;
  margin-top:4px;white-space:nowrap;
}
html[data-route="music"] #dreamSoundsPage .music-heading__intro p {
  font-size:11px;line-height:1.45;margin-top:4px;max-width:none;
}




html[data-route="music"] #dreamSoundsPage .music-layout {
  flex:1 1 auto;min-height:0;min-width:0;align-items:stretch;
  grid-template-columns:minmax(218px,270px) minmax(0,1fr);gap:14px;
  padding-bottom:14px;
}
html[data-route="music"] #dreamSoundsPage .music-sidebar,
html[data-route="music"] #dreamSoundsPage .music-discovery {
  min-height:0;min-width:0;overflow:hidden;border-radius:18px;
}
html[data-route="music"] #dreamSoundsPage .music-sidebar {
  position:relative;top:auto;padding:18px;display:flex;flex-direction:column;
  align-self:stretch;
}
html[data-route="music"] #dreamSoundsPage .music-sidebar h2 {font-size:20px;margin:5px 0 3px}
html[data-route="music"] #dreamSoundsPage .music-sidebar__top>p {font-size:11px;line-height:1.45}
html[data-route="music"] #dreamSoundsPage .provider-list {margin-top:14px;gap:7px}
html[data-route="music"] #dreamSoundsPage .provider-card {padding:10px;min-height:59px;gap:9px;border-radius:12px}
html[data-route="music"] #dreamSoundsPage .provider-card__symbol {width:36px;height:36px;flex-basis:36px;font-size:19px;border-radius:10px}
html[data-route="music"] #dreamSoundsPage .provider-card__content strong {font-size:12px}
html[data-route="music"] #dreamSoundsPage .provider-card__content small {font-size:10px;margin-top:2px}
html[data-route="music"] #dreamSoundsPage .music-sidebar__help {
  display:grid;align-content:center;gap:4px;padding:12px;margin-top:14px;border-radius:12px;
}
html[data-route="music"] #dreamSoundsPage .music-sidebar__help-icon,
html[data-route="music"] #dreamSoundsPage .music-sidebar__help p {display:none}
html[data-route="music"] #dreamSoundsPage .music-sidebar__help strong {font-size:12px}
html[data-route="music"] #dreamSoundsPage .music-help-button {
  display:flex;justify-content:space-between;align-items:center;
  padding:3px 0 0;border:0;background:none;color:var(--ms-accent);
  font-size:10px;font-weight:900;letter-spacing:.045em;cursor:pointer;
}
html[data-route="music"] #dreamSoundsPage .music-sidebar__disclaimer {
  font-size:8px;line-height:1.45;letter-spacing:.01em;margin-top:auto;padding-top:10px;
}
html[data-route="music"] #dreamSoundsPage .music-discovery {
  display:flex;flex-direction:column;min-height:0;padding:18px 20px;
}
html[data-route="music"] #dreamSoundsPage .music-discovery__top {flex-shrink:0;align-items:center}
html[data-route="music"] #dreamSoundsPage .music-discovery__top h2 {font-size:23px;margin-top:4px}
html[data-route="music"] #dreamSoundsPage .music-discovery__source {font-size:8px;padding:8px 10px}
html[data-route="music"] #dreamSoundsPage .music-search {flex:0 0 auto;margin-top:12px;border-radius:12px;padding:4px 4px 4px 13px}
html[data-route="music"] #dreamSoundsPage .music-search button {padding:12px 13px}
html[data-route="music"] #dreamSoundsPage .music-discovery__bar {
  flex:0 0 auto;margin:12px 0 0;padding-bottom:10px;min-height:43px;
}
html[data-route="music"] #dreamSoundsPage .music-discovery__bar p {font-size:11px;min-width:0;line-height:1.35}
html[data-route="music"] #dreamSoundsPage .music-view{flex-shrink:0}
html[data-route="music"] #dreamSoundsPage .music-help-quick{display:none}
html[data-route="music"] #dreamSoundsPage .music-results{
  min-height:0!important;max-height:none;flex:1 1 0;
  overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
  padding:8px 4px 14px 0;
}
html[data-route="music"] #dreamSoundsPage .music-empty {min-height:100%;padding:12px;align-content:center}
html[data-route="music"] #dreamSoundsPage .music-empty__symbol {width:52px;height:52px;font-size:25px;border-radius:14px}
html[data-route="music"] #dreamSoundsPage .music-empty h3 {font-size:19px;margin:10px 0 5px}
html[data-route="music"] #dreamSoundsPage .music-empty p {font-size:11px;line-height:1.5;max-width:390px}
html[data-route="music"] #dreamSoundsPage .music-empty__suggestions {margin-top:12px}
html[data-route="music"] #dreamSoundsPage .music-empty__suggestions button {padding:8px 11px;font-size:10px}
html[data-route="music"] #dreamSoundsPage .music-about,
html[data-route="music"] #dreamSoundsPage .music-copy-guide {display:none}
html[data-route="music"] .music-player {
  position:fixed;bottom:0;left:0;right:0;z-index:90;
  min-height:var(--music-bar-height);padding-bottom:env(safe-area-inset-bottom, 0px);
}
html[data-route="music"] .music-player__inner {min-height:var(--music-bar-height)}
html[data-route="music"] .music-toast {bottom:calc(var(--music-bar-height) + 14px)}
/* Small laptops need readable controls and a results list even at low heights. */
@media(max-height:700px) and (min-width:721px){
 html[data-route="music"] #dreamSoundsPage .music-heading__intro p{display:none}
 html[data-route="music"] #dreamSoundsPage .music-heading {padding-top:7px;padding-bottom:7px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar {padding:11px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar__disclaimer {display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery{padding:12px 16px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar__help {margin-top:8px;padding:8px}
 html[data-route="music"] #dreamSoundsPage .music-search {margin-top:8px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar {margin-top:6px;padding-bottom:5px}
}
/* Narrow screens keep the provider cards in one line above the results. */
@media(max-width:720px){
 html[data-route="music"] {--music-bar-height:145px;--dream-player-offset:145px}
 html[data-route="music"] #dreamSoundsPage .music-heading {padding-top:9px;padding-bottom:7px}
 html[data-route="music"] #dreamSoundsPage .music-kicker {font-size:8px}
 html[data-route="music"] #dreamSoundsPage .music-heading h1 {font-size:clamp(17px,4.4vw,26px);letter-spacing:-.06em;line-height:1.1}
 html[data-route="music"] #dreamSoundsPage .music-heading__intro p {display:none}
 
 html[data-route="music"] #dreamSoundsPage .music-layout {
   display:flex;flex-direction:column;gap:8px;padding-bottom:8px;
 }
 html[data-route="music"] #dreamSoundsPage .music-sidebar {
   display:flex;flex:0 0 auto;gap:5px;padding:9px 11px;border-radius:13px;
 }
 html[data-route="music"] #dreamSoundsPage .music-sidebar__top h2,
 html[data-route="music"] #dreamSoundsPage .music-sidebar__top>p,
 html[data-route="music"] #dreamSoundsPage .music-sidebar__help,
 html[data-route="music"] #dreamSoundsPage .music-sidebar__disclaimer{display:none}
 html[data-route="music"] #dreamSoundsPage .provider-list {display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:0}
 html[data-route="music"] #dreamSoundsPage .provider-card {padding:5px 7px;min-height:46px;gap:7px}
 html[data-route="music"] #dreamSoundsPage .provider-card__symbol{width:29px;height:29px;flex-basis:29px;font-size:16px;border-radius:8px}
 html[data-route="music"] #dreamSoundsPage .provider-card__content strong {font-size:11px}
 html[data-route="music"] #dreamSoundsPage .provider-card__content small {font-size:9px;margin-top:1px}
 html[data-route="music"] #dreamSoundsPage .provider-card__mark {display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery{flex:1 1 0;min-height:0;padding:11px;border-radius:13px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top h2{font-size:18px;margin-top:2px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__source{padding:6px;font-size:7px}
 html[data-route="music"] #dreamSoundsPage .music-search{margin-top:8px;padding-left:9px;gap:7px}
 html[data-route="music"] #dreamSoundsPage .music-search input{font-size:12px}
 html[data-route="music"] #dreamSoundsPage .music-search button{padding:12px 9px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar {margin-top:6px;padding-bottom:4px;min-height:33px;gap:7px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar p{font-size:10px;line-height:1.2}
 html[data-route="music"] #dreamSoundsPage .music-view button {width:27px;height:27px;font-size:16px}
 html[data-route="music"] #dreamSoundsPage .music-help-quick {display:inline-flex;white-space:nowrap;background:none;border:0;color:var(--ms-accent);font-size:9px;font-weight:850;padding:4px 0;cursor:pointer}
 html[data-route="music"] #dreamSoundsPage .music-empty__symbol{width:41px;height:41px;font-size:20px}
 html[data-route="music"] #dreamSoundsPage .music-empty h3{font-size:15px;margin:7px 0 3px}
 html[data-route="music"] #dreamSoundsPage .music-empty p{font-size:10px;line-height:1.35}
 html[data-route="music"] #dreamSoundsPage .music-empty__suggestions{margin-top:9px;gap:4px}
 html[data-route="music"] #dreamSoundsPage .music-empty__suggestions button{padding:6px 9px;font-size:9px}
 html[data-route="music"] .music-player__inner{min-height:var(--music-bar-height)}
 html[data-route="music"] #dreamSoundsPage .music-player__transport{gap:10px}
}
@media(max-width:380px){
 html[data-route="music"] #dreamSoundsPage .music-discovery__source{display:none}
 html[data-route="music"] #dreamSoundsPage .music-help-quick{font-size:8px}
 html[data-route="music"] #dreamSoundsPage .music-search button{font-size:8px}
}
/* Device landscape / cramped screens: reserve space for actual search results. */
@media(max-height:530px){
 html[data-route="music"] #dreamSoundsPage .music-heading {display:none}
 html[data-route="music"] #dreamSoundsPage .music-sidebar__help,
 html[data-route="music"] #dreamSoundsPage .music-sidebar__disclaimer{display:none}
}
.music-help-dialog__steps{display:grid;gap:12px;margin:20px 0 0}
.music-help-dialog__steps p{font-size:13px;line-height:1.65;color:var(--ms-sub)}
.music-help-dialog__steps strong{color:var(--ms-ink)}
/* V9.3.1 viewport height reconciliation: the bar uses two rows at tablet width. */
@media (min-width:721px) and (max-width:1000px){
 html[data-route="music"] {--music-bar-height:146px;--dream-player-offset:146px}
}
@media (max-width:720px){
 html[data-route="music"] {--music-bar-height:126px;--dream-player-offset:126px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar{padding:7px 9px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar__top{display:none}
}
@media(max-width:720px) and (max-height:650px){
 html[data-route="music"] #dreamSoundsPage .music-heading{display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery{padding:8px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top .music-caption{display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top h2{font-size:17px;margin:0}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar{min-height:30px}
}

/* Dream RP V9.3.2 — player height and view-aware content clearance. */
:root { --dream-player-offset:0px }
html[data-route="landing"] body:not(.has-dream-audio) .music-player{display:none}
html[data-route="landing"] body.has-dream-audio .music-player{display:block}
html[data-route="music"] .music-player{display:block}
html[data-route="music"] #dreamSoundsPage{padding-bottom:var(--dream-player-offset)}
.music-player { box-sizing:border-box }
.music-toast { bottom:calc(var(--dream-player-offset, 0px) + 14px) }
html[data-route="landing"] body.has-dream-audio .footer{position:relative}
@media(max-width:720px){
 html[data-route="music"] #dreamSoundsPage{padding-bottom:var(--dream-player-offset)}
}

/* Compact landscape: keep provider choices + real search results above the bar.
   Earlier layout clipped the results below the player at 844×390. */
@media (max-height:530px) and (min-width:721px) {
 html[data-route="music"] #dreamSoundsPage .music-sidebar {padding:7px 9px}
 html[data-route="music"] #dreamSoundsPage .music-sidebar__top{display:none}
 html[data-route="music"] #dreamSoundsPage .provider-list {margin-top:0;gap:5px}
 html[data-route="music"] #dreamSoundsPage .provider-card {padding:4px 6px;min-height:40px}
 html[data-route="music"] #dreamSoundsPage .provider-card__symbol{width:28px;height:28px;flex-basis:28px;font-size:15px}
 html[data-route="music"] #dreamSoundsPage .provider-card__content small{display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery {padding:6px 10px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top {min-height:22px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top .music-caption{display:none}
 html[data-route="music"] #dreamSoundsPage .music-discovery__top h2{font-size:16px;line-height:1.15;margin:0}
 html[data-route="music"] #dreamSoundsPage .music-discovery__source{padding:4px 6px}
 html[data-route="music"] #dreamSoundsPage .music-search{margin-top:4px;padding:2px 3px 2px 9px;min-height:34px}
 html[data-route="music"] #dreamSoundsPage .music-search button{padding:8px 9px}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar{min-height:26px;margin-top:3px;padding:2px 0}
 html[data-route="music"] #dreamSoundsPage .music-discovery__bar p{font-size:9px}
 html[data-route="music"] #dreamSoundsPage .music-view button{height:24px;width:24px}
}
