/* ─────────────────────────────────────────────────────────────
   ETH Gujarat · Garba Juke Box — chrome around the canvas.

   Brand: Afacad for type, the Maroon / Apricot / Linen / White / Black
   palette, rounded pill shapes, and the dotted bead as the one ornament.

   Colours are custom properties that main.js rewrites from the current
   genre's `ui` palette (js/genres.js). Every text colour below is paired with
   the background it sits on exactly as the brand guidelines allow:
     --ink on --bg · --on-accent on --accent · --panel-ink on --panel ·
     --panel-on-accent on --panel-accent
   ───────────────────────────────────────────────────────────── */

/* The brand's secondary typeface, Adhipurush, is for one-word Gujarati
   headings. It is not a web font we can load from a CDN: put your licensed
   copy at fonts/Adhipurush.woff2 and uncomment this block. Until then the
   Gujarati labels fall back to Anek Gujarati.

@font-face {
  font-family: 'Adhipurush';
  src: url('../fonts/Adhipurush.woff2') format('woff2');
  font-display: swap;
}
*/

:root {
  --maroon: #7f1122;
  --apricot: #ffba77;
  --linen: #fff0e6;
  --white: #ffffff;
  --black: #000000;

  --bg: var(--maroon);
  --ink: var(--linen);
  --muted: rgba(255, 240, 230, 0.74);
  --line: rgba(255, 240, 230, 0.26);
  --accent: var(--apricot);
  --on-accent: var(--maroon);
  --panel: var(--linen);
  --panel-ink: var(--maroon);
  --panel-muted: rgba(127, 17, 34, 0.7);
  --panel-line: rgba(127, 17, 34, 0.2);
  --panel-accent: var(--maroon);
  --panel-on-accent: var(--linen);
  --logo-ink: var(--white);
  --plate: transparent;

  --frame: 30px; /* matches the canvas frame: inset + band */
  --pad-x: 26px;
  --pad-y: 18px;

  --font-ui: 'Afacad', 'Anek Gujarati', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Gujarati one-word headings: the brand's Adhipurush when it is installed
     (see README), otherwise Anek Gujarati. */
  --font-gu: 'Adhipurush', 'Anek Gujarati', 'Noto Sans Gujarati', 'Shruti', sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

:root[data-dark='false'] {
  color-scheme: light;
}

/* Registered so the chrome cross-fades between genres in step with the cloth
   spreading across the canvas, instead of flipping in one frame. */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #7f1122; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #fff0e6; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: rgba(255, 240, 230, 0.74); }
@property --line { syntax: '<color>'; inherits: true; initial-value: rgba(255, 240, 230, 0.26); }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #ffba77; }
@property --on-accent { syntax: '<color>'; inherits: true; initial-value: #7f1122; }
@property --panel { syntax: '<color>'; inherits: true; initial-value: #fff0e6; }
@property --panel-ink { syntax: '<color>'; inherits: true; initial-value: #7f1122; }
@property --panel-muted { syntax: '<color>'; inherits: true; initial-value: rgba(127, 17, 34, 0.7); }
@property --panel-line { syntax: '<color>'; inherits: true; initial-value: rgba(127, 17, 34, 0.2); }
@property --panel-accent { syntax: '<color>'; inherits: true; initial-value: #7f1122; }
@property --panel-on-accent { syntax: '<color>'; inherits: true; initial-value: #fff0e6; }
@property --logo-ink { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --plate { syntax: '<color>'; inherits: true; initial-value: transparent; }

:root {
  transition: --bg 0.8s var(--ease), --ink 0.8s var(--ease) 0.15s, --muted 0.8s var(--ease) 0.15s,
    --line 0.8s var(--ease), --accent 0.8s var(--ease), --on-accent 0.8s var(--ease),
    --panel 0.8s var(--ease), --panel-ink 0.8s var(--ease), --panel-muted 0.8s var(--ease),
    --panel-line 0.8s var(--ease), --panel-accent 0.8s var(--ease), --panel-on-accent 0.8s var(--ease),
    --logo-ink 0.8s var(--ease) 0.15s, --plate 0.8s var(--ease);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

[lang='gu'] {
  font-family: var(--font-gu);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus-visible {
  position: fixed !important;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 18px;
  clip: auto;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
}

/* ───────────── canvas ───────────── */

.floor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ───────────── layout ───────────── */

.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  /* Safe-area insets keep the chrome clear of notches and home bars when the
     page is installed to a home screen and drawn edge to edge. */
  padding: calc(var(--frame) + var(--pad-y) + env(safe-area-inset-top, 0px))
    calc(var(--frame) + var(--pad-x) + env(safe-area-inset-right, 0px))
    calc(var(--frame) + var(--pad-y) + env(safe-area-inset-bottom, 0px))
    calc(var(--frame) + var(--pad-x) + env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.app a,
.app button,
.genre-list {
  pointer-events: auto;
}

/* ───────────── masthead ───────────── */

.masthead {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: start;
  gap: 16px;
}

/* The primary lockup. Clear space around it is at least the gap between the
   crystal and the wordmark, as the guidelines ask. */
.brand {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 12px 9px;
  margin: -8px -12px 0;
  border-radius: 16px;
  background: var(--plate);
  color: var(--ink);
  text-decoration: none;
}

.logo {
  display: block;
  height: 54px;
  width: auto;
}

.logo-saffron {
  fill: var(--apricot);
}

.logo-ink {
  fill: var(--logo-ink);
}

.brand-product {
  font: 600 11px/1 var(--font-ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  padding-left: 2px;
}

/* On the maroon plate the product line follows the plate, not the ground. */
[data-genre='sanedo'] .brand-product {
  color: var(--linen);
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.genres {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
}

.genre-list {
  list-style: none;
  margin: 0;
  padding: 6px 4px 8px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.genre-list::-webkit-scrollbar {
  display: none;
}

.genre-list li {
  scroll-snap-align: center;
  flex: none;
}

/* A genre chip: a swatch of that genre's cloth and its Gujarati name. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 1px 15px 0 9px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 32%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--ink);
  font: 600 15.5px/1 var(--font-gu);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.chip .sw {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 50%, transparent);
}

.chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.chip[aria-current='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5);
}

.chip[aria-current='true'] .sw {
  box-shadow: 0 0 0 1.5px var(--on-accent);
}

.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.status {
  justify-self: end;
  text-align: right;
  padding-top: 2px;
}

.clock {
  font: 600 22px/1.05 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.crowd {
  margin-top: 6px;
  font: 600 11px/1 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.crowd span {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ───────────── stage & caption ───────────── */

.stage {
  position: relative;
  min-height: 0;
}

.caption {
  position: absolute;
  left: 50%;
  bottom: -2px;
  max-width: min(92%, 460px);
  padding: 10px 20px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 15px/1.3 var(--font-ui);
  text-align: center;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.55);
  outline: 1.5px dotted color-mix(in srgb, var(--on-accent) 40%, transparent);
  outline-offset: -5px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.caption.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.caption [lang='gu'] {
  font-weight: 700;
}

/* ───────────── the join hint ───────────── */

.hint {
  --notch: 50%;
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  width: max-content;
  max-width: 250px;
  padding: 10px 15px 9px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 14px/1.35 var(--font-ui);
  text-align: center;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.hint::before {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--notch);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}

.hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hint b {
  font-weight: 700;
}

/* ───────────── deck (bottom row) ───────────── */

.deck {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 18px;
}

.wa,
.yt-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px;
  margin-bottom: 8px;
  border-radius: 12px;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.wa {
  justify-self: start;
}

.yt-credit {
  justify-self: end;
}

.wa:hover,
.yt-credit:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.wa:focus-visible,
.yt-credit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wa-icon {
  width: 38px;
  height: 38px;
  flex: none;
}

.wa-bubble {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.wa-phone {
  fill: currentColor;
}

.wa-label {
  font: 600 11.5px/1.45 var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.yt-by {
  font: 500 14px/1 var(--font-ui);
}

.yt-logo {
  height: 26px;
  width: auto;
}

.yt-word {
  font: 700 19px/1 'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.6px;
  fill: var(--ink);
}

/* ───────────── the dock ───────────── */

.dock {
  width: min(480px, 100%);
  padding: 13px 15px 14px;
  border-radius: 22px;
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--panel-line);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(0, 0, 0, 0.05);
  outline: 1.5px dotted var(--panel-line);
  outline-offset: -7px;
  pointer-events: auto;
}

.now {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.cover {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-line);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--panel-line);
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.cover img.ready {
  opacity: 1;
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: center / 22px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='M10 9.5v5l4.3-2.5z' fill='white'/%3E%3C/svg%3E"),
    rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.cover:hover::after,
.cover:focus-visible::after {
  opacity: 1;
}

.cover:hover img {
  transform: scale(1.06);
}

.cover:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

.now-text {
  min-width: 0;
}

.title {
  font: 600 17px/1.25 var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title a {
  color: inherit;
  text-decoration: none;
}

.title a[href]:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.artist {
  margin-top: 2px;
  font-size: 14px;
  color: var(--panel-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time {
  align-self: start;
  padding-top: 2px;
  font: 500 14px/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--panel-muted);
  white-space: nowrap;
}

.time .sep {
  margin: 0 4px;
  opacity: 0.6;
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* Outlined pill: the border takes the accent, the words stay in panel ink so
   they keep a guideline pairing on every panel. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 15px;
  border: 1.5px solid var(--panel-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--panel-ink);
  font: 600 16px/1 var(--font-gu);
  cursor: pointer;
  outline: 1.5px dotted color-mix(in srgb, var(--panel-accent) 45%, transparent);
  outline-offset: -5px;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  background: color-mix(in srgb, var(--panel-accent) 14%, transparent);
}

.btn:active {
  transform: translateY(1px) scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

.btn small {
  font: 600 10px/1 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
  padding-top: 2px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn svg.line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn svg .fill {
  fill: currentColor;
  stroke: none;
}

.btn-icon {
  width: 42px;
  padding: 0;
}

.btn-play {
  width: 50px;
  height: 50px;
  margin: -4px 0;
  padding: 0;
  border-radius: 50%;
  background: var(--panel-accent);
  color: var(--panel-on-accent);
  outline-color: color-mix(in srgb, var(--panel-on-accent) 50%, transparent);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.5);
}

.btn-play:hover {
  background: color-mix(in srgb, var(--panel-accent) 88%, var(--panel-ink));
}

.btn-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-play .i-pause,
.is-playing .btn-play .i-play,
.btn .i-contract,
[data-fs='on'] .btn .i-expand {
  display: none;
}

.is-playing .btn-play .i-pause,
[data-fs='on'] .btn .i-contract {
  display: block;
}

.is-buffering .btn-play {
  animation: breathe 1.1s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--panel-accent) 25%, transparent);
  }
}

/* Beat dots are beads. */
.beat {
  display: flex;
  gap: 7px;
  margin-left: auto;
  padding-right: 4px;
}

.beat i {
  width: 7px;
  height: 7px;
  background: var(--panel-line);
  transform: rotate(45deg);
  transition: background-color 0.12s, transform 0.12s;
}

.beat i.on {
  background: var(--panel-accent);
  transform: rotate(45deg) scale(1.5);
}

/* ───────────── video card (optional) ───────────── */

.yt-host {
  position: fixed;
  z-index: 0;
  left: -20px;
  top: -20px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.yt-host iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-close {
  display: none;
}

.video-peek .yt-host {
  z-index: 6;
  left: auto;
  top: auto;
  right: calc(var(--frame) + var(--pad-x));
  bottom: calc(var(--frame) + var(--pad-y) + 150px);
  width: min(340px, 42vw);
  height: auto;
  aspect-ratio: 16 / 9;
  opacity: 1;
  pointer-events: auto;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
  animation: rise 0.35s var(--ease);
}

.video-peek .yt-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ───────────── song sheet ───────────── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 2, 6, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade 0.25s var(--ease);
}

.sheet[hidden] {
  display: none;
}

.sheet-panel {
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: min(78vh, 680px);
  border-radius: 24px;
  background: var(--panel);
  color: var(--panel-ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--panel-line);
  outline: 1.5px dotted var(--panel-line);
  outline-offset: -8px;
  overflow: hidden;
  animation: rise 0.3s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 4px 22px;
}

.sheet-head h2 {
  margin: 0;
  font: 700 28px/1.1 var(--font-gu);
  color: var(--panel-ink);
}

.sheet-head small {
  margin-left: 8px;
  font: 600 11.5px/1 var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--panel-muted);
  vertical-align: middle;
}

.sheet-note {
  padding: 4px 22px 12px;
  font-size: 14px;
  color: var(--panel-muted);
}

.sheet-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--panel-line);
}

.sheet-list li:first-child {
  border-top: 0;
}

.pick {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 1px 8px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.pick:hover {
  background: color-mix(in srgb, var(--panel-accent) 10%, transparent);
}

.pick:focus-visible,
.src:focus-visible {
  outline: 2px solid var(--panel-accent);
  outline-offset: -2px;
}

.pick .n {
  grid-row: span 2;
  font: 600 12px/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--panel-muted);
  text-align: center;
}

.pick .t {
  font: 600 16px/1.25 var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick .a {
  font-size: 13.5px;
  color: var(--panel-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick[aria-current='true'] {
  background: color-mix(in srgb, var(--panel-accent) 12%, transparent);
}

.pick[aria-current='true'] .t,
.pick[aria-current='true'] .n {
  color: var(--panel-ink);
}

.pick[aria-current='true'] .a {
  color: var(--panel-ink);
  font-weight: 600;
}

.src {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--panel-muted);
}

.src:hover {
  color: var(--panel-ink);
  background: color-mix(in srgb, var(--panel-accent) 12%, transparent);
}

.src svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────────── states ───────────── */

.app > * {
  transition: opacity 0.6s var(--ease);
}

.loading .app > .masthead,
.loading .app > .deck {
  opacity: 0.001;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 30;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--maroon);
  color: var(--linen);
  text-align: center;
}

/* ───────────── smaller screens ───────────── */

@media (max-width: 1100px) {
  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .genres {
    justify-self: stretch;
  }

  .genre-list {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --frame: 19px;
    --pad-x: 12px;
    --pad-y: 12px;
  }

  body {
    font-size: 14px;
  }

  .app {
    gap: 8px;
  }

  .masthead {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand status'
      'genres genres';
    row-gap: 10px;
  }

  .brand {
    grid-area: brand;
  }

  .logo {
    height: 44px;
  }

  .status {
    grid-area: status;
  }

  .genres {
    grid-area: genres;
    margin: 0 -8px;
  }

  .genre-list {
    padding-left: 8px;
    padding-right: 8px;
  }

  .clock {
    font-size: 19px;
  }

  .deck {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'wa yt'
      'dock dock';
    gap: 4px 12px;
  }

  .wa {
    grid-area: wa;
    margin-bottom: 0;
  }

  .yt-credit {
    grid-area: yt;
    margin-bottom: 0;
  }

  .dock {
    grid-area: dock;
    width: 100%;
  }

  .wa-icon {
    width: 32px;
    height: 32px;
  }

  .wa-label {
    font-size: 10.5px;
  }

  .yt-logo {
    height: 22px;
  }

  .caption {
    font-size: 14px;
    bottom: -4px;
  }

  .video-peek .yt-host {
    right: 50%;
    transform: translateX(50%);
    top: calc(var(--frame) + 120px);
    bottom: auto;
    width: min(360px, 86vw);
    animation: none;
  }
}

@media (max-width: 480px) {
  .controls {
    gap: 7px;
  }

  #next,
  #songs {
    flex: 1;
  }

  .beat {
    display: none;
  }
}

@media (max-width: 420px) {
  .btn {
    padding: 0 12px;
  }

  .btn small {
    display: none;
  }

  .yt-by {
    display: none;
  }
}

/* Short, wide windows: tighten everything so the circle keeps its size. */
@media (max-height: 720px) and (min-width: 761px) {
  :root {
    --pad-y: 10px;
  }

  .logo {
    height: 46px;
  }

  .dock {
    padding: 10px 13px 11px;
  }

  .cover {
    width: 48px;
    height: 48px;
  }

  .controls {
    margin-top: 9px;
  }

  .btn {
    height: 38px;
  }

  .btn-icon {
    width: 38px;
  }

  .btn-play {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
