/* dabplus.live — vintage radio cabinet */

html, body {
  background: var(--wood-dark);
  color: var(--ink);
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  font-family: var(--font-serif);
  background:
    radial-gradient(circle at 20% 0%, rgba(232, 154, 60, 0.05), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(184, 49, 42, 0.08), transparent 50%),
    repeating-linear-gradient(90deg, transparent 0, transparent 3px, rgba(0, 0, 0, 0.04) 3px, rgba(0, 0, 0, 0.04) 4px),
    linear-gradient(180deg, var(--wood-dark) 0%, #1a0f08 100%);
  padding: 24px;
  padding-bottom: calc(var(--player-h) + 36px);
  zoom: 0.95;
}
@media (max-width: 720px) {
  body { padding: 12px; padding-bottom: calc(var(--player-h-mobile) + 24px); }
}

/* ─── Cabinet wrapper ─────────────────────────────────────────────────── */

.cabinet {
  max-width: var(--container);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 2px var(--brass),
    inset 0 0 0 4px var(--wood),
    inset 0 0 60px var(--cream-shadow),
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.3);
  padding: 32px 40px 40px;
  position: relative;
}
.cabinet::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(184, 134, 42, 0.4);
  border-radius: 4px;
  pointer-events: none;
}
.cabinet::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(74, 44, 26, 0.04) 0, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(74, 44, 26, 0.03) 0, transparent 1.5px),
    radial-gradient(circle at 50% 50%, rgba(74, 44, 26, 0.02) 0, transparent 1px);
  background-size: 40px 40px, 30px 30px, 20px 20px;
  pointer-events: none;
  border-radius: 8px;
  mix-blend-mode: multiply;
  opacity: 0.5;
}
@media (max-width: 720px) {
  .cabinet { padding: 18px 18px 24px; }
}

/* ensure interactive content sits above the texture pseudo-elements */
.site-header, main, .site-footer {
  position: relative;
}
.site-header { z-index: 50; }
main { z-index: 2; }
.site-footer { z-index: 2; }

/* ─── Top bar / header ────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 2px double var(--wood-mid);
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 0.02em;
  color: var(--red);
  text-shadow:
    2px 2px 0 var(--paper-dark),
    3px 3px 0 rgba(74, 44, 26, 0.3);
  line-height: 1;
}
.wordmark .dot { color: var(--amber); }
@media (max-width: 720px) { .wordmark { font-size: 28px; } }

.header-right {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}

/* Live listener count — subtle green pulse + number */
.listener-count {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--wood);
  padding: 4px 8px;
  border-radius: 3px;
  cursor: default;
  user-select: none;
}
.listener-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wood-mid, #8a6c3a);
  box-shadow: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.listener-count[data-active="true"] .listener-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
  animation: listener-pulse 1.8s ease-in-out infinite;
}
.listener-count[data-active="false"] {
  opacity: 0.55;
}
@keyframes listener-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.listener-text {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.listener-count[hidden] { display: none; }

/* Vintage country selector — toggle + dropdown menu */
.selector-hint {
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wood-mid);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.lang-selector { position: relative; }
.selector-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--wood-mid);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms var(--ease), border-color 120ms var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.selector-toggle:hover { background: var(--paper-warm); border-color: var(--wood); }
.selector-toggle[aria-expanded="true"] {
  background: var(--paper-warm); border-color: var(--wood);
}
.lang-selector-code { text-transform: uppercase; }
.lang-selector-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 180px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--paper);
  border: 2px solid var(--wood);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px var(--brass),
    0 12px 32px rgba(0, 0, 0, 0.4);
}
.lang-selector-menu li { margin: 0; padding: 0; }
.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 13px;
  transition: background 120ms var(--ease);
}
.lang-menu-item:hover { background: var(--paper-warm); }
.lang-menu-item.is-current { background: var(--wood-mid); color: var(--paper); }
.lang-menu-code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--wood);
  min-width: 24px;
}
.lang-menu-item.is-current .lang-menu-code { color: var(--paper-warm); }
.lang-menu-name { white-space: nowrap; }

.country-selector { position: relative; }
.country-selector-code {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  min-width: 1.6em;
  text-align: center;
}
.country-selector-arrow {
  font-size: 14px;
  color: var(--wood-mid);
  transition: transform 180ms var(--ease);
}
.selector-toggle[aria-expanded="true"] .country-selector-arrow {
  transform: rotate(180deg);
}

.country-selector-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 220px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--paper);
  border: 2px solid var(--wood);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 1px var(--brass),
    0 12px 32px rgba(0, 0, 0, 0.4);
}
.country-selector-menu li { margin: 0; padding: 0; }
.country-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 14px;
  transition: background 120ms var(--ease);
}
.country-menu-item:hover { background: var(--paper-warm); }
.country-menu-item.is-current {
  background: var(--wood-mid);
  color: var(--paper);
}
.country-menu-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--wood);
  min-width: 28px;
  text-align: left;
}
.country-menu-item.is-current .country-menu-code { color: var(--paper-warm); }
.country-menu-flag {
  width: 22px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  object-fit: cover;
}
.country-selector-flag {
  width: 22px;
  height: 16px;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
}
.country-selector-code:has(.country-selector-flag) {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}
.country-menu-name { white-space: nowrap; }

/* Landing-row at top of dropdown, separated by divider */
.country-menu-item-landing .country-menu-code {
  color: var(--brass);
  font-size: 18px;
  line-height: 1;
}
.country-menu-item-landing.is-current .country-menu-code {
  color: var(--paper-warm);
}
.country-menu-divider {
  height: 1px;
  background: var(--wood-mid);
  margin: 4px 8px;
  list-style: none;
  opacity: 0.4;
}
.fav-btn {
  margin-left: 4px; padding: 6px 14px;
  border: 1px solid var(--brass);
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  color: var(--wood-dark);
  font-family: var(--font-mono);
  font-size: 20px;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 rgba(0, 0, 0, 0.2);
  letter-spacing: 0.05em;
}
.fav-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── Tuner dial ──────────────────────────────────────────────────────── */

.tuner-dial {
  background: linear-gradient(180deg, #1a0f08 0%, var(--wood-dark) 30%, #1a0f08 100%);
  border-radius: 6px;
  padding: 18px 24px 14px;
  margin-bottom: 28px;
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.7),
    inset 0 -2px 4px rgba(232, 154, 60, 0.1),
    0 2px 0 var(--paper-dark);
  position: relative;
  overflow: hidden;
}
.tuner-dial::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}
.dial-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--amber);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(255, 184, 77, 0.6);
}
.dial-track {
  position: relative;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(232, 154, 60, 0.05) 50%, transparent 100%);
}
.dial-line {
  position: absolute; left: 0; right: 0; top: 40px;
  height: 1px; background: var(--amber);
  box-shadow: 0 0 6px rgba(255, 184, 77, 0.4);
}
.tick {
  position: absolute; top: 32px;
  width: 1px; height: 16px;
  background: var(--amber);
  opacity: 0.55;
}
.tick.major {
  height: 24px; top: 24px;
  opacity: 0.9;
  background: var(--brass-light);
}
.freq-label {
  position: absolute; top: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--amber-glow);
  transform: translateX(-50%);
  text-shadow: 0 0 4px rgba(255, 184, 77, 0.5);
}
.station-mark {
  position: absolute; bottom: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono-tight);
  font-weight: 700;
  font-size: 10px;
  color: var(--paper);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.station-mark::before {
  content: '';
  display: block;
  width: 1px; height: 8px;
  background: var(--paper);
  margin: 0 auto 2px;
}
.station-mark.is-empty {
  opacity: 0.25;
  font-style: italic;
}
.station-mark.is-empty::before {
  opacity: 0.4;
}
.needle {
  position: absolute; top: -4px; bottom: -4px;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--red-glow) 20%, var(--red-glow) 80%, transparent);
  box-shadow: 0 0 12px var(--red-glow), 0 0 24px rgba(232, 72, 56, 0.5);
  z-index: 3;
  transition: left 600ms cubic-bezier(0.4, 1.4, 0.5, 1), opacity 300ms var(--ease);
}
.needle.is-off {
  opacity: 0.15;
  filter: grayscale(0.8);
}
.needle::before {
  content: '';
  position: absolute; top: -6px; left: -5px;
  width: 13px; height: 13px;
  background: radial-gradient(circle, var(--red-glow), var(--red));
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red-glow);
}
@media (max-width: 720px) {
  .tuner-dial { padding: 14px 16px 12px; }
  .freq-label, .dial-label { font-size: 14px; }
  .dial-label { letter-spacing: 0.1em; }
  .station-mark { font-size: 9px; }
}

/* ─── Now-playing strip ───────────────────────────────────────────────── */

.now-playing {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(74, 44, 26, 0.25);
  border-left: 6px solid var(--red);
  padding: 18px 22px;
  border-radius: 4px;
  margin-bottom: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px rgba(74, 44, 26, 0.1);
}
.now-playing[hidden] { display: none; }
.np-art {
  width: 120px; height: 120px;
  background: linear-gradient(135deg, var(--red-glow) 0%, var(--red) 100%);
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 0 0 1px var(--brass), 0 4px 0 var(--paper-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  color: #fff; font-size: 32px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.np-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: scale-down;
  background: var(--wood-dark);
  z-index: 2;
}
.np-art img.is-hidden { display: none; }
.np-art-mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.np-meta { min-width: 0; }
.np-kicker {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--red);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.live-dot {
  width: 10px; height: 10px;
  background: var(--red);
  border-radius: 50%;
  animation: livepulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--red-glow);
}
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
.np-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-show {
  font-size: 16px;
  color: var(--ink-soft);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-vu {
  display: flex; align-items: center; justify-content: center;
  height: 90px; width: 160px;
  padding: 0;
  background: rgba(26, 15, 8, 0.85);
  border-radius: 3px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.vu-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--red-glow), var(--amber) 50%, #6ec96e);
  border-radius: 1px;
  animation: vu 1.2s ease-in-out infinite;
  transform-origin: bottom;
}
.vu-bar:nth-child(1) { animation-delay: 0s;   height: 60%; }
.vu-bar:nth-child(2) { animation-delay: 0.1s; height: 75%; }
.vu-bar:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.vu-bar:nth-child(4) { animation-delay: 0.3s; height: 65%; }
.vu-bar:nth-child(5) { animation-delay: 0.4s; height: 80%; }
.vu-bar:nth-child(6) { animation-delay: 0.5s; height: 55%; }
.vu-bar:nth-child(7) { animation-delay: 0.6s; height: 70%; }
.vu-bar:nth-child(8) { animation-delay: 0.7s; height: 45%; }
@keyframes vu {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

/* Analog VU needle gauge — replaces the old bar VU */
.vu-gauge {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.vu-gauge .vu-needle-group {
  transform-origin: 80px 80px;
  /* Default: needle at rest at -30deg (idle / no audio). Animation
     only runs while body[data-player-state="playing"] is set. */
  transform: rotate(-30deg);
  transition: transform 600ms ease-out;
}
body[data-player-state="playing"] .vu-gauge .vu-needle-group {
  animation: vu-wiggle 1.8s cubic-bezier(0.4, 0.0, 0.6, 1) infinite;
  transition: none;
}
@keyframes vu-wiggle {
  0%   { transform: rotate(-30deg); }
  18%  { transform: rotate(-12deg); }
  35%  { transform: rotate(-22deg); }
  52%  { transform: rotate(-2deg);  }
  68%  { transform: rotate(-15deg); }
  85%  { transform: rotate(8deg);   }
  100% { transform: rotate(-30deg); }
}
.vu-gauge .vu-needle {
  filter: drop-shadow(0 0 2px rgba(232, 72, 56, 0.5));
}

/* Sister-stations widget inside the now-playing strip (desktop only) */
.np-sisters {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(245, 236, 217, 0.18);
}
.np-sisters[hidden] { display: none; }
.np-sisters-header {
  font-family: var(--font-mono-tight);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber-glow, #e89a3c);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.np-sisters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.np-sister-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--paper, #f5ecd9), var(--paper-dark, #ddd0b0));
  color: var(--ink, #3a2412);
  font-family: var(--font-mono-tight);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--wood-mid, #8a6c3a);
  border-radius: 4px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 2px 0 var(--wood-mid, #8a6c3a),
              0 3px 4px rgba(0, 0, 0, 0.2);
  transition: transform 100ms var(--ease, ease),
              box-shadow 100ms var(--ease, ease);
}
.np-sister-chip:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5),
              0 3px 0 var(--wood-mid, #8a6c3a),
              0 4px 8px rgba(0, 0, 0, 0.3),
              0 0 12px rgba(232, 154, 60, 0.25);
}
.np-sister-chip:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
              0 1px 0 var(--wood-mid, #8a6c3a),
              0 2px 3px rgba(0, 0, 0, 0.2);
}
.np-sister-chip-logo {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 2px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-glow), var(--red));
  border: 1px solid var(--wood-dark);
  overflow: hidden;
}
.np-sister-chip-logo::before {
  content: attr(data-mono);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.np-sister-chip-logo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: scale-down;
  background: var(--paper);
  z-index: 2;
}
.np-sister-chip-logo img.is-hidden { display: none; }
.np-sister-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 980px) {
  .np-sisters { display: none; }
}
@media (max-width: 720px) {
  .now-playing { grid-template-columns: 80px 1fr; gap: 14px; padding: 14px 16px; }
  .np-vu { display: none; }
  .np-art { width: 80px; height: 80px; font-size: 22px; }
  .np-title { font-size: 22px; }
  .np-show { font-size: 14px; }
}

/* ─── Section labels ──────────────────────────────────────────────────── */

.section-label {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.2em;
  color: var(--wood);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--wood-mid);
  opacity: 0.4;
}

/* ─── Presets ─────────────────────────────────────────────────────────── */

.presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 28px;
}
.preset:not(.rr-key) {
  background: linear-gradient(180deg, var(--paper-dark), #c4a574);
  border: 2px solid var(--wood);
  padding: 8px 10px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 var(--wood-mid), 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 100ms var(--ease), box-shadow 100ms var(--ease), background 120ms var(--ease);
  font-family: var(--font-serif);
  color: inherit;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.preset-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.preset-logo {
  width: 26px; height: 26px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid var(--wood-dark);
  background: linear-gradient(135deg, var(--red-glow), var(--red));
  position: relative;
  overflow: hidden;
}
.preset-logo[data-mono]::before {
  content: attr(data-mono);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.preset-logo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: scale-down;
  background: var(--paper);
  z-index: 2;
}
.preset-logo img.is-hidden { display: none; }
.preset.is-active .preset-logo { border-color: var(--paper); }
.preset:not(.rr-key):hover {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 var(--wood-mid), 0 3px 4px rgba(0, 0, 0, 0.2);
}
.preset.is-active:not(.rr-key) {
  background: linear-gradient(180deg, var(--red-glow), var(--red));
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 0 #6b1010, inset 0 0 12px rgba(0, 0, 0, 0.2);
}
.preset-num {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  color: var(--wood-dark);
  opacity: 0.85;
}
.preset.is-active .preset-num { color: var(--paper); }
.preset-name {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}
@media (max-width: 720px) {
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ─── Genre + search row ──────────────────────────────────────────────── */

.controls-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  margin-bottom: 24px;
  align-items: center;
}
.genre-strip {
  background: rgba(74, 44, 26, 0.08);
  border: 1px solid rgba(74, 44, 26, 0.2);
  border-radius: 3px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.genre-label {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--wood);
  letter-spacing: 0.2em;
  border-right: 1px solid var(--wood-mid);
  padding-right: 14px;
}
.genre {
  padding: 5px 12px;
  font-family: var(--font-mono-tight);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  transition: background 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.genre.is-active {
  background: var(--ink);
  color: var(--amber-glow);
  border-color: var(--ink);
  box-shadow: inset 0 0 8px rgba(232, 154, 60, 0.3);
}
.genre:hover:not(.is-active) { background: rgba(74, 44, 26, 0.1); }
.search-knob {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper);
  border: 1px solid var(--wood-mid);
  padding: 8px 14px;
  border-radius: 30px;
  box-shadow: inset 0 2px 4px rgba(74, 44, 26, 0.1);
}
.search-knob input {
  border: none; outline: none; background: transparent;
  font-family: var(--font-mono);
  font-size: 20px;
  width: 180px;
  color: var(--ink);
}
.search-knob input::placeholder { color: rgba(74, 44, 26, 0.5); }
.search-glyph {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--wood);
}
@media (max-width: 720px) {
  .controls-row { grid-template-columns: 1fr; }
  .search-knob input { width: 100%; }
}

/* ─── Stations grid ───────────────────────────────────────────────────── */

.stations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: var(--space-12);
  grid-auto-rows: 1fr;
}
@media (max-width: 980px) { .stations { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stations { grid-template-columns: minmax(0, 1fr); } }

[x-cloak] { display: none !important; }
.is-hidden-by-filter { display: none !important; }

/* Card wrapper: holds card + heart + popover */
.station-card-wrap {
  position: relative;
  min-width: 0;
  display: flex;
}
.station-card-wrap > .station-card {
  flex: 1 1 100%;
  width: 100%;
}

.station-card {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(74, 44, 26, 0.3);
  border-radius: 4px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-width: 0;
  min-height: 150px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
  box-shadow: 0 2px 0 var(--paper-dark);
}
.trending-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(232, 72, 56, 0.55));
  animation: trending-flicker 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes trending-flicker {
  0%, 100% { transform: scale(1) rotate(-3deg); opacity: 0.95; }
  50%      { transform: scale(1.12) rotate(3deg); opacity: 1; }
}
.station-card.is-trending {
  border-color: rgba(232, 72, 56, 0.45);
}
.station-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--paper-dark), 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* ─── Diaspora-sectie ─── */
.diaspora-section {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--paper-dark, #d5c89a);
}
.diaspora-intro {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--wood-mid);
  margin: 0.3em 0 1.2em;
  font-style: italic;
}
.station-card.is-diaspora {
  border-style: dashed;
  border-color: var(--brass, #b8862a);
  position: relative;
}
.station-host-cc {
  position: absolute;
  top: 6px;
  right: 30px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 5px;
  background: rgba(184, 134, 42, 0.18);
  color: var(--wood, #5c3d12);
  border-radius: 2px;
  pointer-events: none;
}
.station-host-flag {
  position: absolute;
  top: 6px;
  right: 30px;
  width: 22px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 2px;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.station-card.is-playing {
  border-color: var(--red);
  background: linear-gradient(180deg, var(--paper), #f8e8c0);
}
.station-card.is-playing::before {
  content: '● ON AIR';
  position: absolute; top: -8px; left: 14px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 1px 8px;
  border-radius: 2px;
  letter-spacing: 0.1em;
}
.station-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}
.station-logo {
  width: 48px; height: 48px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  border: 1.5px solid var(--wood-dark);
  background: linear-gradient(135deg, var(--red-glow), var(--red));
  position: relative;
  overflow: hidden;
}
.station-logo[data-mono]::before {
  content: attr(data-mono);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.station-logo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: scale-down;
  background: var(--paper);
  z-index: 2;
}
.station-logo img.is-hidden { display: none; }
.station-info { flex: 1; min-width: 0; }
.station-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-freq {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.station-track {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 34px;
}
.station-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(74, 44, 26, 0.3);
  min-width: 0;
}
.station-genre {
  font-family: var(--font-mono-tight);
  font-size: 10px;
  font-weight: 700;
  color: var(--wood);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}
.station-arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--wood-mid);
  letter-spacing: 0.1em;
  flex: none;
  margin-left: 8px;
}
.station-info-link {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--wood-mid);
  letter-spacing: 0.1em;
  flex: none;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 120ms var(--ease), background 120ms var(--ease);
}
.station-info-link:hover {
  color: var(--ink);
  background: rgba(74, 44, 26, 0.1);
}
/* Empty preset slot — embossed but visibly vacant */
.preset.is-empty:not(.rr-key),
.preset[disabled]:not(.rr-key) {
  cursor: not-allowed;
  background: linear-gradient(180deg, #e8d8b3, var(--paper-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 18px rgba(74, 44, 26, 0.18), 0 3px 0 var(--wood-mid);
}
.preset.is-empty:not(.rr-key):hover { transform: none; }
.preset-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 2px;
}
.preset-empty-icon {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--wood-mid);
  opacity: 0.7;
}
.preset-empty-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wood-mid);
  opacity: 0.6;
}
.preset.is-empty .preset-num { color: var(--wood-mid); opacity: 0.5; }

/* ─── Country picker (landing) ───────────────────────────────────────── */

.country-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
@media (max-width: 820px) { .country-picker-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .country-picker-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Featured stations strip (onder country-grid op landing) ────────── */
.featured-strip {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--wood-mid);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.85;
}
.featured-label {
  display: inline-block;
  margin-right: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--wood-mid);
  opacity: 0.8;
}
.featured-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.featured-link:hover { color: var(--amber); }
.featured-cc {
  margin-left: 3px;
  font-size: 12px;
  color: var(--wood-mid);
  opacity: 0.7;
}
.featured-sep { color: var(--wood-mid); opacity: 0.5; }
@media (max-width: 480px) {
  .featured-strip { font-size: 13px; }
  .featured-label { display: block; margin-bottom: 4px; }
}

.country-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: var(--paper);
  border: 1px solid rgba(74, 44, 26, 0.3);
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
  box-shadow: 0 2px 0 var(--paper-dark);
}
.country-tile-flag {
  display: block;
  width: 100%;
  max-width: 60px;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--wood-mid);
  border-radius: 2px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  object-fit: cover;
}
.country-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--paper-dark), 0 6px 12px rgba(0, 0, 0, 0.1);
}
.country-tile.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.country-tile-code {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--red);
  line-height: 1;
}
.country-tile-name {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-soft);
}
.country-tile-soon {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--wood-mid);
  letter-spacing: 0.1em;
  margin-top: auto;
}

/* ─── Hero (landing) ──────────────────────────────────────────────────── */

.hero-landing {
  padding: 8px 0 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--red);
  text-shadow:
    2px 2px 0 var(--paper-dark),
    3px 3px 0 rgba(74, 44, 26, 0.3);
  margin-bottom: 14px;
}
.hero-lede {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 50ch;
  font-style: italic;
}

/* ─── Country page hero (bypassed by tuner-dial; keep helpers) ──────── */

.country-hero {
  margin-bottom: var(--space-4);
}
.country-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--red);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow:
    2px 2px 0 var(--paper-dark),
    3px 3px 0 rgba(74, 44, 26, 0.3);
}
.country-meta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--wood);
  letter-spacing: 0.15em;
}

.country-lang-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.country-lang-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--wood-mid);
}
.country-lang-chip {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--paper-warm);
  border: 1px solid var(--wood-mid);
  border-radius: 2px;
  color: var(--wood-dark);
  cursor: pointer;
  transition: background 120ms var(--ease);
}
.country-lang-chip:hover { background: var(--paper-dark); }
.country-lang-chip.is-current {
  background: var(--wood-mid);
  color: var(--paper);
  border-color: var(--wood-dark);
}

/* ─── Station detail page ─────────────────────────────────────────────── */

.station-page-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: center;
  padding: 20px 0;
  border-top: 2px double var(--wood-mid);
  border-bottom: 2px double var(--wood-mid);
  margin: 16px 0 24px;
}
.station-page-favicon {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, var(--red-glow), var(--red));
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 0 0 1px var(--brass), 0 4px 0 var(--paper-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  color: #fff;
  font-size: 56px;
  position: relative;
  overflow: hidden;
}
.station-page-favicon[data-mono]::before {
  content: attr(data-mono);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.station-page-favicon img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: scale-down;
  background: var(--wood-dark);
  z-index: 2;
}
.station-page-favicon img.is-hidden { display: none; }
.station-page-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--red);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow:
    2px 2px 0 var(--paper-dark),
    3px 3px 0 rgba(74, 44, 26, 0.3);
}
.station-page-tagline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--wood);
  letter-spacing: 0.15em;
}
.station-page-actions { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 3px;
  border: 2px solid var(--wood);
  background: linear-gradient(180deg, var(--paper-dark), #c4a574);
  color: var(--wood-dark);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 var(--wood-mid);
  transition: transform 100ms var(--ease), box-shadow 100ms var(--ease);
}
.btn:hover {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 var(--wood-mid);
}
.btn-primary {
  background: linear-gradient(180deg, var(--red-glow), var(--red));
  color: var(--paper);
  border-color: var(--wood-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 0 #6b1010;
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #6b1010; }

.station-info-list { margin: 0 0 24px; }
.station-info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(74, 44, 26, 0.3);
}
.station-info-row dt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--wood);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.station-info-row dd { color: var(--ink); font-family: var(--font-serif); }

.related-list { margin-top: 12px; border-top: 1px dashed rgba(74, 44, 26, 0.3); }
.related-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(74, 44, 26, 0.3);
  transition: color 120ms var(--ease);
}
.related-row:hover { color: var(--red); }
.related-name { font-family: var(--font-serif); font-weight: 700; }
.related-meta {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--wood);
  letter-spacing: 0.05em;
}

.station-intro {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--wood);
  max-width: 640px;
  margin: 0 0 24px;
}

.country-intro { max-width: 680px; margin: 8px 0 6px; }
.country-intro .section-label { margin-bottom: 4px; }
.country-intro .faq-item { margin-left: 24px; }
.country-intro .faq-answer { line-height: 1.8; }
.country-faq { margin-top: 10px; max-width: 680px; }
.country-faq .section-label { margin-bottom: 4px; }
.country-faq .faq-item { margin-left: 24px; }
.country-faq .faq-question { padding: 7px 0; }
.country-intro .faq-question { padding: 7px 0; }

.station-faq { margin-top: 24px; }
.faq-item {
  border-bottom: 1px dashed rgba(74, 44, 26, 0.3);
}
.faq-question {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.faq-question::before { content: "▸ "; color: var(--wood); }
.faq-item[open] .faq-question::before { content: "▾ "; }
.faq-question::-webkit-details-marker { display: none; }
.faq-answer {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--wood);
  padding: 0 0 12px 14px;
  margin: 0;
}

@media (max-width: 720px) {
  .station-page-header { grid-template-columns: 1fr; }
  .station-page-favicon { width: 100%; height: 220px; font-size: 64px; }
}

/* ─── Footer (inside cabinet) ─────────────────────────────────────────── */

.site-footer {
  border-top: 2px double var(--wood-mid);
  margin-top: var(--space-12);
  padding-top: var(--space-5);
  padding-bottom: var(--space-4);
}
.footer-text {
  font-family: var(--font-serif);
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  margin: 0;
  flex: 1;
  min-width: 0;
}
/* Top-row: tagline (links) + social-icons (rechts) op één regel.
   Op smalle viewports wrappen socials naar onder de tagline. */
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.footer-meta {
  font-family: var(--font-mono-tight);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--wood);
  margin: 0;
}
.footer-nav {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--wood-mid);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
}
.footer-nav a {
  color: var(--wood);
  text-decoration: none;
  border-bottom: 1px dashed var(--wood-mid);
  padding-bottom: 1px;
  transition: color 120ms var(--ease);
}
.footer-nav a:hover { color: var(--red); border-color: var(--red); }
.footer-nav-seo {
  font-family: var(--font-mono-tight);
  font-size: 12px;
  line-height: 1.6;
  color: var(--wood-mid);
  margin: 6px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.footer-nav-seo a {
  color: var(--wood);
  text-decoration: none;
  border-bottom: 1px dashed var(--wood-mid);
  padding-bottom: 1px;
  transition: color 120ms var(--ease);
}
.footer-nav-seo a:hover { color: var(--red); border-color: var(--red); }
.footer-sep { color: var(--wood-mid); opacity: 0.6; }

/* Transient toast (preset hint and similar) */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-height, 92px) + 18px);
  transform: translateX(-50%) translateY(8px);
  background: var(--wood-deep, #2c1810);
  color: var(--paper, #f5ecd9);
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--brass, #c2a572);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  max-width: min(440px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  z-index: 1500;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.toast[data-shown="true"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Donation toast — richer, persistent (manual dismiss) */
.toast-donate {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 36px 16px 20px;
  max-width: min(440px, calc(100vw - 32px));
  text-align: left;
  background: linear-gradient(180deg, #2c1810 0%, #1a0f08 100%);
  border: 1px solid var(--brass, #c2a572);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}
.toast-donate-icon {
  font-size: 28px;
  line-height: 1;
  flex: none;
  filter: drop-shadow(0 0 8px rgba(232, 154, 60, 0.4));
}
.toast-donate-body {
  flex: 1;
  min-width: 0;
}
.toast-donate-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--amber-glow, #e89a3c);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.toast-donate-text {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--paper, #f5ecd9);
  margin: 0 0 12px 0;
  opacity: 0.92;
}
.toast-donate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toast-donate-cta {
  background: #FFDD00;
  color: #0D0C22;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid #d4b800;
  transition: transform 100ms var(--ease, ease), box-shadow 100ms var(--ease, ease);
}
.toast-donate-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.toast-donate-cta-alt {
  background: transparent;
  color: var(--paper, #f5ecd9);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 7px 12px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--brass, #c2a572);
  transition: background 100ms var(--ease, ease);
}
.toast-donate-cta-alt:hover { background: rgba(194, 165, 114, 0.15); }
.toast-donate-dismiss {
  background: transparent;
  color: var(--paper, #f5ecd9);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 4px;
  border: none;
  border-bottom: 1px dashed rgba(245, 236, 217, 0.3);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 100ms var(--ease, ease);
}
.toast-donate-dismiss:hover { opacity: 1; }
.toast-donate-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--paper, #f5ecd9);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 100ms var(--ease, ease);
}
.toast-donate-close:hover { opacity: 1; }
.footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  margin-top: 8px;
}
@media (max-width: 540px) {
  .footer-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Info pages (about, privacy, contact) */
.info-page {
  max-width: 60ch;
  margin: 0 auto;
  padding: var(--space-8) 0 var(--space-12);
}
.info-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--red);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow:
    2px 2px 0 var(--paper-dark),
    3px 3px 0 rgba(74, 44, 26, 0.3);
  margin: var(--space-3) 0 var(--space-6);
}
.info-lede {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
  border-left: 3px solid var(--brass);
  padding-left: var(--space-4);
  margin-bottom: var(--space-6);
}
.info-page h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--red);
  letter-spacing: 0.02em;
  margin: var(--space-8) 0 var(--space-3);
  text-shadow: 1px 1px 0 var(--paper-dark);
}
.info-page p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.info-page a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px dashed var(--red);
}
.info-page a:hover { color: var(--wood-dark); border-color: var(--wood-dark); }
.info-list {
  list-style: none;
  margin: var(--space-3) 0 var(--space-5);
  padding: 0;
}
.info-list li {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-3);
}
.info-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--brass);
  font-family: var(--font-mono);
}
.info-list code {
  font-family: var(--font-mono-tight);
  background: var(--paper-warm);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.92em;
  border: 1px solid var(--rule);
}
.info-meta {
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--wood-mid);
  border-top: 1px dashed var(--rule);
  padding-top: var(--space-3);
}
.info-email {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--red) !important;
  letter-spacing: 0.02em;
}

/* ─── Press page ─────────────────────────────────────────────────────── */

.press-logo-dark {
  display: inline-block;
  background: var(--wood-deep);
  padding: 20px 32px;
  border-radius: 4px;
  margin: 8px 0 16px;
}
.press-embed {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
  margin: 8px 0 16px;
}

/* ─── Error page ──────────────────────────────────────────────────────── */

.error-page { padding: 40px 0; text-align: center; }
.error-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--red);
  margin: 16px 0;
  text-shadow: 2px 2px 0 var(--paper-dark);
}
.error-message { color: var(--ink-soft); margin-bottom: 24px; font-style: italic; }

/* ─────────────────────────────────────────────────────────────────────
   App-store promotion — badges, homepage call-out, /apps landing page
   ───────────────────────────────────────────────────────────────────── */

/* Reusable badge pair (see templates/_app_badges.html) */
.app-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.app-badge {
  display: inline-flex;
  position: relative;
  line-height: 0;
  text-decoration: none;
  border: 0;
  transition: transform .12s var(--ease), opacity .12s ease;
}
.app-badge:hover { transform: translateY(-1px); }
.app-badge-svg {
  display: block;
  height: 46px;
  width: auto;
  border-radius: 7px;
}
/* Android "binnenkort" — dimmed, non-clickable, small ribbon */
.app-badge--soon { cursor: default; opacity: 0.55; filter: grayscale(0.35); }
.app-badge--soon:hover { transform: none; }
.app-badge-ribbon {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--red);
  border-radius: 3px;
  line-height: 1.3;
  box-shadow: 1px 1px 0 rgba(74, 44, 26, 0.35);
  white-space: nowrap;
}

.app-badges--footer { margin: 4px 0 8px; }
.app-badges--footer .app-badge-svg { height: 40px; }
.app-badges--hero { margin: var(--space-6) 0 var(--space-4); }

/* Homepage hero call-out strip */
.app-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--space-6);
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--wood-mid);
  border-radius: var(--radius-2);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.app-callout:hover {
  border-color: var(--red);
  border-style: solid;
  background: rgba(255, 255, 255, 0.55);
}
.app-callout-icon { color: var(--brass); font-family: var(--font-mono); }
.app-callout-text {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
}
.app-callout-cta {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  white-space: nowrap;
}
@media (max-width: 520px) {
  .app-callout { flex-wrap: wrap; gap: 6px 12px; }
  .app-callout-text { flex-basis: 100%; order: 2; }
  .app-callout-cta { order: 3; }
}

/* /apps landing page */
.apps-page {
  max-width: 68ch;
  margin: 0 auto;
  padding: var(--space-8) 0 var(--space-12);
}
.apps-availability {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: var(--wood-mid);
  margin-bottom: var(--space-8);
}
.apps-page h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--red);
  letter-spacing: 0.02em;
  margin: var(--space-10) 0 var(--space-4);
  text-shadow: 1px 1px 0 var(--paper-dark);
}
.apps-feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.apps-feature {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
}
.apps-feature h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--wood-dark);
  margin: 0 0 6px;
}
.apps-feature p {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
@media (max-width: 520px) {
  .apps-feature-grid { grid-template-columns: 1fr; }
}

/* Screenshot strip — horizontal scroll on small screens */
.apps-shots-strip {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
}
.apps-shot {
  flex: 0 0 auto;
  width: 220px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: 2px 3px 0 var(--cream-shadow);
  scroll-snap-align: start;
}
.apps-web-fallback {
  margin-top: var(--space-10);
  font-family: var(--font-serif);
  font-style: italic;
}
.apps-web-fallback a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px dashed var(--red);
}
.apps-web-fallback a:hover { color: var(--wood-dark); border-color: var(--wood-dark); }

/* ─── App header icon — matches .header-search-btn (search.css) ─── */
.header-app-btn {
  background: none;
  border: 1px solid rgba(232, 154, 60, 0.35);
  border-radius: 6px;
  color: var(--amber, #e89a3c);
  cursor: pointer;
  padding: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.header-app-btn:hover,
.header-app-btn:focus-visible {
  border-color: var(--amber);
  color: var(--amber-glow, #ffb84d);
  outline: none;
}
.header-app-icon { width: 18px; height: 18px; display: block; }

/* ─── Contextual app hint on country/station pages (subtle, one line) ─── */
.app-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-6) 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--wood-mid);
  text-decoration: none;
  border: 1px dashed var(--wood-mid);
  border-radius: var(--radius-2);
  background: rgba(255, 255, 255, 0.25);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.app-hint:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 255, 255, 0.5);
}
.app-hint-icon { color: var(--brass); }
.app-hint-text { flex: 1; }
.app-hint-arrow { color: var(--red); }

/* ─── QR block on /apps (desktop hand-off, notraqr credit) ─── */
.apps-qr {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-10);
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-2);
  background: var(--bg-card);
  max-width: 360px;
}
.apps-qr-img {
  width: 120px;
  height: 120px;
  flex: 0 0 auto;
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-2);
}
.apps-qr-hint {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.apps-qr-credit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--wood-mid);
  opacity: 0.7;
  text-decoration: none;
  border-bottom: 1px dotted var(--wood-mid);
}
.apps-qr-credit:hover { opacity: 1; color: var(--red); border-color: var(--red); }
/* QR is a desktop→phone hand-off; on phones you're already there, so hide it. */
@media (max-width: 640px) {
  .apps-qr { display: none; }
}

/* ─── App header icon: occasional "buzz" to draw a little attention ───
   Short shake in the last ~10% of a 5s cycle → fires roughly every 5s,
   never constant. Pauses on hover; disabled for reduced-motion users. */
@keyframes app-buzz {
  0%, 90%, 100% { transform: translateX(0) rotate(0); }
  91%  { transform: translateX(-1.5px) rotate(-7deg); }
  92%  { transform: translateX(1.5px)  rotate(7deg); }
  93%  { transform: translateX(-1.5px) rotate(-6deg); }
  94%  { transform: translateX(1.5px)  rotate(6deg); }
  95%  { transform: translateX(-1px)   rotate(-4deg); }
  96%  { transform: translateX(1px)    rotate(4deg); }
  97%  { transform: translateX(0)      rotate(0); }
}
.header-app-icon {
  transform-origin: 50% 55%;
  animation: app-buzz 5s ease-in-out infinite;
  will-change: transform;
}
.header-app-btn:hover .header-app-icon,
.header-app-btn:focus-visible .header-app-icon {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .header-app-icon { animation: none; }
}
