/* Gaya ala LekaPong: latar cerah, kad berbingkai lembut, tajuk serif kecil, pil, cip skor */
:root {
  --brand: #5a2d0c;          /* bar atas: kayu papan carrom */
  --navy: #0f172a;
  --accent: #7a3e12;         /* butang utama */
  --tb: #7a3e12; --tb2: #5a2d0c;   /* kayu */
  --or: #d62828;             /* ratu merah */
  --w: #fbf1e3;              /* papan cerah */
  --sh: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(31,74,168,.07);
  --num: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --peach: #fcdcc3;
  --peach-ink: #7a3a0c;
  --gold: #8a6a3a;
  --bg: #eef2f8;
  --card: #ffffff;
  --line: #dde4ef;
  --line2: #dde4ef;
  --ink: #0f172a;
  --muted: #64748b;
  --win: #15803d;
  --loss: #b3261e;
  --radius: 18px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: var(--num);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0a1122; --card:#121b31; --line:#22304d; --line2:#22304d; --accent:#e0663a; --tb:#8a4a1c; --tb2:#6a3510; --w:#2a1c12; --sh:none; --ink:#e8eefc; --ink:#e8ebf1; --muted:#9aa2b1; --peach:#4a2b16; --peach-ink:#ffd7b8; --gold:#c9a66b; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); }
a { color: inherit; }
main { max-width: 860px; margin: 0 auto; padding: 14px 14px 90px; }

/* Bar atas */
.topbar { position: sticky; top: 0; z-index: 20; display:flex; align-items:center; justify-content:space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--brand); color: #fff; }
.brand { display:flex; align-items:center; gap:8px; text-decoration:none; font-weight:700; min-width:0; }
#brand-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Pengepala pertandingan */
.t-head { text-align:center; padding: 18px 16px 6px; }
.t-head .t-logos { display:flex; justify-content:center; align-items:center; gap:14px; margin-bottom:8px; }
.t-head .t-logos img { height:84px; width:auto; max-width:46%; object-fit:contain; }
.t-head h1 { font-size: 24px; line-height:1.15; margin: 0; color: var(--navy); font-weight: 800; letter-spacing:-.01em; }
@media (prefers-color-scheme: dark) { .t-head h1, .h-big { color: #fff; } }
.t-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tags { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:10px; }
.tag { font-size:12px; padding:3px 10px; border-radius:999px; border:1px solid var(--line); background: var(--card); color: var(--muted); }
.tag.live { background: var(--accent); color:#fff; border-color: var(--accent); }

/* Tab: pil */
.tabs { position: sticky; top: 52px; z-index: 15; display:flex; gap:6px; overflow-x:auto; padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tabs a { white-space:nowrap; padding:8px 16px; border-radius:999px; text-decoration:none; font-weight:600; font-size:15px;
  border:1.5px solid #f3c7a5; background: var(--card); color: var(--ink); }
.tabs a.active { background: var(--brand); border-color: var(--brand); color:#fff; }
@media (prefers-color-scheme: dark) { .tabs a.active, .pill-btn.brand { background: var(--accent); border-color: var(--accent); } }

/* Tajuk bahagian */
.eyebrow { font-family: var(--serif); text-transform: uppercase; letter-spacing: .18em; color: var(--gold); font-size: 15px; font-weight:600; margin: 22px 0 2px; }
.h-big { font-size: 30px; line-height:1.1; font-weight: 800; color: var(--navy); margin: 0 0 6px; letter-spacing:-.015em; }
.rule { width: 72px; height: 1px; background: #e9b48a; margin: 10px 0 16px; position: relative; }
.rule::after { content:""; position:absolute; left: 36px; top:-3px; width:1px; height:7px; background:#e9b48a; }
h2 { font-size: 20px; margin: 0 0 8px; font-weight: 700; }
h3 { font-size: 16px; margin: 0 0 6px; }

/* Kad */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(15,29,58,.04), 0 6px 18px rgba(15,29,58,.05); }
.card.soft { border-color: var(--line2); }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: .9rem; }
.small { font-size: .82rem; }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.grow { flex: 1 1 auto; }
.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

/* Butang pil */
.pill-btn { display:inline-flex; align-items:center; gap:8px; border:0; border-radius:999px; padding:11px 20px; font: 600 15px var(--sans);
  cursor:pointer; text-decoration:none; background: #111; color:#fff; }
.pill-btn .dot { width:7px; height:7px; border-radius:50%; background: var(--accent); }
.pill-btn.orange { background: var(--accent); }
.pill-btn.orange .dot { background:#fff; }
.pill-btn.brand { background: var(--brand); }
.pill-btn.light { background: var(--card); color: var(--ink); border:1.5px solid var(--line2); }
.pill-btn.light .dot { background: var(--muted); }
.pill-btn.danger { background:#b91c1c; }
.pill-btn.small { padding:7px 14px; font-size:13px; }
.pill-btn:disabled { opacity:.45; cursor:not-allowed; }
.btn-stack { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }

/* Borang */
label { display:block; font-size:.85rem; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea { width:100%; padding:11px 12px; border:1.5px solid var(--line2); border-radius:12px; font: 15px var(--sans);
  background: var(--bg); color: var(--ink); }
textarea { min-height: 140px; }
label.check { display:flex; align-items:center; gap:8px; color: var(--ink); font-size:.95rem; }
label.check input { width:auto; }
.section-title { font-family: var(--serif); text-transform: uppercase; letter-spacing:.16em; color: var(--gold); font-size: 14px; font-weight:600; margin: 18px 0 2px; }
details > summary { cursor:pointer; list-style:none; }
details > summary::-webkit-details-marker { display:none; }
.fold > summary { font-family: var(--serif); text-transform: uppercase; letter-spacing:.16em; color: var(--gold); font-size: 14px; font-weight:600; padding: 6px 0; }
.fold > summary::before { content:"▸ "; }
.fold[open] > summary::before { content:"▾ "; }

/* Avatar */
.av { display:inline-grid; place-items:center; width:24px; height:24px; border-radius:50%; color:#fff; font: 700 11px var(--sans); flex:0 0 auto; }
.pn { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.pn .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
[data-pid] { cursor:pointer; }

/* Jadual kedudukan */
.tw { overflow-x:auto; }
table { width:100%; border-collapse: collapse; font-size: 14px; }
th { font: 600 11px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing:.06em; padding: 8px 6px; border-bottom:1.5px solid var(--line2); }
td { padding: 9px 6px; border-bottom:1px solid var(--line2); text-align:center; font-family: var(--mono); font-size: 13px; }
td.l, th.l { text-align:left; font-family: var(--sans); font-size: 14px; }
tr.q td { background: color-mix(in srgb, var(--win) 7%, transparent); }
tr.pq td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
tr:last-child td { border-bottom: 0; }
.pill-tbl { font-size: 12px; padding: 3px 10px; border-radius:999px; border:1px solid var(--line2); color: var(--muted); white-space:nowrap; }

/* Matriks */
.mx td { font-size: 12px; padding: 6px 4px; min-width: 38px; }
.mx td.self { background: repeating-linear-gradient(45deg, #2a2f3a 0 3px, #3f4552 3px 7px); }
.mx td.win { color: var(--win); font-weight:700; }
.mx td.l { white-space: nowrap; }

/* Senarai perlawanan (gaya LekaPong) */
.mlist { list-style:none; padding:0; margin:0; }
.mrow { display:grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 14px 6px; border-radius: 14px; text-decoration:none; color:inherit; }
.mrow + .mrow { border-top: 1px solid var(--line2); }
.mrow:active { background: var(--bg); }
.mrow .no { font-family: var(--mono); color: var(--muted); font-size: 14px; padding-top: 2px; }
.mrow .vs { display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:8px; }
.mrow .vs .pn:first-child { justify-self:end; }
.mrow .vs .pn.w .nm { background: var(--peach); color: var(--peach-ink); padding: 1px 7px; border-radius: 7px; font-weight:700; }
.mrow .sc { font: 700 16px var(--mono); }
.mrow .sc.v { font: 600 14px var(--sans); color: var(--muted); }
.mrow .sc.live { color: var(--accent); font-size: 12px; letter-spacing:.05em; }
.chips { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:8px; }
.chip { font: 600 12.5px var(--mono); padding: 3px 9px; border-radius: 8px; border:1px solid var(--line2); background: var(--card); }
.chip.w { background: var(--peach); border-color: #f5c39b; color: var(--peach-ink); }
.mrow .meta { text-align:center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sess { font-family: var(--serif); text-transform: uppercase; letter-spacing:.16em; color: var(--gold); font-size: 13.5px; font-weight:600; padding: 14px 6px 0; }

/* Kad skor */
.rubber { border:1.5px solid var(--line2); border-radius:14px; padding:10px 12px; margin-top:10px; }
.lu { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:6px; }
.lu select { width:auto; padding:6px 8px; }
.sets { display:flex; gap:8px; flex-wrap:wrap; margin-top: 4px; }
.sets .set { display:flex; align-items:center; gap:4px; }
.sets input { width:54px; padding:9px 4px; text-align:center; font-family: var(--mono); }
.hc { margin:6px 0; padding:5px 10px; border-radius:10px; background:#fff7e0; border:1px solid #e0b84c; font-size:.85rem; color:#5a4300; }
.ok-badge { color: var(--win); font-weight:700; font-size:.9rem; }
.draft { color: #8a5a00; font-size:.85rem; font-weight:600; }

/* Bracket */
.bracket { display:flex; gap:14px; overflow-x:auto; padding-bottom:8px; align-items:stretch; }
.bracket .col { min-width: 176px; display:flex; flex-direction:column; }
.bracket .col h3 { font-family: var(--serif); text-transform: uppercase; letter-spacing:.14em; color: var(--gold); font-size: 13px; text-align:center; margin:0 0 8px; }
.bracket .cb { flex:1; display:flex; flex-direction:column; justify-content:space-around; gap:10px; }
.bm { display:block; background: var(--card); border:1.5px solid var(--line); border-radius:12px; overflow:hidden; font-size:13px; text-decoration:none; color:inherit; }
.bm .ln { display:flex; justify-content:space-between; gap:6px; padding:6px 9px; align-items:center; }
.bm .ln + .ln { border-top:1px solid var(--line2); }
.bm .ln.w { background: var(--peach); color: var(--peach-ink); font-weight:700; }
.bm .sd { font: 600 10px var(--mono); color: var(--muted); margin-right:4px; }
.bm .s { font-family: var(--mono); font-weight:700; }
.bm .bmeta { font-size:10.5px; color: var(--muted); padding: 3px 9px; border-top:1px solid var(--line2); }
.champ { text-align:center; padding: 14px; border-radius: var(--radius); background: var(--peach); color: var(--peach-ink); font-weight:800; font-size: 18px; margin: 10px 0; }

/* Ranking */
.rank td { font-size: 12.5px; }
.rank td.l { font-size: 13.5px; }
.dag { color: var(--accent); font-weight:700; }
.foot { font-size: 12px; color: var(--muted); line-height:1.5; }
.foot p { margin: 4px 0; }

/* Modal profil */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10,14,25,.55); display:flex; align-items:flex-end; justify-content:center; }
.modal .sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 88vh; overflow:auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
.stat-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:8px; margin: 10px 0; }
.stat { border:1.5px solid var(--line2); border-radius:12px; padding:8px; text-align:center; }
.stat b { display:block; font: 700 18px var(--mono); }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing:.05em; }

/* Lain-lain */
.list-item { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 0; }
.list-item + .list-item { border-top:1px solid var(--line2); }
.home-logos { display:flex; gap:3px; margin-right:4px; }
.logo-badge { display:inline-grid; place-items:center; width:56px; height:56px; background:#fff; border-radius:12px; padding:3px; flex:0 0 auto; }
.logo-badge img { max-width:100%; max-height:100%; object-fit:contain; }
.logo-badge.sm { width:36px; height:36px; border-radius:9px; padding:2px; }
.club-preview { display:flex; align-items:center; gap:8px; margin-top:10px; padding:8px; border:1.5px solid var(--line2); border-radius:12px; }
.club-preview:empty { display:none; }
.pill { display:inline-block; font-size:.75rem; padding:3px 10px; border-radius:999px; background: var(--bg); border:1px solid var(--line2); }
.pill.done { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.pill.live { background: var(--peach); color: var(--peach-ink); border-color:#f5c39b; }
.notice { padding:10px 12px; border-radius:12px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); font-size:.9rem; }
.notice.bad { background:#fdecea; color: var(--loss); }
.empty { text-align:center; color: var(--muted); padding: 30px 10px; }
ol.rules { padding-left: 20px; margin:0; }
ol.rules li { margin-bottom: 8px; }
.toast { position: fixed; left:50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 92vw;
  background:#111827; color:#fff; padding:10px 18px; border-radius:999px; font-size:.9rem; z-index: 70; text-align:center; }
.imgs img { width:100%; border-radius:12px; border:1px solid var(--line2); margin-top:10px; }
.print-only { display:none; }

/* Video undian */
.drw { position: fixed; inset: 0; z-index: 60; background: #0f1d3a; color: #fff; overflow: auto; padding: calc(12px + env(safe-area-inset-top)) 12px 24px; }
.drw-top { display:flex; align-items:center; gap:10px; }
.drw-logo { width:44px; height:44px; border-radius:10px; background:#fff; display:grid; place-items:center; font-size:26px; overflow:hidden; padding:2px; }
.drw-logo img { max-width:100%; max-height:100%; object-fit:contain; }
.drw-stat { margin:10px 0; padding:10px; border-radius:10px; background: rgba(255,255,255,.08); min-height:58px; }
.drw-now { font-size:22px; font-weight:800; }
.drw-now span, .drw-to { color:#ff7a1a; }
.drw-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:8px; }
.drw-box { background:#fff; color:#000; border-radius:10px; padding:8px; transition: box-shadow .3s; }
.drw-box.hl { box-shadow: 0 0 0 3px #ff7a1a; }
.drw-slot { min-height:26px; margin-top:4px; border:1px dashed #ccc; border-radius:6px; padding:3px 6px; font-weight:600; font-size:.92rem; transition: all .4s; }
.drw-slot.filled { border:0; background:#eef1f5; }
.drw-slot.hl { background:#ff7a1a; color:#fff; }
.drw-vs { text-align:center; font-size:11px; color:#888; }
.drw .btn { border:0; border-radius:999px; padding:7px 14px; font: 600 13px var(--sans); cursor:pointer; }

@media print {
  .topbar, .tabs, .pill-btn, .noprint { display:none !important; }
  .card { border:0; }
  .print-only { display:flex; }
  body { background:#fff; }
}
.club-head { align-items:center; gap:10px; margin-bottom:10px; }

/* Akaun & notifikasi */
.top-actions { display:flex; gap:6px; align-items:center; flex:0 0 auto; }
.top-btn { border:1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color:#fff; border-radius:999px; padding:5px 11px; font: 600 13px var(--sans); cursor:pointer; white-space:nowrap; max-width: 150px; overflow:hidden; text-overflow:ellipsis; }
#bell { background: var(--accent); border-color: var(--accent); }
.cloud-tag { display:inline-block; font-size:11.5px; padding:2px 9px; border-radius:999px; border:1px solid var(--line2); color: var(--muted); }
.cloud-tag.on { color: var(--win); border-color: color-mix(in srgb, var(--win) 40%, transparent); }
.pend { border:1.5px dashed var(--accent); border-radius:14px; padding:10px 12px; margin:10px 0; background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.pend .row { margin-top:8px; }
.pill-btn.ok { background: var(--win); }
.pill-btn.no { background: var(--loss); }
.role-chip { font-size:11.5px; padding:2px 9px; border-radius:999px; background: var(--peach); color: var(--peach-ink); font-weight:700; }

/* ===== Tema "Papan Biru" ===== */
body { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
.topbar { background: var(--hd1, var(--tb2)); }
/* Banner pertandingan (ringkas): logo tanpa latar + papan skor */
.t-head { position: relative; margin: 0 0 6px; padding: 12px 14px 12px; color:#fff; border-radius: 0 0 22px 22px; overflow:hidden; text-align:left;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, #fff 10%, var(--hd2, var(--tb))) 0%, var(--hd2, var(--tb)) 38%, var(--hd1, var(--tb2)) 100%); }
.t-head::before { content:''; position:absolute; inset:6px; border:1.5px solid rgba(255,255,255,.35); border-radius:16px; pointer-events:none; }
.t-head::after { content:''; position:absolute; left:6px; right:6px; top:50%; height:1px; background: rgba(255,255,255,.08); pointer-events:none; }
.t-head > * { position: relative; z-index: 1; }
.hb-top { display:flex; align-items:center; gap:10px; padding: 4px 4px 0; }
.hb-logos { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.hb-logos img { height:52px; width:auto; max-width:72px; object-fit:contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.hb-tt { min-width:0; flex:1; }
.t-head h1 { color:#fff !important; font-size:17px; line-height:1.2; margin:0; font-weight:800; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.t-head p { color: rgba(255,255,255,.78); margin:3px 0 0; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hb-cl { margin-left:6px; font-size:11px; }
.hb-board { display:flex; gap:4px; margin:10px 4px 2px; padding:4px; border-radius:12px; background: rgba(4,8,20,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.hb-board .seg { flex:1 1 0; min-width:0; padding:3px 8px 4px; border-radius:9px; background: rgba(255,255,255,.04); display:flex; flex-direction:column; }
.hb-board .seg:first-child { flex: 1.35 1 0; }
.hb-board .seg.wide { flex: 1.45 1 0; }
.hb-board .seg:last-child { flex: .75 1 0; }
.hb-board small { font-size:9px; letter-spacing:.12em; text-transform:uppercase; color: rgba(255,255,255,.55); font-weight:700; }
.hb-board b { font-family: var(--num); font-variant-numeric: tabular-nums; font-size:15px; color:#ffb02e; letter-spacing:.03em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px; }
.hb-board b em { font-style:normal; color: rgba(255,176,46,.55); font-size:13px; }
.hb-board b.on { color:#7ee2a0; }
.pulse { width:7px; height:7px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 0 rgba(74,222,128,.7); animation: pulse 1.6s infinite; flex:0 0 auto; }
@keyframes pulse { 70% { box-shadow:0 0 0 7px rgba(74,222,128,0); } 100% { box-shadow:0 0 0 0 rgba(74,222,128,0); } }
.rally { position:relative; height:4px; margin-top:3px; border-radius:4px; background: rgba(255,255,255,.12); }
.rally .fill { position:absolute; left:0; top:0; bottom:0; border-radius:4px; background: linear-gradient(90deg, var(--or), #ffb02e); }
.rally .ball { position:absolute; top:50%; width:9px; height:9px; margin:-4.5px 0 0 -4.5px; border-radius:50%; background:#fff; box-shadow:0 0 6px rgba(255,176,46,.9); }
.logo-badge { background: transparent !important; }

/* Tajuk bahagian: bola jingga */
.eyebrow { display:none; }
.h-big { display:flex; align-items:center; gap:10px; font-size:22px; color: var(--ink); margin: 18px 0 10px; }
.h-big::before { content:''; width:12px; height:12px; border-radius:50%; background: var(--or); box-shadow: 0 0 0 3px color-mix(in srgb, var(--or) 25%, transparent); flex:0 0 auto; }
.rule { display:none; }
.section-title, .fold > summary, .sess, .bracket .col h3 { font-family: var(--sans); letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.card { border-radius: 18px; box-shadow: var(--sh); border-color: var(--line); }
.fold > summary { display:flex; justify-content:space-between; align-items:center; }
.fold > summary::before { content: none; }
.fold > summary::after { content:'+'; font-size:20px; color: var(--or); font-weight:800; }
.fold[open] > summary::after { content:'–'; }

/* Bar tab bawah, dua baris */
.tabs { position: fixed; left:0; right:0; bottom:0; top:auto; z-index: 30; display:block; padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--card);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15,23,42,.06); overflow: visible; backdrop-filter:none; }
.tabs .trow { display:flex; gap:4px; }
.tabs .trow.pas { padding-bottom:3px; margin-bottom:3px; border-bottom: 1px dashed var(--line); }
.tabs a { flex: 1 1 0; min-width:0; border:0; background: transparent; border-radius: 12px; color: var(--muted); position: relative; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:1px; font-weight:700; padding: 6px 2px; font-size: 11.5px; text-decoration:none; white-space:nowrap; }
.tabs a .ic { font-size: 20px; line-height: 1.1; }
.tabs .trow.pas a { flex-direction:row; gap:4px; font-size:11px; padding: 3px 2px; opacity:.75; }
.tabs .trow.pas a .ic { font-size: 13px; }
.tabs a.active { background: var(--w); color: var(--tb); opacity: 1; border: 0; }
.tabs a.active::after { content:''; position:absolute; left:50%; top:2px; width:6px; height:6px; margin-left:-3px; border-radius:50%; background: var(--or); }
@media (min-width: 900px) {
  .tabs { position: sticky; top: 52px; bottom:auto; border-top:0; border-bottom:1px solid var(--line); box-shadow:none; }
  .tabs .trow { display:inline-flex; } .tabs .trow.pas { border:0; margin:0; padding:0; } .tabs .trow.pas a { opacity:1; font-size:13px; }
  .tabs { display:flex; justify-content:center; gap:4px; } .tabs a { flex:0 0 auto; padding: 6px 14px; flex-direction:row; gap:6px; font-size:13px; }
  .tabs a .ic { font-size: 15px; }
  body { padding-bottom: 40px; }
}

/* Papan skor */
.mrow .sc:not(.v):not(.live) { display:inline-block; min-width:58px; text-align:center; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 19px;
  letter-spacing:.06em; color:#ffb02e; background:#0f172a; border-radius:10px; padding:3px 9px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.mrow .vs .pn.w .nm { background: var(--w); color: var(--win); }
.chip { font-family: var(--num); }
.chip.w { background: var(--w); border-color: color-mix(in srgb, var(--tb) 30%, transparent); color: var(--tb); }
.bm .ln.w { background: var(--w); color: var(--ink); }
.bm .s { font-family: var(--num); }

/* Kedudukan & juara */
tr.q td { background: var(--w); }
tr.q td:first-child { box-shadow: inset 3px 0 0 var(--or); }
tr.pq td { background: color-mix(in srgb, var(--or) 7%, transparent); }
.champ { background: linear-gradient(135deg, #ffcf5a, #ff9a3c); color:#2a1600; border:0; border-radius:18px; box-shadow: 0 8px 24px rgba(255,138,51,.3); font-size:17px; }
.av { border-radius: 8px; width:24px; height:24px; font-size:10px; font-weight:800; }
.pill-btn.brand { background: var(--tb); }
.pill-btn.orange { background: var(--or); }
.pill-btn.orange .dot { background:#fff; }
.pill-btn .dot { background: var(--or); }
.tabs a.active, .pill-btn.brand { }
@media (prefers-color-scheme: dark) { .pill-btn.brand { background: var(--accent); color:#170b00; } .tabs a.active { color: #ff8a33; } }
.pill-tbl { background: var(--w); color: var(--tb); border-color: transparent; font-weight:700; }
.pill.live { background: var(--w); color: var(--tb); border-color: transparent; }

/* Status peribadi */
.mystrip { display:block; padding:8px 12px; border-radius:12px; margin:8px 0 4px; font-weight:800; font-size:14px; text-decoration:none; }
.mystrip span { font-weight:500; opacity:.85; }
.me-box select { font-weight:700; }
.me-card { margin-top:10px; border-radius:14px; padding:10px 12px; }
.me-card .me-big { font-weight:800; font-size:16px; }
.me-card .me-tb { font-family: var(--num); font-size:30px; font-weight:800; letter-spacing:.04em; line-height:1.1; }
.me-card.wait { background: var(--w); color: var(--ink); }
/* Papan dari atas */
.hall { font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color: var(--muted); margin:12px 2px 0; }
.ttg { display:grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap:10px; margin-top:8px; }
.tt { background: var(--card); border:1px solid var(--line); border-radius:16px; padding:10px; box-shadow: var(--sh); }
.tt.me { border-color: var(--or); box-shadow: 0 0 0 2px var(--or), var(--sh); }
.tt-h { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:6px; }
.tt-h b { font-family: var(--num); letter-spacing:.06em; }
.tt-h small { color: var(--muted); font-size:11px; text-align:right; }
.tt-top { position:relative; display:grid; grid-template-columns: 1fr 4px 1fr; align-items:center; min-height:70px; border-radius:10px; text-decoration:none;
  background: linear-gradient(160deg, var(--tb), var(--tb2)); color:#fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); overflow:hidden; font-weight:700; font-size:13.5px; }
.tt-top::before { content:''; position:absolute; left:2px; right:2px; top:50%; height:1px; background: rgba(255,255,255,.55); }
.tt-top > div { position:relative; padding:6px 8px; text-align:center; line-height:1.2; }
.tt-net { align-self:stretch; padding:0 !important; background: rgba(255,255,255,.95); box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.tt-empty { display:flex; justify-content:center; color: rgba(255,255,255,.7); font-weight:700; font-size:13px; opacity:.55; }
.tt.free { opacity:.8; }
.tt-u { margin-top:6px; font-size:12px; color: var(--muted); }
.tt-n { margin-top:6px; font-size:12px; padding:6px 8px; border-radius:10px; background: var(--w); }
.tt-act { margin-top:6px; gap:6px; }
.q-list { padding:4px 10px; }
.q-row { display:flex; gap:10px; align-items:center; padding:8px 2px; border-bottom:1px solid var(--line); text-decoration:none; color: inherit; font-size:14px; }
.q-row:last-child { border-bottom:0; }
.q-row .no { font-family: var(--num); color: var(--muted); width:20px; text-align:right; }
/* Jadual ringkas */
table.jd { font-size:13px; } table.jd td, table.jd th { padding:6px 6px; white-space:nowrap; }
table.jd tr[data-go]:not([data-go=""]) { cursor:pointer; }
table.jd tr.onlive td { background: color-mix(in srgb, #22c55e 12%, transparent); }
/* Laporan */
.report h3 { margin:18px 0 6px; font-size:16px; border-bottom:2px solid var(--or); padding-bottom:3px; }
.report h4 { margin:12px 0 4px; font-size:13px; color: var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.rp-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.rp-head img { height:56px; width:auto; object-fit:contain; }
.rp-head h2 { margin:0; font-size:18px; }
table.rp-info { width:100%; font-size:12.5px; border-collapse:collapse; margin-bottom:8px; }
table.rp-info td { padding:4px 6px; border-bottom:1px solid var(--line); text-align:left; }
table.rp-info td:nth-child(odd) { color: var(--muted); font-weight:700; width:16%; }
table.rp { font-size:12.5px; } table.rp td.small { white-space:normal; color: var(--muted); }
@media print {
  .t-head, .mystrip { display:none !important; }
  body { padding:0 !important; }
  .report { box-shadow:none; padding:0; }
  .report h3 { break-after: avoid; }
  .report table { break-inside: auto; } .report tr { break-inside: avoid; }
  .h-big { display:none; }
}

/* Mod ujian */
.hb-test { position:absolute; top:6px; right:14px; z-index:2; font-size:10px; font-weight:800; letter-spacing:.06em; background:#facc15; color:#3b2a00; padding:2px 8px; border-radius:0 0 8px 8px; }
.t-head:has(.hb-test) .hb-top { padding-top:12px; }
.test-chk { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1.5px dashed #eab308; border-radius:14px; background: color-mix(in srgb, #facc15 10%, var(--card)); margin:0 0 6px; font-weight:400; }
.test-chk input { width:20px; height:20px; margin-top:2px; flex:0 0 auto; }
.test-card { border:1.5px dashed #eab308; }

/* Nama regu: dua baris, nombor regu dalam avatar */
.av-n { font-size:9.5px; letter-spacing:-.02em; }
.pn .nm2 { display:flex; flex-direction:column; line-height:1.15; white-space:normal; }
.pn .nm2 > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mrow .vs .pn:first-child .nm2 { text-align:right; }
.mrow .vs .pn { min-width:0; }
.tb-set { gap:8px; align-items:center; margin:8px 0 0; flex-wrap:wrap; }
.tb-set label { margin:0; font-weight:700; font-size:13px; }
.tb-set select { width:auto; flex:0 1 auto; padding:6px 10px; }

.test-seed { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); }
.pill-btn.seed { background: transparent; color:#b3261e; border:1.5px solid #b3261e; }
.fold.sub { margin-top:12px; border-top:1px dashed var(--line); padding-top:8px; }
.fold.sub > summary { font-size:13px; }
.fold[open] > summary::before { content: none; }
.toast { border-radius:16px; z-index: 80; line-height:1.35; }

.drw-vmsg { text-align:center; font-size:12.5px; opacity:.85; margin:8px 12px 0; min-height:1em; }
.drw .btn[disabled] { opacity:.8; }

details.guide { padding:8px 14px; margin-bottom:10px; }
details.guide > summary { font-size:12px; }
.bm .ph { color: var(--muted); font-style: italic; font-weight:600; }

.pn .nmu { display:flex; flex-direction:column; line-height:1.2; white-space:normal; }
.pn .nmu .mem { font-size:11.5px; color: var(--muted); font-weight:500; }

/* ===== Kad perlawanan (papan skor) ===== */
.mc { display:block; text-decoration:none; color:inherit; padding:10px 4px 10px; border-radius:12px; }
.mc + .mc { border-top:1px solid var(--line); }
.mc:active { background: var(--w); }
.mc-h { display:flex; align-items:center; gap:8px; margin-bottom:6px; font-size:11.5px; color: var(--muted); }
.mc-code { font-family: var(--num); font-weight:800; font-size:12px; color: var(--tb); background: var(--w); padding:1px 7px; border-radius:6px; }
.mc-ctx { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mc-st { font-weight:700; white-space:nowrap; display:inline-flex; align-items:center; gap:5px; }
.mc-st.ok { color: var(--win); }
.mc-st.on { color:#16a34a; }
.mc-r { display:grid; grid-template-columns: var(--cols, 28px minmax(0,1fr) 40px); align-items:center; column-gap:6px; padding:3px 0; }
.mc-r .av { width:26px; height:26px; }
.av-ph { background: var(--line) !important; }
.mc-n { min-width:0; display:flex; flex-direction:column; line-height:1.15; }
.mc-n b { font-weight:700; font-size:14.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mc-n small { font-size:11px; color: var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mc-n.ph { color: var(--muted); font-style:italic; font-weight:600; font-size:13.5px; }
.mc-g { text-align:center; font-family: var(--num); font-variant-numeric: tabular-nums; font-size:14px; color: var(--muted); }
.mc-g.gw { color: var(--ink); font-weight:800; }
.mc-t { justify-self:end; min-width:34px; text-align:center; font-family: var(--num); font-variant-numeric: tabular-nums; font-size:18px; font-weight:800;
  border-radius:8px; padding:2px 0; color: var(--muted); background: var(--bg); }
.mc-t:empty { background: transparent; }
.mc-r.w .mc-t { background:#0f172a; color:#ffb02e; }
.mc-r.w .mc-n b { color: var(--ink); }
.mc-r.w .mc-n b::after { content:' ●'; color: var(--or); font-size:9px; vertical-align:middle; }
.mc-r.l .mc-n b { color: var(--muted); font-weight:600; }
.mc.live .mc-t { background: color-mix(in srgb, #22c55e 14%, transparent); color:#15803d; }
.mc-f { margin:6px 0 0 34px; font-size:11.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .mc-r.w .mc-t { background:#020617; } }
.mc.live .mc-t:empty { background: transparent; }

.test-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:10px 12px; margin-bottom:10px; }

.lv-list { display:grid; grid-template-columns: 1fr; gap:4px; }
.lv-row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:4px 0; border-bottom:1px solid var(--line); font-size:14px; }
.lv-row select { width:auto; max-width:60%; padding:5px 8px; font-size:13px; }
.lv { font-size:11.5px; font-weight:700; padding:2px 8px; border-radius:999px; background: var(--w); color: var(--tb); }
.lv.none { background: transparent; color: var(--muted); }
.hc-r { font-size:12.5px; margin:4px 0 6px; padding:5px 9px; border-radius:9px; background: color-mix(in srgb, var(--or) 12%, transparent); }
.hc-r.warn { background: color-mix(in srgb, #eab308 16%, transparent); }

/* Pendaftaran & kongsi */
.reg-card .reg-form { margin-top:6px; }
.reg-list { margin-top:8px; border-top:1px solid var(--line); }
.reg-row { display:grid; grid-template-columns: 22px minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:7px 0; border-bottom:1px solid var(--line); }
.reg-row .no { font-family: var(--num); color: var(--muted); font-size:12px; text-align:right; }
.reg-row .nm { display:flex; flex-direction:column; min-width:0; }
.reg-row .nm small { color: var(--muted); font-size:11.5px; }
.reg-row .st { font-weight:800; }
.reg-row.ok .st { color: var(--win); } .reg-row.pending .st { color:#ca8a04; } .reg-row.no { opacity:.55; }
.reg-row .act { display:flex; gap:4px; } .reg-row .act .pill-btn { padding:4px 9px; }
.share-row { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-top:12px; padding-top:10px; border-top:1px dashed var(--line); }
.hb-board .seg.cd b { color:#ffb02e; } .hb-board .seg.cd b em { font-size:10px; margin:0 1px; }

/* Halaman pendaftaran */
.daftar-info .d-info { display:grid; gap:6px; margin-top:6px; font-size:15px; }
.daftar-info .d-info div { display:flex; gap:10px; align-items:baseline; }
.daftar-info .d-note { white-space:pre-line; margin:10px 0 0; padding:10px 12px; border-radius:12px; background: var(--w); font-size:14px; }
.pill-btn.big { justify-content:center; font-size:16px; padding:13px 18px; }
.center { text-align:center; }

table.lv-tab { font-size:11.5px; margin:6px 0; } table.lv-tab th, table.lv-tab td { padding:3px 4px; text-align:center; } table.lv-tab td:first-child { text-align:left; color: var(--muted); }

.wa-bubble { margin-top:10px; padding:10px 12px; border-radius:12px 12px 12px 2px; background:#dcf8c6; color:#111; white-space:pre-wrap; font-size:13.5px; line-height:1.45; max-height:65vh; overflow:auto; font-family: system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { .wa-bubble { background:#005c4b; color:#e9edef; } }
.daftar-info .d-prize { display:grid; gap:4px; margin-top:10px; padding-top:8px; border-top:1px dashed var(--line); font-size:14px; } .daftar-info .d-prize div { display:flex; gap:8px; }

/* ===== 📺 Mod TV ===== */
body.tv .topbar, body.tv #tabs, body.tv #thead, body.tv .toast { display:none !important; }
body.tv { padding:0 !important; overflow:hidden; }
body.tv main#app { max-width:none; padding:0; margin:0; }
.tv-wrap { position:fixed; inset:0; display:flex; flex-direction:column; color:#fff; font-size:1.25vw;
  background: radial-gradient(120% 120% at 0% 0%, var(--hd2, #1d3f8c), var(--hd1, #0b1a3f) 70%); }
.tv-top { display:flex; align-items:center; gap:1.2vw; padding:1.2vw 2vw; background: rgba(0,0,0,.25); }
.tv-top img { height:5vw; width:auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.tv-title { flex:1; min-width:0; display:flex; flex-direction:column; }
.tv-title b { font-size:2.4vw; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tv-title span { opacity:.75; font-size:1.2vw; }
.tv-stat { text-align:center; background: rgba(4,8,20,.55); padding:.5vw 1.2vw; border-radius:1vw; }
.tv-stat small { display:block; font-size:.8vw; letter-spacing:.15em; text-transform:uppercase; opacity:.6; }
.tv-stat b { font-family: var(--num); font-size:2.2vw; color:#ffb02e; } .tv-stat em { font-style:normal; opacity:.6; font-size:1.4vw; }
.tv-clock { font-family: var(--num); font-size:2.4vw; font-weight:800; min-width:9vw; text-align:right; }
.tv-body { flex:1; min-height:0; padding:1.2vw 2vw; display:flex; flex-direction:column; }
.tv-h { margin:0 0 1vw; font-size:2vw; color:#fff; }
.tv-tables { flex:1; display:grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap:1vw; min-height:0; }
.tv-tt { background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:1vw; padding:.8vw; display:flex; flex-direction:column; gap:.5vw; min-height:0; }
.tv-tt.free { opacity:.5; }
.tv-tno { font-family: var(--num); font-weight:800; letter-spacing:.1em; color:#ffb02e; font-size:1.3vw; }
.tv-court { flex:1; display:grid; grid-template-columns: 1fr .35vw 1fr; align-items:center; border-radius:.7vw; background: linear-gradient(160deg, var(--tb), var(--tb2)); box-shadow: inset 0 0 0 .2vw rgba(255,255,255,.85); position:relative; min-height:5vw; }
.tv-court::before { content:''; position:absolute; left:.2vw; right:.2vw; top:50%; height:1px; background: rgba(255,255,255,.5); }
.tv-court > div { position:relative; text-align:center; font-weight:800; font-size:1.5vw; padding:.4vw; line-height:1.15; }
.tv-court > i { align-self:stretch; background:#fff; }
.tv-court.empty { display:flex; justify-content:center; opacity:.6; }
.tv-sub { font-size:1vw; opacity:.8; } .tv-next { font-size:1vw; background: rgba(255,176,46,.15); border-radius:.5vw; padding:.3vw .5vw; }
.tv-cols { flex:1; display:grid; grid-template-columns: 1fr 1fr; gap:1.5vw; min-height:0; }
.tv-card { background: var(--card); color: var(--ink); border-radius:1.2vw; padding:1vw 1.2vw; overflow:hidden; min-height:0; }
.tv-card h3 { margin:0 0 .6vw; font-size:1.8vw; }
.tv-card table { font-size:1.35vw; width:100%; } .tv-card .av { width:2.2vw; height:2.2vw; font-size:.9vw; }
.tv-fit { flex:1; }
.tv-podium { flex:1; display:grid; grid-template-columns: 1fr 1.2fr 1fr; align-items:end; gap:2vw; padding:0 6vw 2vw; }
.tv-pod { text-align:center; border-radius:1.5vw 1.5vw 0 0; padding:1.5vw 1vw; background: rgba(255,255,255,.1); }
.tv-pod .ic { font-size:5vw; } .tv-pod .nm { font-size:2.2vw; font-weight:800; margin:.6vw 0; } .tv-pod .lab { opacity:.75; font-size:1.2vw; letter-spacing:.1em; text-transform:uppercase; }
.tv-pod.p1 { min-height:60%; background: linear-gradient(180deg, rgba(255,198,0,.35), rgba(255,198,0,.08)); }
.tv-pod.p2 { min-height:45%; } .tv-pod.p3 { min-height:35%; }
.tv-wait { flex:1; display:flex; align-items:center; justify-content:center; } .tv-wait .big { font-size:3vw; text-align:center; } .tv-wait b { font-family: var(--num); color:#ffb02e; }
.tv-foot { display:flex; justify-content:space-between; align-items:center; padding:.6vw 2vw; background: rgba(0,0,0,.25); }
.tv-dots i { display:inline-block; width:.8vw; height:.8vw; border-radius:50%; background: rgba(255,255,255,.3); margin-right:.4vw; } .tv-dots i.on { background:#ffb02e; }
.tv-ctl { display:flex; gap:.6vw; } .tv-ctl button, .tv-ctl a { background: rgba(255,255,255,.12); color:#fff; border:0; border-radius:99px; padding:.4vw 1vw; font-size:1vw; text-decoration:none; cursor:pointer; }
@media (orientation: portrait) { .tv-wrap { font-size:2.4vw; } .tv-tables { grid-template-columns: repeat(2, 1fr); } .tv-cols { grid-template-columns: 1fr; } }

.tv-fit { display:flex; justify-content:center; } .tv-scale { width:max-content; } .tv-scale * { overflow:visible !important; }

/* ---------- Skor langsung ---------- */
.lv-sc { display:flex; align-items:center; gap:8px; margin:8px 0 2px; padding:6px 10px; border-radius:10px; background:#1b1f2e; color:#fff; font-size:13px; }
.lv-sc b { margin-left:auto; font-family:var(--mono); font-size:20px; letter-spacing:1px; color:#ffd166; }
.lv-sc .lv-l { font-weight:700; font-size:11px; letter-spacing:.06em; }
.lv-sc .lv-g { opacity:.8; font-size:12px; }
.lv-dot { width:8px; height:8px; border-radius:50%; background:#ef4444; box-shadow:0 0 0 0 rgba(239,68,68,.7); animation: lvPulse 1.4s infinite; flex:none; }
@keyframes lvPulse { 0% { box-shadow:0 0 0 0 rgba(239,68,68,.7); } 70% { box-shadow:0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow:0 0 0 0 rgba(239,68,68,0); } }
.tv-live { display:flex; align-items:center; justify-content:center; gap:14px; margin:6px 0; font-size:1.1em; }
.tv-live b { font-family:var(--mono); font-size:2.2em; color:#ffd166; letter-spacing:2px; }
.tv-live .lv-l { font-weight:700; font-size:.7em; letter-spacing:.08em; color:#fca5a5; }
.tv-live .lv-g { opacity:.8; }
.sb-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0; }
.sb { display:flex; gap:8px; margin:10px 0; }
.sb.sw { flex-direction:row-reverse; }
.sb-side { flex:1; border:0; border-radius:20px; padding:14px 8px 16px; color:#fff; text-align:center; cursor:pointer; min-height:46vh; display:flex; flex-direction:column; justify-content:space-between; touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:transform .06s; }
.sb-side:active { transform:scale(.97); }
.sb-side:disabled { opacity:.55; }
.sb-side.s0 { background:linear-gradient(160deg,#1d4ed8,#172554); }
.sb-side.s1 { background:linear-gradient(160deg,#ea580c,#7c2d12); }
.sb-nm { font-weight:700; font-size:16px; line-height:1.25; word-break:break-word; }
.sb-pt { font-family:var(--mono); font-size:min(28vw,160px); font-weight:800; line-height:1; }
.sb-g { font-size:14px; opacity:.9; } .sb-g b { font-size:22px; }
.sb-ctl { display:flex; gap:6px; justify-content:space-between; }
.sb-ctl .pill-btn { flex:1; justify-content:center; }
.sb-games { margin:10px 0; display:flex; flex-direction:column; gap:4px; font-family:var(--mono); font-size:14px; }
.sb-games span { display:inline-block; margin-right:8px; padding:2px 6px; border-radius:6px; }
.sb-games .wa { background:#dbeafe; color:#1e3a8a; } .sb-games .wb { background:#ffedd5; color:#9a3412; }
.sb-end { border:2px solid #16a34a; }
@media (orientation: landscape) { .sb-side { min-height:58vh; } }
.lv-sc { flex-wrap:wrap; }
.lv-by { flex-basis:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; opacity:.9; border-top:1px solid rgba(255,255,255,.15); padding-top:5px; margin-top:2px; }
.lv-rel { border:0; border-radius:999px; padding:3px 10px; background:#fff; color:#1b1f2e; font-weight:600; font-size:12px; }
/* skor terus di atas papan */
.tt-h small .lv-dot, .tv-sub .lv-dot { display:inline-block; vertical-align:middle; margin-right:2px; }
.tt.on { box-shadow: 0 0 0 2px #ef4444, var(--sh, 0 1px 3px rgba(0,0,0,.08)); }
.tt-top.live { min-height:118px; }
.cs { display:flex; flex-direction:column; align-items:center; gap:2px; }
.cs-nm { font-size:13px; font-weight:700; line-height:1.15; }
.cs-pt { font-family:var(--mono); font-size:44px; font-weight:800; line-height:1; color:#ffd166; text-shadow:0 2px 6px rgba(0,0,0,.35); }
.cs-g { font-size:11px; opacity:.85; }
.lv-by2 { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; font-size:12px; color:var(--mut, #64748b); }
.tv-court.live { min-height:9vw; }
.tv-court .cs-nm { font-size:1.3vw; } .tv-court .cs-pt { font-size:4.2vw; } .tv-court .cs-g { font-size:.9vw; font-weight:600; }
.lv-set { font-weight:800; color:#dc2626; letter-spacing:.02em; }
.tv-sub .lv-set { color:#fca5a5; }
.sb-set { text-align:center; font-weight:800; letter-spacing:.12em; font-size:15px; margin:6px 0 -2px; color:#dc2626; }
.cs-sets { font-size:13px; color:#ffd166; letter-spacing:2px; min-height:16px; } .cs-sets small { letter-spacing:0; font-size:11px; color:#fff; opacity:.85; }
.tv-court .cs-sets { font-size:1.1vw; } .tv-court .cs-sets small { font-size:.85vw; }
.sb-side.flash { animation: sbFlash .35s ease-out; }
@keyframes sbFlash { 0% { filter:brightness(1.9); transform:scale(.97); } 100% { filter:none; transform:none; } }
.rp-box { margin-top:10px; } .rp-img { width:100%; border-radius:14px; box-shadow:0 6px 20px rgba(0,0,0,.25); display:block; }
.d-poster { width:100%; display:block; border-radius:18px; margin:0 0 12px; box-shadow:0 6px 20px rgba(0,0,0,.18); cursor:zoom-in; }
.rp-styles { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
/* Penaja & lampiran */
.sp-list { display:flex; flex-direction:column; gap:6px; margin:8px 0; }
.sp-item { display:flex; align-items:center; gap:10px; padding:6px 10px; border:1px solid var(--line); border-radius:12px; }
.sp-item img { height:34px; max-width:90px; object-fit:contain; background:#fff; border-radius:6px; }
.sp-item span { flex:1; font-weight:600; }
.sp-strip { display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:8px 12px; margin:10px 0 0; background:rgba(255,255,255,.95); border-radius:12px; }
.sp-strip span { font:700 10px var(--mono, monospace); letter-spacing:.08em; color:#6b7280; text-transform:uppercase; }
.sp-strip img { height:30px; max-width:110px; object-fit:contain; } .sp-strip b { color:#111; font-size:13px; }
.tv-foot .sp-strip { margin:0 12px 0 0; padding:6px 12px; }
.at-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
/* Kad skor bercetak */
.ks-sheet { display:grid; grid-template-columns:1fr; gap:14px; }
.ks-card { border:2px solid #111; border-radius:10px; padding:12px 14px; background:#fff; color:#111; break-inside:avoid; page-break-inside:avoid; font-size:13px; }
.ks-top { display:flex; justify-content:space-between; gap:10px; } .ks-top span { color:#555; font-size:12px; } .ks-top img { width:72px; height:72px; }
.ks-vs { font-size:17px; margin:6px 0; } .ks-vs span { color:#666; font-size:13px; margin:0 6px; }
.ks-meta { font-size:12px; color:#333; margin-bottom:6px; }
.ks-rub { font-weight:800; margin:8px 0 2px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.ks-grid { width:100%; border-collapse:collapse; } .ks-grid th, .ks-grid td { border:1.5px solid #111; height:30px; text-align:center; font-size:11px; }
.ks-grid td.ks-n { text-align:left; padding:0 6px; width:38%; font-size:12px; font-weight:600; }
.ks-foot { display:flex; justify-content:space-between; gap:10px; margin-top:12px; font-size:12px; flex-wrap:wrap; }
@media print {
  .ks-sheet { grid-template-columns:1fr 1fr; gap:8px; }
  .ks-card { font-size:11px; padding:8px 10px; } .ks-top img { width:60px; height:60px; }
  .t-head .sp-strip { display:none; }
}
/* Laman utama: kad pertandingan */
.hc-chips { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 10px; }
.chip { border:1.5px solid var(--line2, #d8dde6); background:var(--card, #fff); color:var(--ink, #111); border-radius:999px; padding:6px 14px; font:600 13px var(--sans); cursor:pointer; }
.chip.on { background:var(--tb, #1f4aa8); border-color:var(--tb, #1f4aa8); color:#fff; }
.hc-sub { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-radius:14px; background:color-mix(in srgb, var(--tb, #1f4aa8) 8%, var(--card, #fff)); margin-bottom:12px; font-size:13.5px; }
.hc-list { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.hc { display:flex; gap:14px; padding:12px; border-radius:18px; background:var(--card, #fff); border:1.5px solid var(--line, #e5e7eb); box-shadow:var(--sh, 0 1px 3px rgba(0,0,0,.06)); }
.hc-thumb { flex:0 0 92px; height:115px; border-radius:12px; overflow:hidden; background:color-mix(in srgb, var(--tb, #1f4aa8) 12%, #fff); display:flex; align-items:center; justify-content:center; }
.hc-thumb > img { width:100%; height:100%; object-fit:cover; }
.hc-logo { font-size:34px; } .hc-logo img { width:64px; height:64px; object-fit:contain; }
.hc-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.hc-date { font:700 11.5px var(--mono, monospace); color:var(--accent, #ff7a1a); text-transform:uppercase; letter-spacing:.03em; }
.hc-name { font-weight:800; font-size:16.5px; color:var(--ink, #111); text-decoration:none; line-height:1.25; }
.hc-meta { font-size:12.5px; color:var(--muted, #6b7280); }
.hc-tags { display:flex; gap:5px; flex-wrap:wrap; margin-top:3px; }
.tg { font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; background:color-mix(in srgb, var(--tb, #1f4aa8) 10%, #fff); color:var(--tb, #1f4aa8); }
.tg.ok { background:#dcfce7; color:#166534; } .tg.live { background:#fee2e2; color:#b91c1c; } .tg.mute { background:#f1f5f9; color:#64748b; }
.hc-act { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.my-list { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.my-item { display:flex; flex-direction:column; padding:10px 14px; border-radius:14px; border:1.5px dashed var(--accent, #ff7a1a); text-decoration:none; color:var(--ink, #111); }
.my-item span { font-size:12.5px; color:var(--muted, #6b7280); }
.my-regs { display:flex; flex-direction:column; gap:8px; }
.my-reg { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; margin:0; }
.role-chip.cond { background:#fef3c7; color:#92400e; }
.lv-allow { display:flex; flex-wrap:wrap; gap:4px 14px; }
.pay { border:1.5px solid var(--line2, #d8dde6); background:transparent; border-radius:999px; width:32px; height:28px; cursor:pointer; font-size:14px; flex:none; }
.pay.on { background:#dcfce7; border-color:#86efac; }
.pay-bar { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; padding:10px 12px; border-radius:12px; background:#f0fdf4; font-size:13.5px; color:#14532d; }
.g-roles { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 6px; } .g-roles .chip { padding:5px 11px; font-size:12px; }
.g-list { margin:6px 0 0; padding-left:20px; font-size:13.5px; line-height:1.5; } .g-list li { margin:4px 0; }
.lv-ago { color:var(--muted, #6b7280); font-weight:600; }
.fmt-box { padding:10px 14px; border-radius:14px; background:color-mix(in srgb, var(--tb, #1f4aa8) 9%, var(--card, #fff)); border:1.5px solid color-mix(in srgb, var(--tb, #1f4aa8) 25%, transparent); font-size:14px; margin:0 0 12px; line-height:1.5; }
.mr-live { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:12.5px; color:#b91c1c; margin:-4px 0 10px 4px; font-weight:600; }
.mc-g.gh { opacity:.45; font-style:italic; }
.mc-g.cur { opacity:.6; color:#b91c1c; font-style:italic; }
.mc-t.gh { opacity:.4; }
.mc-f.gh-note { color:#b91c1c; font-weight:600; }
.mx-st td { vertical-align: top; }
.mx-d summary { cursor:pointer; list-style:none; }
.mx-d summary::-webkit-details-marker { display:none; }
.mx-w { display:flex; flex-direction:column; gap:3px; margin-top:6px; font-size:12px; }
.mx-w span { padding:2px 8px; border-radius:8px; background: var(--bg, #f1f5f9); }
.mx-w .ok { background:#dcfce7; color:#166534; }
.mx-w .no { background:#fee2e2; color:#991b1b; }
.jd-rest td { text-align:left; font-size:12px; color:#64748b; background: var(--bg, #f8fafc); font-style:italic; }
.mx-mat { font-size:11.5px; border-collapse:separate; border-spacing:2px; }
.mx-mat th { font-size:11px; padding:2px 4px; white-space:nowrap; }
.mx-mat td { min-width:30px; height:26px; text-align:center; border-radius:6px; padding:0 3px; white-space:nowrap; }
.mx-mat td.x { background:#334155; opacity:.15; }
.mx-mat td.e { color:#cbd5e1; }
.mx-mat td.w { background:#dcfce7; color:#166534; font-weight:700; }
.mx-mat td.l { background:#fee2e2; color:#991b1b; font-weight:700; }
.mx-mat td.d { background:#fef9c3; color:#854d0e; font-weight:700; }
.mx-now { display:flex; flex-direction:column; gap:6px; font-size:14px; margin-top:10px; }
.drw-sl { display:inline-block; min-width:26px; font-size:11px; font-weight:800; color:#94a3b8; margin-right:4px; }
.drw-slot.filled .drw-sl { color:#64748b; }
.drw-slot.hl .drw-sl { color:#ffe2c7; }
.drw-nav { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:12px; }
.drw-nav .btn { background:#1e293b; color:#fff; border:1px solid #334155; }
.drw-nav .btn[disabled] { opacity:.35; }
.mx-mat td.m { background:#e2e8f0; color:#334155; font-weight:700; }
/* Laporan: jadual keputusan regu bertukar */
table.rp-mx { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
table.rp-mx th { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color: var(--muted); padding:5px 4px; border-bottom:2px solid var(--or, #ff7a1a); }
table.rp-mx td { padding:5px 4px; border-bottom:1px solid var(--line, #e5e7eb); vertical-align:middle; text-align:center; overflow-wrap:anywhere; }
table.rp-mx td.l, table.rp-mx th.l { text-align:left; }
table.rp-mx td.win { font-weight:800; }
table.rp-mx td.ses { background: color-mix(in srgb, var(--tb, #1f4aa8) 6%, transparent); border-right:1px solid var(--line, #e5e7eb); line-height:1.2; }
table.rp-mx tbody.rp-ses { border-bottom:2px solid var(--line2, #cbd5e1); }
.report .mx-mat { margin-bottom:6px; }
@media print {
  .report .rp-sec.pb { break-before: page; }
  .report .rp-sec h3 { margin-top:0; }
  .report tbody.rp-ses, .report .mx-mat, .report .rp-sec h4 + p + .tw { break-inside: avoid; }
  table.rp-mx thead { display: table-header-group; }
  .report .mx-mat td { height:22px; min-width:26px; font-size:10.5px; }
  .report .champ { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report .mx-mat td, table.rp-mx td.ses { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print { html, body, #app, main { background:#fff !important; } }
table.rp-mx td.sets span { white-space:nowrap; display:inline-block; margin-right:4px; }
.rp-sign { display:flex; gap:40px; margin-top:40px; font-size:12.5px; }
.rp-sign > div { flex:1; } .rp-sign .ln { border-bottom:1px solid #64748b; height:48px; margin-bottom:6px; }
@media print { @page { size: A4; margin: 12mm 10mm 16mm;
  @bottom-center { content: "Muka surat " counter(page) " / " counter(pages); font: 9pt system-ui, sans-serif; color: #64748b; } } }

.aw-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.aw { display:flex; gap:10px; align-items:flex-start; padding:12px; border-radius:14px; border:1.5px solid var(--line, #e5e7eb); background: color-mix(in srgb, var(--or, #ff7a1a) 5%, #fff); break-inside: avoid; }
.aw-ic { font-size:26px; line-height:1; }
.aw-t { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color: var(--muted, #64748b); font-weight:700; }
.aw-w { font-size:15px; font-weight:800; margin-top:2px; }
.aw-n { font-size:12px; color: var(--muted, #64748b); margin-top:3px; }
@media (max-width: 480px) { .aw-grid { grid-template-columns:1fr; } }
@media print { .aw { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .aw-grid { grid-template-columns:1fr 1fr; } }
.drw-chips { display:flex; flex-wrap:wrap; gap:5px; justify-content:center; margin-top:12px; }
.drw-chips .btn { min-width:34px; padding:5px 8px; font-size:13px; background:#1e293b; color:#cbd5e1; border:1px solid #334155; }
.drw-chips .btn.on { background:#ff7a1a; color:#fff; border-color:#ff7a1a; }
.st-alert { position:fixed; left:12px; right:12px; top:calc(env(safe-area-inset-top, 0px) + 10px); z-index:9999; display:flex; flex-direction:column; gap:2px; padding:14px 40px 14px 16px; border-radius:16px; color:#fff; text-decoration:none; box-shadow:0 10px 30px rgba(0,0,0,.35); animation: stIn .35s ease-out; }
.st-alert b { font-size:17px; } .st-alert span { font-size:13.5px; opacity:.95; }
.st-alert i { position:absolute; right:14px; top:12px; font-style:normal; font-size:18px; opacity:.8; }
.st-play { background:#dc2626; } .st-ump { background:#7c3aed; } .st-ready { background:#d97706; }
@keyframes stIn { from { transform: translateY(-120%); } to { transform:none; } }
/* Matriks kosong (kad skor sandaran) */
.ks-msheet { background:#fff; color:#111; border:2px solid #111; border-radius:10px; padding:12px; margin-bottom:14px; }
.ks-mh { display:flex; justify-content:space-between; align-items:flex-end; gap:10px; margin-bottom:8px; font-size:12px; } .ks-mh span { color:#555; } .ks-mh h3 { margin:0; font-size:16px; text-align:right; }
.ks-mat { width:100%; border-collapse:collapse; table-layout:fixed; font-size:11px; }
.ks-mat th, .ks-mat td { border:1.3px solid #111; height:32px; text-align:center; padding:0 2px; }
.ks-mat th.l, .ks-mat td.l { text-align:left; width:22%; padding:0 5px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ks-mat td.d { background:#9ca3af; } .ks-mat th.x { background:#f1f5f9; }
.ks-note { font-size:11px; color:#333; margin:6px 0 0; }
.ks-ko { width:100%; border-collapse:collapse; font-size:12px; margin-bottom:8px; } .ks-ko td { border-bottom:1px solid #999; padding:8px 4px; } .ks-ko td.c { text-align:center; color:#555; } .ks-msheet h4 { margin:10px 0 4px; }
@media print { .ks-msheet { break-inside: avoid; border:none; padding:0; margin-bottom:10mm; } .ks-msheet.wide { break-before: page; break-after: page; } .ks-mat td.d, .ks-mat th.x { -webkit-print-color-adjust: exact; print-color-adjust: exact; } @page { size: A4; } }
@media print { .ks-msheet.wide { page: wide; } @page wide { size: A4 landscape; margin: 10mm; } }
/* Panduan peserta (gaya mesej) */
.pg-sec { padding:10px 0; border-top:1px solid var(--line, #e5e7eb); }
.pg .section-title + .pg-sec { border-top:0; padding-top:2px; }
.pg-h { display:flex; align-items:center; gap:8px; font-weight:800; font-size:15px; margin-bottom:4px; }
.pg-ic { font-size:20px; line-height:1; }
.pg-sec p { margin:2px 0; font-size:14px; line-height:1.5; }
.pg-stat { display:grid; gap:5px; margin-top:8px; font-size:13.5px; }
.pg-stat > div { display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:10px; background: color-mix(in srgb, var(--line, #e5e7eb) 35%, transparent); }
.pg-dot { width:11px; height:11px; border-radius:50%; flex:none; }
.pg-steps, .g-list { counter-reset: st; list-style:none; padding-left:0; margin:6px 0 0; }
.pg-steps li, .g-list li { counter-increment: st; position:relative; padding-left:30px; margin:6px 0; font-size:14px; line-height:1.45; }
.pg-steps li::before, .g-list li::before { content: counter(st); position:absolute; left:0; top:0; width:21px; height:21px; border-radius:50%; background: var(--brand, #1f4aa8); color:#fff; font-size:11.5px; font-weight:800; display:flex; align-items:center; justify-content:center; }
/* Helaian kod QR */
.qr-doc { display:grid; gap:14px; }
.qr-pg { background:#fff; color:#111; border-radius:16px; padding:22px; box-shadow: var(--sh); }
.qr-main { text-align:center; }
.qr-logos { display:flex; justify-content:center; gap:12px; } .qr-logos img { height:64px; }
.qr-main h1 { font-size:26px; margin:10px 0 2px; } .qr-sub { color:#555; font-size:14px; }
.qr-big { width:min(78%, 360px); margin:18px auto 6px; } .qr-big svg, .qr-sm svg { width:100%; height:auto; display:block; }
.qr-main h2 { font-size:22px; margin:8px 0; }
.qr-steps { text-align:left; max-width:420px; margin:8px auto 0; font-size:15px; line-height:1.6; }
.qr-tables { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.qr-card { border:2px dashed #999; border-radius:14px; padding:14px; text-align:center; break-inside:avoid; }
.qr-papan { font-size:30px; font-weight:900; letter-spacing:.04em; } .qr-hall { color:#666; font-size:12px; }
.qr-sm { width:72%; margin:8px auto; } .qr-who { font-size:14px; } .qr-note { font-size:11.5px; color:#666; margin-top:2px; }
@media print {
  .qr-pg { box-shadow:none; border-radius:0; padding:0; }
  .qr-main { break-after: page; min-height: 92vh; display:flex; flex-direction:column; justify-content:center; }
  .qr-big { width: 62%; }
  .qr-tables { grid-template-columns:1fr 1fr; gap:10mm; }
  .qr-card { height: 108mm; display:flex; flex-direction:column; justify-content:center; }
  .qr-doc ~ *, #toast, .toast { display:none !important; }
}
/* Status penganjur */
.st-bar { height:10px; border-radius:6px; background: var(--line, #e5e7eb); overflow:hidden; margin-top:8px; } .st-bar i { display:block; height:100%; background: var(--brand, #1f4aa8); }
.st-act { display:block; padding:9px 10px; border-radius:10px; margin:6px 0; background: color-mix(in srgb, var(--line, #e5e7eb) 40%, transparent); font-size:14px; color:inherit; text-decoration:none; }
.st-act.warn { background:#fff4d6; color:#5a4100; }
.st-act .pill-btn { margin-left:6px; }
.st-tbs { padding:4px 12px; } .st-tb { display:grid; grid-template-columns:42px 1fr auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line, #e5e7eb); font-size:13.5px; } .st-tb:last-child { border-bottom:0; }
.st-tb.free b { color: var(--muted, #64748b); } .st-sc { text-align:right; font-size:15px; }
.ck-list { display:flex; flex-wrap:wrap; gap:6px; } .ck { border:1.5px solid var(--line, #e5e7eb); background:#fff; border-radius:999px; padding:6px 11px; font-size:13px; } .ck.on { background:#e7f7ec; border-color:#3aa55d; }

/* Carrom: pilih mata board */
.sb-pad { margin-top:10px; text-align:center; }
.sb-padg { display:grid; grid-template-columns:repeat(5, 1fr); gap:6px; }
.sb-padg .pill-btn { justify-content:center; font-size:18px; padding:10px 0; }

/* Carrom: kad papan di tab Langsung — papan kayu dengan bingkai, poket di penjuru dan bulatan tengah */
.tt-top { grid-template-columns: 1fr 26px 1fr;
  background:
    radial-gradient(circle at 11px 11px, #120a05 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 11px) 11px, #120a05 6px, transparent 7px),
    radial-gradient(circle at 11px calc(100% - 11px), #120a05 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), #120a05 6px, transparent 7px),
    linear-gradient(160deg, #94612f, #6b3f17);
  box-shadow: inset 0 0 0 4px #3b1c07, inset 0 0 0 5px #b07a42; }
.tt-top::before { content: none; }
.tt-net { align-self:center; justify-self:center; width:24px; height:24px; border-radius:50%; background: radial-gradient(circle, #d62828 0 5px, transparent 6px) !important; box-shadow: 0 0 0 2px rgba(255,235,200,.7); }

/* Carrom: warna buah & pilih pemenang game */
.cdot { font-size: 15px; line-height: 1; }
.mc-g.cg { font-size: 15px; opacity: .9; }
.mc-g.cg.gw { opacity: 1; filter: drop-shadow(0 0 3px var(--or)); }
.mc-g.cg.gl { opacity: .35; }
.gpick .set { display: grid; grid-template-columns: 62px 1fr 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.gbtn { border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 12px 10px; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.gbtn.on { border-color: var(--win); background: color-mix(in srgb, var(--win) 14%, var(--card)); }
.gbtn.on::after { content: '🏆'; margin-left: auto; }
.gbtn:disabled { opacity: .7; }
