/* =========================================================================
   VIZ CORE STYLES - shared by every visualizer.
   Colours come from the --vz-* tokens, which each app sets for its own look.
   ========================================================================= */
@font-face { font-family: "PPNeueBit"; src: url("https://assets.codepen.io/7558/PPNeueBit-Bold.woff2") format("woff2"); font-weight: bold; font-style: normal; font-display: swap; }

:root {
    --vz-font: "PPNeueBit", monospace;
    --vz-accent: #EFDD5B;
    --vz-on-accent: #111;
    --vz-fg: #fff;
    --vz-dim: rgba(255,255,255,0.68);
    --vz-faint: rgba(255,255,255,0.45);
    --vz-line: rgba(255,255,255,0.14);
    --vz-soft: rgba(255,255,255,0.07);
    --vz-softer: rgba(255,255,255,0.04);
    --vz-panel: rgba(10,10,15,0.88);
    --vz-shadow: 0 16px 50px rgba(0,0,0,0.35);
    --vz-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* The Lenis smooth-scroll script on the site sets html.lenis { height: auto },
   which collapses a page of fixed elements to zero height. */
html.lenis, html.lenis body { height: 100% !important; }

* { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; box-sizing: border-box; }
:focus:not(:focus-visible) { outline: none; }
body :focus-visible { outline: 2px solid var(--vz-accent); outline-offset: 2px; }
.vz-pad-focus { outline: 2px solid var(--vz-accent) !important; outline-offset: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--vz-accent) 25%, transparent); }
button { font-family: var(--vz-font); }

/* --- shared panel look --- */
.panel { position: fixed; z-index: 500; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s var(--vz-ease); pointer-events: none; }
.panel.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.vz-card { background: var(--vz-panel); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--vz-line); border-radius: 16px; box-shadow: var(--vz-shadow); color: var(--vz-fg); font-family: var(--vz-font); }

.mp-header { display: flex; justify-content: space-between; align-items: center; color: var(--vz-fg); font-size: 22px; line-height: 1; user-select: none; }
.mp-actions { display: flex; gap: 6px; }
.vz-icon-btn { all: unset; box-sizing: border-box; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: var(--vz-dim); font-family: sans-serif; font-size: 14px; }
.vz-icon-btn:hover { background: var(--vz-soft); color: var(--vz-fg); }
.vz-btn { appearance: none; background: var(--vz-soft); border: 1px solid var(--vz-line); border-radius: 10px; color: var(--vz-fg); cursor: pointer; font-family: var(--vz-font); font-size: 17px; line-height: 1; min-height: 38px; padding: 8px 14px; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.vz-btn:hover { border-color: var(--vz-accent); color: var(--vz-accent); }
.vz-btn.primary { background: var(--vz-accent); border-color: var(--vz-accent); color: var(--vz-on-accent); }
.vz-btn.primary:hover { filter: brightness(1.08); color: var(--vz-on-accent); }
.vz-btn.off { display: none; }
.vz-btn.block { width: 100%; }
.vz-btn.active { border-color: var(--vz-accent); color: var(--vz-accent); }

/* --- settings menu --- */
.settings-panel { z-index: 1200; top: 24px; left: 24px; width: 400px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; overflow: hidden; transform: translateX(-16px); }
.settings-panel.visible { transform: none; }
.settings-panel .mp-header { padding: 16px 18px 12px; flex: none; }
.vz-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 14px 10px; padding: 4px; background: var(--vz-softer); border-radius: 12px; flex: none; }
.vz-tabs button { appearance: none; background: none; border: 0; border-radius: 9px; color: var(--vz-dim); cursor: pointer; font-size: 18px; padding: 9px 2px; line-height: 1; transition: background 0.2s, color 0.2s; }
.vz-tabs button:hover { color: var(--vz-fg); }
.vz-tabs button.on { background: var(--vz-accent); color: var(--vz-on-accent); }
#vzPanelBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 16px; scrollbar-width: thin; scrollbar-color: var(--vz-line) transparent; }
.vz-tab { display: none; }
.vz-tab.on { display: block; }
.vz-section { color: var(--vz-accent); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; margin: 18px 0 2px; }
.vz-section:first-child { margin-top: 4px; }
.vz-row { padding: 9px 0; }
.vz-label { color: var(--vz-dim); font-size: 18px; line-height: 1.1; margin-bottom: 7px; }
.vz-row-toggle { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.vz-row-toggle .vz-label { margin: 0; }
.vz-hint { grid-column: 1 / -1; color: var(--vz-faint); font-size: 16px; line-height: 1.2; margin-top: 6px; }
.vz-row.disabled { opacity: 0.45; }
.vz-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.vz-seg button { appearance: none; flex: 1 1 0; min-width: fit-content; min-height: 36px; padding: 7px 9px; background: var(--vz-softer); border: 1px solid var(--vz-line); border-radius: 8px; color: var(--vz-dim); cursor: pointer; font-size: 17px; line-height: 1; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.vz-seg button:hover:not(:disabled) { border-color: var(--vz-accent); color: var(--vz-fg); }
.vz-seg button.on { background: var(--vz-accent); border-color: var(--vz-accent); color: var(--vz-on-accent); }
.vz-seg button:disabled { cursor: default; }
.vz-presets button { min-height: 48px; font-size: 20px; }
.vz-preset-block { padding: 2px 0 8px; }
#vzPresetNote { min-height: 19px; }
.vz-switch { appearance: none; position: relative; width: 46px; height: 26px; padding: 0; background: var(--vz-soft); border: 1px solid var(--vz-line); border-radius: 26px; cursor: pointer; transition: background 0.2s; }
.vz-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--vz-dim); transition: transform 0.2s var(--vz-ease), background 0.2s; }
.vz-switch[aria-checked="true"] { background: var(--vz-accent); border-color: var(--vz-accent); }
.vz-switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--vz-on-accent); }
.vz-slider { display: grid; grid-template-columns: 1fr 52px; gap: 10px; align-items: center; }
.vz-slider input { width: 100%; accent-color: var(--vz-accent); cursor: pointer; }
.vz-val { color: var(--vz-fg); font-size: 17px; text-align: right; }
.vz-advanced { border-top: 1px solid var(--vz-line); margin-top: 12px; padding-top: 6px; }
.vz-advanced-toggle { appearance: none; display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; color: var(--vz-fg); cursor: pointer; font-size: 18px; padding: 8px 0; }
.vz-advanced-toggle::after { content: '+'; font-family: sans-serif; color: var(--vz-dim); }
.vz-advanced.open .vz-advanced-toggle::after { content: '−'; }
.vz-advanced-body { display: none; }
.vz-advanced.open .vz-advanced-body { display: block; }
.vz-readout { display: flex; justify-content: space-between; color: var(--vz-faint); font-size: 16px; padding: 10px 0 4px; }
.vz-keys { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 17px; line-height: 1.15; color: var(--vz-dim); margin: 6px 0 4px; }
.vz-keys b { color: var(--vz-fg); font-weight: inherit; white-space: nowrap; }
.vz-theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.vz-theme-grid button { appearance: none; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 9px; background: var(--vz-softer); border: 1px solid var(--vz-line); border-radius: 8px; color: var(--vz-dim); cursor: pointer; font-size: 17px; line-height: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vz-theme-grid button:hover { border-color: var(--vz-accent); color: var(--vz-fg); }
.vz-theme-grid button.on { border-color: var(--vz-accent); color: var(--vz-accent); }
.vz-swatch { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--vz-line); }

/* --- quick theme menu, bottom right --- */
.vz-corner { position: fixed; right: 24px; bottom: 24px; z-index: 1000; display: flex; align-items: flex-end; gap: 8px; }
.theme-dock { position: relative; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--vz-font); transition: opacity 0.5s ease; }
.theme-btn { appearance: none; display: flex; align-items: center; gap: 8px; height: 42px; max-width: 220px; padding: 0 16px; background: var(--vz-softer); border: 1px solid var(--vz-line); border-radius: 32px; color: var(--vz-dim); cursor: pointer; font-size: 18px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: all 0.3s ease; }
.theme-btn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn span { overflow: hidden; text-overflow: ellipsis; }
.theme-btn:hover, .theme-dock.active .theme-btn { background: var(--vz-soft); border-color: var(--vz-accent); color: var(--vz-accent); }
.theme-list-container { position: absolute; right: 0; bottom: 50px; width: 220px; max-height: 0; display: flex; flex-direction: column; overflow: hidden; visibility: hidden; opacity: 0; background: var(--vz-panel); border: 1px solid var(--vz-line); border-radius: 12px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: max-height 0.4s var(--vz-ease), opacity 0.25s ease, visibility 0.25s; }
.theme-dock.active .theme-list-container { max-height: min(460px, calc(100dvh - 120px)); visibility: visible; opacity: 1; }
.theme-list { flex: 1 1 auto; min-height: 0; list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--vz-line) transparent; }
.theme-list-item { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: 7px; color: var(--vz-dim); cursor: pointer; font-size: 18px; line-height: 1; text-align: left; }
.theme-list-item:hover { background: var(--vz-soft); color: var(--vz-fg); }
.theme-list-item.active { background: var(--vz-soft); color: var(--vz-accent); }

/* --- player --- */
.music-panel { z-index: 1100; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 360px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: grab; scrollbar-width: thin; scrollbar-color: var(--vz-line) transparent; }
.music-panel.dragging { cursor: grabbing; }
.music-panel.collapsed { width: auto; padding: 10px 14px; border-radius: 50px; flex-direction: row; align-items: center; gap: 12px; overflow: hidden; }
.music-panel.collapsed > :not(.mp-header):not(.mp-controls) { display: none !important; }
.music-panel.collapsed .mp-header { order: 3; }
.music-panel.collapsed .mp-title, .music-panel.collapsed #musicClose { display: none; }
.vz-sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--vz-softer); border-radius: 12px; cursor: default; }
.vz-sources button { appearance: none; background: none; border: 0; border-radius: 9px; color: var(--vz-dim); cursor: pointer; font-size: 17px; line-height: 1; padding: 9px 2px; }
.vz-sources button:hover { color: var(--vz-fg); }
.vz-sources button.on { background: var(--vz-soft); color: var(--vz-accent); }
.vz-source { display: none; flex-direction: column; gap: 8px; cursor: default; }
.vz-source.on { display: flex; }
.vz-note { color: var(--vz-faint); font-size: 16px; line-height: 1.2; margin: 0; }
.upload-area { border: 1px dashed var(--vz-line); border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.upload-area:hover { border-color: var(--vz-fg); background: var(--vz-softer); }
.upload-text { color: var(--vz-dim); font-size: 18px; line-height: 1.1; }
.vz-link-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.vz-link-row .vz-input, select#audioSource { width: 100%; min-height: 38px; background: var(--vz-softer); border: 1px solid var(--vz-line); border-radius: 10px; color: var(--vz-fg); font-family: var(--vz-font); font-size: 16px; padding: 7px 10px; }
select#audioSource { display: none; }
select#audioSource.on { display: block; }
select#audioSource option { background: #141418; color: #f1f1f1; }
.vz-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vz-apps .vz-btn { padding-inline: 8px; }
.vz-share-step { display: none; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--vz-accent); border-radius: 10px; }
.vz-share-step.on { display: flex; }
.vz-share-step ol { margin: 0; padding-left: 20px; color: var(--vz-dim); font-size: 17px; line-height: 1.2; }
.vz-unsupported { display: none; }
.unsupported > :not(.vz-unsupported) { display: none; }
.unsupported .vz-unsupported { display: block; }
.vz-live { display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--vz-accent); border-radius: 10px; color: var(--vz-accent); font-size: 17px; line-height: 1.1; cursor: default; }
.vz-live.on { display: flex; }
.vz-live span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist { list-style: none; padding: 0; margin: 0; max-height: 150px; overflow-y: auto; display: none; scrollbar-width: thin; scrollbar-color: var(--vz-line) transparent; cursor: default; }
.playlist.has-tracks { display: block; }
.track-item { display: flex; align-items: center; gap: 2px; padding: 2px 4px 2px 0; margin-bottom: 3px; background: var(--vz-softer); border: 1px solid transparent; border-radius: 7px; }
.track-item:hover { background: var(--vz-soft); }
.track-item.active { background: var(--vz-soft); border-color: var(--vz-line); }
.track-name { all: unset; box-sizing: border-box; flex: 1; min-width: 0; padding: 6px 8px; color: var(--vz-dim); cursor: pointer; font-family: var(--vz-font); font-size: 17px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-item.active .track-name { color: var(--vz-fg); }
.move-btn, .track-del { all: unset; box-sizing: border-box; width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--vz-faint); cursor: pointer; font-family: sans-serif; font-size: 10px; border-radius: 5px; }
.move-btn:hover { background: var(--vz-soft); color: var(--vz-fg); }
.track-del:hover { color: #ff5a5a; }
.mp-controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.ctrl-btn { appearance: none; background: transparent; border: 1px solid var(--vz-line); color: var(--vz-fg); border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; padding: 0; width: 42px; height: 42px; transition: all 0.2s ease; }
.ctrl-btn svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.ctrl-btn.play-btn { width: 56px; height: 56px; border: 2px solid var(--vz-fg); background: var(--vz-softer); }
.ctrl-btn.play-btn svg { width: 28px; height: 28px; }
.ctrl-btn:hover { border-color: var(--vz-accent); color: var(--vz-accent); transform: scale(1.05); }
.vol-container { display: flex; align-items: center; gap: 10px; cursor: default; }
.vol-slider { flex: 1; min-width: 0; cursor: pointer; accent-color: var(--vz-accent); }
.mute-btn { appearance: none; background: none; border: 0; color: var(--vz-fg); cursor: pointer; display: grid; place-items: center; padding: 2px; }

/* --- now playing, bottom left --- */
.now-playing { position: fixed; left: 24px; bottom: 24px; z-index: 900; display: flex; align-items: center; gap: 12px; width: min(340px, calc(100vw - 110px)); padding: 8px 14px 8px 8px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s var(--vz-ease); font-family: var(--vz-font); color: var(--vz-fg); background: var(--vz-panel); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--vz-line); border-radius: 14px; }
.now-playing.show { opacity: 1; visibility: visible; transform: none; }
.np-art { flex: none; width: 64px; height: 64px; border-radius: 8px; background: var(--vz-soft) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.np-art svg { width: 28px; height: 28px; fill: var(--vz-faint); display: none; }
.now-playing.no-art .np-art svg { display: block; }
.np-text { min-width: 0; flex: 1; }
.np-title, .np-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-title { font-size: 21px; line-height: 1.1; }
.np-artist { color: var(--vz-dim); font-size: 17px; line-height: 1.15; margin-top: 1px; min-height: 19px; }
.np-bar { position: relative; display: block; width: 100%; height: 12px; margin-top: 2px; cursor: pointer; }
.np-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--vz-line); }
#npFill { position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--vz-accent); transform: scaleX(0); transform-origin: left; }
.now-playing.live .np-bar { display: none; }

/* --- idle fade --- */
body.user-idle { cursor: none; }
body.user-idle .ui-dock, body.user-idle .theme-dock, body.user-idle .theme-toggle, body.user-idle .music-panel, body.user-idle .now-playing, body.user-idle .scroll-progress, body.user-idle .config-hint, body.user-idle .vz-pad-cursor, body.user-idle .auto-fade, body.user-idle .return-button { opacity: 0 !important; pointer-events: none !important; transition: opacity 1.6s ease, visibility 1.6s ease !important; }
.auto-fade { transition: opacity 0.6s var(--vz-ease), transform 0.6s var(--vz-ease) !important; }

/* --- intro --- */
.intro-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; color: var(--vz-fg); font-family: var(--vz-font); cursor: pointer; transition: opacity 1.3s ease, background 1.2s ease; }
.intro-overlay.leaving { opacity: 0; pointer-events: none; }
.intro-overlay.gone { display: none; }
.intro-overlay.touring { cursor: default; background: var(--vz-tour-bg, rgba(0,0,0,0.45)) !important; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.intro-overlay.touring .intro-hero { display: none; }
.intro-hero { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 620px; }
.intro-text { font-size: clamp(38px, 7vw, 68px); line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.intro-tagline { color: var(--vz-dim); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.2; margin: 0; max-width: 34em; }
.hp-container { display: flex; align-items: center; flex-direction: column; gap: 10px; color: var(--vz-dim); }
.hp-msg { font-size: 17px; line-height: 1; }
#headphones { width: 30px; height: 30px; }
.intro-start { opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity 0.7s ease, transform 0.7s var(--vz-ease); min-height: 52px; padding: 12px 34px; font-size: 24px; }
.intro-overlay.ready .intro-start { opacity: 1; pointer-events: auto; transform: none; }
.loader-container { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(280px, 80vw); }
.loader-text { color: var(--vz-dim); font-size: 16px; letter-spacing: 0.15em; }
.loader-bar-bg { width: 100%; height: 2px; background: var(--vz-line); overflow: hidden; }
.loader-bar-fill { width: 0; height: 100%; background: var(--vz-fg); transition: width 0.1s linear; }
.intro-tour { display: none; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; text-align: left; }
.intro-tour.on { display: block; }
.tour-card { display: none; }
.tour-card.on { display: block; animation: vzRise 0.45s var(--vz-ease); }
@keyframes vzRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tour-kicker { color: var(--vz-accent); font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; }
.tour-card h2 { color: var(--vz-fg); font-family: var(--vz-font); font-size: 34px; font-weight: bold; letter-spacing: 0.02em; line-height: 1.05; margin: 4px 0 8px; }
.tour-card p { color: var(--vz-dim); font-size: 19px; line-height: 1.22; margin: 0 0 12px; }
.tour-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.tour-sources .vz-btn { min-height: 46px; }
.tour-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tour-list li { display: grid; grid-template-columns: minmax(104px, auto) 1fr; gap: 12px; color: var(--vz-dim); font-size: 18px; line-height: 1.15; }
.tour-list b { color: var(--vz-fg); font-weight: inherit; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--vz-line); }
.tour-dots span.on { background: var(--vz-accent); }
.tour-actions { display: flex; gap: 6px; }
.tour-skip { appearance: none; background: none; border: 0; color: var(--vz-dim); cursor: pointer; font-size: 17px; padding: 8px; }
.tour-skip:hover { color: var(--vz-fg); }
#tourBack.off { visibility: hidden; }
.pad-only { display: none; }
body.vz-has-pad .pad-only { display: block; }

/* --- story and credits --- */
.story-panel { top: 0; left: 0; width: 100%; height: 100%; z-index: 1300; display: flex; justify-content: center; align-items: center; cursor: pointer; padding: 24px; background: var(--vz-scrim, rgba(0,0,0,0.72)); }
.story-content { max-width: 500px; color: var(--vz-fg); font-family: var(--vz-font); font-size: clamp(19px, 1.5vw, 23px); line-height: 1.4; text-align: center; }
.story-content .italic { font-style: italic; }
.credits-panel { top: 0; left: 0; width: 100%; height: 100%; z-index: 1300; display: flex; justify-content: center; align-items: center; padding: 16px; background: var(--vz-scrim, rgba(0,0,0,0.72)); }
.credits-card { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 20px; }
.credits-card .mp-header { margin-bottom: 8px; }
.credit-group { padding: 9px 0; border-top: 1px solid var(--vz-line); }
.credit-group h3 { color: var(--vz-accent); font-family: var(--vz-font); font-size: 16px; font-weight: bold; letter-spacing: 0.08em; line-height: 1.1; margin: 0 0 5px; text-transform: uppercase; }
.credit-group p { color: var(--vz-dim); font-size: 18px; line-height: 1.25; margin: 0; }
.credit-group a { color: var(--vz-fg); text-decoration: underline; text-decoration-color: var(--vz-accent); text-underline-offset: 3px; background: none; border: 0; }
.credit-group a:hover { color: var(--vz-accent); }

/* --- misc --- */
.vz-pad-cursor { position: fixed; left: -12px; top: -12px; z-index: 950; width: 24px; height: 24px; border: 2px solid var(--vz-accent); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.vz-pad-cursor.on { opacity: 0.85; }
.vz-toast { position: fixed; left: 50%; top: 24px; z-index: 10000; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; background: var(--vz-panel); border: 1px solid var(--vz-line); border-radius: 10px; color: var(--vz-fg); font-family: var(--vz-font); font-size: 18px; line-height: 1.15; text-align: center; opacity: 0; transform: translate(-50%, -8px); pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--vz-ease); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.vz-toast.show { opacity: 1; transform: translate(-50%, 0); }
.vz-hidden-video { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body.vz-dropping::after { content: 'Drop to add to the playlist'; position: fixed; inset: 16px; z-index: 9000; display: grid; place-items: center; border: 2px dashed var(--vz-accent); border-radius: 18px; background: var(--vz-scrim, rgba(0,0,0,0.6)); color: var(--vz-fg); font-family: var(--vz-font); font-size: 32px; pointer-events: none; }

/* --- theme defence ---
   Hello Elementor colours every button pink on hover and focus through its reset, and that
   rule outranks single-class selectors. These restate each control's own colours for both
   states. They come after the components so they win, and stay out of the resting state. */
html body .vz-btn:is(:hover, :focus) { background-color: var(--vz-soft); color: var(--vz-accent); }
html body .vz-btn.primary:is(:hover, :focus) { background-color: var(--vz-accent); color: var(--vz-on-accent); }
html body :is(.vz-tabs, .vz-sources, .vz-theme-grid) button:is(:hover, :focus) { background-color: var(--vz-softer); color: var(--vz-fg); }
html body .vz-seg button:is(:hover, :focus) { background-color: var(--vz-softer); color: var(--vz-fg); }
html body :is(.vz-tabs, .vz-seg) button.on:is(:hover, :focus) { background-color: var(--vz-accent); color: var(--vz-on-accent); }
html body .vz-sources button.on:is(:hover, :focus) { background-color: var(--vz-soft); color: var(--vz-accent); }
html body .vz-theme-grid button.on:is(:hover, :focus) { color: var(--vz-accent); }
html body .vz-switch:is(:hover, :focus) { background-color: var(--vz-soft); }
html body .vz-switch[aria-checked="true"]:is(:hover, :focus) { background-color: var(--vz-accent); }
html body .vz-advanced-toggle:is(:hover, :focus) { background-color: transparent; color: var(--vz-fg); }
html body .vz-icon-btn:is(:hover, :focus) { background-color: var(--vz-soft); color: var(--vz-fg); }
html body .track-name:is(:hover, :focus) { background-color: transparent; color: var(--vz-fg); }
html body .move-btn:is(:hover, :focus) { background-color: var(--vz-soft); color: var(--vz-fg); }
html body .track-del:is(:hover, :focus) { background-color: transparent; color: #ff5a5a; }
html body .ctrl-btn:is(:hover, :focus) { background-color: transparent; color: var(--vz-accent); }
html body .ctrl-btn.play-btn:is(:hover, :focus) { background-color: var(--vz-softer); }
html body .mute-btn:is(:hover, :focus) { background-color: transparent; color: var(--vz-fg); }
html body .tour-skip:is(:hover, :focus) { background-color: transparent; color: var(--vz-fg); }
html body .theme-list-item:is(:hover, :focus) { background-color: var(--vz-soft); color: var(--vz-fg); }
html body .theme-list-item.active:is(:hover, :focus) { color: var(--vz-accent); }
html body .ui-btn:is(:hover, :focus) { color: inherit; }
html body .ui-btn:is(:hover) { background-color: var(--vz-soft); }
html body .theme-btn:is(:hover, :focus), html body .theme-dock.active .theme-btn { background-color: var(--vz-soft); color: var(--vz-accent); }
html body .theme-toggle:is(:hover, :focus) { background-color: var(--vz-soft); }

/* --- phones --- */
@media (max-width: 768px) {
    .settings-panel, .music-panel { z-index: 2100; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0; width: 100% !important; max-width: none; max-height: 86dvh; border-radius: 18px 18px 0 0; transform: translateY(24px); }
    .settings-panel.visible, .music-panel.visible { transform: none; }
    .music-panel { cursor: default; }
    .music-panel.collapsed { left: 50% !important; right: auto; bottom: 12px !important; width: auto !important; border-radius: 50px; transform: translateX(-50%); }
    .now-playing { left: 12px; bottom: 12px; width: calc(100vw - 96px); }
    .vz-corner { right: 12px; bottom: 12px; }
    .theme-btn { width: 42px; padding: 0; justify-content: center; }
    .theme-btn span { display: none; }
    .np-art { width: 52px; height: 52px; }
    .np-title { font-size: 19px; }
    .tour-list li { grid-template-columns: 1fr; gap: 0; }
    .intro-tour { padding: 18px; }
    .vz-seg button, .vz-tabs button, .vz-sources button { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .tour-card.on { animation: none; } }

/* =========================================================================
   LIQUID METAL
   ========================================================================= */
body {
    --vz-accent: #111;
    --vz-on-accent: #fff;
    --vz-fg: #111;
    --vz-dim: rgba(0,0,0,0.66);
    --vz-faint: rgba(0,0,0,0.48);
    --vz-line: rgba(0,0,0,0.13);
    --vz-soft: rgba(0,0,0,0.06);
    --vz-softer: rgba(0,0,0,0.035);
    --vz-panel: rgba(255,255,255,0.92);
    --vz-shadow: 0 12px 40px rgba(0,0,0,0.12);
    --vz-scrim: rgba(255,255,255,0.82);
    --vz-tour-bg: rgba(247,247,247,0.5);
}
body.dark {
    --vz-accent: #EFDD5B;
    --vz-on-accent: #111;
    --vz-fg: #f1f1f1;
    --vz-dim: rgba(255,255,255,0.7);
    --vz-faint: rgba(255,255,255,0.48);
    --vz-line: rgba(255,255,255,0.15);
    --vz-soft: rgba(255,255,255,0.08);
    --vz-softer: rgba(255,255,255,0.04);
    --vz-panel: rgba(14,14,18,0.9);
    --vz-shadow: 0 12px 40px rgba(0,0,0,0.5);
    --vz-scrim: rgba(10,10,12,0.85);
    --vz-tour-bg: rgba(0,0,0,0.45);
}

html, body { margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior: none; font-family: sans-serif; }

/* Backlight layer. Dark mode paints its glow here (see setTheme in the script). */
#vizBackdrop { position: fixed; inset: 0; z-index: 0; background: #f7f7f7; pointer-events: none; }
#vignette { position: fixed; inset: 0; z-index: 0; background: radial-gradient(circle, transparent 40%, #a1a1a1 100%); opacity: 0; transition: opacity 0.1s linear; pointer-events: none; }
canvas { display: block; position: fixed; top: 0; left: 0; z-index: 1; width: 100vw; height: 100dvh; touch-action: none; user-select: none; }

.intro-overlay { background: #fff; }
body.dark .intro-overlay { background: #0a0a0c; }
#headphones { stroke: currentColor; }

/* --- dock --- */
.ui-dock { position: fixed; top: 24px; left: 24px; z-index: 1000; display: flex; align-items: center; width: 42px; height: 42px; padding: 4px; overflow: hidden; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08); border-radius: 32px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: all 0.4s var(--vz-ease); }
.ui-dock:hover, .ui-dock.expanded { width: 250px; background: rgba(0,0,0,0.06); }
.menu-btn { flex-shrink: 0; position: relative; width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; border-radius: 50%; cursor: pointer; }
.menu-icon { position: relative; width: 18px; height: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.menu-icon span { display: block; width: 100%; height: 2px; background-color: rgba(0,0,0,0.7); border-radius: 2px; transition: all 0.3s ease-in-out; transform-origin: center; }
.ui-dock:hover .menu-icon span:nth-child(1), .ui-dock.expanded .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ui-dock:hover .menu-icon span:nth-child(2), .ui-dock.expanded .menu-icon span:nth-child(2) { opacity: 0; }
.ui-dock:hover .menu-icon span:nth-child(3), .ui-dock.expanded .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.dock-items { display: flex; align-items: center; gap: 8px; margin-left: 8px; opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; pointer-events: none; }
.ui-dock:hover .dock-items, .ui-dock.expanded .dock-items { opacity: 1; transform: none; pointer-events: auto; }
.ui-btn { appearance: none; flex-shrink: 0; width: 32px; height: 32px; padding: 0; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); border-radius: 50%; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
.ui-btn:hover { transform: scale(1.1); background: rgba(0,0,0,0.1); }
.ui-btn.active { background: rgba(0,0,0,0.16); }
.ui-btn svg { width: 14px; height: 14px; fill: none; stroke: rgba(0,0,0,0.7); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.dark .ui-dock { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
body.dark .ui-dock:hover, body.dark .ui-dock.expanded { background: rgba(255,255,255,0.12); }
body.dark .menu-icon span { background-color: rgba(255,255,255,0.85); }
body.dark .ui-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
body.dark .ui-btn:hover { background: rgba(255,255,255,0.18); }
body.dark .ui-btn.active { background: rgba(255,255,255,0.26); }
body.dark .ui-btn svg { stroke: rgba(255,255,255,0.85); }

/* --- theme picker, bottom right --- */
.theme-toggle { appearance: none; flex: none; width: 42px; height: 42px; padding: 0; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08); border-radius: 50%; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background 0.3s ease, transform 0.2s ease, opacity 0.5s ease; }
.theme-toggle:hover { transform: scale(1.08); background: rgba(0,0,0,0.08); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: rgba(0,0,0,0.7); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.dark .theme-toggle { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
body.dark .theme-toggle:hover { background: rgba(255,255,255,0.14); }
body.dark .theme-toggle svg { stroke: rgba(255,255,255,0.85); }
.vz-tabs button.on, .vz-seg button.on { font-weight: bold; }

@media (max-width: 768px) {
    .ui-dock { flex-direction: column; transition: height 0.4s var(--vz-ease), background 0.4s; }
    .ui-dock:hover { width: 42px; background: rgba(0,0,0,0.03); }
    .ui-dock.expanded { width: 42px !important; height: 264px !important; background: rgba(0,0,0,0.06); }
    .dock-items { flex-direction: column; margin-left: 0; margin-top: 12px; width: 100%; gap: 12px; }
    .vz-corner { flex-direction: column-reverse; }
}
