/* Music icon on every page + panel + mini bar (static/js/nc-music.js). */
.nc-music-btn {
    position: relative;
    z-index: 40;
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #d7aa58;
    border-radius: 50%;
    background: #06142b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.nc-music-btn:hover { transform: scale(1.08); }
.nc-music-btn img {
    width: 22px;
    height: 22px;
    opacity: .85;
    pointer-events: none;
}
.nc-music-btn.is-playing {
    box-shadow: 0 0 0 3px rgba(244, 206, 108, .25), 0 2px 10px rgba(0, 0, 0, .4);
}
.nc-music-btn.is-playing img { filter: drop-shadow(0 0 4px rgba(244, 206, 108, .6)); opacity: 1; }
.nc-music-btn[aria-expanded="true"] { background: #d7aa58; }
.nc-music-btn--floating { position: fixed; top: 10px; right: 64px; z-index: 3100; }
.nc-music-btn:focus-visible,
.nc-music-panel button:focus-visible,
.nc-music-bar button:focus-visible { outline: 3px solid #fbf3df; outline-offset: 2px; }

/* Next to the Indoor page's own background-music switch. */
.hall-topbar-actions .nc-music-btn { margin-right: 8px; }

.nc-music-panel {
    position: fixed;
    z-index: 10001;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    padding: 10px;
    border: 2px solid #d7aa58;
    border-radius: 14px;
    background: #06142b;
    color: #f6ecd2;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .7);
    font: 600 13px/1.35 "Nunito", "Segoe UI", system-ui, sans-serif;
}
.nc-music-panel[hidden],
.nc-music-bar[hidden] { display: none; }
.nc-music-note { margin: 0 0 8px; color: #f6cf6a; }
.nc-music-help { margin: 0 0 8px; opacity: .85; }
.nc-music-login { display: grid; gap: 8px; }
.nc-music-login input {
    padding: 10px 12px;
    border: 1px solid rgba(226, 182, 79, .6);
    border-radius: 10px;
    background: #fff;
    color: #10213c;
    font: inherit;
    font-size: 16px;
}
.nc-music-submit,
.nc-music-up,
.nc-music-out {
    padding: 8px 12px;
    border: 1px solid rgba(226, 182, 79, .8);
    border-radius: 999px;
    background: #f4ce6c;
    color: #10213c;
    font: 800 13px/1 "Nunito", "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
}
.nc-music-up:disabled { opacity: .4; }
.nc-music-out { background: transparent; color: #f6cf6a; }
.nc-music-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nc-music-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.nc-music-list { display: grid; gap: 2px; }
.nc-music-row {
    padding: 10px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nc-music-row:active,
.nc-music-row[aria-current="true"] { background: rgba(246, 207, 106, .22); color: #f6cf6a; }
.nc-music-row.is-folder { font-weight: 800; }

/* Mini bar while a song is loaded. */
.nc-music-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 3300;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    width: min(420px, calc(100vw - 24px));
    padding: 6px 8px;
    border: 1px solid rgba(226, 182, 79, .8);
    border-radius: 999px;
    background: rgba(15, 31, 58, .93);
    color: #f6cf6a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    font: 700 13px/1.2 "Nunito", "Segoe UI", system-ui, sans-serif;
}
.nc-music-bar button {
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f6cf6a;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.nc-music-bar button:active { background: rgba(246, 207, 106, .22); }
.nc-music-bar .nc-music-open { background: #f4ce6c; color: #10213c; }
.nc-music-bar .nc-music-close { width: 30px; height: 30px; font-size: 13px; opacity: .8; }
.nc-music-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The Outdoor page keeps the bottom strip for the route hint, legend and zoom buttons. */
body.map-academy .nc-music-bar { bottom: 72px; }

/* Tablet widths: the header is tight, so the round icons shrink a little and nothing overlaps the nav. */
@media (min-width: 761px) and (max-width: 1200px) {
  .language-picker { gap: 4px !important; }
  .language-picker .nc-music-btn,
  .language-picker .cb-eye-btn,
  .language-picker .hp-bell-btn,
  .hall-topbar-actions .music-icon-toggle { width: 28px; height: 28px; }
  .language-picker .nc-music-btn img { width: 17px; height: 17px; }
  .hall-topbar-actions { gap: 4px; }
}

/* One selectable song per line. */
.nc-music-line { display: flex; align-items: center; gap: 4px; }
.nc-music-line .nc-music-row { flex: 1; min-width: 0; }
.nc-music-head .nc-music-path { font-size: 15px; opacity: 1; color: #f6cf6a; }

/* Outdoor header on small laptops and tablets: the live-weather badge, and on tablets the weather
   chip too, give way so the controls never sit on top of the Main / Indoor / Outdoor links. */
@media (min-width: 1081px) and (max-width: 1200px) {
  .map-academy .weather-live-badge { display: none; }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .map-academy .weather-chip { display: none !important; }
}

/* Phones: the Outdoor page has the big "Let's run" button at the bottom, so the bar sits above it. */
@media (max-width: 760px) {
  body.map-academy .nc-music-bar { bottom: 96px; }
}

/* The mini bar: drag it anywhere; "–" puts it away, the header music icon brings it back. */
.nc-music-bar { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.nc-music-bar button { cursor: pointer; }
.nc-music-bar.is-dragging { cursor: grabbing; }
.nc-music-bar .nc-music-fold { width: 30px; height: 30px; font-size: 18px; opacity: .8; }
.nc-music-bar.is-away { display: none; }

/* Song progress: the bar's rim glows yellow up to the point reached. Press or drag along the rim to skip. */
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.nc-music-bar {
  --p: 0%;
  padding: 3px 5px;
  border: 4px solid transparent;
  background:
    linear-gradient(rgba(15, 31, 58, .97), rgba(15, 31, 58, .97)) padding-box,
    linear-gradient(90deg, #fff0b0 0, #ffd24d var(--p), rgba(226, 182, 79, .22) var(--p)) border-box;
  transition: --p .3s linear, box-shadow .3s;
}
.nc-music-bar.is-playing { box-shadow: 0 0 14px rgba(255, 210, 77, .45), 0 6px 20px rgba(0, 0, 0, .4); }
.nc-music-bar.is-rim,
.nc-music-bar.is-seeking { cursor: ew-resize; }
.nc-music-bar.is-seeking { transition: box-shadow .3s; }
