/* ============================================================
   Radio Eemland - radiospeiler
   Huisstijl: magenta #c22266 op bijna-zwart
   ============================================================ */

:root {
  --brand: #c22266;
  --brand-bright: #ff4f96;
  --brand-deep: #7d0f42;
  --brand-soft: rgba(194, 34, 102, 0.16);

  --bg: #07050a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f7eef3;
  --text-dim: #c6b4c0;
  --text-mute: #93808e;

  --ok: #4ad991;
  --warn: #f2b544;
  --err: #ff6b6b;

  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;

  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --shadow-brand: 0 18px 50px -14px rgba(194, 34, 102, 0.65);

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(90rem 45rem at 12% -10%, rgba(194, 34, 102, 0.28), transparent 60%),
    radial-gradient(70rem 40rem at 105% 8%, rgba(120, 24, 160, 0.24), transparent 62%),
    radial-gradient(60rem 50rem at 50% 120%, rgba(194, 34, 102, 0.14), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtiele korrel zodat het grote verloop niet zo vlak oogt. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

:where(a) { color: var(--brand-bright); text-decoration-color: rgba(255, 79, 150, 0.4); }
:where(a):hover { text-decoration-color: currentColor; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 12px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* -- Layout ------------------------------------------------- */

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 1.6rem));
  margin-inline: auto;
  padding-block: clamp(1rem, 3vw, 2.2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.2vw, 1.75rem);
  min-height: 100dvh;
}

.layout {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
  align-items: start;
  flex: 1;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.side {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.25rem);
  align-content: start;
}

/* -- Header ------------------------------------------------ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  line-height: 1.25;
}

.brand__logo {
  width: clamp(150px, 22vw, 208px);
  height: auto;
  filter: drop-shadow(0 6px 22px rgba(194, 34, 102, 0.45));
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}
.brand:hover .brand__logo {
  filter: drop-shadow(0 8px 30px rgba(255, 79, 150, 0.6));
  transform: translateY(-1px);
}

.brand__tagline {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-left: 0.15rem;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0) scale(0.96); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }

.icon-btn--flat {
  border-color: transparent;
  background: transparent;
  width: 2.2rem;
  height: 2.2rem;
}
.icon-btn--flat:hover { background: var(--surface); border-color: var(--line); }

/* LIVE-pill */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.6rem;
  padding-inline: 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.live-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--text-mute);
  transition: background 0.3s var(--ease);
}

.live-pill[data-live="true"] {
  color: #ffd9e7;
  border-color: rgba(255, 79, 150, 0.45);
  background: rgba(194, 34, 102, 0.24);
}
.live-pill[data-live="true"] .live-pill__dot {
  background: var(--brand-bright);
  box-shadow: 0 0 0 0 rgba(255, 79, 150, 0.7);
  animation: pulse 2s var(--ease) infinite;
}

.live-pill[data-live="false"] .live-pill__dot { background: var(--ok); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 79, 150, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(255, 79, 150, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 79, 150, 0); }
}

/* -- Speler-kaart ------------------------------------------- */

.player {
  position: relative;
  padding: clamp(1rem, 2.4vw, 1.85rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(12, 7, 14, 0.72);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(120%);
  display: grid;
  gap: clamp(0.9rem, 1.8vw, 1.35rem);
  overflow: hidden;
}

.player::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 79, 150, 0.6), transparent);
  opacity: 0.7;
}

/* Albumhoes */
.art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2a1020, #0d0710 70%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 60px rgba(194, 34, 102, 0.18), var(--shadow-brand);
  isolation: isolate;
}

.art__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.art__img.is-visible { opacity: 1; transform: scale(1); }

.art__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.5s var(--ease);
}
.art__fallback[hidden] { display: none; }

.art__wave {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  fill: none;
  stroke: rgba(255, 79, 150, 0.32);
  stroke-width: 0.5;
}
.art__wave circle:nth-child(1) {
  stroke-dasharray: 4 6;
  animation: spin 44s linear infinite;
  transform-origin: 50% 50%;
}
.art__wave circle:nth-child(2) { stroke: rgba(255, 79, 150, 0.2); }
.art__wave circle:nth-child(3) {
  stroke: rgba(255, 79, 150, 0.45);
  fill: rgba(194, 34, 102, 0.1);
}

@keyframes spin { to { transform: rotate(360deg); } }

.art__logo {
  position: relative;
  width: 62%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}

.art__glow {
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 70%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 79, 150, 0.28), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
body.is-playing .art__glow { opacity: 1; }

/* Equalizer-balkjes */
.eq {
  position: absolute;
  left: 50%;
  bottom: 0.8rem;
  translate: -50% 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(7, 5, 10, 0.62);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
body.is-playing .eq { opacity: 1; }

.eq span {
  display: block;
  width: 3px;
  height: 35%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  animation: bounce 1s var(--ease) infinite alternate;
  transform-origin: bottom;
}
.eq span:nth-child(1) { animation-duration: 0.78s; animation-delay: -0.2s; }
.eq span:nth-child(2) { animation-duration: 1.06s; animation-delay: -0.55s; }
.eq span:nth-child(3) { animation-duration: 0.68s; animation-delay: -0.1s; }
.eq span:nth-child(4) { animation-duration: 0.94s; animation-delay: -0.7s; }
.eq span:nth-child(5) { animation-duration: 1.16s; animation-delay: -0.35s; }

@keyframes bounce {
  from { height: 22%; }
  to { height: 100%; }
}

/* Track-info */
.track { text-align: center; display: grid; gap: 0.28rem; }

.track__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-bright);
  font-weight: 700;
  opacity: 0.9;
}

.track__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-wrap: balance;
  min-height: 1.15em;
}

.track__artist {
  margin: 0;
  font-size: clamp(0.95rem, 2.1vw, 1.1rem);
  color: var(--text-dim);
  font-weight: 500;
  text-wrap: balance;
}

.track__meta {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  min-height: 1em;
}

/* Bediening */
.controls {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  flex-wrap: wrap;
  justify-content: center;
}

.play {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(4.2rem, 12vw, 4.9rem);
  height: clamp(4.2rem, 12vw, 4.9rem);
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(150deg, var(--brand-bright), var(--brand) 55%, var(--brand-deep));
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.18s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.2s var(--ease);
  flex: 0 0 auto;
}
.play:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 24px 60px -16px rgba(194, 34, 102, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.play:active { transform: translateY(0) scale(0.97); }

.play__icon { width: 42%; height: 42%; }
.play__icon--play { margin-left: 6%; }
.play__icon--pause { display: none; }

body.is-playing .play__icon--play { display: none; }
body.is-playing .play__icon--pause { display: block; }

.play__spinner {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.85s linear infinite;
}
.play[data-state="loading"] .play__icon { opacity: 0; }
.play[data-state="loading"] .play__spinner { display: block; }

/* Volume */
.volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 190px;
  max-width: 300px;
  min-width: 170px;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.vicon { width: 1.2rem; height: 1.2rem; }
.vicon--off { display: none; }
body.is-muted .vicon--on { display: none; }
body.is-muted .vicon--off { display: block; }

.volume__range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 22px;
  background: transparent;
  cursor: pointer;
  --pct: 80%;
}
.volume__range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-bright) var(--pct), rgba(255, 255, 255, 0.12) var(--pct));
}
.volume__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s var(--ease);
}
.volume__range:hover::-webkit-slider-thumb { transform: scale(1.14); }
.volume__range::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.volume__range::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
}
.volume__range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.volume__value {
  font-size: 0.72rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  min-width: 2.1ch;
  text-align: right;
}

/* Kwaliteit */
.quality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.quality__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.55rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}
.quality__btn:hover { color: var(--text-dim); background: rgba(255, 255, 255, 0.04); }
.quality__btn[aria-checked="true"] {
  color: #fff;
  border-color: rgba(255, 79, 150, 0.4);
  background: linear-gradient(180deg, rgba(194, 34, 102, 0.32), rgba(194, 34, 102, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.quality__name { font-size: 0.86rem; font-weight: 700; letter-spacing: 0.06em; }
.quality__bitrate { font-size: 0.68rem; opacity: 0.72; font-variant-numeric: tabular-nums; }
.quality__btn[aria-checked="true"] .quality__bitrate { opacity: 0.9; }

.quality__btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}
.quality__btn:disabled:hover {
  background: transparent;
  color: var(--text-mute);
}

/* Statusregel */
.status {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-mute);
  min-height: 1.2em;
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease);
}
.status[data-kind="live"] { color: var(--ok); }
.status[data-kind="busy"] { color: var(--warn); }
.status[data-kind="error"] { color: var(--err); }

/* -- Panelen ------------------------------------------------ */

.panel {
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.032);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px -28px rgba(0, 0, 0, 0.9);
}

.panel__title {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}

.panel__hint {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.panel__hint.is-active { color: var(--brand-bright); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.chip:hover { background: var(--surface-strong); color: var(--text); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(194, 34, 102, 0.55), rgba(194, 34, 102, 0.28));
  border-color: rgba(255, 79, 150, 0.5);
  color: #fff;
}
.chip--ghost { color: var(--text-mute); }

/* Recent gedraaid */
.history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.history__item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.35rem;
  border-radius: 10px;
  transition: background 0.2s var(--ease);
}
.history__item + .history__item { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.history__item:hover { background: rgba(255, 255, 255, 0.035); }

.history__time {
  font-size: 0.72rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.history__body { min-width: 0; }

.history__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history__artist {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history__empty {
  font-size: 0.8rem;
  color: var(--text-mute);
  padding: 0.3rem 0;
}

/* Zenderfeiten */
.station-facts {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.station-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  padding-block: 0.28rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.station-facts > div:last-child { border-bottom: 0; }
.station-facts dt { color: var(--text-mute); }
.station-facts dd { margin: 0; font-weight: 600; text-align: right; }

.panel__links {
  margin: 0.85rem 0 0;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

/* -- Footer ------------------------------------------------- */

.app-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-mute);
  padding-top: 0.5rem;
  display: grid;
  gap: 0.3rem;
}
.app-footer p { margin: 0; }
.app-footer__hint { opacity: 0.7; font-size: 0.72rem; }
.app-footer a { color: var(--text-dim); }

@media (hover: none) {
  .app-footer__hint { display: none; }
}

/* -- Toast -------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  translate: -50% 1.2rem;
  z-index: 60;
  max-width: min(90vw, 30rem);
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 12, 22, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease), translate 0.28s var(--ease);
  text-align: center;
}
.toast.is-visible { opacity: 1; translate: -50% 0; }

/* -- Chatvenster -------------------------------------------- */

.chat {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(14, 8, 16, 0.96);
  backdrop-filter: blur(22px) saturate(120%);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: chat-in 0.24s var(--ease);
}
.chat[hidden] { display: none; }

@keyframes chat-in {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

.chat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(194, 34, 102, 0.16), transparent);
}

.chat__who { min-width: 0; }

.chat__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat__sub {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: var(--text-mute);
}

.chat__log {
  flex: 1;
  min-height: 8rem;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
}

.chat__msg {
  max-width: 84%;
  padding: 0.5rem 0.7rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat__msg--luisteraar {
  align-self: flex-end;
  background: linear-gradient(160deg, var(--brand), var(--brand-deep));
  color: #fff;
  border-bottom-right-radius: 5px;
}

.chat__msg--dj {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

.chat__msg-name {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

.chat__msg-time {
  display: block;
  font-size: 0.62rem;
  opacity: 0.5;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.chat__empty {
  margin: auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-mute);
  max-width: 24ch;
  line-height: 1.5;
}

.chat__notice {
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.76rem;
  color: var(--warn);
  border-top: 1px solid var(--line);
  background: rgba(242, 181, 68, 0.08);
}

.chat__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* voorkomt inzoomen op iOS */
}
.chat__input::placeholder { color: var(--text-mute); }
.chat__input:focus {
  outline: none;
  border-color: rgba(255, 79, 150, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.chat__send {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(150deg, var(--brand-bright), var(--brand));
  box-shadow: 0 6px 18px -6px rgba(194, 34, 102, 0.8);
  transition: transform 0.15s var(--ease), filter 0.2s var(--ease);
}
.chat__send svg { width: 1.05rem; height: 1.05rem; margin-left: 2px; }
.chat__send:hover { filter: brightness(1.08); transform: translateY(-1px); }
.chat__send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.chat__meta {
  margin: 0;
  padding: 0 0.9rem 0.7rem;
  font-size: 0.68rem;
  color: var(--text-mute);
  text-align: center;
}

@media (max-width: 560px) {
  .chat {
    left: 0.6rem;
    right: 0.6rem;
    width: auto;
    max-height: 78vh;
  }
}

/* -- Diversen ----------------------------------------------- */

.noscript {
  position: fixed;
  inset: auto 0 0;
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: var(--brand-deep);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .eq span { height: 60%; }
}

@media (max-width: 480px) {
  .app { width: calc(100% - 1.1rem); }
  .controls { gap: 0.75rem; }
  .volume { max-width: none; }
  .art { max-width: 340px; }
}
