:root {
  color-scheme: dark;
  font-family: 'Segoe UI', 'Malgun Gothic', system-ui, sans-serif;
  background: #171717;
  color: #f4f4f4;
  --muted: #b0b0b0;
  --line: #343434;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .44; }
:is(button, input):focus-visible { outline: 2px solid #eee; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.workspace { width: min(100%, 680px); margin-inline: auto; padding: 18px clamp(16px, 4vw, 32px) 30px; }
.header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.header h1 { font-size: 15px; font-weight: 650; }
.header span { color: var(--muted); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.player { padding: 36px 0 29px; text-align: center; }
.controls { display: flex; align-items: center; justify-content: center; gap: clamp(7px, 3vw, 17px); }
.controls button { display: grid; position: relative; place-items: center; border: 0; padding: 0; border-radius: 50%; }
.controls svg { width: 55%; height: 55%; fill: currentColor; }
.round { width: 39px; height: 39px; color: #444; background: linear-gradient(145deg,#fff,#dcdcdc); box-shadow: 3px 3px 7px #0006,-1px -1px 2px #fff4,inset 0 0 0 1px #fff8; }
.round.play { width: 52px; height: 52px; }
.round:active:not(:disabled) { transform: scale(.95); box-shadow: inset 2px 2px 6px #0004; }
.controls .mode { width: 34px; height: 34px; color: var(--muted); background: transparent; }
.mode:hover:not(:disabled), .mode[data-active] { color: #fff; }
.mode svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#repeat-one { position: absolute; right: 0; top: -2px; color: #171717; background: #eee; border-radius: 50%; width: 12px; height: 12px; font-size: 9px; font-weight: 700; line-height: 12px; }
#time-display { margin: 20px 0 6px; color: #ccc; font-size: 12px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
#current { color: #fff; font-size: clamp(22px, 5vw, 32px); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
#current-details { color: var(--muted); margin-top: 5px; font-size: 14px; overflow-wrap: anywhere; }
.phase { margin-top: 9px; color: var(--muted); font-size: 12px; }
.library { border-top: 1px solid var(--line); }
.views { display: flex; gap: 21px; margin-bottom: 10px; }
.views button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 11px 0 8px; font-size: 13px; }
.views button[aria-pressed="true"] { color: #fff; border-color: #e6e6e6; }
#queue-count { margin-left: 4px; color: var(--muted); }
form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
input { min-width: 0; min-height: 40px; padding: 8px 11px; background: #202020; border: 1px solid #484848; color: inherit; border-radius: 5px; }
.primary { padding: 0 15px; border: 1px solid #ddd; border-radius: 5px; background: #e8e8e8; color: #202020; font-weight: 650; }
#feedback { color: var(--muted); margin: 0 0 10px; font-size: 13px; }
#feedback:empty, #current-details:empty { display: none; }
#feedback[data-error] { color: #ffb9be; }
.results { display: grid; margin-top: 9px; }
.results:empty { display: none; }
.result { display: grid; grid-template-columns: minmax(0, 1fr) 65px; min-height: 57px; min-width: 0; padding: 4px 0 4px 8px; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.result:hover:not(:disabled) { background: #252525; }
.result:focus-visible { outline-offset: -2px; }
.result-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding-right: 8px; }
.result strong, .details { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result strong { font-size: 14px; }
.details { color: var(--muted); font-size: 12px; }
.cover { display: grid; place-items: center; }
.cover img { display: block; width: 52px; height: 43px; object-fit: cover; border-radius: 4px; }
#queue-empty, #queue { color: var(--muted); font-size: 13px; }
#queue { margin: 0; padding-left: 23px; }
#queue li { padding: 4px 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.queue-track { display: grid; grid-template-columns: minmax(0,1fr) 65px; align-items: center; min-height: 47px; gap: 8px; }
.queue-track[data-track-id] { grid-template-columns: 14px minmax(0,1fr) 65px; }
.queue-track[data-track-id]::before { content: ''; width: 9px; height: 13px; background: radial-gradient(circle, currentColor 1px, transparent 1.2px) 0 0 / 4px 4px; }
.queue-track[draggable="true"] { cursor: grab; }
.queue-track[data-dragging] { opacity: .45; cursor: grabbing; }
.queue-track[data-drop] { background: #252525; outline: 1px solid #777; outline-offset: -1px; }
