:root {
  color-scheme: dark;
  --bg: #111318;
  --bg-elevated: #171a21;
  --panel: #191d25;
  --panel-strong: #202530;
  --panel-soft: #1d222c;
  --surface-hover: #272e3a;
  --line: rgba(220, 227, 241, .09);
  --line-strong: rgba(220, 227, 241, .15);
  --text: #f0f2f7;
  --text-soft: #b5bdcb;
  --muted: #798394;
  --accent: #c3a6ff;
  --accent-strong: #a887f3;
  --accent-ink: #241746;
  --mint: #a6e7d6;
  --danger: #ff9b9b;
  --shadow: 0 20px 70px rgba(0, 0, 0, .32);
  --radius-xl: 25px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f7;
  --bg-elevated: #fbfbfd;
  --panel: #ffffff;
  --panel-strong: #f0eef7;
  --panel-soft: #f5f3fa;
  --surface-hover: #ece8f5;
  --line: rgba(36, 31, 53, .09);
  --line-strong: rgba(36, 31, 53, .15);
  --text: #252333;
  --text-soft: #5f5b70;
  --muted: #888397;
  --accent: #7953c8;
  --accent-strong: #6941bc;
  --accent-ink: #fff;
  --mint: #267e69;
  --danger: #b83c4a;
  --shadow: 0 20px 70px rgba(40, 33, 65, .12);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: not-allowed !important; opacity: .38; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; color: var(--accent-ink); background: var(--accent); border-radius: 10px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.topbar { height: 76px; display: grid; grid-template-columns: 250px minmax(130px, 1fr) auto; align-items: center; gap: 22px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elevated) 94%, transparent); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; display: block; flex: 0 0 auto; object-fit: contain; border-radius: 13px; filter: drop-shadow(0 5px 14px rgba(150, 102, 237, .2)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-name { font: 800 23px/1 'Manrope', sans-serif; letter-spacing: -.055em; }
.brand-caption { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .19em; }
.topbar-center { display: flex; align-items: center; gap: 9px; justify-self: center; color: var(--muted); font-size: 12px; }
.status-dot, .corner-dot, .format-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 11%, transparent); }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.top-action { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: transparent; color: var(--text-soft); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.top-action svg { width: 16px; height: 16px; }
.top-action:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.primary-action { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 0 15px; }
.primary-action:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.icon-button { width: 40px; height: 40px; display: inline-grid; flex: 0 0 auto; place-items: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-soft); cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.icon-button:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button.small { width: 34px; height: 34px; border-color: var(--line); }
.mobile-menu { display: inline-grid; }

.app-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 250px minmax(0, 1fr) 288px; }
.sidebar { min-width: 0; display: flex; flex-direction: column; padding: 27px 17px 18px; border-right: 1px solid var(--line); background: var(--bg-elevated); }
.sidebar-heading, .details-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 9px; line-height: 1.3; font-weight: 700; letter-spacing: .18em; }
.sidebar-heading h2, .details-heading h2 { margin: 0; font: 700 19px/1.2 'Manrope', sans-serif; letter-spacing: -.045em; }
.library-nav { margin: 25px 0 27px; }
.nav-item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 11px; border: 0; border-radius: 11px; background: transparent; color: var(--text-soft); text-align: left; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .18s, color .18s; }
.nav-item svg { width: 18px; height: 18px; color: var(--muted); }
.nav-item:hover { color: var(--text); background: var(--surface-hover); }
.nav-item.active { color: var(--text); background: color-mix(in srgb, var(--accent) 13%, var(--panel)); }
.nav-item.active svg { color: var(--accent); }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 8px; background: var(--panel-strong); color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.queue-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 9px 10px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 4px; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; }
.text-button:hover:not(:disabled) { color: var(--accent-strong); text-decoration: underline; }
.queue-list { min-height: 115px; max-height: calc(100vh - 410px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.queue-empty { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 12px; color: var(--muted); text-align: center; }
.empty-stack { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--accent); }
.empty-stack svg { width: 19px; height: 19px; }
.queue-empty p { margin: 0 0 5px; color: var(--text-soft); font-size: 12px; font-weight: 600; }
.queue-empty > span { max-width: 170px; font-size: 10px; line-height: 1.55; }
.queue-empty .text-button { margin-top: 8px; }
.queue-item { position: relative; display: grid; grid-template-columns: 35px minmax(0,1fr) 26px; align-items: center; gap: 9px; min-height: 58px; padding: 6px 7px; margin: 2px 0; border: 1px solid transparent; border-radius: 11px; cursor: pointer; transition: background .16s, border-color .16s; }
.queue-item:hover { background: var(--panel); }
.queue-item.current { background: color-mix(in srgb, var(--accent) 11%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.queue-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.queue-thumb { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-strong); color: var(--muted); }
.queue-item.current .queue-thumb { background: color-mix(in srgb, var(--accent) 22%, var(--panel-strong)); color: var(--accent); }
.queue-thumb svg { width: 16px; height: 16px; }
.queue-track-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.queue-track-copy strong { overflow: hidden; color: var(--text-soft); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.queue-item.current .queue-track-copy strong { color: var(--text); }
.queue-track-copy span { color: var(--muted); font-size: 9px; }
.queue-more { width: 25px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; opacity: 0; }
.queue-item:hover .queue-more, .queue-more:focus-visible { opacity: 1; }
.queue-more:hover { color: var(--danger); background: var(--surface-hover); }
.sidebar-bottom { margin-top: auto; padding-top: 17px; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.privacy-note > svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--mint); }
.privacy-note div { display: flex; flex-direction: column; gap: 4px; }
.privacy-note strong { font-size: 10px; font-weight: 600; }
.privacy-note span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.settings-nav { margin-top: 12px; }

.main-content { min-width: 0; width: 100%; max-width: 1280px; margin: 0 auto; padding: 35px clamp(20px, 3.2vw, 48px) 24px; }
.main-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.main-heading h1 { margin: 0; font: 800 clamp(25px, 2.4vw, 32px)/1.1 'Manrope', sans-serif; letter-spacing: -.065em; }
.main-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.main-heading-actions { display: flex; align-items: center; gap: 8px; }
.search-field { width: clamp(150px, 19vw, 220px); min-height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel); color: var(--muted); }
.search-field svg { width: 16px; height: 16px; flex: 0 0 auto; }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-field input::placeholder { color: var(--muted); }
kbd { min-width: 21px; height: 21px; display: inline-grid; place-items: center; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel-strong); color: var(--text-soft); font: 600 9px/1 Inter, sans-serif; }
.folder-button { border-color: var(--line-strong); background: var(--panel); }

.player-stage { position: relative; width: 100%; min-height: 280px; aspect-ratio: 16 / 8.2; max-height: min(58vw, 620px); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: #0b0d12; box-shadow: var(--shadow); isolation: isolate; }
#mediaElement { width: 100%; height: 100%; max-height: inherit; object-fit: contain; background: #08090c; }
#mediaElement:not([hidden]) { display: block; }
.empty-state { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; text-align: center; background: radial-gradient(ellipse at 50% 56%, rgba(132, 102, 195, .14), transparent 49%), linear-gradient(135deg, #171923 0%, #11141c 56%, #141522 100%); }
.empty-art { position: relative; width: 110px; height: 78px; margin: 0 auto 16px; }
.art-disc { position: absolute; width: 76px; height: 76px; left: 17px; top: 0; border: 1px solid rgba(220, 202, 255, .47); border-radius: 50%; background: repeating-radial-gradient(circle at center, #262033 0 4px, #312844 5px 6px, #1d1b29 7px 9px); box-shadow: 0 12px 27px rgba(0,0,0,.24), inset 0 0 18px rgba(190, 158, 255, .12); animation: slow-spin 19s linear infinite; }
.art-disc::after { content: ''; position: absolute; inset: 17px; border: 1px solid rgba(207, 185, 255, .25); border-radius: 50%; }
.art-disc-hole { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #d2bcff; box-shadow: inset 0 0 0 4px #65517e; transform: translate(-50%, -50%); }
.art-spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #cbb5ff; box-shadow: 0 0 12px #b79bfa; }
.spark-a { top: 12px; right: 4px; }.spark-b { bottom: 8px; left: 4px; width: 3px; height: 3px; }.spark-c { right: 9px; bottom: 2px; width: 2px; height: 2px; }
.empty-state .eyebrow { margin-bottom: 9px; color: #aa99c9; }
.empty-state h2 { margin: 0; color: #f4f0ff; font: 800 clamp(25px, 3vw, 34px)/1.05 'Manrope', sans-serif; letter-spacing: -.065em; }
.empty-state h2 em { color: #c5adff; font-style: normal; }
.empty-description { max-width: 390px; margin: 12px 0 17px; color: #9c9caf; font-size: 11px; line-height: 1.6; }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.button-primary, .button-secondary { min-height: 39px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 11px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .16s, background .16s, border-color .16s; }
.button-primary { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.button-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.button-primary svg, .button-secondary svg { width: 15px; height: 15px; }
.button-secondary { border-color: rgba(228, 220, 246, .17); background: rgba(255,255,255,.045); color: #ded7ec; }
.button-secondary:hover { background: rgba(255,255,255,.09); }
.drop-hint { display: flex; align-items: center; gap: 10px; margin-top: 19px; color: #727486; font-size: 8px; font-weight: 700; letter-spacing: .17em; }
.drop-hint-line { width: 23px; height: 1px; background: rgba(180, 171, 205, .2); }
.audio-visual { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; overflow: hidden; background: radial-gradient(ellipse at 50% 46%, rgba(125, 91, 181, .25), transparent 46%), linear-gradient(145deg, #161421, #10131b 65%, #141724); }
.audio-orb { position: relative; width: clamp(115px, 17vw, 190px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(188, 160, 255, .28), rgba(107, 78, 166, .13) 47%, transparent 69%); }
.orb-core { width: 43%; height: 43%; border: 1px solid rgba(220, 203, 255, .55); border-radius: 50%; background: repeating-radial-gradient(circle, #43345e 0 3px, #211d32 4px 6px); box-shadow: 0 0 38px rgba(179, 144, 255, .28), inset 0 0 20px rgba(199, 177, 255, .18); animation: slow-spin 16s linear infinite; }
.orb-ring { position: absolute; inset: 8%; border: 1px solid rgba(199, 172, 255, .17); border-radius: 50%; }
.ring-two { inset: -8%; border-color: rgba(199, 172, 255, .08); }
.visualizer { height: 32px; display: flex; align-items: center; gap: 4px; }
.visualizer i { display: block; width: 3px; height: 8px; border-radius: 5px; background: #bda4fa; opacity: .75; animation: equalize .85s ease-in-out infinite alternate; animation-play-state: paused; }
.visualizer i:nth-child(3n) { animation-delay: -.55s; }.visualizer i:nth-child(3n + 1) { animation-delay: -.25s; }.visualizer i:nth-child(4n) { animation-duration: 1.1s; }
.audio-playing .visualizer i { animation-play-state: running; }
.audio-label { color: #a99abf; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.stage-topline { position: absolute; top: 17px; left: 18px; right: 18px; z-index: 3; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.playing-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(209, 197, 236, .16); border-radius: 8px; background: rgba(13, 14, 20, .58); color: #eee7ff; font-size: 8px; font-weight: 700; letter-spacing: .12em; backdrop-filter: blur(10px); }
.playing-pulse { width: 6px; height: 6px; border-radius: 50%; background: #9ee2c9; box-shadow: 0 0 0 3px rgba(158, 226, 201, .14); }
.stage-file-name { overflow: hidden; color: rgba(255,255,255,.72); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 5px rgba(0,0,0,.7); }
.stage-play-overlay { position: absolute; z-index: 4; left: 50%; top: 50%; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(20, 18, 29, .68); color: white; opacity: 0; transform: translate(-50%, -50%) scale(.94); transition: opacity .18s, transform .18s; cursor: pointer; backdrop-filter: blur(10px); }
.player-stage:hover .stage-play-overlay, .stage-play-overlay:focus-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.stage-play-overlay svg { width: 23px; height: 23px; }
.stage-corner-note { position: absolute; bottom: 16px; right: 17px; z-index: 3; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(10, 12, 18, .6); color: rgba(255,255,255,.62); font-size: 8px; letter-spacing: .12em; backdrop-filter: blur(8px); }
.corner-dot { width: 5px; height: 5px; box-shadow: none; }
.drop-overlay { position: absolute; inset: 9px; z-index: 8; display: grid; place-items: center; border: 2px dashed #c5aaff; border-radius: 19px; background: rgba(19, 17, 30, .9); color: white; text-align: center; backdrop-filter: blur(8px); }
.drop-overlay-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: rgba(191, 166, 255, .16); color: #d4c3ff; }
.drop-overlay strong { font: 700 18px 'Manrope', sans-serif; }
.drop-overlay span { color: #aaa1b8; font-size: 11px; }

.playback-panel { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(240px, 1.45fr) minmax(150px, 1fr); align-items: center; gap: 16px; padding: 17px 2px 12px; }
.track-summary { min-width: 0; display: flex; align-items: center; gap: 10px; }
.track-art { width: 43px; height: 43px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, #39304b, #1e2531); color: #cbb6ff; }
.track-art.video-art { background: linear-gradient(145deg, #2a444a, #1d2937); color: #a7e5d6; }
.track-art svg { width: 19px; height: 19px; }
.track-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.track-copy strong { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.track-copy span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-button { width: 30px; height: 30px; color: var(--muted); font-size: 22px; line-height: 1; }
.favorite-button.is-favorite { color: #f19bb5; }
.timeline-area { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.timeline-row > span:last-child { text-align: right; }
.range-slider { width: 100%; height: 4px; margin: 0; border-radius: 99px; background: var(--panel-strong); appearance: none; -webkit-appearance: none; cursor: pointer; accent-color: var(--accent); }
.range-slider:disabled { cursor: not-allowed; opacity: .38; }
.range-slider::-webkit-slider-thumb { width: 11px; height: 11px; border: 2px solid var(--bg-elevated); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); appearance: none; -webkit-appearance: none; }
.range-slider::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid var(--bg-elevated); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.transport-row { display: flex; justify-content: center; align-items: center; gap: 6px; }
.transport-secondary { width: 33px; height: 33px; color: var(--muted); }
.transport-secondary svg { width: 17px; height: 17px; }
.play-button { width: 39px; height: 39px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 18px color-mix(in srgb, var(--accent) 20%, transparent); cursor: pointer; transition: transform .16s, background .16s; }
.play-button:hover:not(:disabled) { background: var(--accent-strong); transform: scale(1.05); }
.play-button svg { width: 19px; height: 19px; }
.loop-button { width: 29px; height: 29px; margin-left: 3px; color: var(--muted); }
.loop-button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.loop-glyph { font-size: 21px; line-height: 1; }
.utility-controls { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.utility-controls .icon-button { width: 34px; height: 34px; }
.utility-controls .icon-button svg { width: 17px; height: 17px; }
.volume-control { width: clamp(70px, 9vw, 105px); display: flex; align-items: center; gap: 5px; }
.volume-control .icon-button { width: 29px; }
.volume-slider { height: 3px; }
.speed-control select { height: 31px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text-soft); font-size: 10px; cursor: pointer; }
.under-player-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 2px 0; border-top: 1px solid var(--line); }
.format-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.format-dot { width: 5px; height: 5px; box-shadow: none; }
.shortcut-link { color: var(--muted); font-size: 10px; }
.shortcut-link svg { width: 14px; height: 14px; }

.details-panel { min-width: 0; display: flex; flex-direction: column; padding: 27px 19px 19px; border-left: 1px solid var(--line); background: var(--bg-elevated); }
.details-heading { padding: 0; }
.details-heading h2 { font-size: 18px; }
.live-indicator { padding: 5px 7px; border: 1px solid color-mix(in srgb, var(--mint) 20%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--mint) 8%, transparent); color: var(--mint); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.details-artwork { position: relative; width: 100%; aspect-ratio: 1.55; display: grid; place-items: center; overflow: hidden; margin-top: 23px; border: 1px solid rgba(204, 181, 255, .15); border-radius: 17px; background: radial-gradient(circle at 50% 44%, rgba(166, 132, 230, .23), transparent 52%), linear-gradient(145deg, #272235, #181c28 70%, #202034); }
.details-artwork::before, .details-artwork::after { content: ''; position: absolute; width: 175px; height: 175px; border: 1px solid rgba(213, 193, 255, .08); border-radius: 50%; }
.details-artwork::after { width: 220px; height: 220px; }
.details-artwork > span { position: absolute; bottom: 12px; right: 13px; color: rgba(222, 208, 255, .37); font: 800 9px 'Manrope', sans-serif; letter-spacing: .14em; }
.detail-art-disc { width: 88px; height: 88px; z-index: 1; display: grid; place-items: center; border: 1px solid rgba(232, 220, 255, .3); border-radius: 50%; background: repeating-radial-gradient(circle, #3c3151 0 4px, #252236 5px 7px); box-shadow: 0 10px 35px rgba(0,0,0,.22); }
.detail-art-disc > div { width: 17px; height: 17px; border-radius: 50%; background: #b9a1e9; box-shadow: inset 0 0 0 5px #695582; }
.details-track { margin-top: 15px; }
.details-track h3 { overflow: hidden; margin: 0 0 5px; font: 700 14px 'Manrope', sans-serif; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.details-track p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.detail-divider { height: 1px; margin: 19px 0; background: var(--line); }
.detail-section { display: flex; flex-direction: column; gap: 12px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.detail-section-heading svg { width: 15px; height: 15px; }
.detail-label { padding: 3px 6px; border-radius: 5px; background: var(--panel-strong); color: var(--mint); font-size: 8px; letter-spacing: .08em; }
.detail-line { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.detail-line strong { overflow: hidden; max-width: 58%; color: var(--text-soft); font-weight: 600; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.shortcuts-card { gap: 11px; }
.shortcut-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--text-soft); font-size: 10px; }
.shortcut-line > div { display: flex; gap: 4px; }
.details-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 19px; color: var(--muted); font-size: 9px; }
.details-bottom svg { width: 15px; height: 15px; color: var(--mint); }

.app-dialog { width: min(440px, calc(100vw - 28px)); max-width: 440px; max-height: min(88vh, 700px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 21px; background: var(--panel); color: var(--text); box-shadow: 0 25px 100px rgba(0,0,0,.52); }
.app-dialog::backdrop { background: rgba(5, 6, 10, .68); backdrop-filter: blur(7px); }
.dialog-card { padding: 23px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dialog-heading h2 { margin: 0; font: 800 21px 'Manrope', sans-serif; letter-spacing: -.05em; }
.dialog-copy { margin: 0 0 19px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.field-label { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: 10px; font-weight: 700; }
.text-input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: var(--bg); color: var(--text); font-size: 11px; }
.text-input:focus { border-color: var(--accent); }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 22px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row > div { display: flex; flex-direction: column; gap: 5px; }
.setting-row strong { font-size: 11px; font-weight: 700; }
.setting-row span:not(.switch-track) { color: var(--muted); font-size: 9px; line-height: 1.45; }
.switch { position: relative; flex: 0 0 auto; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { width: 39px; height: 23px; display: block; padding: 3px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--panel-strong); cursor: pointer; transition: background .2s; }
.switch-track::after { content: ''; width: 15px; height: 15px; display: block; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { border-color: var(--accent); background: var(--accent); }
.switch input:checked + .switch-track::after { background: var(--accent-ink); transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }
.dialog-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 11px; border-radius: 10px; background: var(--panel-strong); color: var(--muted); font-size: 9px; line-height: 1.5; }
.dialog-note svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--accent); }
.shortcut-modal-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; padding: 9px 0; color: var(--text-soft); font-size: 11px; }
.shortcut-modal-grid > div { display: flex; gap: 4px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { max-width: min(370px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-strong); color: var(--text); box-shadow: var(--shadow); font-size: 11px; line-height: 1.4; animation: toast-in .22s ease-out; }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--mint); }
.toast.error svg { color: var(--danger); }

@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes equalize { from { height: 5px; opacity: .55; } to { height: 25px; opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

@media (max-width: 1250px) {
  .app-layout { grid-template-columns: 226px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }
  .details-panel { display: none; }
  .main-content { padding-inline: clamp(22px, 4vw, 52px); }
}
@media (max-width: 820px) {
  .topbar { height: 66px; grid-template-columns: 1fr auto; padding: 0 18px; }
  .topbar-center { display: none; }
  .app-layout { min-height: calc(100vh - 66px); grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; z-index: 50; top: 66px; bottom: 0; left: 0; width: min(300px, calc(100vw - 48px)); border-right: 1px solid var(--line-strong); box-shadow: 20px 0 60px rgba(0,0,0,.22); transform: translateX(-105%); transition: transform .24s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-scrim.visible { position: fixed; z-index: 45; top: 66px; right: 0; bottom: 0; left: 0; display: block; border: 0; background: rgba(4, 5, 9, .52); backdrop-filter: blur(2px); }
  .mobile-menu { display: inline-grid; width: 34px; height: 34px; margin-left: -5px; }
  .brand-lockup { gap: 8px; }
  .brand-name { font-size: 21px; }
  .topbar-actions { gap: 6px; }
  .top-action { min-height: 37px; padding-inline: 10px; }
  .top-action span { display: none; }
  .primary-action span { display: inline; }
  .main-content { padding: 28px clamp(15px, 3vw, 27px) 25px; }
  .player-stage { aspect-ratio: 16 / 9; min-height: 230px; max-height: 65vw; }
  .playback-panel { grid-template-columns: minmax(120px, .9fr) minmax(220px, 1.25fr) minmax(125px, .8fr); gap: 8px; }
  .volume-control { width: 72px; }
  .utility-controls { gap: 1px; }
  .utility-controls .icon-button { width: 31px; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 13px; }
  .top-action:not(.primary-action) { display: none; }
  .primary-action { width: 39px; height: 39px; justify-content: center; padding: 0; }
  .primary-action span { display: none; }
  .primary-action svg { width: 19px; height: 19px; }
  .main-content { padding: 23px 13px 22px; }
  .main-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 18px; }
  .main-heading-actions { width: 100%; }
  .search-field { width: 100%; }
  .folder-button { width: 39px; height: 39px; }
  .main-heading h1 { font-size: 27px; }
  .player-stage { min-height: 215px; max-height: none; aspect-ratio: 16 / 10; border-radius: 18px; }
  .empty-state { padding: 18px 16px; }
  .empty-art { width: 87px; height: 62px; margin-bottom: 9px; }
  .art-disc { width: 61px; height: 61px; left: 13px; }
  .art-disc::after { inset: 14px; }
  .art-disc-hole { width: 10px; height: 10px; }
  .empty-state .eyebrow { margin-bottom: 7px; font-size: 8px; }
  .empty-state h2 { font-size: 27px; }
  .empty-description { max-width: 310px; margin: 8px 0 12px; font-size: 10px; }
  .empty-actions { gap: 6px; }
  .button-primary, .button-secondary { min-height: 35px; padding-inline: 11px; font-size: 10px; }
  .drop-hint { margin-top: 13px; font-size: 7px; }
  .playback-panel { grid-template-columns: 1fr auto; gap: 11px; padding-top: 13px; }
  .track-summary { grid-column: 1 / 2; grid-row: 1; }
  .track-art { width: 38px; height: 38px; }
  .track-copy strong { font-size: 10px; }
  .track-copy span { font-size: 8px; }
  .favorite-button { display: none; }
  .utility-controls { grid-column: 2; grid-row: 1; }
  .volume-control { width: 34px; }
  .volume-control .range-slider { display: none; }
  .utility-controls .icon-button { width: 30px; height: 32px; }
  .utility-button:nth-last-child(2) { display: none; }
  .speed-control select { height: 29px; font-size: 9px; }
  .timeline-area { grid-column: 1 / -1; grid-row: 2; gap: 9px; }
  .timeline-row { grid-template-columns: 31px minmax(0,1fr) 31px; gap: 7px; }
  .transport-row { gap: 8px; }
  .transport-secondary { width: 36px; height: 35px; }
  .play-button { width: 42px; height: 42px; border-radius: 15px; }
  .loop-button { margin-left: 5px; }
  .under-player-row { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 10px; }
  .format-note { font-size: 8px; }
  .shortcut-link { font-size: 9px; }
  .toast-region { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; }
  .toast { max-width: none; }
}
@media (max-width: 380px) {
  .brand-caption { display: none; }
  .topbar { gap: 8px; }
  .main-content { padding-inline: 10px; }
  .player-stage { min-height: 190px; }
  .empty-state { padding: 10px; }
  .empty-art { height: 54px; margin-bottom: 5px; }
  .empty-state h2 { font-size: 23px; }
  .empty-description { margin: 6px 0 9px; }
  .drop-hint { display: none; }
  .empty-description { max-width: 270px; font-size: 9px; }
  .utility-controls { gap: 0; }
  .utility-controls .icon-button { width: 27px; }
  .speed-control select { padding-inline: 4px; }
}
@media (hover: none) {
  .queue-more { opacity: 1; }
  .stage-play-overlay { opacity: .85; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------
   VLCore 1.2: readable typography, responsive side panels and embeds
   --------------------------------------------------------------- */
:root { --library-track: 250px; --details-track: 288px; }
.app-layout { grid-template-columns: var(--library-track) minmax(0, 1fr) var(--details-track); transition: grid-template-columns .22s ease; }
.sidebar-heading-actions { display: flex; align-items: center; gap: 6px; }
.mobile-menu { display: inline-grid; }
.panel-toggle { border-color: var(--line); background: var(--panel); }
.sidebar-scrim { display: none; }
.sidebar-scrim.visible { position: fixed; z-index: 50; top: 76px; right: 0; bottom: 0; left: 0; display: block; border: 0; background: rgba(4,5,9,.58); backdrop-filter: blur(3px); }
.details-close { display: none; }

#youtubeFrame { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; background: #000; }
#youtubeFrame:not([hidden]) { display: block; }
.playback-panel.youtube-mode .timeline-row,
.playback-panel.youtube-mode .utility-controls,
.playback-panel.youtube-mode #loopButton { display: none; }
.playback-panel.youtube-mode .timeline-area { gap: 0; }
.playback-panel.youtube-mode .transport-row { justify-content: flex-end; }

@media (min-width: 821px) {
  .app-shell.library-collapsed { --library-track: 0px; }
  .app-shell.details-collapsed { --details-track: 0px; }
  .sidebar, .details-panel { transition: padding .22s ease, opacity .18s ease; }
  .app-shell.library-collapsed .sidebar {
    width: 0; min-width: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none;
  }
  .app-shell.details-collapsed .details-panel {
    width: 0; min-width: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none;
  }
}

/* Text is intentionally larger than the original compact build. */
html { font-size: 16px; }
body { font-size: 15px; line-height: 1.5; }
.eyebrow { font-size: 11px; }
.brand-caption { font-size: 10px; }
.topbar-center { font-size: 14px; }
.top-action { min-height: 44px; font-size: 14px; }
.nav-item { font-size: 14px; }
.nav-count { font-size: 12px; }
.queue-heading { font-size: 11px; }
.text-button { font-size: 14px; }
.queue-empty p { font-size: 14px; }
.queue-empty > span { font-size: 12px; }
.queue-track-copy strong { font-size: 13px; }
.queue-track-copy span { font-size: 12px; }
.queue-more { font-size: 22px; }
.privacy-note strong { font-size: 13px; }
.privacy-note span { font-size: 12px; }
.main-subtitle { font-size: 14px; }
.search-field { min-height: 44px; }
.search-field input { font-size: 14px; }
kbd { min-width: 24px; height: 24px; font-size: 11px; }
.empty-description { font-size: 14px; }
.button-primary, .button-secondary { min-height: 44px; font-size: 14px; }
.drop-hint { font-size: 11px; }
.audio-label { font-size: 12px; }
.playing-pill { font-size: 11px; }
.stage-file-name { font-size: 13px; }
.stage-corner-note { font-size: 11px; }
.track-copy strong { font-size: 14px; }
.track-copy span { font-size: 12px; }
.timeline-row { font-size: 12px; }
.speed-control select { height: 36px; font-size: 13px; }
.format-note { font-size: 12px; }
.shortcut-link { font-size: 13px; }
.live-indicator { font-size: 10px; }
.details-track p { font-size: 13px; }
.detail-section-heading { font-size: 11px; }
.detail-label { font-size: 10px; }
.detail-line { font-size: 13px; }
.shortcut-line { font-size: 13px; }
.details-bottom { font-size: 12px; }
.dialog-copy { font-size: 14px; }
.field-label { font-size: 13px; }
.text-input { height: 48px; font-size: 14px; }
.field-help { font-size: 12px; }
.setting-row strong { font-size: 14px; }
.setting-row span:not(.switch-track) { font-size: 12px; }
.dialog-note { font-size: 12px; }
.shortcut-modal-grid { font-size: 14px; }
.toast { font-size: 13px; }

@media (max-width: 1250px) {
  .app-shell { --library-track: 226px; --details-track: 0px; }
  .app-shell.library-collapsed { --library-track: 0px; }
  .app-layout { grid-template-columns: var(--library-track) minmax(0, 1fr) 0; }
  .details-panel { display: none; }
  .details-panel.drawer-open {
    position: fixed; z-index: 51; top: 76px; right: 0; bottom: 0; width: min(360px, calc(100vw - 24px));
    display: flex !important; padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    border-left: 1px solid var(--line-strong); box-shadow: -20px 0 60px rgba(0,0,0,.28); overflow-y: auto;
  }
  .details-panel.drawer-open .details-close { display: inline-grid; }
  .sidebar { padding-inline: 14px; }
  .main-content { padding-inline: clamp(22px, 4vw, 52px); }
}
@media (max-width: 820px) {
  .app-shell { --library-track: 0px; --details-track: 0px; }
  .app-layout { min-height: calc(100vh - 66px); grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 51; top: 66px; bottom: 0; left: 0; width: min(320px, calc(100vw - 42px)); padding: 23px 17px calc(18px + env(safe-area-inset-bottom)); border-right: 1px solid var(--line-strong); box-shadow: 20px 0 60px rgba(0,0,0,.28); transform: translateX(-105%); transition: transform .24s ease; overflow-y: auto; }
  .sidebar.mobile-open { transform: translateX(0); }
  .details-panel.drawer-open { top: 66px; width: min(360px, calc(100vw - 24px)); }
  .sidebar-scrim.visible { position: fixed; z-index: 50; top: 66px; right: 0; bottom: 0; left: 0; display: block; border: 0; background: rgba(4,5,9,.58); backdrop-filter: blur(3px); }
  .mobile-menu { width: 38px; height: 38px; margin-left: -5px; }
  .brand-lockup { gap: 8px; }
  .topbar { grid-template-columns: minmax(0,1fr) auto; }
  .main-content { padding: 28px clamp(15px, 3vw, 27px) 25px; }
  .player-stage { aspect-ratio: 16 / 9; min-height: 230px; max-height: 65vw; }
  .playback-panel { grid-template-columns: minmax(120px, .9fr) minmax(220px, 1.25fr) minmax(125px, .8fr); gap: 8px; }
  .volume-control { width: 72px; }
  .utility-controls { gap: 1px; }
  .utility-controls .icon-button { width: 34px; }
  .details-close { display: inline-grid; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 13px; }
  .top-action:not(.primary-action) { display: none; }
  .primary-action { width: 42px; height: 42px; justify-content: center; padding: 0; }
  .primary-action span { display: none; }
  .primary-action svg { width: 19px; height: 19px; }
  .topbar-actions { gap: 4px; }
  .panel-toggle { width: 38px; height: 38px; }
  .main-content { padding: 23px 13px 22px; }
  .main-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 18px; }
  .main-heading-actions { width: 100%; }
  .search-field { width: 100%; }
  .folder-button { width: 42px; height: 42px; }
  .main-heading h1 { font-size: 29px; }
  .player-stage { min-height: 215px; max-height: none; aspect-ratio: 16 / 10; border-radius: 18px; }
  .empty-state { padding: 18px 16px; }
  .empty-art { width: 87px; height: 62px; margin-bottom: 9px; }
  .art-disc { width: 61px; height: 61px; left: 13px; }
  .art-disc::after { inset: 14px; }
  .art-disc-hole { width: 10px; height: 10px; }
  .empty-state .eyebrow { margin-bottom: 7px; font-size: 10px; }
  .empty-state h2 { font-size: 29px; }
  .empty-description { max-width: 340px; margin: 8px 0 12px; font-size: 13px; }
  .empty-actions { gap: 7px; }
  .button-primary, .button-secondary { min-height: 42px; padding-inline: 13px; font-size: 13px; }
  .drop-hint { margin-top: 13px; font-size: 10px; }
  .playback-panel { grid-template-columns: 1fr auto; gap: 11px; padding-top: 13px; }
  .track-summary { grid-column: 1 / 2; grid-row: 1; }
  .track-art { width: 42px; height: 42px; }
  .track-copy strong { font-size: 13px; }
  .track-copy span { font-size: 11px; }
  .favorite-button { display: none; }
  .utility-controls { grid-column: 2; grid-row: 1; }
  .volume-control { width: 34px; }
  .volume-control .range-slider { display: none; }
  .utility-controls .icon-button { width: 34px; height: 36px; }
  .utility-button:nth-last-child(2) { display: none; }
  .speed-control select { height: 34px; font-size: 12px; }
  .timeline-area { grid-column: 1 / -1; grid-row: 2; gap: 9px; }
  .timeline-row { grid-template-columns: 38px minmax(0,1fr) 38px; gap: 7px; font-size: 11px; }
  .transport-row { gap: 8px; }
  .transport-secondary { width: 38px; height: 38px; }
  .play-button { width: 46px; height: 46px; border-radius: 15px; }
  .loop-button { margin-left: 5px; }
  .under-player-row { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 10px; }
  .format-note { font-size: 11px; }
  .shortcut-link { font-size: 12px; }
  .toast-region { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; }
  .toast { max-width: none; }
}
@media (max-width: 380px) {
  .brand-caption { display: none; }
  .topbar { gap: 8px; }
  .main-content { padding-inline: 10px; }
  .player-stage { min-height: 190px; }
  .empty-state { padding: 10px; }
  .empty-art { height: 54px; margin-bottom: 5px; }
  .empty-state h2 { font-size: 25px; }
  .empty-description { margin: 6px 0 9px; font-size: 12px; }
  .drop-hint { display: none; }
  .utility-controls { gap: 0; }
  .utility-controls .icon-button { width: 29px; }
  .speed-control select { padding-inline: 4px; }
}
@media (max-width: 620px) {
  .player-stage:has(.empty-state:not([hidden])) { min-height: 338px; aspect-ratio: auto; }
}
@media (max-width: 380px) {
  .player-stage:has(.empty-state:not([hidden])) { min-height: 320px; }
}


/* VLCore UI polish: balanced brand mark, icon buttons, favorite, and speed selector. */
.brand-mark {
  width: 44px;
  height: 44px;
  padding: 1px;
  border-radius: 14px;
  filter: drop-shadow(0 4px 10px rgba(150, 102, 237, .16));
}
.brand-name { letter-spacing: -.045em; }
.settings-nav svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
  color: var(--text-soft);
}
.settings-nav:hover svg { color: var(--accent); }
.favorite-button {
  width: 36px;
  height: 36px;
  margin-left: 1px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  color: var(--muted);
}
.favorite-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  transition: fill .16s ease, transform .16s ease, color .16s ease;
}
.favorite-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, #f0789b 38%, var(--line));
  background: color-mix(in srgb, #f0789b 9%, var(--panel));
  color: #ed8da9;
}
.favorite-button.is-favorite {
  border-color: color-mix(in srgb, #ed7899 35%, var(--line));
  background: color-mix(in srgb, #ed7899 12%, var(--panel));
  color: #f18ca8;
}
.favorite-button.is-favorite svg { fill: currentColor; }
.favorite-button:active:not(:disabled) svg { transform: scale(.88); }
.speed-control {
  position: relative;
  display: block;
  flex: 0 0 auto;
}
.speed-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.speed-control select {
  display: block;
  width: 72px;
  min-width: 72px;
  height: 38px;
  padding: 0 29px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.speed-control select:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line-strong));
  background: var(--surface-hover);
  color: var(--text);
}
.speed-control select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.speed-control select:disabled { cursor: not-allowed; opacity: .48; }
.speed-control select option { background: var(--panel); color: var(--text); }
@media (max-width: 820px) {
  .speed-control select { width: 70px; min-width: 70px; height: 36px; padding-inline: 11px 27px; font-size: 12px; }
}
@media (max-width: 380px) {
  .speed-control select { width: 68px; min-width: 68px; height: 35px; padding-inline: 10px 25px; font-size: 11px; }
  .speed-control::after { right: 10px; width: 6px; height: 6px; }
}
@media (max-width: 620px) {
  .favorite-button { display: inline-grid; width: 32px; height: 32px; }
  .track-summary { gap: 7px; }
  .track-art { width: 39px; height: 39px; }
  .track-copy { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 380px) {
  .favorite-button { display: none; }
}


/* VLCore v1.3 — fullscreen transport overlay */
.player-stage.is-fullscreen,
.player-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}
.player-stage.is-fullscreen #mediaElement:not([hidden]),
.player-stage:fullscreen #mediaElement:not([hidden]) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
.player-stage.is-fullscreen #youtubeFrame:not([hidden]),
.player-stage:fullscreen #youtubeFrame:not([hidden]) { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-stage.is-fullscreen .stage-topline,
.player-stage:fullscreen .stage-topline,
.player-stage.is-fullscreen .stage-corner-note,
.player-stage:fullscreen .stage-corner-note { opacity: 0; transition: opacity .2s ease; }
.stage-play-overlay { z-index: 5; width: 74px; height: 74px; opacity: .96; border: 1px solid rgba(255,255,255,.35); background: rgba(18,16,27,.78); box-shadow: 0 10px 35px rgba(0,0,0,.35); }
.stage-play-overlay svg { width: 29px; height: 29px; }
.player-stage.is-playing:not(:hover) .stage-play-overlay { opacity: 0; pointer-events: none; }
.player-stage:not(.is-playing) .stage-play-overlay { opacity: .96; }
.player-stage.is-fullscreen .stage-play-overlay,
.player-stage:fullscreen .stage-play-overlay { z-index: 6; }
.stage-controls { display: none; }
.player-stage.is-fullscreen .stage-controls:not([hidden]),
.player-stage:fullscreen .stage-controls:not([hidden]) {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 38px);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.52) 0%, transparent 23%, transparent 57%, rgba(0,0,0,.76) 100%);
  transition: opacity .22s ease;
}
.player-stage.is-fullscreen.controls-visible .stage-controls:not([hidden]),
.player-stage:fullscreen.controls-visible .stage-controls:not([hidden]) { opacity: 1; pointer-events: auto; }
.player-stage.is-fullscreen.controls-visible,
.player-stage:fullscreen.controls-visible { cursor: default; }
.player-stage.is-fullscreen:not(.controls-visible),
.player-stage:fullscreen:not(.controls-visible) { cursor: none; }
.stage-controls-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.stage-controls-heading { min-width: 0; display: flex; flex-direction: column; gap: 6px; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.stage-controls-brand { color: #e0c8ff; font-size: 10px; font-weight: 800; letter-spacing: .22em; }
.stage-controls-heading > span:last-child { max-width: min(70vw, 900px); overflow: hidden; color: #fff; font-size: clamp(15px, 1.8vw, 22px); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.stage-controls-footer { width: 100%; max-width: 1500px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.stage-seek-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; color: rgba(255,255,255,.86); font-size: 12px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 5px rgba(0,0,0,.7); }
.stage-seek-slider { width: 100%; min-width: 0; height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0%, rgba(255,255,255,.25) 0%); cursor: pointer; }
.stage-controls-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.stage-transport-group, .stage-utility-group { display: flex; align-items: center; gap: 10px; }
.stage-control-button { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(15,15,22,.44); color: #fff; cursor: pointer; backdrop-filter: blur(12px); transition: background .16s, transform .16s, border-color .16s; }
.stage-control-button:hover:not(:disabled) { background: rgba(143,106,208,.38); border-color: rgba(220,198,255,.55); transform: translateY(-1px); }
.stage-control-button svg { width: 20px; height: 20px; }
.stage-control-button:disabled { opacity: .42; }
.stage-play-button { width: 54px; height: 54px; border: 0; border-radius: 17px; background: var(--accent); color: #231738; box-shadow: 0 5px 22px rgba(145,105,220,.35); }
.stage-play-button svg { width: 24px; height: 24px; }
.stage-volume-slider { width: clamp(72px, 10vw, 145px); height: 5px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 80%, rgba(255,255,255,.24) 80%); cursor: pointer; }
.stage-speed-control { position: relative; }
.stage-speed-control select { width: 78px; height: 42px; padding: 0 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; appearance: none; background: rgba(15,15,22,.55); color: #fff; text-align: center; font-size: 13px; font-weight: 650; cursor: pointer; backdrop-filter: blur(12px); }
.stage-speed-control select option { background: #1b1b25; color: #fff; }
.stage-exit-fullscreen { background: rgba(15,15,22,.5); }
.player-stage.is-fullscreen.youtube-mode .stage-controls,
.player-stage:fullscreen.youtube-mode .stage-controls { display: none !important; }
@media (max-width: 700px) {
  .player-stage.is-fullscreen .stage-controls:not([hidden]),
  .player-stage:fullscreen .stage-controls:not([hidden]) { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .stage-controls-footer { gap: 10px; }
  .stage-controls-actions { gap: 8px; }
  .stage-transport-group, .stage-utility-group { gap: 6px; }
  .stage-control-button { width: 39px; height: 39px; border-radius: 11px; }
  .stage-play-button { width: 47px; height: 47px; }
  .stage-volume-slider { width: 66px; }
  .stage-speed-control select { width: 66px; height: 38px; }
  .stage-seek-row { gap: 8px; font-size: 11px; }
}
@media (max-width: 430px) {
  .stage-utility-group { gap: 4px; }
  .stage-volume-slider { display: none; }
  .stage-control-button { width: 36px; height: 36px; }
  .stage-play-button { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-controls { transition: none !important; }
}

/* Final transport affordance polish */
.play-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 7px 22px color-mix(in srgb, var(--accent) 30%, transparent);
}
.play-button svg { width: 21px; height: 21px; }
.play-button:active:not(:disabled) { transform: scale(.94); }
.player-stage.is-fullscreen.is-playing .stage-play-overlay,
.player-stage:fullscreen.is-playing .stage-play-overlay {
  opacity: 0;
  pointer-events: none;
}
.player-stage.is-fullscreen:not(.is-playing) .stage-play-overlay,
.player-stage:fullscreen:not(.is-playing) .stage-play-overlay {
  opacity: .98;
  pointer-events: auto;
}
.player-stage.is-fullscreen .stage-play-overlay,
.player-stage:fullscreen .stage-play-overlay { display: none; }


/* VLCore 1.4 — container-aware layout corrections for tablet and compact desktops.
   The playback panel responds to the available player column, not only viewport width. */
.main-content {
  container-name: vlcore-main;
  container-type: inline-size;
}
.empty-art { flex: 0 0 78px; }



@container vlcore-main (max-width: 820px) {
  .player-stage {
    min-height: 360px;
    max-height: none;
    aspect-ratio: auto;
  }
  .empty-state { padding: 20px 18px; }
  .empty-art {
    width: 90px;
    height: 62px;
    flex: 0 0 62px;
    margin: 0 auto 10px;
  }
  .art-disc { width: 62px; height: 62px; left: 14px; }
  .art-disc::after { inset: 14px; }
  .art-disc-hole { width: 11px; height: 11px; }
  .empty-state .eyebrow { margin-bottom: 7px; }
  .empty-state h2 { font-size: clamp(25px, 3.4cqw, 31px); line-height: 1.08; }
  .empty-description { max-width: 370px; margin: 9px 0 13px; font-size: 13px; }
  .drop-hint { margin-top: 13px; }

  /* Move transport controls to a second row before the utility group can collide. */
  .playback-panel {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 11px;
  }
  .track-summary { grid-column: 1; grid-row: 1; min-width: 0; }
  .utility-controls {
    grid-column: 2;
    grid-row: 1;
    width: max-content;
    max-width: 100%;
    gap: 3px;
  }
  .timeline-area { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .volume-control { width: 76px; gap: 3px; }
  .volume-control .range-slider { display: block; width: 42px; }
  .utility-controls .icon-button { width: 33px; height: 36px; }
  .speed-control select { width: 70px; min-width: 70px; height: 36px; }
}

@container vlcore-main (max-width: 560px) {
  .player-stage { min-height: 348px; }
  .empty-state { padding: 17px 12px; }
  .empty-art {
    width: 76px;
    height: 58px;
    flex-basis: 58px;
    margin-bottom: 8px;
  }
  .art-disc { width: 58px; height: 58px; left: 9px; }
  .art-disc::after { inset: 13px; }
  .empty-state h2 { font-size: 26px; }
  .empty-description { max-width: 310px; margin: 8px 0 11px; font-size: 12px; line-height: 1.5; }
  .button-primary, .button-secondary { min-height: 40px; padding-inline: 12px; font-size: 12px; }
  .drop-hint { margin-top: 10px; font-size: 9px; }
  .utility-controls { gap: 2px; }
  .volume-control { width: 34px; }
  .volume-control .range-slider { display: none; }
  .utility-controls .icon-button { width: 31px; height: 34px; }
  .speed-control select { width: 66px; min-width: 66px; height: 34px; padding: 0 25px 0 9px; font-size: 12px; }
  .speed-control::after { right: 9px; }
  .transport-row { gap: 5px; }
  .transport-secondary { width: 35px; height: 35px; }
  .play-button { width: 43px; height: 43px; }
}

@container vlcore-main (max-width: 390px) {
  .player-stage { min-height: 332px; }
  .empty-state { padding-inline: 9px; }
  .empty-state h2 { font-size: 24px; }
  .empty-description { font-size: 11px; }
  .drop-hint { display: none; }
  .playback-panel { column-gap: 7px; }
  .utility-controls { gap: 1px; }
  .utility-controls .icon-button { width: 29px; }
  .speed-control select { width: 62px; min-width: 62px; }
  .track-art { flex: 0 0 38px; }
}


/* VLCore 1.5 — persistent library toggle, framed target mark, and even control spacing. */
.mobile-menu {
  display: inline-grid !important;
  width: 40px;
  height: 40px;
  margin-left: -5px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text-soft);
}
.mobile-menu:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line-strong));
  background: var(--surface-hover);
  color: var(--text);
}
.brand-lockup { gap: 10px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  filter: none;
}
.utility-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.volume-control {
  width: clamp(88px, 8vw, 112px);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.volume-control .icon-button { width: 32px; height: 36px; }
.volume-control .range-slider { flex: 1 1 auto; width: 100%; min-width: 46px; }
.speed-control { margin: 0; flex: 0 0 auto; }
.speed-control select {
  width: 74px;
  min-width: 74px;
  height: 38px;
  padding: 0 29px 0 13px;
  border-radius: 11px;
  text-align: center;
}
.speed-control::after { right: 12px; }
.utility-controls .utility-button { flex: 0 0 34px; width: 34px; height: 36px; }

@container vlcore-main (max-width: 820px) {
  .utility-controls { gap: 8px; }
  .volume-control { width: 84px; gap: 6px; }
  .volume-control .range-slider { min-width: 44px; }
  .speed-control { margin-left: 1px; }
  .speed-control select { width: 72px; min-width: 72px; height: 36px; }
}
@container vlcore-main (max-width: 560px) {
  .utility-controls { gap: 7px; }
  .volume-control { width: 34px; gap: 0; }
  .volume-control .range-slider { display: none; }
  .speed-control { margin-left: 1px; }
  .speed-control select { width: 68px; min-width: 68px; height: 35px; }
  .utility-controls .utility-button { flex-basis: 31px; width: 31px; height: 34px; }
}
@container vlcore-main (max-width: 390px) {
  .utility-controls { gap: 4px; }
  .speed-control { margin-left: 0; }
  .speed-control select { width: 64px; min-width: 64px; padding-left: 10px; padding-right: 24px; }
  .speed-control::after { right: 9px; }
}
@media (max-width: 820px) {
  .mobile-menu { width: 38px; height: 38px; margin-left: -5px; }
  .brand-lockup { gap: 8px; }
}
@media (max-width: 380px) {
  .brand-mark { width: 40px; height: 40px; }
  .mobile-menu { width: 36px; height: 36px; }
}
