@font-face {
  font-family: Syne;
  src: url("/syne.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: #111111;
  background: #faf8f5;
  --ink: #111111;
  --cream: #faf8f5;
  --green: #1b7f5c;
  --blue: #1d34d8;
  --orange: #ff5a1f;
  --pink: #ff9ee5;
  --yellow: #ffd60a;
  --white: #fff;
  --on-accent: #fff;
  --tint-yellow: color-mix(in srgb, var(--yellow) 42%, #fff);
  --tint-green: color-mix(in srgb, var(--green) 14%, #fff);
  --tint-blue: color-mix(in srgb, var(--blue) 12%, #fff);
  --tint-card: color-mix(in srgb, var(--yellow) 72%, #fff);
  --muted: #514d49;
  --line: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --heading: Syne, "Arial Black", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
:where(section[id]) { scroll-margin-top: 1rem; }
.shell { width: min(1220px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; background: var(--yellow); }
.skip-link:focus { top: 10px; }

.button, .primary, .secondary, .transport-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .55em;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--line);
  border-radius: 11px;
  background: var(--cream);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.1;
}
.primary { background: var(--green); color: var(--on-accent); }
.pink-button { background: var(--pink); }
.button, .primary, .secondary, .transport-button, .album-button, .track-button {
  transition: transform 130ms ease, box-shadow 130ms ease;
}
:where(.button, .primary, .secondary, .transport-button, .album-button, .track-button):not(:disabled):active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}
@media (hover: hover) {
  :where(.button, .primary, .secondary, .transport-button, .album-button, .track-button):not(:disabled):hover {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--ink);
  }
}
button:disabled { background: #edebe5; color: #5d5650; box-shadow: none; }

.masthead { padding-top: 23px; }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 8px 14px 8px 17px;
  border: var(--line);
  border-radius: 99px;
  background: var(--cream);
  box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 9px; justify-self: start; font-weight: 700; line-height: 1; }
.brand strong { display: block; font-family: var(--heading); font-weight: 800; font-size: 1.08rem; }
.brand-mark { flex: 0 0 34px; height: 34px; border: var(--line); border-radius: 50%; background: radial-gradient(circle, var(--ink) 0 10%, var(--pink) 11% 31%, var(--ink) 32% 43%, var(--cream) 45% 48%, var(--ink) 49%); }
.nav-links { display: flex; gap: clamp(10px, 2.5vw, 34px); align-items: center; font-size: .9rem; font-weight: 700; }
.nav-links a { display: grid; place-items: center; min-height: 44px; }
.nav-links a:hover, .footer-top:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-action { justify-self: end; background: var(--orange); border-radius: 50px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }

.intro { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: clamp(24px, 6vw, 94px); align-items: center; padding-block: clamp(46px, 6vw, 79px) 44px; }
.intro-copy { container-type: inline-size; }
.model, .mode, .eyebrow, .times, .track-number, .track-time, code {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
}
.model { display: inline-block; padding: 7px 11px; border: var(--line); border-radius: 7px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); letter-spacing: .06em; font-size: .75rem; }
h1, h2, h3, .footer-brand { font-family: var(--heading); font-weight: 800; letter-spacing: -.052em; }
h1 { margin-top: 15px; max-width: 9em; font-size: clamp(2rem, 5vw, 5.1rem); font-size: clamp(2rem, 12.8cqw, 5.1rem); line-height: .92; }
h1 span, .deck-heading h2 span { color: var(--blue); }
.intro-description { font-size: clamp(1rem, 1.65vw, 1.2rem); line-height: 1.42; margin-top: 19px; max-width: 37ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.hero-actions .button { min-height: 48px; }

.hero-visual { position: relative; min-width: 0; margin: 0 19px 12px 5px; }
.bg-checkerboard {
  --checker-size: 24px;
  --checker-offset: 12px;
  background: linear-gradient(45deg, var(--ink) 25%, transparent 25% 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25% 75%, var(--ink) 75%) var(--checker-offset) var(--checker-offset),
    var(--cream);
  background-size: var(--checker-size) var(--checker-size);
}
.hero-offset { position: absolute; inset: 13px -12px -13px 13px; border: var(--line); border-radius: 35px 22px 54px 23px; transform: rotate(2.5deg); }
.wavy-box { border-radius: 38px 23px 68px 26px / 30px 40px 48px 36px; }
.hero-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding: clamp(16px, 3.3vw, 43px);
  min-height: clamp(220px, 28vw, 380px);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--blue);
}
.hero-sticker { position: absolute; right: -22px; top: -26px; width: clamp(55px, 7vw, 85px); height: auto; transform: rotate(11deg); filter: drop-shadow(3px 3px 0 var(--ink)); }
.record-well {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 9%;
  border: var(--line);
  border-radius: 46% 54% 48% 52%;
  background: var(--yellow);
  box-shadow: var(--shadow);
  transform: rotate(-11deg);
}
.mini-disc {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 3px, #44413e 4px 5px, transparent 6px 8px),
    conic-gradient(var(--ink) 0 60deg, #66615b 85deg, var(--ink) 110deg 260deg, #66615b 282deg, var(--ink) 305deg);
  box-shadow: 4px 4px 0 var(--ink);
  animation: spin 4s linear infinite paused;
}
.mini-disc::after {
  content: "";
  position: absolute;
  inset: 27%;
  border: var(--line);
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 8%, transparent 9%), conic-gradient(from 18deg, var(--pink) 0 62deg, var(--yellow) 62deg 252deg, var(--pink) 252deg);
}
.mini-disc.playing { animation-play-state: running; }
@keyframes spin { to { transform: rotate(1turn); } }
.mini-copy { min-width: 0; padding: clamp(9px, 1.7vw, 20px); border: var(--line); border-radius: 20px 14px 22px 15px; background: var(--pink); box-shadow: var(--shadow); }
.mini-copy h2 { margin-bottom: 6px; }
.mini-copy strong, #mini-album { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy strong { font-family: var(--heading); font-size: clamp(1.03rem, 2vw, 1.5rem); line-height: 1.05; letter-spacing: -.04em; }
#mini-album { margin-top: 4px; font-size: .82rem; }
#mini-progress { appearance: none; display: block; width: 100%; height: 10px; margin-top: 11px; border: var(--line); border-radius: 20px; overflow: hidden; background: var(--cream); color: var(--green); }
#mini-progress::-webkit-progress-bar { background: var(--cream); }
#mini-progress::-webkit-progress-value { background: var(--green); }
#mini-progress::-moz-progress-bar { background: var(--green); }
.mini-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.mini-actions button { min-width: 44px; padding-inline: 8px; border-radius: 50%; background: var(--yellow); }
.mini-actions button:disabled { background: var(--cream); }
.mini-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: .79rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.marquee { position: relative; overflow: hidden; background: var(--blue); color: var(--on-accent); border-block: 3px solid var(--ink); }
.marquee-track { display: flex; width: max-content; animation: ticker 31s linear infinite; }
.marquee-run { display: flex; align-items: center; justify-content: space-around; gap: clamp(16px, 3vw, 45px); min-width: 100vw; padding: 12px 13px; white-space: nowrap; font-family: var(--heading); font-size: clamp(.85rem, 1.65vw, 1.17rem); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.marquee-run b { color: var(--yellow); font-size: 1.2em; }
.marquee.paused .marquee-track { animation-play-state: paused; }
#marquee-toggle { position: absolute; top: 50%; right: max(5px, env(safe-area-inset-right)); transform: translateY(-50%); width: 44px; padding: 0; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
#marquee-toggle:focus-visible { outline-color: var(--cream); }
@keyframes ticker { to { transform: translateX(-50%); } }

.deck-shell { padding-block: 39px 59px; }
.deck-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 11px; margin-bottom: 19px; }
.deck-heading h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; }
.mode { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border: var(--line); border-radius: 30px; background: var(--yellow); font-size: .74rem; }
.mode span { width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 50%; background: var(--orange); }
.workspace { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: 20px; }
.panel { min-width: 0; padding: clamp(16px, 2.3vw, 27px); border: 3px solid var(--ink); border-radius: 25px 19px 29px 19px; background: var(--white); box-shadow: var(--shadow); }
.player { background: var(--pink); }
.library { background: var(--cream); }
.cards { background: var(--tint-card); }
.section-head, .player-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h3 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); line-height: 1.05; }
.section-symbol { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: var(--line); border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 1.15rem; transform: rotate(9deg); }
.eyebrow { font-size: .72rem; letter-spacing: .075em; text-transform: uppercase; }
.count { margin-bottom: 12px; min-height: 1em; }
.muted { color: var(--muted); font-size: .9rem; }
.player .muted { color: #30232c; }
.player-summary { justify-content: start; margin-block: 15px 9px; }
.song { min-width: 0; overflow-wrap: anywhere; }
.song h4 { margin: 3px 0; font-family: var(--heading); font-weight: 800; letter-spacing: -.04em; font-size: clamp(1.1rem, 2vw, 1.55rem); line-height: 1.1; }
#track-format:empty { display: none; }
#player-art { width: clamp(75px, 9vw, 103px); flex-shrink: 0; }

.art { position: relative; display: grid; align-items: end; aspect-ratio: 1.18; overflow: hidden; border: var(--line); border-radius: 12px 9px 14px 8px; background: var(--cream); isolation: isolate; }
.art::before, .art::after { content: ""; position: absolute; z-index: -1; }
.art span { display: block; width: 100%; padding: 6px 5px; border-top: var(--line); background: var(--cream); color: var(--ink); font-size: clamp(.57rem, .8vw, .67rem); font-weight: 700; text-transform: uppercase; letter-spacing: .035em; line-height: 1; overflow-wrap: anywhere; }
.art.violet { background: var(--blue); }
.art.violet::before { inset: 9% 17% 23%; border: 2px solid var(--ink); border-radius: 48%; transform: rotate(-26deg); background: repeating-radial-gradient(ellipse at center, var(--pink) 0 5px, var(--ink) 6px 7px, var(--blue) 8px 13px); }
.art.orange { background: var(--orange); }
.art.orange::before { width: 90%; height: 90%; bottom: 2%; right: -15%; border: 2px solid var(--ink); border-radius: 50%; background: repeating-linear-gradient(0deg, var(--yellow) 0 9px, var(--ink) 9px 11px, var(--pink) 11px 19px); transform: rotate(-25deg); }
.art.green { background: var(--green); }
.art.green::before { inset: 8% 17% 21%; border: var(--line); border-radius: 60% 40% 58% 42%; background: var(--pink); transform: rotate(-32deg); box-shadow: 12px 7px 0 var(--yellow); }
.art.green::after { inset: 22% 34% 39%; border: var(--line); border-radius: 50%; background: var(--ink); }
.art.silver { background: repeating-conic-gradient(var(--ink) 0 25%, var(--cream) 0 50%) 0 0 / 24px 24px; }
.art.placeholder { place-items: center; background: var(--cream); }
.art.placeholder::before { width: 54%; aspect-ratio: 1; border: var(--line); border-radius: 50%; background: repeating-radial-gradient(circle, var(--ink) 0 3px, var(--cream) 4px 5px, var(--ink) 6px 10px); }
.art.placeholder span { width: auto; padding: 0; border: 0; background: var(--yellow); border-radius: 50%; font-size: 1rem; line-height: 1; }
.cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.has-cover > .cover-image { opacity: 1; }
.art.has-cover { background: var(--ink); }
.art.has-cover::before, .art.has-cover::after, .art.has-cover span { display: none; }
.record-well.has-cover { position: relative; border-radius: 20px 14px 22px 15px; background: var(--pink); }
.record-well.has-cover .mini-disc { visibility: hidden; animation: none; }
.record-well .cover-image { inset: 8%; width: 84%; height: 84%; border: var(--line); border-radius: 8px; background: var(--ink); }

#seek { display: block; width: 100%; margin: 0; height: 28px; accent-color: var(--blue); cursor: pointer; }
#seek:disabled { cursor: default; }
.times { display: flex; justify-content: space-between; font-size: .77rem; }
.transport { display: flex; justify-content: center; align-items: center; gap: 12px; margin-block: 11px 17px; }
.toggle { width: 55px; height: 55px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 1.05rem; }
.transport-button { min-width: 47px; font-size: .78rem; }
.queue-title { font-size: .93rem; margin-bottom: 6px; }
.queue, .albums, .card-list { list-style: none; padding: 0; margin: 0; }
.queue { display: grid; gap: 8px; }
.track-button {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: var(--line);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--cream);
  color: inherit;
  padding: 7px 8px;
  text-align: left;
  overflow-wrap: anywhere;
}
.track-button[aria-current] { background: var(--yellow); font-weight: 700; }
.track-number, .track-time { font-size: .77rem; }

input:not([type=range]), select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 11px; border: var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
input::placeholder { color: #57514d; }
#search { margin-block: 15px 10px; }
#refresh { background: var(--yellow); }
#refresh:disabled { background: #edebe5; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 115px), 1fr)); gap: 12px; }
.album-button { width: 100%; height: 100%; display: grid; align-content: start; gap: 4px; padding: 6px; border: var(--line); border-radius: 13px; box-shadow: 3px 3px 0 var(--ink); background: var(--white); color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.album-button strong { margin-top: 3px; font-size: .88rem; line-height: 1.12; }
.album-button .muted { font-size: .78rem; }
.cards form { display: grid; gap: 6px; margin-top: 15px; }
.cards label { font-size: .88rem; font-weight: 700; }
.cards label:not(:first-child) { margin-top: 5px; }
.pending-card { margin-top: 12px; padding: 8px 10px; border: var(--line); border-radius: 8px; background: var(--cream); font-size: .87rem; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 7px; }
.card-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: var(--line); padding-top: 9px; margin-top: 12px; }
.card-list li div { display: grid; overflow-wrap: anywhere; min-width: 0; }
.footer :focus-visible { outline-color: var(--cream); }
#hdmi-result { font-size: .88rem; font-weight: 700; }
.notice { background: var(--yellow); border: var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 16px; }

.footer { border-top: 3px solid var(--ink); background: var(--ink); color: var(--cream); }
.footer-content { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 24px; justify-content: space-between; padding-block: 28px 33px; }
.footer-brand { font-size: clamp(1.23rem, 2.7vw, 2rem); line-height: 1; }
.footer-brand span { color: var(--yellow); }
.footer p { margin-top: 7px; font-size: .87rem; }
.footer-top { font-weight: 700; }
#install { background: var(--yellow); box-shadow: 4px 4px 0 var(--pink); }

@media (max-width: 930px) {
  .shell { width: calc(100% - 60px); }
  .intro { gap: 26px; }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 34px); }
  .topbar { grid-template-columns: 1fr auto; column-gap: 9px; row-gap: 5px; border-radius: 24px; padding: 8px 11px 3px; }
  .nav-links { grid-row: 2; grid-column: 1 / -1; justify-content: space-evenly; border-top: var(--line); }
  .nav-action { font-size: .8rem; padding-inline: 10px; }
  .brand strong { font-size: .95rem; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 38px; padding-block: 34px 25px; }
  .intro-description { margin-top: 13px; }
  .hero-actions { margin-top: 16px; }
  .hero-visual { margin: 0 14px 10px 10px; }
  .hero-board { min-height: 198px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .deck-shell { padding-block: 27px 38px; }
}
@media (max-width: 365px) {
  .hero-actions { gap: 9px; }
  .hero-actions .button { padding-inline: 9px; font-size: .8rem; }
  .section-head { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .marquee-track, .mini-disc.playing { animation: none; }
  #marquee-toggle { display: none; }
}
