  :root{
    --bg:#12151a;
    --panel:#1b1f26;
    --panel-2:#20252d;
    --line:#2b313b;
    --text:#eef1f5;
    --text-dim:#8d97a5;
    --amber:#e8b04b;
    --amber-dim:#8a6b2e;

    --accent:#9a72d1;
    --accent-dim:#3f2e5c;
  }

  html{
    overflow-y:scroll;
    scrollbar-gutter:stable;
  }

  *{box-sizing:border-box; margin:0; padding:0;}

  body{
    background:
      var(--bg);
    color:var(--text);
    font-family:'Inter', sans-serif;
    min-height:100vh;
    padding-bottom:150px;
  }

  ::selection{ background:var(--amber-dim); color:var(--text); }

  /* ---------- HEADER / DIAL ---------- */
  header{
    padding:28px 32px 28px;
    max-width:1210px;
    margin:0 auto;
  }

  .eyebrow{
    font-family:'Inter', sans-serif;
    font-size:12px;
    letter-spacing:0.18em;
    text-transform:uppercase;
    color:var(--amber);
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
  }
  .eyebrow::before{
    content:"";
    width:7px; height:7px; border-radius:50%;
    background:var(--amber);
    box-shadow:0 0 8px 2px rgba(232,176,75,0.6);
  }

  h1{
    font-family:'Space Grotesk', sans-serif;
    font-weight:700;
    font-size:clamp(32px, 5vw, 52px);
    letter-spacing:-0.01em;
    line-height:1.05;
  }
  h1 span{ color:var(--text-dim); font-family:'Inter', sans-serif; font-weight:500; }

  header p.sub{
    margin-top:12px;
    color:var(--text-dim);
    font-size:15px;
    max-width:560px;
    line-height:1.55;
  }

  /* dial strip */
  .player-dock{
    position:fixed;
    bottom:0; left:0; right:0;
    z-index:50;
  }

  .dial{
    width:100%;
    margin:0;
    background:linear-gradient(180deg, var(--panel), var(--panel-2));
    border:1px solid var(--line);
    border-left:0;
    border-right:0;
    border-radius:0;
    padding:7px 22px 6px;
    position:relative;
    overflow:hidden;
  }
  .dial-ticks{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    height:18px;
    position:relative;
    margin-bottom:4px;
  }
  .tick{
    width:1px; height:6px; background:var(--line);
  }
  .tick.mid{ height:10px; background:#3a4250; }
  .dial-needle{
    position:absolute;
    top:-2px;
    width:2px;
    height:25px;
    background:var(--amber);
    box-shadow:0 0 10px 2px rgba(232,176,75,0.55);
    border-radius:2px;
    transition:left 0.5s cubic-bezier(.4,0,.2,1);
    left:6%;
  }
  .dial-needle::after{
    content:"";
    position:absolute; top:-3px; left:50%; transform:translateX(-50%);
    width:6px; height:6px; border-radius:50%;
    background:var(--amber);
    box-shadow:0 0 8px 2px rgba(232,176,75,0.7);
  }
  .dial-label{
    font-family:'Inter', sans-serif;
    font-size:11px;
    color:var(--text-dim);
    letter-spacing:0.05em;
  }

  /* ---------- STATION GRID ---------- */
  main{
    max-width:1210px;
    margin:0 auto;
    padding:8px 32px 40px;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    grid-template-rows:auto repeat(var(--compact-rows), auto);
    grid-auto-flow:column;
    gap:6px 12px;
  }

  .card{
    background:transparent;
    border:0;
    padding:0;
    min-height:48px;
    position:relative;
    text-align:left;
    display:grid;
    grid-template-columns:8px minmax(0, 1fr) 112px;
    align-items:center;
    gap:12px;
    order:var(--compact-order);
  }
  .card.active{
    background:transparent;
    box-shadow:none;
  }

  .card-top{
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0;
  }
  .live-dot{
    width:7px; height:7px; border-radius:50%;
    background:#3d4552;
    transition:background 0.2s;
  }
  .card.active .live-dot{
    background:#ff5b5b;
    box-shadow:0 0 6px 2px rgba(255,91,91,0.6);
    animation:pulse 1.6s infinite;
  }
  @keyframes pulse{
    0%,100%{ opacity:1; }
    50%{ opacity:0.45; }
  }

  .card h3{
    font-family:'Space Grotesk', sans-serif;
    font-size:14px;
    font-weight:600;
    margin:0;
    padding:7px 0;
  }
  .station-title-link{
    color:inherit;
    text-decoration:none;
  }
  .station-title-link::after{
    content:" ↗";
    color:var(--text-dim);
    font:400 10px 'Inter', sans-serif;
  }
  .station-title-link:hover,
  .station-title-link:focus-visible{
    color:inherit;
    text-decoration:underline;
    text-underline-offset:3px;
    outline:none;
  }

  .card-foot{
    margin:0;
    align-self:center;
  }
  .tune-button{
    position:relative;
    width:104px;
    height:38px;
    min-height:38.4px;
    padding:0 8px;
    border:1px solid var(--line);
    border-radius:5px;
    background:var(--panel-2);
    color:var(--text-dim);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:'Inter', sans-serif;
    font-size:11px;
    text-align:center;
    white-space:nowrap;
    transition:border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }
  .tune-button:hover,
  .tune-button:focus-visible{
    border-color:var(--accent);
    color:var(--text);
    outline:none;
  }
  .card.active .tune-button{
    border-color:var(--accent);
    color:var(--text);
    background:var(--accent-dim);
  }
  .tune-button > span[id^="status-"]{
    display:block;
    width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    text-align:center;
  }

  .compact-headings{ display:contents; }
  .compact-heading{
    grid-row:1;
    order:-1;
    display:flex;
    align-items:center;
    gap:10px;
    margin:24px 0 8px;
    color:var(--text-dim);
    font:500 11px 'Space Grotesk', sans-serif;
    letter-spacing:0.14em;
    text-transform:uppercase;
  }
  .compact-heading::after{
    content:"";
    flex:1;
    height:1px;
    background:var(--line);
  }
  .compact-country{
    display:block;
    margin-top:2px;
    color:var(--text-dim);
    font:400 10px 'Inter', sans-serif;
    letter-spacing:0.04em;
  }
  /* ---------- NOW PLAYING BAR ---------- */
  .nowbar{
    position:relative;
    background:linear-gradient(180deg, #171b21, #0f1216);
    border-top:1px solid var(--line);
    padding:14px 22px;
    display:flex;
    align-items:center;
    gap:18px;
    backdrop-filter:blur(6px);
  }

  .nowbar .accent-strip{
    width:4px; align-self:stretch; border-radius:4px;
    background:var(--amber-dim);
    transition:background 0.3s;
    flex-shrink:0;
  }

  .transport{
    display:flex; align-items:center; gap:10px; flex-shrink:0;
  }
  .btn-round{
    width:40px; height:40px;
    border-radius:50%;
    background:var(--panel-2);
    border:1px solid var(--line);
    color:var(--text);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    transition:border-color 0.15s, background 0.15s;
  }
  .btn-round:hover{ border-color:var(--amber-dim); }
  .btn-round svg{ width:15px; height:15px; }

  .now-info{
    flex:1;
    min-width:0;
    font-family:'Inter', sans-serif;
  }
  .now-station{
    font-size:11px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--text-dim);
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:3px;
  }
  .now-station .dot{
    width:6px; height:6px; border-radius:50%;
    background:#ff5b5b;
    box-shadow:0 0 5px 1px rgba(255,91,91,0.6);
    animation:pulse 1.6s infinite;
  }
  .now-track-wrap{
    overflow:hidden;
    white-space:nowrap;
    position:relative;
    height:22px;
  }
  .now-track{
    display:inline-block;
    font-size:15px;
    color:var(--text);
    font-weight:500;
    letter-spacing:0.01em;
  }
  .now-track.scroll{
    animation:marquee 14s linear infinite;
    padding-left:0;
  }
  @keyframes marquee{
    0%{ transform:translateX(0); }
    15%{ transform:translateX(0); }
    85%{ transform:translateX(calc(-100% + 300px)); }
    100%{ transform:translateX(calc(-100% + 300px)); }
  }

  .vol-wrap{
    display:flex; align-items:center; gap:8px;
    flex-shrink:0;
  }
  .vol-wrap svg{ width:16px; height:16px; color:var(--text-dim); }
  input[type=range]{
    -webkit-appearance:none;
    appearance:none;
    width:90px; height:3px;
    background:var(--line);
    border-radius:3px;
    outline:none;
  }
  input[type=range]::-webkit-slider-thumb{
    -webkit-appearance:none;
    appearance:none;
    width:12px; height:12px; border-radius:50%;
    background:var(--amber);
    cursor:pointer;
    box-shadow:0 0 6px rgba(232,176,75,0.5);
  }
  input[type=range]::-moz-range-thumb{
    width:12px; height:12px; border-radius:50%;
    background:var(--amber);
    border:none;
    cursor:pointer;
  }

  .nowbar .placeholder{
    color:var(--text-dim);
    font-family:'Inter', sans-serif;
    font-size:13px;
  }

  footer{
    max-width:1210px;
    margin:0 auto;
    padding:8px 32px 20px;
    color:var(--text-dim);
    font-size:12px;
    line-height:1.6;
  }
  footer a{ color:var(--text-dim); }

  @media (max-width:640px){
    header{ padding:32px 18px 20px; }
    main{ padding:8px 18px 30px; }
    body{ padding-bottom:140px; }
    .dial{ padding:6px 14px 5px; }
    .dial-ticks{ height:16px; }
    .nowbar{ padding:12px 14px; gap:10px; }
    .vol-wrap{ display:none; }
    footer{ padding:8px 18px 20px; }
    main{
      grid-template-columns:1fr;
      grid-template-rows:none;
      grid-auto-flow:row;
    }
    .compact-headings{ display:none; }
  }
