/* A reserved row avoids covering the gate, chapter controls or invitation. */
.music-bar[hidden],.music-toggle[hidden]{display:none!important}
.music-bar{position:relative;z-index:40;flex:0 0 auto;min-width:0;min-height:calc(24 * var(--ui-unit) + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center;padding:calc(2 * var(--ui-unit)) max(var(--page-gutter),env(safe-area-inset-right)) calc(2 * var(--ui-unit) + env(safe-area-inset-bottom)) max(var(--page-gutter),env(safe-area-inset-left));border:0;background:transparent}
/* The gate scenery continues underneath; other views soften their last edge. */
body:not([data-view="welcome"]) .music-bar::before{content:'';position:absolute;inset:calc(-8 * var(--ui-unit)) 0 0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#faf7f000,var(--cream) calc(8 * var(--ui-unit)))}
.music-toggle{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;gap:calc(8 * var(--ui-unit));min-width:calc(120 * var(--ui-unit));min-height:max(44px,calc(44 * var(--ui-unit)));padding:calc(8 * var(--ui-unit)) calc(14 * var(--ui-unit));border:1px solid var(--line);border-radius:calc(28 * var(--ui-unit));background:var(--paper);color:var(--red);font-size:calc(max(12px,calc(12 * var(--ui-unit))) * var(--text-scale));line-height:1.4;transition:background .2s,border-color .2s}
.music-toggle:hover{background:#f3ebe2;border-color:#b9a58e}
.music-toggle svg{width:calc(18 * var(--ui-unit));height:calc(18 * var(--ui-unit));flex-shrink:0}
.music-toggle[aria-pressed="true"] .music-slash{display:none}
.music-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.has-music .welcome,.has-music .journey{padding-bottom:calc(10 * var(--ui-unit))}
.has-music .invitation{padding-bottom:0}
@media(prefers-reduced-motion:reduce){.music-toggle{transition:none}}
/* Reclaim height for the invitation on short landscape screens. */
@media(min-width:480px) and (max-height:420px){
  .music-bar{display:none}
  .has-music .welcome,.has-music .journey{padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .has-music .invitation{padding-bottom:env(safe-area-inset-bottom)}
}
