/* NitroPlayer background music button + popover (np-music.js) */
.np-music-btn { position: relative; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.np-music-btn svg { width: 20px; height: 20px; }
.hdr-icon-btn.np-music-on { color: var(--volt); }
.np-music-btn .nm-eq { position: absolute; right: 6px; bottom: 7px; display: none; gap: 1.5px; align-items: flex-end; height: 8px; }
.np-music-btn.np-music-on .nm-eq { display: flex; }
/* static level bars (no animation: a looping animation would repaint the blurred header every frame) */
.np-music-btn .nm-eq i { width: 2px; height: 5px; border-radius: 1px; background: currentColor; }
.np-music-btn .nm-eq i:nth-child(2) { height: 8px; }
.np-music-btn .nm-eq i:nth-child(3) { height: 3px; }

/* game toolbar button: only on phones or in focus mode (the header scrolls away / is hidden there) */
.toolbar-actions .np-music-tb { display: none; }
.np-music-tb.np-music-on { color: var(--accent); border-color: var(--accent); }
.np-music-tb .nm-eq { right: 5px; bottom: 6px; }
body.np-focus .toolbar-actions .np-music-tb { display: inline-flex; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
    .toolbar-actions .np-music-tb { display: inline-flex; flex: 0 0 38px; }
    .game-body .site-header .np-music-btn { display: none; }
}
@media (max-height: 500px) and (max-width: 1000px) and (orientation: landscape) {
    .game-toolbar .toolbar-actions .np-music-tb { flex: none; width: 100%; }
}

/* popover */
.np-music-pop {
    position: fixed; z-index: 1200; width: 232px; padding: 12px;
    background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-3); animation: popIn .15s var(--ease, ease);
}
.np-music-pop[hidden] { display: none; }
.nmp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nmp-title { font: 700 13px var(--font-display, inherit); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.nmp-play { width: 36px; height: 36px; border-radius: 999px; border: 0; display: grid; place-items: center; background: var(--volt); color: var(--volt-ink, #0e1020); cursor: pointer; }
.nmp-play svg { width: 16px; height: 16px; }
.nmp-moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--bg-panel, rgba(127,127,127,.12)); border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.nmp-moods button { min-height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim, inherit); font-size: 13px; font-weight: 650; cursor: pointer; padding: 0 4px; }
.nmp-moods button[aria-checked="true"] { background: var(--ink, #0e1020); color: #fff; }
:root[data-theme="dark"] .nmp-moods button[aria-checked="true"] { background: var(--volt); color: var(--volt-ink, #0e1020); }
.nmp-vol { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.nmp-vol svg { width: 18px; height: 18px; flex: none; }
.nmp-vol input { flex: 1; min-width: 0; min-height: 0; height: 24px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
.nmp-val { width: 36px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .np-music-pop { animation: none; }
}

/* narrow phones: make room for the music button (level ring on the avatar stays visible) */
@media (max-width: 420px) {
    .site-header .hdr-right { gap: 5px; }
    .site-header .hud-lv { display: none; }
    .site-header .hud-pill { padding: 0 4px; }
}
