/* Syndicate contest player (Soca Monarch, Calypso Monarch …). Mobile first; desktop from 960 px.
   Colours come from the contest's theme (CSS variables set by contest.js). */
:root { --bg:#0a0f2c; --panel:#141c47; --panel2:#1d2a63; --line:#2a3878; --ink:#fff; --muted:#aeb9e6; --dim:#7f8bc0;
  --gold:#ffc93c; --hero1:#1d3fbf; --hero2:#d9761a; --seg:#4cc23a; --segink:#062300; --tile:#2f7d22; }
* { box-sizing:border-box; margin:0; padding:0; }
html, body { background:var(--bg); color:var(--ink); font-family:Montserrat, system-ui, sans-serif; -webkit-font-smoothing:antialiased; }
button { font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
button:focus-visible, input:focus-visible { outline:3px solid var(--gold); outline-offset:2px; border-radius:8px; }
.app { min-height:100vh; padding-bottom:150px; }
.desk-only { display:none !important; }

/* header */
.hero { padding:calc(18px + env(safe-area-inset-top)) 18px 14px;
  background:radial-gradient(120% 140% at 0% 0%, var(--hero1) 0%, transparent 55%), radial-gradient(120% 140% at 100% 0%, var(--hero2) 0%, transparent 55%), var(--bg); }
.herol { min-width:0; }
.brandrow { display:flex; justify-content:space-between; font-size:11px; font-weight:700; color:var(--muted); letter-spacing:.08em; }
.titlerow { display:flex; gap:14px; align-items:center; margin-top:10px; }
.logo { height:92px; width:auto; flex:none; filter:drop-shadow(0 6px 14px #0006); }
.logo:not([src]) { visibility:hidden; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ctitle { font-size:26px; font-weight:900; line-height:1.02; letter-spacing:-.01em; }
.csub { font-size:12px; font-weight:700; letter-spacing:.04em; color:#ffe7a8; margin-top:8px; line-height:1.45; }

/* winners */
.monarchs { display:flex; flex-direction:column; gap:10px; padding:14px 16px 4px; }
.mon { border-radius:16px; padding:12px; display:flex; gap:12px; align-items:center; text-align:left; width:100%; }
.mon > span:nth-child(2) { min-width:0; } .mon .a, .mon .t2 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mon .big { width:64px; height:64px; border-radius:12px; flex:none; background:#0003 center/cover no-repeat; }
.mon .k { font-size:10px; font-weight:800; letter-spacing:.14em; color:var(--gold); }
.mon .a { font-size:18px; font-weight:900; margin-top:3px; }
.mon .t2 { font-size:13px; color:#ffffffd9; margin-top:1px; }
.mon .pl svg { width:20px; height:20px; }
.mon .pl { margin-left:auto; width:44px; height:44px; border-radius:50%; background:#fff; color:#111; display:grid; place-items:center; font-size:16px; flex:none; }

/* segments + rounds */
.segs { display:flex; gap:8px; padding:14px 16px 6px; }
.segs[hidden] { display:none; }
.seg { flex:1; border-radius:14px; padding:10px 12px; background:var(--panel); border:1px solid var(--line); text-align:left; }
.seg .k { font-size:15px; font-weight:800; display:block; } .seg .n { font-size:11px; color:var(--muted); font-weight:600; margin-top:2px; display:block; }
.seg[aria-pressed="true"] { background:var(--c); border-color:var(--c); color:var(--ci); } .seg[aria-pressed="true"] .n { color:var(--ci); opacity:.8; }
.rounds { display:flex; gap:6px; padding:8px 16px 10px; overflow-x:auto; scrollbar-width:none; }
.rounds::-webkit-scrollbar { display:none; }
.chip { white-space:nowrap; font-size:12px; font-weight:700; padding:8px 12px; border-radius:999px; border:1px solid var(--line); color:var(--muted); }
.chip[aria-pressed="true"] { background:#fff; color:var(--bg); border-color:#fff; }
.chip:disabled { opacity:.45; cursor:default; }
.playall svg { width:16px; height:16px; vertical-align:-3px; }
.playall { gap:12px; margin:2px 16px 8px; width:calc(100% - 32px); border-radius:12px; padding:11px 14px; font-weight:800; font-size:13px; display:flex; justify-content:space-between; align-items:center; background:var(--seg); color:var(--segink); }
.playall[hidden] { display:none; }

/* list */
.lists { padding:0 8px; }
.list { list-style:none; }
.seghead { display:none; }
.row { display:flex; align-items:center; gap:11px; padding:8px 8px; border-radius:12px; width:100%; text-align:left; }
.row:hover { background:#ffffff0a; }
.row.playing { background:var(--panel2); }
.row.failed { opacity:.45; }
.num { width:20px; font-size:11px; color:var(--dim); font-weight:700; text-align:right; flex:none; }
.place { width:20px; font-size:13px; font-weight:900; color:var(--gold); text-align:center; flex:none; }
.tile { width:44px; height:44px; border-radius:9px; flex:none; background:var(--tile) center/cover no-repeat; }
.tile.logo-tile { background-size:78% auto; }
.meta { flex:1; min-width:0; }
.meta .a { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.meta .t2 { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.badge { font-size:9px; font-weight:800; letter-spacing:.08em; padding:3px 6px; border-radius:5px; margin-left:6px; vertical-align:2px; }
.b-semi { background:#ffffff22; color:#fff; } .b-final, .b-place { background:var(--gold); color:#3a2800; }
.dur { font-size:11px; color:var(--dim); font-weight:600; flex:none; }
.empty { color:var(--muted); font-size:14px; padding:24px 20px; line-height:1.5; }
.foot { color:var(--dim); font-size:11px; padding:18px 20px; line-height:1.5; }

/* mobile bar */
.bar { position:fixed; left:0; right:0; bottom:0; background:#070a1fef; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-top:1px solid var(--line); padding:9px calc(14px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)); z-index:10; }
.bar[hidden] { display:none !important; }
.barctx { font-size:10px; color:var(--muted); font-weight:700; letter-spacing:.06em; margin-bottom:7px; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.barrow { display:flex; align-items:center; gap:10px; }
.bart { width:42px; height:42px; border-radius:8px; flex:none; background:var(--tile) center/cover no-repeat; }
.bart.logo-tile { background-size:78% auto; }
.barmeta { flex:1; min-width:0; } .barmeta .t { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .barmeta .a { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ic { width:36px; height:40px; display:grid; place-items:center; color:#fff; }
.pl { width:44px; height:44px; border-radius:50%; background:#fff; color:var(--bg); display:grid; place-items:center; flex:none; }
input[type=range] { -webkit-appearance:none; appearance:none; width:100%; height:18px; background:transparent; margin-top:6px; --p:0%; }
input[type=range]::-webkit-slider-runnable-track { height:4px; border-radius:2px; background:linear-gradient(90deg, var(--seg) var(--p), #ffffff26 var(--p)); }
input[type=range]::-moz-range-track { height:4px; border-radius:2px; background:linear-gradient(90deg, var(--seg) var(--p), #ffffff26 var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:14px; height:14px; border-radius:50%; background:#fff; margin-top:-5px; }
input[type=range]::-moz-range-thumb { width:14px; height:14px; border:0; border-radius:50%; background:#fff; }
.times { display:flex; justify-content:space-between; font-size:10px; color:var(--dim); font-weight:600; }

/* desktop */
@media (min-width: 960px) {
  .desk-only { display:flex !important; } .mob-only { display:none !important; }
  .app { padding-bottom:40px; max-width:1360px; margin:0 auto; }
  .hero { padding:30px 36px 22px; display:flex; justify-content:space-between; align-items:flex-end; gap:20px; border-radius:0 0 24px 24px; }
  .titlerow { margin-top:12px; } .logo { height:120px; }
  .ctitle { font-size:40px; } .csub { font-size:12px; }
  .rounds { padding:0; flex-wrap:wrap; justify-content:flex-end; }
  .monarchs { flex-direction:row; gap:18px; padding:22px 36px 0; }
  .mon { flex:1; padding:18px; gap:16px; } .mon > span:nth-child(2) { min-width:0; } .mon .a, .mon .t2 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mon .big { width:96px; height:96px; border-radius:14px; } .mon .a { font-size:24px; } .mon .t2 { font-size:14px; } .mon .pl { width:52px; height:52px; font-size:18px; }
  .main { display:grid; grid-template-columns:minmax(0, 1fr) 380px; gap:28px; padding:20px 36px 0; align-items:start; }
  .segs { padding:0 0 12px; max-width:520px; }
  .playall { margin:0 0 12px; width:auto; }
  .lists { padding:0; display:grid; gap:18px; }
  .lists.two { grid-template-columns:1fr 1fr; }
  .lists.two .seghead, .lists .seghead.show { display:flex; justify-content:space-between; font-size:12px; letter-spacing:.14em; font-weight:800; padding:4px 8px 8px; }
  .lists.two .list, .lists.panel .list { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:8px; }
  .lists:not(.two) .list { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:8px; }
  .row { padding:9px 10px; } .tile { width:48px; height:48px; } .meta .a { font-size:15px; } .meta .t2 { font-size:13px; }
  .now { position:sticky; top:20px; max-height:calc(100vh - 40px); overflow-y:auto; flex-direction:column; background:var(--panel); border:1px solid var(--line); border-radius:20px; padding:20px; }
  .nowart { width:100%; max-width:calc(100vh - 380px); min-width:160px; margin:0 auto; aspect-ratio:1; border-radius:16px; background:var(--tile) center/cover no-repeat; box-shadow:0 18px 40px #0007; }
  .nowart.logo-tile { background-size:70% auto; }
  .nowk { font-size:11px; font-weight:800; letter-spacing:.14em; color:var(--muted); margin-top:16px; text-transform:uppercase; }
  .nowt { font-size:22px; font-weight:900; margin-top:6px; line-height:1.15; } .nowa { font-size:15px; color:var(--muted); margin-top:4px; }
  .seek { margin-top:12px; }
  .ctls { display:flex; justify-content:center; gap:18px; align-items:center; margin-top:8px; }
  .ctls .pl { width:58px; height:58px; font-size:20px; } .ctls .ic { font-size:20px; width:44px; }
  .upnext { flex-direction:column; margin-top:16px; border-top:1px solid var(--line); padding-top:12px; gap:4px; display:flex; }
  .upnext .k { font-size:11px; font-weight:800; letter-spacing:.14em; color:var(--dim); margin-bottom:4px; }
  .upnext .row { padding:6px; } .upnext .tile { width:36px; height:36px; border-radius:7px; } .upnext .meta .a { font-size:13px; } .upnext .meta .t2 { font-size:12px; }
  .foot { padding:24px 36px; }
}

/* coming soon (listed, no track yet) */
.row.soon { opacity:.55; cursor:default; }
.row.soon:hover { background:none; }
.b-soon { background:#ffffff1f; color:var(--muted); }

/* loading: a ring on the play buttons and on the row's number until sound starts (and while buffering) */
@keyframes spin { to { transform:rotate(360deg); } }
.is-loading #play-m, .is-loading #play-d { position:relative; }
.is-loading #play-m svg, .is-loading #play-d svg { visibility:hidden; }
.is-loading #play-m::after, .is-loading #play-d::after { content:''; position:absolute; inset:27%; border:3px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .8s linear infinite; }
.is-loading .row.playing .num { font-size:0; }
.is-loading .row.playing .num::after { content:''; display:inline-block; width:14px; height:14px; border:2px solid var(--gold); border-right-color:transparent; border-radius:50%; animation:spin .8s linear infinite; vertical-align:middle; }
@media (prefers-reduced-motion: reduce) { .is-loading #play-m::after, .is-loading #play-d::after, .is-loading .row.playing .num::after { animation-duration:2.4s; } }

/* 3.24.5 Road March vote */
.vintro { margin:4px 0 14px; padding:14px 16px; border-radius:14px; background:linear-gradient(135deg,#1d8a3c,#0f6b2c); color:#fff; display:flex; flex-direction:column; gap:6px; }
.vintro b { font-size:16px; font-weight:800; } .vintro span { font-size:13px; line-height:1.45; opacity:.95; }
.vgrp { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:8px; margin-bottom:12px; }
.vhead { display:flex; align-items:center; gap:10px; padding:6px 6px 8px 8px; border-bottom:1px solid var(--line); margin-bottom:4px; }
.vhm { flex:1; min-width:0; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.vcode { background:var(--gold); color:#2a1d00; font-weight:900; font-size:13px; padding:4px 8px; border-radius:8px; letter-spacing:.04em; }
.vart { font-weight:800; font-size:16px; } .vn { font-size:12px; color:var(--muted); }
.vbtn { flex:none; display:inline-flex; flex-direction:column; align-items:center; justify-content:center; text-decoration:none; background:#25d366; color:#06210f; border-radius:12px; padding:6px 14px; line-height:1.1; }
.vbtn .vw { font-weight:900; font-size:15px; } .vbtn .vc { font-size:11px; font-weight:700; opacity:.85; }
.bar.hasvote .barctx { line-height:28px; margin-bottom:12px; padding-right:190px; }
#vote-m { position:absolute; right:calc(14px + env(safe-area-inset-right)); top:6px; }
.vbtn.sm { flex-direction:row; gap:8px; padding:5px 10px; border-radius:9px; } .vbtn.sm .vw { font-size:13px; } .vbtn.sm .vc { font-size:11px; }
.nvote { margin:14px 0 4px; display:flex; } .nvote .vbtn { flex:1; flex-direction:row; gap:10px; padding:10px; }
.badge.b-soon { white-space:nowrap; }
.vgrp .list { border:0 !important; background:none !important; padding:0 !important; }
.vrow .meta .t2 { font-size:16px; font-weight:700; color:inherit; white-space:normal; overflow:visible; line-height:1.3; }   /* the full name, never "…" */
.rounds[hidden] { display:none; }
.vintro em { font-style:normal; font-size:12px; opacity:.85; border-top:1px solid #ffffff33; padding-top:6px; }
