/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Window chrome and type follow website/example.html. */
:root { color-scheme: dark; --paper: #e6e6e6; --muted: #9a9a9a; --line: #c9c9c9; --panel: #111; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--paper); }
body { font: 19px/1.3 "Jersey 10", Geneva, Verdana, sans-serif; letter-spacing: .02em; -webkit-font-smoothing: none; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; display: block; background: #000; }
#controls { position: fixed; inset: 0; pointer-events: none; }
.menubar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 30px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; background: #0b0b0b; border-bottom: 1px solid var(--line); padding: 0 10px; }
.menu-brand { justify-self: start; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 21px; color: var(--paper); background: transparent; }
.menu-brand img { display: block; image-rendering: pixelated; }
.transport { position: absolute; left: 50%; top: calc(50% + 15px); transform: translate(-50%,-50%); transform-origin: center; width: 540px; max-width: calc(100% - 56px); max-height: calc(100dvh - 62px); display: flex; flex-direction: column; pointer-events: auto; background: var(--panel); border: 1px solid var(--line); box-shadow: 2px 2px 0 #000, 3px 3px 0 rgba(201,201,201,.25); }
.window-bar { position: relative; flex: none; height: 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; }
.window-bar::before { content: ""; position: absolute; left: 3px; right: 3px; top: 5px; bottom: 5px; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 2px); }
.window-bar.dragging { cursor: grabbing; }
.wordmark { position: relative; margin: 0; padding: 0 8px; font: 20px/1 "Jersey 10", Geneva, sans-serif; background: var(--panel); white-space: nowrap; }
.slash, .dim { color: var(--muted); }
button, select, input { font: inherit; color: inherit; }
button, select { min-height: 32px; border: 1px solid var(--line); border-radius: 0; background: #222; padding: 5px 12px; cursor: pointer; line-height: 1.2; }
button { box-shadow: inset 1px 1px 0 #666, 1px 1px 0 #000; }
button:hover:not(:disabled) { background: var(--paper); color: #000; }
button:active:not(:disabled) { box-shadow: inset 1px 1px 0 #000; }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: var(--paper); color: #000; }
button.primary:hover { background: #fff; }
button.primary span { padding-left: 10px; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 1px dotted var(--paper); outline-offset: 3px; }
.window-box { position: absolute; top: 7px; width: 12px; min-height: 0; height: 12px; padding: 0; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 0 0 2px var(--panel); }
.window-box::before { content: ""; position: absolute; inset: -7px; }
.window-box.minimize { left: 10px; }
.window-box.minimize::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px; background: currentColor; }
.window-box.zoom { right: 10px; }
.window-box.zoom::after { content: ""; position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.window-body { padding: 12px; min-height: 0; overflow: auto; }
.track-info { display: flex; flex-direction: column; gap: 4px; min-height: 65px; padding: 10px 12px; margin-bottom: 10px; background: #050505; border: 1px solid #555; box-shadow: inset 1px 1px 0 #000; }
.track-name { font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.status { font-size: 16px; color: var(--muted); }
#error { color: #ffc8b7; font-size: 16px; white-space: pre-wrap; max-height: 90px; overflow: auto; }
.playback-row, .window-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.time { font-variant-numeric: tabular-nums; margin-left: auto; min-width: 39px; }
.tempo { font-size: 16px; min-width: 57px; color: var(--muted); text-align: right; white-space: nowrap; }
.window-actions { margin-top: 12px; }
.window-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.volume { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 16px; color: var(--muted); }
input[type=range] { appearance: none; min-width: 0; width: 85px; height: 28px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; background: #050505; border: 1px solid #777; }
input[type=range]::-moz-range-track { height: 3px; background: #050505; border: 1px solid #777; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 9px; height: 15px; margin-top: -6px; border: 1px solid #111; border-radius: 0; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
input[type=range]::-moz-range-thumb { width: 7px; height: 13px; border: 1px solid #111; border-radius: 0; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.window-tools button { font-size: 16px; padding: 6px 9px; white-space: nowrap; }
#settings { border-top: 1px solid #555; margin-top: 13px; padding-top: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: end; }
.settings-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 16px; color: var(--muted); }
.settings-grid select { width: 100%; font-size: 18px; color: var(--paper); background: var(--panel); border-color: #777; }
.settings-grid input { width: 100%; height: 32px; }
.settings-grid button { grid-column: span 2; font-size: 18px; }
.help { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 12px 0 0; }
.help a { color: var(--paper); text-underline-offset: 3px; }
#show-ui { grid-column: 2; min-height: 0; padding: 0 16px; border: 0; box-shadow: none; font-size: 19px; background: var(--paper); color: #000; }
#show-ui[aria-expanded=false] { background: transparent; color: var(--paper); }
#show-ui:hover { background: var(--paper); color: #000; }
#show-ui:focus-visible { outline-offset: -4px; outline-color: #777; }
#menu-fullscreen { grid-column: 3; justify-self: end; min-height: 0; padding: 0 10px; border: 0; box-shadow: none; font-size: 17px; background: transparent; color: var(--paper); white-space: nowrap; }
#menu-fullscreen:hover, #menu-fullscreen[aria-pressed=true] { background: var(--paper); color: #000; }
#menu-fullscreen:focus-visible { outline-offset: -4px; outline-color: #777; }
#drop-hint { position: fixed; inset: 20px; z-index: 5; border: 2px dashed var(--line); display: grid; place-items: center; background: #111e; font-size: clamp(28px,5vw,60px); pointer-events: none; opacity: 0; transition: opacity .15s; }
body.dragging #drop-hint { opacity: 1; }
body.no-webgl #bg { background: #000; }
noscript { position: fixed; top: 40%; left: 10%; right: 10%; text-align: center; }
@media(max-width:700px) {
  .transport { width: calc(100% - 24px); max-width: none; max-height: calc(100dvh - 54px); }
  .window-bar { height: 30px; cursor: default; }
  .window-box { top: 9px; }
  .window-body { padding: 10px; }
  .track-name { font-size: 22px; }
  .playback-row { gap: 6px; }
  .playback-row button { padding: 6px 10px; }
  .window-actions { gap: 6px; }
  .volume { gap: 6px; width: 100%; }
  .volume input { width: 60px; }
  .window-tools { gap: 6px; }
  .window-tools button { padding: 6px 8px; }
  .menubar { padding: 0 6px; }
  .menu-brand { gap: 5px; padding: 0 6px; font-size: 19px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; } }
