/* Entry music. YouTube asks for a player of at least 200 by 200 that stays in view while it plays. */
#intro-music {
  position: fixed;
  z-index: 43;
  right: 84px;
  bottom: 44px;
  color: #fff5f4;
  font-family: DM, system-ui, sans-serif;
  pointer-events: none;
}
#intro-music[hidden], #intro-music [hidden] { display: none !important; }
#intro-music .im-card {
  width: 300px;
  overflow: hidden;
  background: #271a2c;
  border: 1px solid #69475f;
  border-radius: 14px;
  box-shadow: 0 8px 28px #180c2780;
  pointer-events: auto;
}
#intro-music .im-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 12px;
}
#intro-music .im-name {
  min-width: 0;
  overflow: hidden;
  color: #ddc8d8;
  font: 700 12px/1.2 DM, system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#intro-music button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  color: #ffc2a5;
  background: none;
  border: 0;
  cursor: pointer;
  font: 750 13px/1.12 DM, system-ui, sans-serif;
  pointer-events: auto;
}
#intro-music button .ic { width: 18px; height: 18px; }
#intro-music button:focus-visible { outline: 3px solid #fff2c3; outline-offset: -3px; }
#intro-music .im-player { height: 200px; background: #120a16; }
#intro-music iframe { display: block; width: 100%; height: 100%; border: 0; }
#intro-music .im-tap {
  margin: 0;
  padding: 9px 12px 10px;
  font: 600 13px/1.25 DM, system-ui, sans-serif;
}
#intro-music .im-switch {
  color: #fff5f4;
  background: #271a2c;
  border: 1px solid #69475f;
  border-radius: 12px;
  box-shadow: 0 3px 14px #180c2766;
}
/* The switch lives on the entry screen only, so the map keeps its space. */
html:not(:has(#map-intro)) #intro-music .im-switch { display: none; }
html:has(#map-intro) #intro-music {
  right: clamp(20px, 6.3vw, 112px);
  bottom: 32px;
}

/* An open point keeps its card: the player moves to its left. */
@media (min-width: 721px) and (min-height: 600px) {
  html:not(:has(#map-intro)):has(#detail:not([hidden])) #intro-music { right: 396px; }
}
@media (max-width: 1100px) {
  #intro-music .im-card { width: 212px; }
  #intro-music .im-bar { gap: 2px; padding-left: 10px; }
  #intro-music .im-off { padding: 0 10px 0 6px; }
}
@media (max-width: 720px), (max-height: 599px) {
  #intro-music { right: auto; left: 12px; bottom: calc(148px + env(safe-area-inset-bottom)); }
  #intro-music.im-away { display: none; }
  html.map-full #intro-music { bottom: calc(12px + env(safe-area-inset-bottom)); }
  html:has(#map-intro) #intro-music {
    top: calc(62px + env(safe-area-inset-top));
    right: auto;
    bottom: auto;
    left: 20px;
  }
}
