:root {
  color-scheme: dark;
  --ink: #080b10;
  --panel: #10151b;
  --line: #33404b;
  --muted: #9ca8b1;
  --paper: #eef1e7;
  --cyan: #0878d1;
  --red: #ff5548;
  --green: #69d59a;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--ink);
  color: var(--paper);
  font-family: "Courier New", Courier, monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .26;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px);
}

.now-playing-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.station-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; width: min(1400px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.home-column > section:first-child { margin-top: 0; }
.home-column .track-panel { grid-template-columns: minmax(130px, 1fr); gap: 24px; }
.home-column .artwork-frame { width: min(100%, 360px); margin: 0 auto; }
.home-column h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.current-dj { border: 1px solid var(--line); background: rgba(16, 21, 27, .91); box-shadow: 10px 10px 0 rgba(255, 85, 72, .06); }
.current-dj-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px; align-items: center; }
.current-dj-card > img { width: 150px; aspect-ratio: 1; object-fit: cover; border: 1px solid #61707e; }
.current-dj-copy h2 { margin: 0 0 6px; }
.current-dj-copy .dj-show { margin: 0; color: var(--cyan); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.dj-current-bio { color: var(--paper); font-family: Arial, sans-serif; line-height: 1.45; }
.dj-profile-link { color: var(--red); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.station-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px; border: 1px solid var(--line); background: rgba(16, 21, 27, .95); box-shadow: 10px 10px 0 rgba(255, 85, 72, .06); }
.station-brand { display: flex; flex-direction: column; gap: 5px; color: var(--paper); text-decoration: none; }
.station-logo { display: block; width: min(100%, 300px); height: auto; }

.station-name { color: var(--cyan); font-family: Arial, sans-serif; font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.06em; }
.station-tagline { color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.menu-toggle { display: none; }
.station-nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); }
.station-nav a, .station-nav summary { color: var(--paper); cursor: pointer; font-size: .72rem; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.station-nav a:hover, .station-nav a:focus-visible, .station-nav summary:hover { color: var(--red); }
.station-nav details { position: relative; }
.station-nav summary { list-style: none; }
.station-nav summary::-webkit-details-marker { display: none; }
.station-nav-menu { position: absolute; right: 0; z-index: 2; display: grid; gap: 12px; min-width: 150px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); background: var(--panel); box-shadow: 6px 6px 0 rgba(255, 85, 72, .1); }
.station-nav-menu a { white-space: nowrap; }

.module-heading p,
.module-code,
.status-label {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.now-playing {
  border: 1px solid var(--line);
  background: rgba(16, 21, 27, .91);
  box-shadow: 10px 10px 0 rgba(255, 85, 72, .06);
}

.recent-signals {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 27, .91);
}

.module-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 0 18px;
}

.module-heading { border-bottom: 1px solid var(--line); }
.module-code { margin-left: auto; color: var(--cyan); }

.signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.track-panel {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: clamp(20px, 5vw, 48px);
}

.artwork-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #19232d;
  border: 1px solid #61707e;
  box-shadow: 8px 8px 0 #040506;
}

#album-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #19232d;
}

.artwork-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1f2b35, #07090d);
}

/* The visual fallback must not cover a successfully loaded live image. */
.artwork-fallback[hidden] {
  display: none;
}

.track-details { min-width: 0; }
.status-label { color: var(--green); font-weight: 700; }

.artist {
  margin: 18px 0 4px;
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 700;
}

h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Arial, sans-serif;
  font-size: clamp(1.8rem, 4.25vw, 3.6rem);
  letter-spacing: -.055em;
  line-height: .94;
}

.album { min-height: 1.2em; margin: 18px 0 26px; color: var(--muted); }

.listen-link {
  display: inline-block;
  border: 1px solid var(--red);
  color: var(--paper);
  background: transparent;
  font: inherit;
  font-size: .78rem;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.listen-link { padding: 12px 15px; }
.listen-link:hover,
.listen-link:focus-visible { background: var(--red); color: var(--ink); outline: none; }

.recent-track-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-track {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(51, 64, 75, .7);
}

.recent-track:last-child { border-bottom: 0; }

.recent-time {
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
}

.recent-buy {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  justify-self: end;
  line-height: 0;
  text-decoration: none;
}

/* Keep the supplied Amazon badge at its native 100 × 49 pixel size.
   This prevents mobile layout rules from stretching the image itself. */
.recent-buy img {
  display: block;
  width: 100px;
  height: 49px;
  max-width: 100%;
  object-fit: contain;
}

.recent-buy:hover,
.recent-buy:focus-visible {
  opacity: .78;
  outline: none;
}

.recent-art {
  position: relative;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #19232d;
}

.recent-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-art-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1f2b35, #07090d);
}

.recent-art.is-missing-art {
  width: 2px;
  height: 40px;
  border: 0;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 85, 72, .45);
}

.recent-art.is-missing-art .recent-art-fallback { display: none; }

.recent-copy { min-width: 0; }
.recent-artist,
.recent-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-artist { color: var(--cyan); font-size: .82rem; font-weight: 700; }
.recent-title { margin-top: 4px; color: var(--paper); font-family: Arial, sans-serif; font-size: 1rem; font-weight: 700; }

.recent-track-empty {
  padding: 20px 18px;
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 620px) {
  .now-playing-shell { width: min(100% - 22px, 1040px); padding: 18px 0; }
  .track-panel { grid-template-columns: 1fr; }
  .artwork-frame { width: min(100%, 340px); }
  .recent-track {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "art copy buy"
      ". time time";
    gap: 11px;
    padding: 10px 14px;
  }
  .recent-art { grid-area: art; width: 44px; height: 44px; }
  .recent-copy { grid-area: copy; }
  .recent-buy { grid-area: buy; }
  .recent-art.is-missing-art { width: 2px; height: 36px; }
  .recent-time { grid-area: time; }
}

.editorial-module {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 27, .91);
  box-shadow: 10px 10px 0 rgba(255, 85, 72, .06);
}

.editorial-source {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin: -0.5rem 0 1rem;
}

.editorial-list { margin: 0; padding: 0; list-style: none; }
.editorial-item { padding: 18px; border-bottom: 1px solid rgba(51, 64, 75, .7); }
.editorial-item:last-child { border-bottom: 0; }
.editorial-title { margin: 0; color: var(--cyan); font-family: Arial, sans-serif; font-size: 1.1rem; line-height: 1.15; }
.editorial-title a { color: inherit; text-decoration: none; }
.editorial-title a:hover, .editorial-title a:focus-visible { color: var(--red); text-decoration: underline; }
.editorial-summary { margin: 9px 0 0; color: var(--paper); font-family: Arial, sans-serif; font-size: .94rem; line-height: 1.5; }
.editorial-meta { margin: 12px 0 0; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.editorial-empty { margin: 0; padding: 20px 18px; color: var(--muted); font-size: .82rem; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; border-top: 1px solid var(--line); }
.pagination button { border: 1px solid var(--line); padding: 8px 12px; color: var(--paper); background: transparent; cursor: pointer; font: inherit; font-size: .75rem; }
.pagination button:hover, .pagination button:focus-visible, .pagination button:disabled { border-color: var(--red); color: var(--red); outline: none; }

.station-footer { display: flex; justify-content: space-between; gap: 20px; width: min(1400px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 32px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.station-footer p { margin: 0; }
.social-nav { display: flex; gap: 18px; }
.social-nav a { color: var(--cyan); text-decoration: none; }
.social-nav a:hover, .social-nav a:focus-visible { color: var(--red); text-decoration: underline; }

@media (max-width: 620px) {
  .station-footer { align-items: flex-start; flex-direction: column; width: min(100% - 22px, 1040px); }
}

.dj-profile {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dj-card,
.dj-bio {
  border: 1px solid var(--line);
  background: rgba(16, 21, 27, .91);
  box-shadow: 10px 10px 0 rgba(255, 85, 72, .06);
}

.dj-card { padding: 18px; text-align: center; }
.dj-portrait-frame { overflow: hidden; border: 1px solid #61707e; background: #19232d; }
.dj-portrait-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.dj-card h1 { margin: 22px 0 2px; font-family: Arial, sans-serif; font-size: 2.35rem; letter-spacing: -.05em; }
.dj-shift { margin: 0; color: var(--cyan); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.dj-show { margin: 27px 0 0; color: var(--paper); font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; }
.dj-hours { margin: 9px 0 0; color: var(--muted); font-size: .76rem; }
.dj-bio-copy { padding: 26px clamp(18px, 4vw, 40px) 34px; }
.dj-bio-copy p { max-width: 68ch; margin: 0 0 18px; color: var(--paper); font-family: Arial, sans-serif; font-size: 1rem; line-height: 1.65; }
.dj-bio-copy .dj-intro { color: var(--cyan); font-size: 1.12rem; font-weight: 700; }
.dj-bio-copy h2 { margin: 30px 0 12px; color: var(--paper); font-family: Arial, sans-serif; font-size: 1.15rem; letter-spacing: 0; line-height: 1.2; }
.dj-bio-copy ul { margin: 0; padding-left: 21px; color: var(--paper); font-family: Arial, sans-serif; line-height: 1.8; }
.dj-preferences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 5vw, 64px); margin-top: 30px; }
.dj-preferences h2 { margin-top: 0; }
.dj-preferences ul { padding-left: 21px; }

@media (max-width: 720px) {
  .station-home { grid-template-columns: 1fr; width: min(100% - 22px, 1040px); padding: 18px 0; }
  .dj-profile { grid-template-columns: minmax(0, 1fr); }
  .dj-card, .dj-bio { min-width: 0; }
  .dj-bio-copy { padding-inline: 18px; }
  .dj-preferences { grid-template-columns: minmax(0, 1fr); gap: 8px; }

  .station-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .menu-toggle { display: inline-flex; align-self: flex-end; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
  .menu-toggle span { display: block; width: 22px; height: 2px; background: var(--cyan); }
  .station-nav { display: none; width: 100%; align-items: stretch; flex-direction: column; gap: 14px; padding-top: 4px; }
  .menu-open .station-nav { display: flex; }
  .station-nav details { width: 100%; }
  .station-nav-menu { position: static; min-width: 0; margin-top: 8px; }

  .station-nav { flex-wrap: wrap; row-gap: 12px; }
  .current-dj-card { grid-template-columns: 110px minmax(0, 1fr); }
  .current-dj-card > img { width: 110px; }
  .dj-card { text-align: left; }
  .dj-card h1 { margin-top: 18px; }
}

/* Some mobile browsers expose a desktop-width layout viewport. Keep DJ profiles single-column on touch devices. */
@media (hover: none) and (pointer: coarse) {
  .dj-profile { grid-template-columns: minmax(0, 1fr); }
}
