:root{
      --bg:#071a2f;
      --card:#0b2447;
      --card2:#0e2f5c;
      --text:#e8f0ff;
      --muted:#b8c7e6;
      --accent:#6D9EEB;
      --accent2:#c9daf2;
      --ok:#3ddc97;
      --warn:#ffcc66;
      --danger:#ff6b6b;
      --shadow: 0 10px 30px rgba(0,0,0,.35);
      --radius: 22px;
      --radius2: 16px;
      --max: 1100px;
      --glow-1: rgba(109,158,235,.25);
      --glow-2: rgba(61,220,151,.18);
      --header-grad-1: rgba(109,158,235,.25);
      --header-grad-2: rgba(11,36,71,.92);
      --logo-grad-1: var(--accent);
      --logo-grad-2: rgba(201,218,242,.8);
      --logo-text:#003366;
      --season-banner-start: rgba(109,158,235,.16);
      --season-banner-end: rgba(201,218,242,.08);
      --surface-strong: rgba(11,36,71,.75);
      --surface-border: rgba(201,218,242,.18);
      --surface-soft: rgba(201,218,242,.07);
      --surface-soft-hover: rgba(201,218,242,.12);
      --surface-soft-strong: rgba(201,218,242,.15);
      --surface-highlight: rgba(109,158,235,.12);
      --surface-highlight-strong: rgba(109,158,235,.20);
      --surface-highlight-border: rgba(109,158,235,.35);
      --btn-primary-text: #003366;
    }

    body[data-theme="default"]{
      --bg:#071a2f;
      --card:#0b2447;
      --card2:#0e2f5c;
      --text:#e8f0ff;
      --muted:#b8c7e6;
      --accent:#6D9EEB;
      --accent2:#c9daf2;
      --glow-1: rgba(109,158,235,.25);
      --glow-2: rgba(61,220,151,.18);
      --header-grad-1: rgba(109,158,235,.25);
      --header-grad-2: rgba(11,36,71,.92);
      --logo-grad-1: #6D9EEB;
      --logo-grad-2: rgba(201,218,242,.8);
      --logo-text:#003366;
      --season-banner-start: rgba(109,158,235,.16);
      --season-banner-end: rgba(201,218,242,.08);
      --surface-strong: rgba(11,36,71,.75);
      --surface-border: rgba(201,218,242,.18);
      --surface-soft: rgba(201,218,242,.07);
      --surface-soft-hover: rgba(201,218,242,.12);
      --surface-soft-strong: rgba(201,218,242,.15);
      --surface-highlight: rgba(109,158,235,.12);
      --surface-highlight-strong: rgba(109,158,235,.20);
      --surface-highlight-border: rgba(109,158,235,.35);
      --btn-primary-text: #003366;
    }

    body[data-theme="kerst"]{
      --bg:#21090d;
      --card:#4e1618;
      --card2:#6a2427;
      --text:#fff3e8;
      --muted:#f1d4c2;
      --accent:#d33d3d;
      --accent2:#7ad67a;
      --glow-1: rgba(211,61,61,.26);
      --glow-2: rgba(122,214,122,.20);
      --header-grad-1: rgba(211,61,61,.28);
      --header-grad-2: rgba(78,22,24,.94);
      --logo-grad-1: #d33d3d;
      --logo-grad-2: rgba(122,214,122,.90);
      --logo-text:#fffaf0;
      --season-banner-start: rgba(211,61,61,.18);
      --season-banner-end: rgba(122,214,122,.10);
      --surface-strong: rgba(78,22,24,.78);
      --surface-border: rgba(241,212,194,.18);
      --surface-soft: rgba(255,243,232,.08);
      --surface-soft-hover: rgba(255,243,232,.13);
      --surface-soft-strong: rgba(255,243,232,.16);
      --surface-highlight: rgba(122,214,122,.14);
      --surface-highlight-strong: rgba(211,61,61,.22);
      --surface-highlight-border: rgba(122,214,122,.32);
      --btn-primary-text: #fff6ef;
    }

    body[data-theme="lente"]{
      --bg:#eef7eb;
      --card:#ffffff;
      --card2:#f3fbf1;
      --text:#213327;
      --muted:#5e7864;
      --accent:#5fb14a;
      --accent2:#c7e8b6;
      --shadow: 0 10px 24px rgba(32,67,29,.14);
      --glow-1: rgba(95,177,74,.22);
      --glow-2: rgba(255,208,102,.18);
      --header-grad-1: rgba(95,177,74,.20);
      --header-grad-2: rgba(255,255,255,.92);
      --logo-grad-1: #5fb14a;
      --logo-grad-2: rgba(255,208,102,.70);
      --logo-text:#25401c;
      --season-banner-start: rgba(95,177,74,.16);
      --season-banner-end: rgba(255,208,102,.10);
      --surface-strong: rgba(255,255,255,.84);
      --surface-border: rgba(62,111,52,.16);
      --surface-soft: rgba(95,177,74,.07);
      --surface-soft-hover: rgba(95,177,74,.12);
      --surface-soft-strong: rgba(95,177,74,.15);
      --surface-highlight: rgba(255,208,102,.16);
      --surface-highlight-strong: rgba(95,177,74,.20);
      --surface-highlight-border: rgba(95,177,74,.28);
      --btn-primary-text: #183114;
    }

    body[data-theme="winter"]{
      --bg:#dff1fb;
      --card:#f6fbff;
      --card2:#eaf6ff;
      --text:#163247;
      --muted:#5f7d92;
      --accent:#7bc6ee;
      --accent2:#ffffff;
      --shadow: 0 14px 32px rgba(30,81,118,.14);
      --glow-1: rgba(123,198,238,.34);
      --glow-2: rgba(255,255,255,.72);
      --header-grad-1: rgba(123,198,238,.35);
      --header-grad-2: rgba(246,251,255,.94);
      --logo-grad-1: #7bc6ee;
      --logo-grad-2: rgba(255,255,255,.96);
      --logo-text:#113047;
      --season-banner-start: rgba(123,198,238,.20);
      --season-banner-end: rgba(255,255,255,.55);
      --surface-strong: rgba(255,255,255,.78);
      --surface-border: rgba(123,198,238,.26);
      --surface-soft: rgba(123,198,238,.08);
      --surface-soft-hover: rgba(123,198,238,.14);
      --surface-soft-strong: rgba(123,198,238,.16);
      --surface-highlight: rgba(255,255,255,.52);
      --surface-highlight-strong: rgba(123,198,238,.24);
      --surface-highlight-border: rgba(123,198,238,.30);
      --btn-primary-text: #113047;
    }

    body[data-theme="warm"]{
      --bg:#2a120c;
      --card:#4b1f14;
      --card2:#6d2415;
      --text:#fff1dc;
      --muted:#e7c9a7;
      --accent:#ffb347;
      --accent2:#ffd98a;
      --shadow: 0 16px 36px rgba(0,0,0,.38);
      --glow-1: rgba(255,179,71,.34);
      --glow-2: rgba(164,49,24,.24);
      --header-grad-1: rgba(255,179,71,.24);
      --header-grad-2: rgba(75,31,20,.94);
      --logo-grad-1: #ffb347;
      --logo-grad-2: rgba(164,49,24,.94);
      --logo-text:#4a1c10;
      --season-banner-start: rgba(255,179,71,.18);
      --season-banner-end: rgba(164,49,24,.12);
      --surface-strong: rgba(75,31,20,.78);
      --surface-border: rgba(255,217,138,.18);
      --surface-soft: rgba(255,241,220,.08);
      --surface-soft-hover: rgba(255,241,220,.14);
      --surface-soft-strong: rgba(255,241,220,.16);
      --surface-highlight: rgba(255,179,71,.14);
      --surface-highlight-strong: rgba(255,179,71,.24);
      --surface-highlight-border: rgba(255,179,71,.34);
      --btn-primary-text: #4a1c10;
    }
    *{ box-sizing:border-box; }
    body{
      margin:0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background:
        radial-gradient(1200px 800px at 20% 10%, var(--glow-1), transparent 60%),
        radial-gradient(1000px 700px at 80% 0%, var(--glow-2), transparent 55%),
        var(--bg);
      color:var(--text);
    }
    a{ color:inherit; text-decoration:none; }
    .wrap{ max-width:var(--max); margin:0 auto; padding:18px; }
    header{
      display:flex; gap:14px; align-items:center; justify-content:space-between;
      padding:14px 16px; border-radius:var(--radius);
      background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2));
      box-shadow: var(--shadow);
      position: sticky; top: 10px; z-index: 5;
      backdrop-filter: blur(8px);
    }
    .brand{
      display:flex; align-items:center; gap:12px; min-width: 180px;
    }
    .logo{
      width:44px; height:44px; border-radius:14px;
      background: linear-gradient(135deg, var(--logo-grad-1), var(--logo-grad-2));
      box-shadow: 0 10px 18px rgba(0,0,0,.25);
      display:grid; place-items:center;
      color:var(--logo-text); font-weight:900;
      letter-spacing:.5px;
      user-select:none;
    }
    .brand h1{ font-size:18px; margin:0; line-height:1.1; }
    .brand small{ display:block; color:var(--muted); font-weight:500; margin-top:3px; }

    .player{
      flex: 1;
      display:flex; align-items:center; gap:12px;
      padding:10px 12px;
      border-radius: var(--radius2);
      background: var(--surface-strong);
      border: 1px solid var(--surface-border);
      min-width: 320px;
    }

    .btn{
      border:0; cursor:pointer;
      border-radius:14px;
      padding:10px 12px;
      background: var(--surface-soft-strong);
      color: var(--text);
      transition: transform .08s ease, background .2s ease, opacity .2s ease;
      display:inline-flex; align-items:center; gap:10px;
      user-select:none;
      -webkit-tap-highlight-color: transparent;
    }
    .btn:hover{ background: var(--surface-soft-hover); }
    .btn:active{ transform: translateY(1px); }
    .btn.primary{
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      color:var(--btn-primary-text);
      font-weight:800;
    }
    .btn.primary:hover{ opacity:.95; }
    .btn[disabled]{ opacity:.55; cursor:default; }

    .pill{
      padding:6px 10px;
      border-radius: 999px;
      background: rgba(61,220,151,.18);
      border: 1px solid rgba(61,220,151,.35);
      color: var(--text);
      font-size: 12px;
      white-space:nowrap;
    }
    .pill.off{
      background: rgba(255,204,102,.14);
      border-color: rgba(255,204,102,.25);
    }
    /* NIEUW: ONLINE (wel live, maar jij speelt niet) */
    .pill.ready{
      background: rgba(109,158,235,.14);
      border-color: rgba(109,158,235,.28);
    }

    /* Request cooldown pill */
    .pill.req{
      background: rgba(201,218,242,.12);
      border-color: rgba(201,218,242,.22);
      cursor:pointer;
    }

    /* Request pill states */
    .pill.req.is-cooldown{
      background: rgba(231,76,60,.18);
      border-color: rgba(231,76,60,.35);
      color: #fff;
    }

    .pill.req.is-ready{
      background: rgba(46,204,113,.18);
      border-color: rgba(46,204,113,.35);
      color: #fff;
    }

    /* voorkomt verspringen bij Verzoek/Aanvragen */
    .pill.req.is-ready{
      min-width: 110px;      /* pas evt. iets aan */
      justify-content: center;
      text-align: center;
      white-space: nowrap;
    }

    /* Toasts */
    #phToastHost{
      position: fixed;
      transform: translate(-50%,-50%);
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: min(520px, calc(100vw - 24px));
      pointer-events: none;
      align-items: stretch;
      top: 20px;
      right: 20px;
      z-index: 99999;
    }
    .ph-toast{
      pointer-events: none;
      padding: 12px 14px;
      border-radius: 18px;
      border: 1px solid rgba(201,218,242,.22);
      background: rgba(11,36,71,.92);
      box-shadow: 0 12px 28px rgba(0,0,0,.38);
      color: var(--text);
      display:flex;
      gap:10px;
      align-items:flex-start;
      backdrop-filter: blur(8px);
    }
    .ph-toast .t{ font-weight: 900; margin-bottom: 2px; }
    .ph-toast .m{ color: var(--muted); font-size: 13px; line-height: 1.25; }

    .ph-toast.success{
      background: rgba(46, 204, 113, .92);
      border-color: rgba(46, 204, 113, .45);
    }
    .ph-toast.error{
      background: rgba(231, 76, 60, .92);
      border-color: rgba(231, 76, 60, .45);
    }

    .ph-theme-banner{
      margin: 0 0 16px;
      padding: 12px 14px;
      border-radius: 18px;
      background: linear-gradient(135deg, var(--season-banner-start), var(--season-banner-end));
      border: 1px solid rgba(201,218,242,.20);
      box-shadow: var(--shadow);
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      flex-wrap:wrap;
    }
    .ph-theme-banner strong{ font-size:14px; }
    .ph-theme-banner span{ color: var(--muted); font-size: 13px; }

    .meta{
      display:flex; flex-direction:column; min-width: 220px;
    }
    .meta .title{
      font-size: 13px; color: var(--muted);
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .meta .state{
      font-size: 14px; font-weight:700;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }

    .controls{
      display:flex; align-items:center; gap:10px;
      margin-left:auto;
    }
    .vol{
      display:flex; align-items:center; gap:8px;
      background: var(--surface-soft);
      border:1px solid var(--surface-border);
      padding:8px 10px;
      border-radius: 14px;
    }
    input[type="range"]{
      width: 130px;
      accent-color: var(--accent);
    }

    .grid{
      display:grid;
      grid-template-columns: 260px 1fr;
      gap: 16px;
      margin-top: 16px;
    }
/*    nav{
      background: var(--surface-strong);
      border: 1px solid var(--surface-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;
    } */
    nav{
      background: var(--surface-strong);
      border: 1px solid var(--surface-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;

      position: sticky;
      top: 92px;
      align-self: start;
      z-index: 4;
    }
    .navhead{
      padding:14px 14px 10px;
      background: var(--surface-highlight);
      border-bottom: 1px solid var(--surface-border);
    }
    .navhead .t{ font-weight:900; }
    .navhead .s{ color:var(--muted); font-size:12px; margin-top:4px; }
    .navlist{ display:flex; flex-direction:column; padding:10px; gap:8px; }
    .navlink{
      padding:12px 12px;
      border-radius: 16px;
      border: 1px solid var(--surface-border);
      background: var(--surface-soft);
      transition: background .2s ease, transform .08s ease;
      display:flex; justify-content:space-between; align-items:center;
    }
    .navlink:hover{ background: var(--surface-soft-hover); }
    .navlink:active{ transform: translateY(1px); }
    .navlink.active{
      background: var(--surface-highlight-strong);
      border-color: var(--surface-highlight-border);
    }
    .navlink .tag{
      font-size:12px; color: var(--muted);
      padding:3px 8px; border-radius:999px;
      background: rgba(0,0,0,.18);
    }

    main{
      background: var(--surface-strong);
      border: 1px solid var(--surface-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      min-height: 420px;
      overflow:hidden;
    }
    .content{ padding: 16px; }
    .loading{
      padding: 26px 16px;
      color: var(--muted);
      display:flex; align-items:center; gap:10px;
    }
    .dot{
      width:10px; height:10px; border-radius:999px;
      background: rgba(109,158,235,.9);
      box-shadow: 0 0 0 6px rgba(109,158,235,.16);
      animation: pulse 1.2s infinite;
    }
    @keyframes pulse{
      0%{ transform:scale(.9); opacity:.7 }
      50%{ transform:scale(1.1); opacity:1 }
      100%{ transform:scale(.9); opacity:.7 }
    }

    footer{
      margin-top: 16px;
      color: var(--muted);
      font-size: 12px;
      text-align:center;
      padding: 10px 0 18px;
    }

    /* responsive */
/*    @media (max-width: 980px){
      .grid{ grid-template-columns: 1fr; }
      .meta{ min-width: 0; }
      input[type="range"]{ width: 110px; }
      header{ gap:10px; flex-wrap:wrap; }
      .player{ width:100%; min-width: 0; }
    }
*/

    @media (max-width: 980px){
      .grid{ grid-template-columns: 1fr; }
      .meta{ min-width: 0; }
      input[type="range"]{ width: 110px; }
      header{ gap:10px; flex-wrap:wrap; }
      .player{ width:100%; min-width: 0; }

      nav{
        position: static;
        top: auto;
      }
    }

    /* phone volume overflow fix */
    @media (max-width: 480px){
      .player{ flex-wrap:wrap; }
      .controls{ width:100%; margin-left:0; justify-content:space-between; }
      .vol{ flex:1; justify-content:space-between; }
      input[type="range"]{ width:100%; }
    }

    /* ========================= MOBILE FIX (compact + netjes) ========================= */
    @media (max-width: 640px){
      .wrap{ padding: 12px; }

      header{ position: static; top: auto; padding: 12px; gap: 10px; }

      .brand{ width: 100%; min-width: 0; justify-content: flex-start; }

      .player{
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
      }

      #btnPlay{
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        border-radius: 16px;
      }

      .meta{ width: 100%; min-width: 0; }

      .meta .state{
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.25;
      }

/*
      .controls{
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .pill{ width: fit-content; }
*/

      .controls{
        width: 100%;
        margin-left: 0;
        display:flex;
        gap:8px;
        flex-wrap:wrap;              /* mag naar nieuwe regel */
      }

      .controls .pill{
        flex:1 1 0;                  /* ONLINE en VERZOEK naast elkaar */
        justify-content:center;
        text-align:center;
        white-space:nowrap;
      }

      .controls .vol{
        flex: 0 0 100%;        /* volume eronder */
        width:100%;            /* slider naar nieuwe regel */
      }

      .controls .vol input[type="range"]{
        width:100%;
      }

      .vol{ width: 100%; }
      .vol input[type="range"]{ width: 100%; }

      .grid{ grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }

      nav{ border-radius: 18px; }
      .navlist{
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
      }
      .navlink{
        flex: 0 0 auto;
        min-width: 140px;
        padding: 12px 12px;
        border-radius: 16px;
      }

      .content{ padding: 14px; }
    }

    @media (max-width: 420px){
      .navlink{ min-width: 125px; }
      .brand h1{ font-size: 16px; }
    }

    /* Now playing animatie */
    #playerState.ph-fadeout{
      opacity: 0;
      transform: translateY(3px);
      transition: opacity .18s ease, transform .18s ease;
    }
    #playerState.ph-fadein{
      opacity: 1;
      transform: translateY(0);
      transition: opacity .22s ease, transform .22s ease;
    }
  /* Dedication modal */
  #phDedModal{ position:fixed; inset:0; z-index:9999; }
  #phDedModal .ph-modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
  #phDedModal .ph-modal{
    position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
    width:min(520px, calc(100vw - 28px));
    background:var(--card); color:var(--text);
    border-radius:16px; box-shadow:0 12px 40px rgba(0,0,0,.45);
    border:1px solid rgba(255,255,255,.08);
    overflow:hidden;
  }
  #phDedModal .ph-modal-head{ padding:14px 16px; font-weight:700; background:rgba(255,255,255,.03); }
  #phDedModal .ph-modal-body{ padding:14px 16px; }
  #phDedModal .ph-label{ display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
  #phDedModal .ph-input, #phDedModal .ph-textarea{
    width:100%; border-radius:12px; border:1px solid rgba(255,255,255,.10);
    background:rgba(0,0,0,.18); color:var(--text);
    padding:10px 12px; outline:none;
  }
  #phDedModal .ph-textarea{ min-height:96px; resize:vertical; }
  #phDedModal .ph-input:focus, #phDedModal .ph-textarea:focus{ border-color:rgba(255,255,255,.22); }
  #phDedModal .ph-hint{ margin-top:8px; font-size:12px; color:var(--muted); }
  #phDedModal .ph-modal-actions{
    padding:12px 16px; display:flex; gap:10px; justify-content:flex-end;
    background:rgba(255,255,255,.02);
  }
  #phDedModal .ph-btn{ border-radius:12px; padding:10px 12px; border:1px solid rgba(255,255,255,.10); cursor:pointer; }
  #phDedModal .ph-btn-ghost{ background:transparent; color:var(--text); }
  #phDedModal .ph-btn-primary{ background:var(--accent); color:#071a2f; border-color:transparent; font-weight:700; }


/* ===== Ticker (scroller) ===== */

.ticker{
  background: var(--card2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  margin: 12px 0 14px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.ticker-inner{
  width: 100%;
  overflow: hidden;
  /* vaste hoogte zodat verticale wissel strak blijft */
  height: var(--ticker-row-h, 44px);
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.ticker-track{
  display: flex;
  flex-direction: column;
  width: 100%;
  will-change: transform;
  transform: translateY(0);
  transition: transform 480ms ease;
}
.ticker-item{
  height: var(--ticker-row-h, 44px);
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* subtiele fade boven/onder */
.ticker::before,
.ticker::after{
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}
.ticker::before{
  top: 0;
  background: linear-gradient(to bottom, var(--card2), rgba(11,36,71,0));
}
.ticker::after{
  bottom: 0;
  background: linear-gradient(to top, var(--card2), rgba(11,36,71,0));
}


/* Toast polish */
.ph-toast{
  position: relative;
  overflow: hidden;
  animation: phToastFadeIn .28s ease;
}
.ph-toast::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.45);
  transform-origin: left center;
  animation: phToastProgress 5.2s linear forwards;
}
.ph-toast .t,
.ph-toast .m{
  text-align: center;
}
.ph-toast .m{
  color: inherit;
}
.ph-toast .t::before{
  content: "♪ ";
  opacity: .95;
}

@keyframes phToastFadeIn{
  from{
    opacity: 0;
    transform: translateY(8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes phToastProgress{
  from{
    transform: scaleX(1);
  }
  to{
    transform: scaleX(0);
  }
}

.spotlight-line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.spotlight-artist{
    font-weight:600;
}

.spotlight-title{
    opacity:0.95;
}

.spotlight-action{
    margin-left:auto;
}



/* ===== Poll ===== */
.ph-poll-card{
  border:1px solid rgba(201,218,242,.16);
  background: rgba(201,218,242,.04);
  border-radius: 18px;
  padding: 18px;
}
.ph-poll-head h2{ margin:0 0 4px; }
.ph-poll-sub, .ph-poll-help, .ph-poll-total, .ph-poll-empty{ color:var(--muted); }
.ph-poll-question{
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
  margin: 10px 0 16px;
}
.ph-poll-options{ display:grid; gap:10px; }
.ph-poll-option{
  border:1px solid rgba(201,218,242,.18);
  background: rgba(201,218,242,.08);
  color:var(--text);
  cursor:pointer;
  text-align:left;
  padding:14px 16px;
  border-radius:16px;
  font-weight:800;
}
.ph-poll-option:hover{ background: rgba(201,218,242,.14); }
.ph-poll-results{ display:grid; gap:12px; }
.ph-poll-choice-note{ font-size:14px; color:var(--muted); margin-bottom:2px; }
.ph-poll-bar-row{ padding:12px 12px 10px; border-radius:16px; background: rgba(201,218,242,.05); border:1px solid rgba(201,218,242,.10); }
.ph-poll-bar-row.is-selected{ border-color: rgba(61,220,151,.35); background: rgba(61,220,151,.08); }
.ph-poll-bar-top{ display:flex; justify-content:space-between; gap:10px; margin-bottom:8px; }
.ph-poll-bar-label{ font-weight:800; }
.ph-poll-bar-meta{ color:var(--muted); font-size:13px; white-space:nowrap; }
.ph-poll-bar-track{ height:12px; border-radius:999px; background: rgba(0,0,0,.2); overflow:hidden; }
.ph-poll-bar-fill{ height:100%; border-radius:999px; background: linear-gradient(90deg, rgba(61,220,151,.95), rgba(109,158,235,.95)); }
@media (max-width:640px){
  .ph-poll-question{ font-size:19px; }
  .ph-poll-bar-top{ flex-direction:column; }
}


/* ===== Chat widget ===== */
.ph-chat-fab[hidden],
.ph-chat-widget[hidden]{ display:none !important; }

.ph-chat-fab,
.ph-chat-widget{
  --ph-chat-surface-strong: var(--surface-strong);
  --ph-chat-surface-border: var(--surface-border);
  --ph-chat-surface-soft: var(--surface-soft);
  --ph-chat-surface-soft-hover: var(--surface-soft-hover);
  --ph-chat-surface-soft-strong: var(--surface-soft-strong);
  --ph-chat-surface-highlight: var(--surface-highlight);
  --ph-chat-surface-highlight-border: var(--surface-highlight-border);
  --ph-chat-accent: var(--accent);
  --ph-chat-accent2: var(--accent2);
  --ph-chat-text: var(--text);
  --ph-chat-muted: var(--muted);
  --ph-chat-btn-text: var(--btn-primary-text);
}

.ph-chat-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  border: 1px solid var(--ph-chat-surface-highlight-border);
  background: linear-gradient(135deg, var(--ph-chat-accent), var(--ph-chat-accent2));
  color: var(--ph-chat-btn-text);
  border-radius: 999px;
  min-height: 52px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(0,0,0,.28);
  font-weight: 900;
}
.ph-chat-fab.is-open{ background: var(--surface-soft-strong); }
.ph-chat-fab.is-open{ opacity: 0; pointer-events: none; transform: translateY(8px); }
.ph-chat-badge{
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff6b6b;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.ph-chat-widget{
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 10019;
  width: min(380px, calc(100vw - 20px));
  background: var(--ph-chat-surface-strong);
  border: 1px solid var(--ph-chat-surface-border);
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(0,0,0,.34);
  overflow: hidden;
}
.ph-chat-widget.is-open{ display:block; }

.ph-chat-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding: 14px 16px 12px;
  background: var(--ph-chat-surface-highlight);
  border-bottom: 1px solid var(--ph-chat-surface-border);
}
.ph-chat-title{ font-weight: 900; font-size: 18px; color: var(--ph-chat-text); }
.ph-chat-status{ color: var(--ph-chat-muted); font-size: 12px; margin-top: 4px; line-height: 1.35; }
.ph-chat-status.is-error{ color: #ff9d9d; }
.ph-chat-status.is-warn{ color: #ffd98d; }
.ph-chat-status.is-ok{ color: var(--muted); }
.ph-chat-close{
  border: 0;
  background: var(--ph-chat-surface-soft);
  color: var(--ph-chat-text);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.ph-chat-close:hover{ background: var(--ph-chat-surface-soft-hover); }
.ph-chat-welcome{
  padding: 10px 16px;
  color: var(--ph-chat-muted);
  font-size: 13px;
  background: var(--ph-chat-surface-soft);
  border-bottom: 1px solid var(--ph-chat-surface-border);
}
.ph-chat-messages{
  max-height: min(52vh, 430px);
  min-height: 240px;
  overflow-y: auto;
  padding: 14px 14px 10px;
  display: grid;
  gap: 12px;
}
.ph-chat-empty{
  color: var(--ph-chat-muted);
  font-size: 13px;
  padding: 10px 4px;
}
.ph-chat-msg{
  display:grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 10px;
  align-items:start;
}
.ph-chat-avatar{
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface-soft);
}
.ph-chat-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom: 4px;
}
.ph-chat-name{
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.ph-chat-time{
  color: var(--ph-chat-muted);
  font-size: 11px;
  white-space: nowrap;
}
.ph-chat-bubble{
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.ph-chat-form{
  display:grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--ph-chat-surface-border);
  background: var(--ph-chat-surface-soft);
}
.ph-chat-form textarea{
  width:100%;
  resize:none;
  min-height: 46px;
  max-height: 96px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--ph-chat-surface-border);
  background: var(--ph-chat-surface-strong);
  color: var(--ph-chat-text);
  outline: none;
}
.ph-chat-form textarea::placeholder{ color: color-mix(in srgb, var(--ph-chat-muted) 72%, transparent); }
.ph-chat-form textarea:focus{
  border-color: var(--ph-chat-surface-highlight-border);
  box-shadow: 0 0 0 3px var(--ph-chat-surface-highlight);
}

.ph-chat-form .btn,
.ph-chat-form .btn-primary,
#phChatSend{
  background: linear-gradient(135deg, var(--ph-chat-accent), var(--ph-chat-accent2)) !important;
  color: var(--ph-chat-btn-text) !important;
  border: 0 !important;
  font-weight: 800 !important;
}
.ph-chat-form .btn:hover,
.ph-chat-form .btn-primary:hover,
#phChatSend:hover{
  opacity: .95;
}

body.ph-chat-open{
  overflow: auto;
}

@media (max-width: 860px){
  .ph-chat-fab{
    right: 12px;
    left: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.26);
    font-size: 14px;
    gap: 8px;
  }
  .ph-chat-badge{
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .ph-chat-widget{
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -12px 36px rgba(0,0,0,.34);
    max-height: min(82dvh, 720px);
    flex-direction: column;
  }
  .ph-chat-widget.is-open{
    display: flex;
  }
  .ph-chat-header{
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 14px 10px;
  }
  .ph-chat-title{
    font-size: 17px;
  }
  .ph-chat-status{
    font-size: 11px;
    margin-top: 3px;
  }
  .ph-chat-close{
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
  .ph-chat-welcome{
    padding: 9px 14px;
    font-size: 12px;
  }
  .ph-chat-messages{
    flex: 1 1 auto;
    max-height: none;
    min-height: 180px;
    padding: 12px 12px 8px;
    gap: 10px;
  }
  .ph-chat-msg{
    grid-template-columns: 36px minmax(0,1fr);
    gap: 9px;
  }
  .ph-chat-avatar{
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .ph-chat-meta{
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 3px;
  }
  .ph-chat-name{
    font-size: 12px;
  }
  .ph-chat-time{
    font-size: 10px;
  }
  .ph-chat-bubble{
    padding: 9px 11px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.35;
  }
  .ph-chat-form{
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  }
  .ph-chat-form textarea{
    min-height: 44px;
    max-height: 112px;
    font-size: 16px;
    padding: 10px 12px;
  }
  .ph-chat-form .btn{
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 420px){
  .ph-chat-fab{
    left: auto;
    right: 10px;
    width: auto;
    max-width: calc(100vw - 20px);
    justify-content: center;
  }
  .ph-chat-meta{
    flex-direction: column;
  }
}

.ph-site-message{
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(201,218,242,.18);
  background:rgba(201,218,242,.08);
}
.ph-site-message.info{ background:rgba(109,158,235,.14); border-color:rgba(109,158,235,.24); }
.ph-site-message.warn{ background:rgba(255,204,102,.14); border-color:rgba(255,204,102,.28); }
.ph-site-message.ok{ background:rgba(61,220,151,.14); border-color:rgba(61,220,151,.24); }
.ph-site-message.danger{ background:rgba(255,107,107,.14); border-color:rgba(255,107,107,.26); }
.ph-site-message-title{ font-weight:900; margin-bottom:4px; }
.ph-site-message-text{ line-height:1.45; white-space:pre-line; }


/* Public pages theme follow-through */
#content .ph-contact-card,
#content .ph-rules-card,
#content .ph-card,
#content .np-card,
#content .ph-prof-card,
#content .card{
  background: var(--surface-strong) !important;
  border: 1px solid var(--surface-border) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow) !important;
}

#content .ph-contact-head,
#content .ph-rules-head,
#content .ph-topbar,
#content .np-topbar{
  background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2)) !important;
  border-bottom: 1px solid var(--surface-border) !important;
}

#content .ph-contact-sub,
#content .ph-rules-sub,
#content .ph-meta,
#content .np-meta,
#content .ph-prof-sub,
#content .ph-prof-note,
#content .ph-prof-previewlabel,
#content #phMoreInfo{
  color: var(--muted) !important;
}

#content .ph-field label,
#content .ph-rules-list li,
#content .faq-a,
#content .ph-table td,
#content .ph-table thead th,
#content .np-date-badge,
#content .ph_waitbadge,
#content .ph-prof-input,
#content .ph-prof-select,
#content .ph-prof-file,
#content .ph-prof-btn,
#content #phMoreBtn{
  color: var(--text) !important;
}

#content .ph-field input,
#content .ph-field textarea,
#content #phSearch,
#content .ph-prof-input,
#content .ph-prof-select,
#content .ph-prof-file,
#content .ph-prof-color{
  background: var(--surface-soft) !important;
  border: 1px solid var(--surface-border) !important;
  color: var(--text) !important;
}

#content .ph-field input::placeholder,
#content .ph-field textarea::placeholder,
#content #phSearch::placeholder,
#content .ph-prof-input::placeholder{
  color: var(--muted) !important;
}

#content .ph-field input:focus,
#content .ph-field textarea:focus,
#content #phSearch:focus,
#content .ph-prof-input:focus,
#content .ph-prof-select:focus,
#content .ph-prof-file:focus{
  border-color: var(--surface-highlight-border) !important;
  box-shadow: 0 0 0 3px var(--surface-highlight) !important;
}

#content .ph-alpha,
#content .ph-more,
#content .faq-a,
#content .ph-rules-note{
  background: var(--surface-soft) !important;
  border-color: var(--surface-border) !important;
}

#content .faq-q,
#content .ph-ab,
#content .np-date-badge,
#content .ph_waitbadge,
#content #phMoreBtn,
#content .ph-prof-btn{
  background: var(--surface-soft-strong) !important;
  border: 1px solid var(--surface-border) !important;
}

#content .faq-q:hover,
#content .ph-ab:hover,
#content .np-date-badge:hover,
#content .ph-actions a:hover .ph_waitbadge,
#content #phMoreBtn:hover,
#content .ph-prof-btn:hover{
  background: var(--surface-highlight-strong) !important;
  border-color: var(--surface-highlight-border) !important;
}

#content .ph-ab.is-active,
#content .np-date-badge.is-active,
#content .ph-prof-btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  border-color: transparent !important;
  color: var(--btn-primary-text) !important;
}

#content .faq-item.open .faq-q,
#content tr.ph_artistrow td,
#content .ph-table tbody tr:hover td,
#content .np-table tbody tr:hover td{
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: var(--btn-primary-text) !important;
}

#content .ph-table tbody tr[bgcolor] td,
#content .ph-table tbody tr:not(.ph_artistrow) td,
#content .np-table td{
  background: color-mix(in srgb, var(--card) 78%, transparent) !important;
  color: var(--text) !important;
}

#content .ph-table thead th{
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--surface-border) !important;
}

#content .ph-table td{
  border-top: 1px solid var(--surface-border) !important;
}

#content .ph_artistname,
#content .ph-rules-list a{
  color: var(--accent2) !important;
}

body[data-theme="warm"] #content .ph_artistname,
body[data-theme="warm"] #content tr.ph_artistrow td .ph_artistname,
body[data-theme="warm"] #content tr.ph_artistrow td .ph_artistname *{
  color: var(--btn-primary-text) !important;
}

#content .ph-spotlight-table tbody tr:hover td,
#content .ph-spotlight-table tbody tr:hover td *,
#content .ph-spotlight-table tbody tr:hover td a{
  background: color-mix(in srgb, var(--card) 78%, transparent) !important;
  color: var(--text) !important;
  text-shadow: none !important;
}

#content .ph-spotlight-table .ph_waitbadge,
#content .ph-spotlight-table tbody tr:hover .ph_waitbadge,
#content .ph-spotlight-table tbody tr:hover .ph_waitbadge *{
  background: var(--surface-soft-strong) !important;
  border-color: var(--surface-border) !important;
  color: var(--text) !important;
  text-shadow: none !important;
}

#content .ph-contact-hint,
#content .ph-rules-note,
#content .np-meta,
#content .ph-meta,
#content .faq-a{
  color: var(--muted) !important;
}

#content .np-cover,
#content .ph-prof-photo{
  background: var(--surface-soft) !important;
  border: 1px solid var(--surface-border) !important;
}

#content .ph-prof-btn.danger{
  background: rgba(255,107,107,.16) !important;
  border: 1px solid rgba(255,107,107,.26) !important;
  color: var(--text) !important;
}
#content .ph-prof-btn.danger:hover{
  background: rgba(255,107,107,.24) !important;
}
