/* ==========================================================================
   TTSM ARENA — web match-center visual system
   Replaces theme.css + style.css + draft-board.css for index.html & admin.html.
   One tournament, one broadcast look.
   Every legacy token name the inline scripts / draft-board.js reference is
   aliased below, so nothing that emits markup has to change.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Condensed:wght@400;500;600;700&family=Chakra+Petch:wght@400;500;600;700&display=swap");

/* ----------------------------------------------------------------- tokens -- */
:root {
  color-scheme: dark;

  /* grounds */
  --bg:        #090b10;
  --bg-2:      #0d1016;
  --raise:     #12161d;
  --raise-2:   #171c25;
  --sunk:      #06080c;

  /* lines */
  --hair:      #202836;
  --hair-2:    #2f3a4b;
  --hair-soft: rgba(236, 240, 246, .07);

  /* ink */
  --ink:       #eef1f5;
  --ink-2:     #9fa9b8;
  --ink-3:     #6c7889;
  --ink-4:     #46515f;

  /* team + state colour law — aged blood red, not an alarm red */
  --red:       #c0272d;   /* team A + live/turn/action */
  --red-hi:    #e0353d;   /* hover / active only */
  --red-deep:  #7a1116;
  --red-glow:  rgba(224, 53, 61, .28);
  --blue:      #5a9ae0;   /* team B */
  --blue-deep: #2f6fac;
  --blue-glow: rgba(90, 154, 224, .26);
  --gold:      #c7a862;   /* global ban / killer emphasis — used sparingly */
  --gold-deep: #7d6636;

  --ok:        #63c07a;
  --warn:      #d7a34c;

  /* type */
  --disp:  "Barlow Condensed", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --heavy: "Anton", "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body:  "Chakra Petch", "Segoe UI", system-ui, sans-serif;

  --shell-x: clamp(16px, 4vw, 44px);
  --maxw: 1660px;

  /* ---- legacy aliases (do not remove — JS-emitted markup depends on these) */
  --void: var(--sunk);
  --slate-0: var(--sunk); --slate-1: var(--bg-2); --slate-2: var(--raise); --slate-3: var(--raise-2);
  --line: var(--hair); --line-2: var(--hair-2);
  --text: var(--ink); --text-1: var(--ink); --text-2: var(--ink-2); --text-3: var(--ink-3);
  --red-2: var(--red); --red-dk: var(--red-deep);
  --gold-2: var(--gold-deep);
  --biru: var(--blue);
  --ground: var(--bg); --surface: var(--raise); --surface-2: var(--raise-2);
  --dim: var(--ink-2); --faint: var(--ink-3);
  --blood: var(--red-deep); --blood-2: var(--red); --on-blood: #fff;
  --q1: #6b5a3e; --q2: #7d7030; --q3: #2f6b45; --q4: #5a3a7a; --q5: #8a2f2f;
  /* draft-board.css local scope also sets --panel/--garis/--bg/--merah/--text-* ;
     they are re-pointed in the draft-board section further down. */
}

* , *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: #ff5a62; }

::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--sunk); }
::-webkit-scrollbar-thumb {
  background: var(--hair-2); border-radius: 3px; border: 2px solid var(--sunk);
}
::-webkit-scrollbar-thumb:hover { background: #3d4a5d; }
* { scrollbar-color: var(--hair-2) var(--sunk); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 3px; }

/* ------------------------------------------------------------- headings --- */
h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: .98;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-family: var(--heavy); font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  letter-spacing: .02em; line-height: .94;
}
h2 { font-size: 1.5rem; letter-spacing: .03em; }
h3 { font-size: 1.05rem; letter-spacing: .05em; }

.eyebrow {
  font-family: var(--disp);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--red);
  margin: 0 0 .5rem;
}
.rule {
  height: 2px; border: 0; margin: .7rem 0 0;
  background: linear-gradient(90deg, var(--red), transparent 70%);
}

/* =========================================================== TOP BAR ====== */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(6, 8, 12, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex; align-items: stretch;
  gap: clamp(10px, 2vw, 26px);
  padding: 0 var(--shell-x);
  max-width: var(--maxw); margin: 0 auto; height: 60px;
}

.logo {
  display: flex; align-items: center; gap: .5ch;
  font-family: var(--disp);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; flex: none;
  padding-right: clamp(12px, 2vw, 26px);
  border-right: 1px solid var(--hair-soft);
}
.logo { cursor: pointer; }
.logo span:first-child { color: #fff; }
.logo span:last-child  { color: var(--red); }

#nav, .topbar nav { display: flex; align-items: stretch; flex: 1; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }

.nav-btn {
  position: relative; background: none; border: 0;
  color: var(--ink-3);
  padding: 0 clamp(9px, 1.4vw, 16px);
  font-family: var(--disp);
  font-size: .92rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: color .16s;
}
.nav-btn::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1);
}
.nav-btn:hover { color: var(--ink); }
.nav-btn.active { color: #fff; }
.nav-btn.active::after { transform: scaleX(1); }
.nav-btn[hidden] { display: none; }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 9px; padding-bottom: 0; align-items: center; gap: 8px; }
  .logo { border-right: 0; padding-right: 0; font-size: 1rem; flex: 1 1 auto; min-width: 0; white-space: nowrap; }
  .logo span:last-child { display: none; }
  .topbar-right { flex: 0 0 auto; margin-left: auto; border-left: 0; padding-left: 0; }
  #nav, .topbar nav {
    order: 5; flex: 1 1 100%; width: 100%; height: 42px;
    border-top: 1px solid var(--hair-soft); margin-top: 4px;
  }
}

.topbar-right {
  display: flex; align-items: center; gap: 10px;
  padding-left: clamp(10px, 1.6vw, 20px);
  flex: none;
  border-left: 1px solid var(--hair-soft);
}
.who, .ro {
  font-family: var(--disp);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap;
}
.ro { color: var(--red); margin-left: 8px; }
#authLink { text-decoration: none; }

/* small button / chip control shared across pages */
.small-btn, .setting-button {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(236, 240, 246, .045);
  border: 1px solid var(--hair-2);
  color: var(--ink-2);
  padding: 7px 15px; border-radius: 2px;
  font-family: var(--disp); font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: color .16s, border-color .16s, background .16s;
}
.small-btn:hover, .setting-button:hover {
  color: #fff; background: rgba(236, 240, 246, .09); border-color: var(--ink-3);
}
.small-btn:disabled { opacity: .35; cursor: not-allowed; }

.primary, .generate-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff;
  border: 1px solid transparent;
  padding: 11px 24px; border-radius: 2px;
  font-family: var(--disp); font-size: .92rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: background .16s;
}
.primary:hover, .generate-btn:hover, .btn:hover { background: var(--red-hi); }
.primary:disabled, .btn:disabled, .generate-btn:disabled {
  opacity: .4; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.btn.ghost:hover { border-color: var(--red); color: #fff; box-shadow: none; }
.btn.sm { padding: 7px 14px; font-size: .78rem; }

/* =========================================================== LAYOUT ======= */
.main {
  padding: clamp(22px, 3vw, 38px) var(--shell-x) 120px;
  max-width: var(--maxw); margin: 0 auto;
}

.page { display: none; }
.page.active { display: block; animation: pageIn .18s ease-out; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
  .nav-btn::after { transition: none; }
}

.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 22px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 26px;
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.page-header::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 72px; height: 2px; background: var(--red);
}
.page-header h1 { margin: 0; }
.page-header p {
  color: var(--ink-2); font-size: .92rem; margin: 8px 0 0; max-width: 62ch;
}
.page-header > div:last-child:not(:first-child) {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* =================================================== SCOREBOARD BAND ====== */
/* #tournament > #tournBody > .trn-skor  (markup from renderTournament) */
#tournament .trn-skor {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 3vw, 46px);
  padding: clamp(16px, 2.4vw, 26px) clamp(18px, 3vw, 40px);
  margin-bottom: 18px;
  background: var(--bg-2);
  border: 1px solid var(--hair);
  position: relative; overflow: hidden;
}
#tournament .trn-skor::before,
#tournament .trn-skor::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 3px;
}
#tournament .trn-skor::before { left: 0;  background: var(--red); }
#tournament .trn-skor::after  { right: 0; background: var(--blue); }

#tournament .trn-sk-tim {
  display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); min-width: 0;
}
#tournament .trn-sk-tim.b { justify-content: flex-end; }
#tournament .trn-sk-tim b {
  font-family: var(--heavy); font-weight: 400;
  font-size: clamp(1.25rem, .8rem + 1.9vw, 2.2rem);
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#tournament .trn-sk-tim.a b { color: #ff6169; }
#tournament .trn-sk-tim.b b { color: #7fb2ec; }
#tournament .trn-sk-tim i {
  font-style: normal;
  font-family: var(--heavy); font-weight: 400;
  font-size: clamp(2.2rem, 1rem + 3.2vw, 3.6rem);
  line-height: 1; color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 1.4ch; text-align: center; flex: none;
}
#tournament .trn-sk-mid {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--disp); text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-3); font-size: .72rem; white-space: nowrap; flex: none;
}
#tournament .trn-sk-mid span:first-child {
  color: var(--ink); font-weight: 700; font-size: .82rem;
  padding: 3px 10px; border: 1px solid var(--hair-2); border-radius: 3px;
}

/* score-control strip (#trnKontrol .tk-*) — kept from index.html inline, retinted */
#trnKontrol { margin: 4px 0 18px; display: flex; flex-direction: column; gap: 7px; }
#trnKontrol .tk-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); }
#trnKontrol .tk-t { font-family: var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); min-width: 6rem; }
#trnKontrol .tk-c { display: inline-flex; align-items: center; gap: 5px; }

/* Peran + sisi overlay. Sisi kiri overlay selalu milik killer ronde
   ini, jadi operator web tahu susunannya tanpa melihat OBS. */
/* Poin ronde berjalan, di sebelah nomor ronde. Admin web melihat angka
   yang sama dengan operator di Local App. */
#trnKontrol .tk-poin { display: block; font-style: normal; font-size: .7rem;
  letter-spacing: .1em; color: var(--emas, #c9a961); margin-top: 2px;
  font-variant-numeric: tabular-nums; }
#trnKontrol .tk-peran { font-style: normal; font-size: .68rem; letter-spacing: .08em;
  color: var(--ink-3); opacity: .75; margin-left: 5px; }
#trnKontrol .tk-c b, #trnKontrol .tk-sc { font-variant-numeric: tabular-nums; color: var(--ink); }
#trnKontrol .tk-sc { font-family: var(--disp); font-weight: 700; letter-spacing: .04em; font-size: .95rem; }
#trnKontrol .tk-mid { color: var(--ink-3); font-family: var(--disp); letter-spacing: .12em; text-transform: uppercase; }
#trnKontrol button {
  background: var(--raise-2); color: var(--ink); border: 1px solid var(--hair-2);
  border-radius: 2px; min-width: 24px; padding: 3px 9px; font: inherit; font-size: .8rem; cursor: pointer;
}
#trnKontrol button:hover { border-color: var(--red); color: #fff; }

.msg { font-size: .8rem; color: var(--red); min-height: 1.1em; }

#tournHint, #tournBody.who, .who#tournBody { color: var(--ink-3); }

/* ======================================================== HOME LIVE ====== */
.home-live {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--hair);
}
.home-live .hl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.home-live .hl-dot.on { background: var(--red); }
.home-live .who { flex: 1 1 220px; min-width: 0; color: var(--ink-2); white-space: normal; }
.home-live .btn { margin-left: auto; }

/* ======================================================== SITE FOOT ====== */
.site-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px var(--shell-x) 40px;
  border-top: 1px solid var(--hair);
  font-size: .82rem; color: var(--ink-3);
}
.sf-mark {
  font-family: var(--disp); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.site-foot .sf-live {
  margin-left: auto;
  font-family: var(--disp); letter-spacing: .1em; text-transform: uppercase;
  font-size: .72rem; color: var(--ink-3);
}
.site-foot .sf-live.on { color: var(--red); }

/* ====================================================== STAT CARDS ======== */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 8px;
}
.stat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  background: var(--raise);
  border: 1px solid var(--hair);
  border-top: 2px solid var(--hair-2);
  border-radius: 3px; padding: 20px 22px;
}
.stat-card:nth-child(1) { border-top-color: var(--ink-3); }
.stat-card:nth-child(2) { border-top-color: var(--gold-deep); }
.stat-card:nth-child(3) { border-top-color: var(--blue-deep); }
.stat-card:nth-child(4) { border-top-color: var(--red); }
.stat-icon {
  width: 42px; height: 42px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  background: rgba(236, 240, 246, .05); border: 1px solid var(--hair-soft);
  color: var(--ink-2);
}
.stat-icon svg { width: 21px; height: 21px; }
.stat-card span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.stat-card strong, .stat-card .n {
  display: block; font-family: var(--disp); font-weight: 700;
  font-size: 1.7rem; line-height: 1.15; color: var(--ink);
  font-variant-numeric: tabular-nums; text-transform: uppercase;
}

/* ======================================================== PANELS ========= */
.panel {
  background: var(--raise);
  border: 1px solid var(--hair);
  border-radius: 3px; padding: 22px;
  position: relative;
}
.panel + .panel { margin-top: 14px; }
.panel > b {
  display: block; margin-bottom: 3px;
  font-family: var(--disp); font-size: 1rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.lead, .panel .lead { color: var(--ink-3); font-size: .82rem; margin: 0 0 12px; }

/* ======================================================== FORMS ========== */
label {
  display: block;
  font-family: var(--disp); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  margin: 16px 0 7px;
}
.panel > label:first-child { margin-top: 0; }

input, textarea, select {
  width: 100%;
  background: var(--sunk);
  border: 1px solid var(--hair-2);
  border-radius: 2px; padding: 10px 13px;
  color: var(--ink); font-family: var(--body); font-size: .88rem;
  transition: border-color .16s;
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 2px var(--red-glow);
}
select { cursor: pointer; }
select option { background: var(--raise); color: var(--ink); }
textarea { resize: vertical; min-height: 84px; line-height: 1.7; }

label input, label select, label textarea { margin-top: 6px; }
label.inline {
  display: flex; flex-direction: row; align-items: center; gap: 7px;
  text-transform: none; letter-spacing: 0; font-family: var(--body);
  font-size: .82rem; color: var(--ink-2); margin: 0;
}
label.inline input { width: auto; margin: 0; accent-color: var(--red); }

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .two-column { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* ======================================================== TABLES ========= */
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
th {
  font-family: var(--disp); text-transform: uppercase;
  font-size: .78rem; letter-spacing: .12em; color: var(--ink-2);
  background: rgba(236, 240, 246, .02);
}
tr.off td { opacity: .45; }
td b { color: var(--ink); font-family: var(--disp); letter-spacing: .04em; }

.pill {
  display: inline-block; padding: 2px 9px; border-radius: 3px;
  font-family: var(--disp); font-size: .64rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.pill.on  { background: rgba(99, 192, 122, .16); color: var(--ok); }
.pill.off { background: rgba(229, 51, 60, .16); color: var(--red); }

/* ===================================================== TEAMS GRID ======== */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tm-card {
  background: var(--raise);
  border: 1px solid var(--hair); border-top: 2px solid var(--hair-2);
  border-radius: 3px; padding: 16px 18px;
}
a.tm-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.tm-card:hover { border-color: var(--red); }
.tm-card h3 { margin: 0 0 .6rem; }
.tm-card h3 span {
  font-family: var(--disp); font-size: .66rem; color: var(--ink-3);
  letter-spacing: .12em; margin-left: .6rem; text-transform: uppercase;
}
.tm-p {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--ink-2); padding: 6px 0;
  border-top: 1px solid var(--hair);
}
.tm-p:first-of-type { border-top: none; }
.tm-p .cap {
  font-family: var(--disp); font-size: .58rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--gold-deep); border-radius: 2px; padding: 0 4px;
}
.tm-p.off { opacity: .4; text-decoration: line-through; }
.tm-empty { font-size: .8rem; color: var(--ink-3); font-style: italic; }

/* admin team rows */
.tm-row { display: flex; align-items: center; gap: .5rem; padding: 8px 0; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.tm-row:first-of-type { border-top: none; }
.tm-row .nm { font-family: var(--disp); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; min-width: 8rem; color: var(--ink); }
.tm-row .ppl { color: var(--ink-2); font-size: .8rem; flex: 1; min-width: 12rem; }

details.adv > summary {
  cursor: pointer; list-style: none; padding: 8px 0;
  font-family: var(--disp); font-size: 1rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "▸ "; color: var(--red); }
details.adv[open] > summary::before { content: "▾ "; }

/* ==================================================== MAPS LIST ========== */
.mp-daftar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.mp-item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--hair); border-radius: 5px;
  padding: 10px 13px; text-align: left; cursor: pointer;
  color: var(--ink-2); font-family: var(--body); font-size: .85rem;
  text-decoration: none;
  transition: background .14s, border-color .14s, color .14s;
}
.mp-item:hover { background: rgba(236, 240, 246, .04); color: var(--ink); border-color: var(--hair-2); }
.mp-titik {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  border: 1px solid var(--hair-2); background: transparent;
}
.mp-item.ada .mp-titik { background: var(--red); border-color: var(--red); }
.mp-nama { flex: 1; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .14s; }
.mp-item:hover .mp-nama { text-decoration-color: var(--red); }
.mp-realm { font-family: var(--disp); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }

/* ================================================ CALLOUT MODAL ========== */
.mapsview-modal { position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center; padding: 24px; }
.mapsview-modal.show { display: flex; }
.mapsview-modal > .modal-bg { position: absolute; inset: 0; background: rgba(4, 6, 10, .88); backdrop-filter: blur(6px); }
.mapsview-card {
  position: relative; z-index: 1; width: min(1100px, 94vw);
  background: var(--raise);
  border: 1px solid var(--hair-2); border-radius: 3px; padding: 18px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .75);
}
.mapsview-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.mapsview-judul { font-family: var(--disp); font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.mapsview-aksi { display: flex; gap: 8px; flex: none; align-items: center; flex-wrap: wrap; }
.mapsview-persen { font-family: var(--disp); font-size: .75rem; letter-spacing: .06em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mapsview-body { display: flex; align-items: center; justify-content: center; position: relative; background: var(--sunk); border: 1px solid var(--hair); border-radius: 3px; overflow: hidden; min-height: 40vh; }
.mapsview-body img { display: block; max-width: 100%; max-height: 78vh; object-fit: contain; transition: transform .12s ease-out; }
.mv-panah {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(6, 9, 14, .7); border: 1px solid var(--hair-2); color: var(--ink);
  font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .16s, background .16s;
}
.mapsview-body:hover .mv-panah { opacity: 1; }
.mv-panah:hover { background: var(--red); border-color: var(--red); color: #fff; }
.mv-panah.kiri { left: 12px; } .mv-panah.kanan { right: 12px; }
.mv-kaki { margin-top: 9px; font-size: .72rem; color: var(--ink-3); text-align: center; letter-spacing: .02em; }
.mapsview-hint { margin-top: 6px; font-size: .68rem; color: var(--ink-4); text-align: center; }

/* ================================================ GLOBAL-BAN BLOCKS ===== */
.gbi-bar {
  margin: 0 0 16px; font-size: .8rem; color: var(--ink-3);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gbi-blok {
  margin-bottom: 16px; border: 1px solid var(--hair); border-radius: 3px; overflow: hidden;
  background: var(--bg-2);
}
.gbi-jd {
  cursor: pointer; list-style: none; padding: 12px 15px;
  font-family: var(--disp); font-size: 1.05rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.gbi-jd::-webkit-details-marker { display: none; }
.gbi-jd::before { content: "▸"; color: var(--red); font-size: .8em; }
.gbi-blok[open] .gbi-jd::before { content: "▾"; }
.gbi-jd i { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; }
.gbi-grid { max-height: none; overflow: visible; padding: 4px 12px 14px; }
.gbi-grid .draft-kartu { cursor: default; }
.gbi-x {
  position: absolute; top: 3px; right: 3px; z-index: 3;
  width: 17px; height: 17px; padding: 0; border-radius: 3px;
  background: rgba(6, 9, 14, .8); border: 1px solid var(--hair-2); color: var(--ink-3);
  font-size: .8rem; line-height: 1; cursor: pointer; display: none;
}
.draft-kartu:hover .gbi-x { display: block; }
.gbi-x:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ================================================= LIVE CHAT tweak ====== */
/* chat.js ships its own scoped CSS with hard fallbacks; only nudge the shell. */
#dbdChat { border-radius: 3px !important; }

/* ================================================== AUTH MODAL ========== */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(380px, 92vw); }
.login h1 { font-size: 1.7rem; }

.auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 24px;
  background: rgba(4, 6, 10, .78); backdrop-filter: blur(4px);
}
.auth-card {
  width: min(380px, 92vw);
  background: var(--raise);
  border: 1px solid var(--hair-2); border-top: 2px solid var(--red);
  border-radius: 3px; padding: 26px 26px 28px;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7);
}
.auth-card h2 { margin: .3rem 0 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

/* ================================================== ADMIN SHELL ========= */
.admin-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.admin-side {
  position: sticky; top: 0; align-self: flex-start;
  width: 232px; flex: none; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  background: var(--bg-2);
  border-right: 1px solid var(--hair);
}
.admin-brand {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 8px 18px; margin-bottom: 14px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--disp); text-transform: uppercase;
}
.admin-brand { cursor: pointer; }
.admin-brand span { font-size: 1.15rem; font-weight: 700; letter-spacing: .1em; color: #fff; }
.admin-brand b { font-size: .74rem; font-weight: 600; letter-spacing: .16em; color: var(--red); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav a {
  display: block; padding: 9px 10px; border-radius: 5px;
  font-family: var(--disp); font-size: .82rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); transition: color .14s, background .14s;
}
.admin-nav a:hover { color: var(--ink); background: rgba(236, 240, 246, .05); }
.admin-nav a[hidden] { display: none; }
.admin-side-foot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--hair);
}

.admin-main { flex: 1; min-width: 0; max-width: 1200px; padding-top: clamp(22px, 3vw, 36px); }
.admin-head { margin-bottom: 22px; }
.admin-head h1 { margin: 0; }
.admin-status {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0;
  font-size: .82rem; color: var(--ink-2);
}
.admin-status .as-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);

}
#appView section { margin-bottom: 30px; scroll-margin-top: 20px; }
#appView section > h2 {
  margin-bottom: 6px; padding-bottom: 8px;
  border-bottom: 1px solid var(--hair); position: relative;
}
#appView section > h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 54px; height: 2px; background: var(--red); }
#appView section > .lead { margin: 8px 0 14px; }

/* pinned tournament selector row */
#setup > .row:first-of-type {
  position: sticky; top: 0; z-index: 20;
  margin: 0 0 16px; padding: 12px 14px;
  background: var(--bg-2);

  border: 1px solid var(--hair-2);
  border-radius: 3px;
}

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-side {
    position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px; padding: 12px var(--shell-x);
    border-right: 0; border-bottom: 1px solid var(--hair);
  }
  .admin-brand { border: 0; padding: 0 10px 0 0; margin: 0; flex-direction: row; align-items: baseline; gap: 8px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; gap: 4px; }
  .admin-side-foot { flex-direction: row; align-items: center; padding: 0; border: 0; margin-left: auto; }
  .admin-main { max-width: none; padding: 22px var(--shell-x) 100px; width: 100%; }
}

/* ==================================================================
   DRAFT BOARD  (.dr-*)  +  PICKER GRID  (.draft-*)
   Elevated from the ported local-app board. Team A = red/left,
   Team B = blue/right is a fixed law; the turn side lights up.
   ================================================================== */
.dr-papan, .draft-panel, .draft-grid, .draft-tab, .gbi-grid {
  --panel: var(--raise);
  --garis: var(--hair);
  --bg:    var(--sunk);
  --merah: var(--red);
  --text-1: var(--ink); --text-2: var(--ink-2); --text-3: var(--ink-3);
}

.dr-papan {
  background: var(--raise);
  border: 1px solid var(--hair);
  border-radius: 3px; overflow: hidden; margin-bottom: 14px;
  transition: border-color .3s;
}
.dr-papan.live { border-color: rgba(229, 51, 60, .32); }

.dr-tim {
  display: grid; grid-template-columns: auto 1fr 132px;
  gap: 13px; align-items: center; padding: 12px 15px;
  transition: background .25s;
}
.dr-tim.tim-a { background: rgba(192, 39, 45, .05); }
.dr-tim.tim-b { background: rgba(90, 154, 224, .05); }
.dr-tim.giliran.tim-a { background: rgba(192, 39, 45, .12); box-shadow: inset 3px 0 0 var(--red); }
.dr-tim.giliran.tim-b { background: rgba(90, 154, 224, .12); box-shadow: inset 3px 0 0 var(--blue); }
@media (max-width: 780px) {
  .dr-tim { grid-template-columns: 1fr; }
  .dr-sisi { order: -1; }
}

/* ---- bans ---- */
.dr-ban { display: flex; flex-direction: column; gap: 10px; align-content: start; }
.dr-ban-grup { display: flex; flex-direction: column; gap: 4px; }
.dr-ban-petak { display: grid; grid-template-columns: repeat(4, 40px); gap: 4px; }
.dr-ban-jd {
  font-family: var(--disp); font-size: .66rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.dr-ban-jd i { font-style: normal; opacity: .7; }
.tim-a .dr-ban-jd { color: #c66b71; }
.tim-b .dr-ban-jd { color: #7fb2ec; }
.dr-ban-i {
  width: 40px; height: 40px; border-radius: 3px; overflow: hidden; position: relative;
  border: 1px solid var(--hair-2); background: var(--sunk);
}
.dr-ban-i img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55) brightness(.7); }
.dr-ban-i:not(.kosong)::after {
  content: ""; position: absolute; inset: 13%;
  background:
    linear-gradient(45deg, transparent 47%, rgba(255, 90, 96, .85) 48% 52%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(255, 90, 96, .85) 48% 52%, transparent 53%);
}
.dr-ban-i.kosong { border-style: dashed; opacity: .45; }
.dr-ban-i.kini { border-color: var(--red); opacity: 1; animation: drDenyut 1.4s ease-in-out infinite; }
.dr-ban-i .dr-ph { width: 100%; height: 100%; font-size: .9rem; }

/* ---- picks ---- */
.dr-pick { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.dr-grup { display: flex; flex-direction: column; gap: 5px; }
.dr-grup-jd { font-family: var(--disp); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.dr-grup.killer .dr-grup-jd { color: var(--gold); }
.dr-grup.killer { padding-right: 14px; border-right: 1px solid var(--hair); }
.dr-grup-isi { display: flex; gap: 6px; flex-wrap: wrap; }

.dr-pick-k {
  width: 70px; border-radius: 3px; overflow: hidden; position: relative;
  border: 1px solid var(--hair-2); background: var(--sunk);
}
.dr-pick-k img, .dr-ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.dr-ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.4rem; font-weight: 700;
  color: var(--ink-4); background: rgba(236, 240, 246, .02);
}
.dr-pick-k.kosong .dr-ph { aspect-ratio: 4 / 3; font-size: 1.1rem; }
.dr-pick-k span {
  display: block; font-size: .62rem; padding: 4px 5px 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dr-pick-k em {
  display: block; font-size: .56rem; font-style: normal; padding: 0 5px 4px;
  color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dr-pick-k u {
  position: absolute; top: 3px; right: 3px; text-decoration: none;
  font-size: .5rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); background: rgba(0, 0, 0, .8); padding: 1px 4px; border-radius: 2px;
}
.tim-a .dr-pick-k.terisi { border-color: rgba(229, 51, 60, .55); }
.tim-b .dr-pick-k.terisi { border-color: rgba(90, 154, 224, .55); }
.dr-pick-k.kosong { border-style: dashed; }
.dr-pick-k.kini { border-color: var(--red); animation: drDenyut 1.4s ease-in-out infinite; }
.dr-pick-k.besar { width: 96px; }
.dr-pick-k.besar .dr-ph { font-size: 1.9rem; }
.dr-pick-k.besar img, .dr-pick-k.besar .dr-ph { aspect-ratio: 3 / 4; }
.dr-pick-k.besar span { font-size: .72rem; padding: 5px 6px 0; }
.dr-pick-k.besar em { font-size: .62rem; padding: 0 6px 5px; }
.dr-pick-k.besar.terisi { border-color: rgba(199, 168, 98, .55); }

@keyframes drDenyut {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 51, 60, 0); }
  50% { box-shadow: 0 0 0 3px rgba(229, 51, 60, .22); }
}

/* ---- team side (name + roster) ---- */
.dr-sisi { min-width: 0; }
.dr-nama {
  width: 100%; background: transparent; border: 0;
  border-bottom: 1px solid var(--hair-2);
  color: var(--ink); font-family: var(--disp);
  font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 0 0 5px; margin-bottom: 6px; text-align: right; display: block;
}
.tim-a .dr-nama { border-bottom-color: rgba(229, 51, 60, .5); color: #ff6169; }
.tim-b .dr-nama { border-bottom-color: rgba(90, 154, 224, .5); color: #7fb2ec; }
.dr-pemain { list-style: none; margin: 0; padding: 0; text-align: right; }
.dr-pemain li {
  font-size: .62rem; color: var(--ink-3); line-height: 1.55;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- centre timeline ---- */
.dr-tengah {
  display: flex; align-items: center; gap: 15px;
  padding: 12px 16px; background: rgba(0, 0, 0, .28);
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.dr-jam {
  font-family: var(--heavy); font-size: 2.1rem; font-weight: 400;
  color: var(--ink); font-variant-numeric: tabular-nums; min-width: 78px; letter-spacing: .02em;
}
.dr-jam.panik { color: var(--red); animation: drKedip .7s steps(1) infinite; transform: scale(1.06); }
@keyframes drKedip { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.dr-alur { flex: 1; display: flex; gap: 2px; align-items: center; min-width: 0; }
.dr-alur i { flex: 1; height: 5px; border-radius: 2px; min-width: 3px; background: var(--hair-2); transition: transform .15s; }
.dr-alur i.tim-a.lewat { background: rgba(229, 51, 60, .8); }
.dr-alur i.tim-b.lewat { background: rgba(90, 154, 224, .8); }
.dr-alur i.pick { height: 9px; }
.dr-alur i.kini { background: var(--ink); transform: scaleY(1.7); }
.dr-info { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.dr-info .t-a { color: #ff6169; } .dr-info .t-b { color: #7fb2ec; }
.dr-info i { font-style: normal; color: var(--ink-3); font-size: .72rem; }

/* ---- picker panel ---- */
.draft-panel {
  background: var(--raise);
  border: 1px solid var(--hair); border-radius: 3px; overflow: hidden;
  transition: border-color .3s;
}
.draft-panel.live { border-color: rgba(229, 51, 60, .4); }
/* Satu baris jawaban "giliran siapa, ngapain" — sebelumnya cuma ada di
   .dr-info di atas papan (jauh dari grid yang sedang dilihat pemain), jadi
   pemain harus scroll balik buat inget kenapa sebagian kartu bisa diklik. */
.draft-giliran { padding: 0; font-size: 0; transition: padding .16s, font-size .16s; }
.draft-giliran.aktif {
  padding: 9px 13px; font-size: .78rem; letter-spacing: .03em;
  color: var(--ink-2); border-bottom: 1px solid var(--hair);
}
.draft-giliran b { color: var(--ink); }
.draft-giliran.t-a b { color: var(--red-hi); }
.draft-giliran.t-b b { color: #7fb2ec; }
.draft-giliran.milikku {
  background: rgba(229, 51, 60, .12); color: #fff;
  animation: drDenyut 1.6s ease-in-out infinite;
}
.draft-giliran.milikku b { color: var(--red-hi); }
.draft-tab {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 11px 13px; border-bottom: 1px solid var(--hair);
}
.draft-tab-btn {
  padding: 6px 14px; background: transparent; border: 1px solid var(--hair-2);
  border-radius: 2px; color: var(--ink-3); cursor: pointer;
  font-family: var(--disp); font-size: .78rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; transition: color .14s, border-color .14s, background .14s;
}
.draft-tab-btn:hover { color: var(--ink); border-color: var(--ink-4); }
.draft-tab-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.draft-cari {
  margin-left: auto; padding: 6px 12px; min-width: 170px; width: auto;
  background: var(--sunk); border: 1px solid var(--hair-2);
  border-radius: 2px; color: var(--ink); font-size: .82rem;
}
.draft-hitung { font-size: .72rem; color: var(--ink-3); padding: 9px 13px 0; letter-spacing: .04em; }
.draft-hitung .gb-tag { color: var(--gold); font-style: normal; font-weight: 600; }

.draft-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 7px; padding: 13px; max-height: 52vh; overflow-y: auto;
  transition: opacity .12s ease;
}
/* Feedback instan begitu kartu diklik — sebelum ini gridnya tetap terlihat
   bisa diklik sampai broadcast baliknya nyampe, kebaca sebagai delay. */
#tournPicker.sending .draft-grid { opacity: .5; pointer-events: none; }
.draft-kartu {
  position: relative; padding: 0; overflow: hidden; text-align: left;
  background: var(--sunk); border: 1px solid var(--hair-2);
  border-radius: 5px; cursor: default; display: flex; flex-direction: column;
  transition: transform .12s, border-color .12s;
}
.draft-kartu img, .draft-ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.draft-ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-size: 1.5rem; font-weight: 700;
  color: var(--ink-4); background: rgba(236, 240, 246, .02);
}
.draft-nm { font-size: .66rem; color: var(--ink); padding: 5px 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-sub { font-size: .56rem; color: var(--ink-3); padding: 0 5px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sebelumnya cuma border tipis rgba(...,.45) -- nyaris tak beda dari 40+
   kartu lain yang sekadar dipajang. Kartu yang benar-benar bisa diklik
   sekarang berdenyut, sama seperti slot ban/pick yang "kini" di papan atas
   (drDenyut yang sama, bukan animasi baru). */
.draft-kartu.bisa {
  cursor: pointer; border-color: var(--red-hi);
  animation: drDenyut 1.4s ease-in-out infinite;
}
.draft-kartu.bisa:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.draft-kartu[disabled] { pointer-events: none; }
.draft-kartu.diban { opacity: .3; filter: grayscale(1); }
.draft-kartu.diban.ban::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(229, 51, 60, .42) 7px 9px);
}
.draft-kartu.diban.pick { opacity: .5; filter: none; }
.draft-tanda {
  position: absolute; top: 3px; left: 3px; z-index: 2;
  font-size: .56rem; letter-spacing: .05em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 2px; color: #fff; font-weight: 600;
  max-width: calc(100% - 6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.draft-tanda.tim-a { background: rgba(229, 51, 60, .95); }
.draft-tanda.tim-b { background: rgba(90, 154, 224, .95); }
.draft-tanda.global { background: var(--gold); color: #14181e; }
.draft-tanda.aksi-ban { background: var(--red-hi); }
.draft-tanda.aksi-pick { background: var(--ok, #63c07a); color: #0b1a10; }
.draft-kartu.global { opacity: .4; }
.draft-kartu.global .draft-ph { filter: grayscale(1) brightness(.6); }
.draft-kosong { font-size: .8rem; color: var(--ink-3); text-align: center; padding: 16px 0; font-style: italic; grid-column: 1 / -1; }

/* ---- live cursors ---- */
.rt-cursor-layer { position: absolute; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
/* .11s bridges the 100ms gap between cursor updates, so a peer slides
   continuously instead of stepping ten times a second. */
.rt-cursor { position: absolute; transform: translate(-2px, -2px); transition: left .11s linear, top .11s linear; will-change: left, top; }
.rt-cursor svg { display: block; fill: var(--ink); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.rt-cursor.tim-a svg { fill: #ff6169; }
.rt-cursor.tim-b svg { fill: #7fb2ec; }
.rt-cursor b {
  position: absolute; left: 13px; top: 12px; white-space: nowrap;
  font-family: var(--disp); font-size: .62rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(20, 24, 30, .92); padding: 1px 6px; border-radius: 3px;
}
.rt-cursor.tim-a b { background: var(--red-deep); }
.rt-cursor.tim-b b { background: var(--blue-deep); }

/* ====================================================================
   RULES PAGE  (.rl-*)  — editable handbook, mirrors the ops-desk look
   ==================================================================== */
.rl-hero {
  max-width: 62ch; padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--hair); position: relative;
}
.rl-hero::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px; background: var(--red);
}
.rl-hero .rule { max-width: 220px; }
.rl-hero h1, .rl-hero h2 { font-size: clamp(1.9rem, 1.1rem + 3vw, 3rem); text-wrap: balance; }
.rl-intro { margin: 14px 0 0; }
.rl-intro p { color: var(--ink-2); font-size: .95rem; margin: 0 0 .4rem; }
.rl-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.rl-stat {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; border-radius: 3px;
  background: var(--raise); border: 1px solid var(--hair);
}
.rl-stat span { font-family: var(--disp); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.rl-stat b { font-family: var(--heavy); font-weight: 400; font-size: 1.2rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.rl-stat b.red { color: var(--red-hi); }
.rl-stat b.ok { color: var(--ok); }

/* Baki tab tersegmentasi — satu bagian aturan tampil sekaligus, seperti
   tab bar siaran, bukan daftar panjang yang di-scroll. */
.rl-nav {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: clamp(16px, 3vw, 24px);
  padding: 6px; border-radius: 4px;
  background: var(--sunk); border: 1px solid var(--hair);
}
.rl-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: none; border: 1px solid transparent; border-radius: 3px;
  color: var(--ink-2);
  font-family: var(--disp); font-size: .78rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; cursor: pointer;
  transition: color .14s, background .14s, border-color .14s;
}
.rl-pill i { font-style: normal; color: var(--ink-4); font-weight: 700; }
.rl-pill:hover { color: var(--ink); border-color: var(--hair-2); }
.rl-pill.active { color: #fff; background: var(--red); border-color: var(--red); }
.rl-pill.active i { color: rgba(255,255,255,.65); }
.rl-pill-all { margin-left: auto; color: var(--ink-2); }

.rl-list { display: flex; flex-direction: column; gap: clamp(14px, 2.5vw, 22px); }
.rl-sec {
  border-radius: 3px; padding: clamp(18px, 3vw, 30px);
  background: var(--raise);
  border: 1px solid var(--hair);
}
.rl-sec.danger { border-color: rgba(229, 51, 60, .35); }
.rl-sec-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 4px;
  border-bottom: 1px solid var(--hair);
}
.rl-sec-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rl-ico {
  width: 46px; height: 46px; flex: none; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  background: var(--raise-2); border: 1px solid var(--hair-2); color: var(--red);
}
.rl-ico svg { width: 24px; height: 24px; }
.rl-sec.danger .rl-ico { color: var(--red); border-color: rgba(229, 51, 60, .4); }
.rl-kick { display: block; font-family: var(--disp); font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 3px; }
.rl-sec-id h2 { font-size: 1.3rem; }
.rl-tag {
  align-self: flex-start; flex: none;
  padding: 5px 12px; border-radius: 2px;
  background: var(--sunk); border: 1px solid var(--hair);
  font-family: var(--disp); font-size: .62rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.rl-sec.danger .rl-tag { color: var(--red); }

.rl-lead { padding-top: 16px; }
.rl-lead p, .rl-card p { color: var(--ink-2); font-size: .92rem; margin: 0 0 .5rem; }
/* Kartu aturan-berbutir dibaca kalimat demi kalimat — beri tiap kartu ruang
   napas yang nyata (bukan 5 kolom sempit yang tiap barisnya patah dua baris)
   supaya bisa dipindai sekilas, bukan cuma "bisa dibaca". */
.rl-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px; margin-top: 14px;
}
.rl-card {
  padding: 18px 20px; border-radius: 3px;
  background: var(--sunk); border: 1px solid var(--hair);
}
.rl-card h4 {
  font-family: var(--disp); font-size: 1rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--hair);
  line-height: 1.3;
}
.rl-li { display: flex; align-items: flex-start; gap: 10px; font-size: .87rem; line-height: 1.5; color: var(--ink-2); padding: 6px 0; }
.rl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; margin-top: .55em; }
.rl-kv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: .86rem; color: var(--ink-2); padding: 5px 0; border-top: 1px solid var(--hair);
}
.rl-kv:first-child { border-top: 0; }
.rl-kv b { color: var(--ink); font-weight: 600; white-space: nowrap; }

.rl-dl {
  max-width: 980px; margin: clamp(18px, 3vw, 28px) auto 0;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 3px;
  background: var(--raise);
  border: 1px solid var(--hair);
}
.rl-dl-i { width: 40px; height: 40px; flex: none; border-radius: 3px; display: flex; align-items: center; justify-content: center; background: var(--raise-2); border: 1px solid var(--hair-2); color: var(--ink-2); }
.rl-dl-i svg { width: 20px; height: 20px; }
.rl-dl-t { flex: 1; min-width: 12rem; display: flex; flex-direction: column; gap: 2px; }
.rl-dl-t b { font-family: var(--disp); font-size: 1rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); }
.rl-dl-t span { font-size: .8rem; color: var(--ink-3); }

/* ================================================ KILLERS PAGE (.kr-*) === */
.kr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.kr-kartu {
  display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--raise); border: 1px solid var(--hair); border-radius: 3px;
  overflow: hidden; padding: 0; transition: border-color .14s, transform .12s;
}
.kr-kartu:hover { border-color: var(--red); transform: translateY(-2px); }
.kr-kartu.aktif { border-color: var(--red-hi); }
.kr-kartu img, .kr-ph {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; display: block;
}
.kr-ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heavy); font-size: 2.4rem; color: var(--ink-4); background: var(--sunk);
}
.kr-ph.big { width: 96px; aspect-ratio: 3 / 4; font-size: 2rem; flex: none; }
.kr-nm { font-family: var(--disp); font-weight: 700; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); padding: 8px 10px 2px; }
.kr-meta { font-size: .72rem; color: var(--ink-3); padding: 0 10px 9px; }
.kr-meta b { color: var(--red-hi); }

.kr-detail {
  position: relative; margin-top: 18px; padding: clamp(16px, 3vw, 26px);
  background: var(--raise); border: 1px solid var(--hair); border-radius: 3px;
}
.kr-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--ink-3); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.kr-x:hover { color: var(--red); }
.kr-det-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--hair); }
.kr-det-head img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; flex: none; }
.kr-det-head h2 { font-size: 1.4rem; margin: 2px 0 0; }
.kr-rar { margin-top: 16px; }
.kr-rar-jd { font-family: var(--disp); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.kr-rar-jd i { font-style: normal; opacity: .7; }
.kr-addons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.kr-addon {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; background: var(--sunk); border: 1px solid var(--hair); border-radius: 3px;
  font-size: .84rem; color: var(--ink-2);
}
.kr-addon img { width: 26px; height: 26px; flex: none; object-fit: contain; }
.kr-addon .kr-ai { width: 26px; height: 26px; flex: none; border: 1px solid var(--hair-2); border-radius: 2px; }
.kr-an { flex: 1; min-width: 0; }
.kr-addon.ban { border-color: rgba(199, 168, 98, .4); }
.kr-addon.ban .kr-an { color: var(--ink-3); text-decoration: line-through; }
.kr-tag {
  flex: none; font-family: var(--disp); font-size: .58rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: #14181e; background: var(--gold); padding: 2px 6px; border-radius: 2px;
}

/* ============================================ LOADOUT LAYOUT (.ld-*) ====
   In-game-style build screen for the Killers page: character list on the
   left (search + scroll list, like the roster grid), big build panel on
   the right (power + add-ons as rarity-coloured diamonds, like the
   loadout screen). Scoped separately from .kr-* so Survivors/Offerings/
   Items (still on the old card-grid layout) are untouched. */
.ld-shell { display: flex; gap: 0; margin-top: 16px; border: 1px solid var(--hair); border-radius: 3px; overflow: hidden; min-height: 520px; }

.ld-side { width: 300px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--hair); background: var(--bg-2); }
.ld-search { position: relative; padding: 12px; border-bottom: 1px solid var(--hair); flex: none; }
.ld-search svg { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-3); pointer-events: none; }
.ld-search input {
  width: 100%; padding: 9px 10px 9px 32px; background: var(--sunk); border: 1px solid var(--hair-2);
  border-radius: 2px; color: var(--ink); font-family: var(--body); font-size: .84rem;
}
.ld-search input:focus { outline: none; border-color: var(--red); }
.ld-list { flex: 1; overflow-y: auto; max-height: 560px; }
.ld-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px;
  background: none; border: 0; border-left: 3px solid transparent; text-align: left; cursor: pointer;
  color: var(--ink-2); transition: background-color .12s, border-color .12s;
}
.ld-item:hover { background: var(--raise); color: var(--ink); }
.ld-item.aktif { background: var(--raise); border-left-color: var(--red); color: var(--ink); }
.ld-item img, .ld-item .ld-ph {
  width: 38px; height: 38px; flex: none; object-fit: cover; object-position: center top;
  border-radius: 2px; background: var(--sunk); border: 1px solid var(--hair-2);
}
.ld-item .ld-ph { display: flex; align-items: center; justify-content: center; font-family: var(--heavy); font-size: 1rem; color: var(--ink-4); }
.ld-item-nm { font-family: var(--disp); font-size: .84rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-item-n { flex: none; font-size: .68rem; color: var(--ink-3); }

.ld-main { flex: 1; min-width: 0; padding: clamp(18px, 3vw, 30px); overflow-y: auto; }
.ld-hero { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--hair); }
.ld-hero img, .ld-hero .ld-ph {
  width: 110px; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
  border-radius: 2px; border: 1px solid var(--hair-2); flex: none; background: var(--sunk);
}
.ld-hero .ld-ph { display: flex; align-items: center; justify-content: center; font-family: var(--heavy); font-size: 2.2rem; color: var(--ink-4); }
.ld-hero h2 { font-size: 1.5rem; margin: 2px 0 6px; }
.ld-power { font-size: .88rem; color: var(--ink-2); margin: 0 0 4px; }
.ld-power b { color: var(--ink); }
.ld-more { font-size: .78rem; }

.ld-group { margin-bottom: 22px; }
.ld-group-jd { font-family: var(--disp); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.ld-group-jd i { font-style: normal; opacity: .7; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 14px 10px; }
.ld-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ld-diamond {
  width: 58px; height: 58px; padding: 3px; flex: none;
  background: var(--r-color, var(--hair-2));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  display: flex; transition: transform .12s;
}
.ld-slot:hover .ld-diamond { transform: scale(1.06); }
.ld-diamond-in {
  flex: 1; background: var(--sunk); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  display: flex; align-items: center; justify-content: center;
}
.ld-diamond-in img { width: 62%; height: 62%; object-fit: contain; }
.ld-slot-nm { font-size: .68rem; line-height: 1.25; color: var(--ink-2); }

@media (max-width: 760px) {
  .ld-shell { flex-direction: column; min-height: 0; }
  .ld-side { width: 100%; border-right: 0; border-bottom: 1px solid var(--hair); }
  .ld-list { max-height: 240px; }
  .ld-hero { flex-wrap: wrap; }
}

/* banned add-on list on the Global Ban page */
.gb-addon-list { display: flex; flex-direction: column; gap: 4px; padding: 4px 12px 12px; }
.gb-addon { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--ink-2); }
.gb-addon em { font-style: normal; color: var(--ink-3); font-size: .78rem; }

/* clickable locked pick — klaim nama kamu di bawah kartu (bukan overlay popup) */
.dr-pick-k.sorot-bisa { cursor: pointer; }
.dr-pick-k.sorot-bisa:hover { border-color: var(--gold); }

/* rules editor in admin.html */
.re-sec { border: 1px solid var(--hair); border-radius: 3px; padding: 16px; margin-top: 12px; background: var(--sunk); }
.re-sec-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.re-sec-top .small-btn { margin-left: auto; }
.re-stat-row { display: grid; grid-template-columns: 1fr 1fr 8rem; gap: 8px; margin-top: 8px; }
@media (max-width: 640px) { .re-stat-row { grid-template-columns: 1fr; } }

.oe-grid { display: grid; grid-template-columns: 1fr 6rem 6rem; gap: 8px 12px; align-items: center; margin: 12px 0; max-width: 420px; }
.oe-grid > span { font-size: .85rem; color: var(--ink-2); }
.oe-grid .oe-h { font-family: var(--disp); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.oe-grid input { width: 100%; text-align: center; }

/* ==================================================== RESPONSIVE ======== */
@media (max-width: 640px) {
  #tournament .trn-skor { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  #tournament .trn-sk-tim, #tournament .trn-sk-tim.b { justify-content: center; }
  .page-header { align-items: flex-start; }
}
