/* Earth Music player: a bar on the globe page, with the live video dropping down inside it on phones (Kay, 2026-10-24) */
.em{position:fixed;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px 6px 6px;border-radius:var(--r-md)}
.em[hidden],.em-video[hidden]{display:none!important}
.em.em-open{z-index:7}
.em-play{width:34px;height:34px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--coral);color:#fff;box-shadow:0 4px 12px rgba(255,122,102,.38)}
.em-play:hover{filter:brightness(1.08)}
.em .i-pause,.em.on .i-play{display:none}
.em.on .i-pause{display:inline}
.em-text{flex:1;min-width:0}
.em-label{display:flex;align-items:center;gap:6px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--indigo);white-space:nowrap}
.em-now{margin-top:1px;font-size:12px;font-weight:600;color:var(--ink);line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* the music note next to Play: the Earth Music page (Kay, 2026-10-24); smaller than Play, in the label's indigo */
.em-page{width:30px;height:30px;flex:none;border-radius:50%;display:grid;place-items:center;color:var(--indigo);background:var(--indigo-soft);
  border:1.5px solid rgba(79,70,229,.35)}
.em-page:hover{border-color:var(--indigo);box-shadow:0 0 10px 1px rgba(79,70,229,.3)}
html.night .em-page{background:rgba(140,130,255,.16);border-color:rgba(170,160,255,.45)}
/* small sound bars: still when stopped, dancing while the music plays */
.em-bars{display:inline-flex;align-items:flex-end;gap:2px;height:11px;flex:none}
.em-bars i{width:2.5px;height:35%;border-radius:2px;background:currentColor;opacity:.55}
.em.on .em-bars i{opacity:1;animation:em-bar .9s ease-in-out infinite}
.em.on .em-bars i:nth-child(2){animation-delay:.15s}.em.on .em-bars i:nth-child(3){animation-delay:.3s}.em.on .em-bars i:nth-child(4){animation-delay:.45s}
@keyframes em-bar{0%,100%{height:30%}50%{height:100%}}
@media (prefers-reduced-motion:reduce){.em.on .em-bars i{animation:none;height:70%}}
/* Watch (orange, red halo) and TV (lavender): as big as Play, a rounded-square outline with a soft halo (Kay, 2026-10-10) */
.em-btn{width:34px;height:34px;flex:none;border-radius:10px;display:grid;place-items:center;border:1.5px solid}
.em-btn svg{width:18px;height:18px}
.em-expand{color:#F08A3C;background:#FFF3E8;border-color:#F7A9A3;box-shadow:0 0 10px 1px rgba(240,110,100,.45)}
.em-tv{color:#3B9BE6;background:#F1EEFF;border-color:#C2B8F5;box-shadow:0 0 14px 3px rgba(160,145,240,.6)}
.em-expand:hover,.em-expand[aria-expanded="true"]{background:#FFE8D6;color:#E0752A}
.em-tv:hover{background:#E6E1FF;color:#2A86D0}
html.night .em-expand{background:rgba(240,140,80,.16);border-color:rgba(245,150,140,.55)}
html.night .em-tv{background:rgba(160,145,240,.16);border-color:rgba(185,172,245,.55)}

/* the video drops down out of the bar, inside the same card; folding it up is only a height change, so the
   music keeps playing (Kay, 2026-10-10) */
.em-video{order:9;flex:0 0 100%;box-sizing:border-box;width:100%;min-width:0;padding:2px 2px 4px;display:flex;flex-direction:column;gap:8px;overflow:hidden;
  max-height:60vh;transition:max-height .45s cubic-bezier(.2,.8,.2,1),opacity .35s ease,padding .45s ease}
.em-video.em-collapsed{max-height:0;opacity:0;padding-top:0;padding-bottom:0;pointer-events:none}
.em-vhead{display:flex;align-items:center;gap:8px;font-size:12px;padding:0 2px 0 6px}
.em-vhead b{font-weight:800;color:var(--ink)}
.em-yt{margin-left:auto;font-size:11px;font-weight:700;color:var(--ink-2,var(--ink));text-decoration:none}
.em-yt:hover{text-decoration:underline}
.em-video iframe{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:var(--r-md);background:#1E1B3A}

/* computers: a small pill at the top middle, just Play, "Earth Music" and TV (Kay, 2026-10-14). The music plays
   with its video folded away; the TV page has the picture */
@media (min-width:761px){
  .em{gap:10px;padding:5px;border-radius:999px;flex-wrap:nowrap}
  .em-text{flex:none;padding-right:2px}
  .em-now,.em-expand{display:none!important}
  /* clipped to nothing rather than display:none, so the browser keeps playing it */
  .em-video,.em-video.em-collapsed{position:absolute;left:0;top:0;width:320px;max-height:0;padding:0;opacity:0;pointer-events:none}
  .em-label{font-size:12px;letter-spacing:.06em}
  /* each button has a ring and a soft halo in its own colour (Kay, 2026-10-14) */
  .em-play{background:var(--indigo-soft);color:var(--indigo);border:1.5px solid var(--indigo);box-shadow:0 0 0 3px rgba(79,70,229,.14),0 0 12px 2px rgba(79,70,229,.35)}
  .em .em-tv svg{width:20px;height:20px}
  .em .em-tv{width:46px;height:46px;border-radius:50%;background:var(--coral);color:#fff;border-color:var(--coral);box-shadow:0 0 0 3px rgba(255,122,102,.18),0 0 12px 2px rgba(255,122,102,.45)}
  .em .em-tv:hover{background:var(--coral);color:#fff;filter:brightness(1.08)}
}
