/* ===================================================
   PBX Design System v2 — Dark VIP Mobile First
   =================================================== */

/* FONTS */
@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam.ttf") format("truetype");
}
@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
/* Fix: Shabnam's U+06F0 glyph renders as a tiny dot — use Arabic system fonts for this char.
   Note: persianNumber() also skips '0'→'۰' conversion, so this is a belt-and-suspenders guard. */

@font-face {
  font-family: "IcoFont";
  src:
    url("../fonts/icofont/fonts/icofont.woff") format("woff"),
    url("../fonts/icofont/fonts/icofont.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ===== TOKENS ===== */
:root {
  --bg-0: #080b14;
  --bg-1: #0d1120;
  --bg-2: #111827;
  --bg-3: #1a2235;
  --bg-4: #1f2a3f;
  --bg-5: #263147;
  --gold: #e8831a;
  --gold-dim: #c46e12;
  --gold-glow: rgba(232, 131, 26, 0.18);
  --gold-pale: rgba(232, 131, 26, 0.08);
  --accent: #e8831a;
  --danger: #ef4444;
  --success: #22c55e;
  --info: #3b82f6;
  --warning: #f59e0b;
  --text-0: #f8fafc;
  --text-1: #e2e8f0;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --text-5: #3f4f67;
  --border: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.04);
  --border-gold: rgba(232, 131, 26, 0.3);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 64px;
  --header-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  background: var(--bg-0);   /* themed root — fills iOS safe areas with dark */
  height: 100%;              /* enables the height:100% chain for the app shell */
}
body {
  font-family: "Shabnam", system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  direction: rtl;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;        /* standalone pages (login / register / install gate) scroll normally */
}
/* App-shell pages only (home, matches, …): lock to the visible viewport so the
   fixed bottom-nav is always in view and the page itself never scrolls.
   min-height:0 cancels the inherited 100dvh (which over-reports on Android PWA). */
body.app-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input,
select,
textarea {
  font-family: inherit;
}
code,
pre,
kbd,
samp {
  font-family: "Shabnam", monospace;
}
img {
  max-width: 100%;
  display: block;
}

/* ===== ICOFONT ===== */
[class^="icf-"],
[class*=" icf-"] {
  font-family: "IcoFont" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.icf-home::before {
  content: "\ef47";
}
.icf-football::before {
  content: "\eda0";
}
.icf-trophy::before {
  content: "\edd7";
}
.icf-crown::before {
  content: "\eef6";
}
.icf-wallet::before {
  content: "\f024";
}
.icf-book::before {
  content: "\ead2";
}
.icf-user::before {
  content: "\ed05";
}
.icf-users::before {
  content: "\ed0d";
}
.icf-settings::before {
  content: "\efe2";
}
.icf-plus::before {
  content: "\efc2";
}
.icf-minus::before {
  content: "\ef9a";
}
.icf-check::before {
  content: "\eed8";
}
.icf-close::before {
  content: "\eee4";
}
.icf-arrow-right::before {
  content: "\ea5d";
}
.icf-arrow-left::before {
  content: "\ea5c";
}
.icf-arrow-up::before {
  content: "\ea5e";
}
.icf-arrow-down::before {
  content: "\ea5b";
}
.icf-chevron-right::before {
  content: "\ea69";
}
.icf-chevron-left::before {
  content: "\ea68";
}
.icf-chevron-down::before {
  content: "\ea67";
}
.icf-edit::before {
  content: "\ef10";
}
.icf-trash::before {
  content: "\ee09";
}
.icf-lock::before {
  content: "\ef7a";
}
.icf-unlock::before {
  content: "\f01a";
}
.icf-eye::before {
  content: "\ef24";
}
.icf-eye-off::before {
  content: "\ef22";
}
.icf-upload::before {
  content: "\f01d";
}
.icf-download::before {
  content: "\ef08";
}
.icf-copy::before {
  content: "\edea";
}
.icf-star::before {
  content: "\f000";
}
.icf-chart::before {
  content: "\e979";
}
.icf-clock::before {
  content: "\eedc";
}
.icf-calendar::before {
  content: "\eecd";
}
.icf-bell::before {
  content: "\eeb8";
}
.icf-shield::before {
  content: "\efe6";
}
.icf-telegram::before {
  content: "\ed75";
}
.icf-warning::before {
  content: "\f026";
}
.icf-info::before {
  content: "\ef50";
}
.icf-refresh::before {
  content: "\efd1";
}
.icf-search::before {
  content: "\ed1b";
}
.icf-percent::before {
  content: "\efc5";
}
.icf-money::before {
  content: "\ef9d";
}
.icf-gift::before {
  content: "\ef3c";
}
.icf-fire::before {
  content: "\ef2c";
}
.icf-medal::before {
  content: "\eae2";
}
.icf-bars::before {
  content: "\eeaf";
}
.icf-photo::before {
  content: "\ef4b";
}
.icf-camera::before {
  content: "\eecf";
}
.icf-filter::before {
  content: "\ef29";
}
.icf-signal::before {
  content: "\efea";
}
.icf-logout::before {
  content: "\ef7c";
}
.icf-ban::before {
  content: "\eead";
}
.icf-flag::before {
  content: "\ef2f";
}
.icf-dashboard::before {
  content: "\eefa";
}

/* ===== APP SHELL ===== */
.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;             /* = the real visible viewport via the locked html/body chain
                               (robust on Android PWA, where 100vh/100dvh over-report) */
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-0);
}
/* Installed PWA (standalone): the base height:100dvh above is correct on
   Android — it tracks the real visible viewport. Forcing 100vh on Android
   standalone makes the wrapper taller than the visible area (viewport-fit=cover
   + gesture nav), pushing the bottom nav below the screen edge.
   iOS standalone is the exception: there 100dvh miscomputes on cold start and
   100vh is exact. So scope the 100vh override to iOS ONLY, via the
   -webkit-touch-callout test (supported on iOS Safari, NOT on Android Chrome). */
@supports (-webkit-touch-callout: none) {
  @media all and (display-mode: standalone) {
    .app-wrapper { height: 100vh; }
  }
}

/* ===== HEADER ===== */
.app-header {
  flex-shrink: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 16px;
  padding-left: 16px;
  z-index: 100;
}
.header-logo {
  display: flex;
  align-items: center;
}
.header-logo img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--gold-glow)) brightness(1.1);
}
.header-logo-admin {
  cursor: pointer;
}
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--border-gold);
  cursor: pointer;
  flex-shrink: 0;
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  flex: 1;
  text-align: center;
}
.header-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 18px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.header-action:active {
  background: var(--bg-3);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  /* Pinned to the real viewport bottom — independent of vh/dvh miscalculation
     on Android PWA, so the nav is always visible without scrolling. */
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding-bottom: var(--safe-bottom);
  /* solid (opaque) so the iOS home-indicator safe band reads as one seamless bar */
  background: #0d1120;
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-right: var(--safe-right);
  padding-left: var(--safe-left);
}
.nav-items {
  display: flex;
  width: 100%;
  height: var(--nav-h);
  align-items: center;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-4);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}
.nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
  transition: var(--transition);
}
.nav-item .nav-logo {
  display: inline-block;
  width: 22px;
  height: 24px;
  background-image: var(--logo);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: var(--transition);
}
.nav-item.active .nav-logo { background-image: var(--logo-on); transform: translateY(-1px); }
/* tapped feedback (until the next page paints) */
.nav-item.tapped { color: var(--gold); opacity: .85; }
.nav-item.tapped .nav-icon { transform: translateY(-1px) scale(1.08); }

/* top navigation progress bar — instant feedback that a tap registered */
.nav-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--gold); z-index: 99999; opacity: 0;
  box-shadow: 0 0 8px rgba(232,131,26,.6); pointer-events: none;
  transition: opacity .2s;
}
.nav-progress.go { opacity: 1; animation: nav-prog 8s cubic-bezier(.1,.6,.2,1) forwards; }
@keyframes nav-prog { 0% { width: 0; } 40% { width: 65%; } 80% { width: 88%; } 100% { width: 95%; } }
/* full-screen blocking loader for bottom-nav switches (prevents repeat taps) */
.nav-loading { position: fixed; inset: 0; z-index: 99998; display: none; align-items: center; justify-content: center; background: rgba(8,11,20,.55); backdrop-filter: blur(2px); }
.nav-loading.show { display: flex; }
.nav-loading-spin { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.16); border-top-color: var(--gold); animation: nav-spin .7s linear infinite; }
@keyframes nav-spin { to { transform: rotate(360deg); } }
.nav-item .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition);
}
.nav-item.active {
  color: var(--gold);
}
.nav-item.active .nav-icon {
  transform: translateY(-1px);
}
.nav-item::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===== MAIN CONTENT ===== */
.app-content {
  flex: 1 1 auto;
  min-height: 0;                 /* allow flex child to scroll */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  /* clear the fixed bottom-nav so the last items aren't hidden behind it */
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}
.page-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-padded {
  padding: 16px;
}
.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .icon {
  font-size: 16px;
  color: var(--gold);
}

/* ===== DASHBOARD CARDS ===== */
/* Performance card (rank + score hero) */
/* ── Performance card ── */
/* ===== Performance dashboard (cards + mini-charts) =====
   All cards share ONE surface (bg-2 + subtle gold border) to match the rest of
   the app (financial card, gift cards, base .card) — no off-theme blue gradient. */
.us-dash { display: flex; flex-direction: column; gap: 12px; }
.us-card {
  background: var(--bg-2);
  border: 1px solid rgba(232,131,26,.12);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  position: relative; overflow: hidden;
}
.us-card-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--text-2); margin-bottom: 12px; }
.us-card-h i { color: var(--gold); font-size: 13px; }

/* Hero: rank + total + today */
.us-hero {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2);
  border: 1px solid rgba(232,131,26,.12);
  border-radius: var(--radius-xl);
  padding: 16px; position: relative; overflow: hidden;
}
.us-hero::before { content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(232,131,26,.9) 40%, rgba(232,131,26,.5) 60%, transparent); }
.us-hero-rank { display:flex; align-items:center; gap:14px; flex:1; min-width:0; }
/* fixed-width box + tabular figures so the label beside it never shifts while
   the rank counts up (1→2 digits would otherwise nudge the text). */
.us-rank-num { flex: 0 0 auto; min-width: 60px; text-align: center; font-size: 46px; font-weight: 900; line-height: 1; color: var(--text-0); font-variant-numeric: tabular-nums; }
.us-rank-num.rank-gold   { color: var(--gold); text-shadow: 0 0 28px rgba(232,131,26,.5); }
.us-rank-num.rank-silver { color: #c8d0dc; text-shadow: 0 0 20px rgba(200,208,220,.3); }
.us-rank-num.rank-bronze { color: #c87d4a; text-shadow: 0 0 20px rgba(200,125,74,.35); }
.us-rank-meta { display:flex; flex-direction:column; gap:3px; min-width:0; }
.us-rank-label { font-size: 12px; font-weight: 800; color: var(--text-2); }
.us-rank-of { font-size: 11px; color: var(--text-4); }
.us-move { display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:800; border-radius: var(--radius-full); padding: 2px 7px; width: fit-content; margin-top: 2px; }
.us-move i { font-size: 10px; }
.us-move.up   { color: var(--success); background: rgba(34,197,94,.12); }
.us-move.down { color: var(--danger);  background: rgba(239,68,68,.12); }
.us-hero-nums { display:flex; align-items:center; gap:9px; padding-right: 10px; border-right: 1px solid var(--border); }
.us-hn { display:flex; flex-direction:column; align-items:center; gap:2px; min-width: 42px; }
.us-hn-v { font-size: 17px; font-weight: 900; color: var(--text-0); font-variant-numeric: tabular-nums; }
.us-hn-l { white-space: nowrap; }
@media (max-width: 360px) { .us-hero { padding: 14px 12px; } .us-hero-nums { gap: 7px; padding-right: 8px; } .us-hn { min-width: 38px; } .us-hn-v { font-size: 15px; } }
.us-hn-l { font-size: 10px; color: var(--text-4); font-weight: 700; }
.us-hn-sep { width:1px; align-self:stretch; background: var(--border); }

/* Charts row */
.us-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.us-spark-wrap { width: 100%; height: 56px; }
.us-spark { width: 100%; height: 56px; display:block; }
.us-spark-empty { font-size: 11px; color: var(--text-4); text-align:center; padding: 18px 0; }
.us-spark-foot { display:flex; align-items:center; gap:5px; margin-top: 9px; }
.us-fdot { width: 9px; height: 9px; border-radius: 50%; }
.us-fdot.f-exact { background:#22c55e; } .us-fdot.f-diff { background:#38bdf8; }
.us-fdot.f-out { background: var(--gold); } .us-fdot.f-wrong { background:#64748b; } .us-fdot.f-miss { background:#dc2626; }
.us-spark-cap { font-size: 10px; color: var(--text-4); margin-right: auto; }
.us-donut-wrap { display:flex; justify-content:center; }
.us-donut { width: 108px; height: 108px; transform-origin: center; }
/* charts animate every time the dashboard loads (.play added by JS on load) */
.us-dash.play .us-donut { animation: us-donut-in .8s cubic-bezier(.22,1,.36,1) both; }
@keyframes us-donut-in { from { opacity: 0; transform: rotate(-110deg) scale(.85); } to { opacity: 1; transform: none; } }
.us-donut-val { fill: var(--text-0); font-size: 22px; font-weight: 900; }
.us-donut-lbl { fill: var(--text-4); font-size: 9px; font-weight: 700; }
.us-legend { display:grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-top: 10px; }
.us-legend span { display:flex; align-items:center; gap:5px; font-size: 10.5px; color: var(--text-3); }
.us-legend i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.us-legend b { margin-right: auto; color: var(--text-1); font-weight: 800; }

/* Quick stat grid */
.us-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.us-stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 5px;
  display:flex; flex-direction:column; align-items:center; gap:3px; text-align:center; }
.us-stat-ic { width: 28px; height: 28px; border-radius: 50%; display:flex; align-items:center; justify-content:center;
  background: rgba(232,131,26,.1); color: var(--gold); font-size: 13px; margin-bottom: 2px; }
.us-stat-ic.gold { background: rgba(232,131,26,.16); }
.us-stat-v { font-size: 16px; font-weight: 900; color: var(--text-0); font-variant-numeric: tabular-nums; }
.us-stat-l { font-size: 9.5px; color: var(--text-4); font-weight: 700; }

/* Per-stage performance */
.us-stage-row { display:flex; align-items:center; gap:10px; margin-top: 11px; }
.us-stage-row:first-of-type { margin-top: 0; }
.us-stage-name { display:flex; flex-direction:column; gap:1px; width: 56px; flex-shrink:0; font-size: 11.5px; font-weight: 800; color: var(--text-2); }
.us-stage-cnt { font-size: 9px; font-weight: 600; color: var(--text-4); }
.us-stage-bar { flex:1; height: 8px; border-radius: var(--radius-full); background: var(--bg-1); overflow: hidden; }
.us-stage-bar span { display:block; height:100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transform-origin: right; }
.us-dash.play .us-stage-bar span { animation: us-stage-grow .9s cubic-bezier(.22,1,.36,1) .15s both; }
@keyframes us-stage-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.us-stage-bar.knock span { background: linear-gradient(90deg, #1d4ed8, #38bdf8); }
.us-stage-val { font-size: 11px; font-weight: 800; color: var(--text-3); width: 40px; text-align: left; flex-shrink:0; font-variant-numeric: tabular-nums; }

/* Best prediction */
.us-best { display:flex; align-items:center; gap:11px;
  background: linear-gradient(100deg, rgba(232,131,26,.08), var(--bg-2) 60%);
  border: 1px solid rgba(232,131,26,.18); border-radius: var(--radius-lg); padding: 11px 13px; }
.us-best-ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(232,131,26,.15); color: var(--gold);
  display:flex; align-items:center; justify-content:center; font-size: 16px; flex-shrink:0; }
.us-best-body { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.us-best-l { font-size: 10.5px; color: var(--text-4); font-weight: 700; }
.us-best-m { font-size: 13px; font-weight: 700; color: var(--text-1); }
.us-best-m b { color: var(--gold); font-weight: 900; margin: 0 3px; }

/* Per-game points bar chart (responsive HTML/CSS, fills the card) */
.us-card-h-cap { margin-right: auto; font-size: 10px; font-weight: 700; color: var(--text-4); }
.us-bars-wrap { width: 100%; }
.us-bc { display: flex; gap: 8px; height: 116px; }
.us-bc-axis { position: relative; width: 18px; flex: 0 0 18px; }
.us-bc-yl { position: absolute; right: 0; transform: translateY(-50%); font-size: 8.5px; line-height: 1; color: var(--text-4); font-weight: 700; white-space: nowrap; }
.us-bc-plot { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 4px; }
.us-bc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); pointer-events: none; }
.us-bc-grid.zero { border-top-style: solid; border-top-color: rgba(255,255,255,.13); }
.us-bc-col { position: relative; flex: 1 1 0; height: 100%; }
.us-bc-bar { position: absolute; left: 0; right: 0; min-height: 3px; border-radius: 3px;
  transform-origin: bottom; }
.us-bc-bar.neg { transform-origin: top; }
.us-dash.play .us-bc-bar { animation: us-bar-grow .6s cubic-bezier(.22,1,.36,1) both; }
@keyframes us-bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.us-bc-bar.b-exact { background: #22c55e; }
.us-bc-bar.b-diff  { background: #38bdf8; }
.us-bc-bar.b-out   { background: var(--gold); }
.us-bc-bar.b-wrong { background: #64748b; }
.us-bc-bar.b-miss  { background: #dc2626; }

/* Accuracy donut laid out beside its legend */
.us-donut-row { display: flex; align-items: center; gap: 16px; }
.us-donut-row .us-donut-wrap { flex: 0 0 auto; }
.us-donut-row .us-legend { flex: 1; margin-top: 0; }

/* Gift points breakdown — elevated chips (bg-3) on the bg-2 card */
.us-gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.us-gift { display: flex; align-items: center; gap: 9px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; }
.us-gift-ic { width: 30px; height: 30px; border-radius: 50%; background: rgba(232,131,26,.1); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.us-gift-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.us-gift-l { font-size: 11px; color: var(--text-3); font-weight: 700; }
.us-gift-v { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ===== Web Push permission prompt (bottom banner, above the nav) ===== */
.push-prompt {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 2500; display: flex; align-items: center; gap: 11px;
  background: var(--bg-2); border: 1px solid rgba(232,131,26,.3);
  border-radius: var(--radius-lg); padding: 12px 13px;
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  transform: translateY(150%); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.push-prompt.show { transform: translateY(0); opacity: 1; }
.push-prompt-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(232,131,26,.15); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.push-prompt-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.push-prompt-body b { font-size: 13px; color: var(--text-0); font-weight: 800; }
.push-prompt-body span { font-size: 11px; color: var(--text-4); }
.push-prompt-on { background: var(--gold); color: #fff; border: none; border-radius: var(--radius-full); padding: 8px 14px; font-size: 12px; font-weight: 800; font-family: inherit; cursor: pointer; flex-shrink: 0; }
.push-prompt-x { background: transparent; border: none; color: var(--text-4); font-size: 16px; cursor: pointer; padding: 4px; flex-shrink: 0; }

/* ===== Changelog modal (after an update) ===== */
.changelog-ov { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s ease; }
.changelog-ov.show { opacity: 1; }
.changelog-box { background: var(--bg-1); border: 1px solid var(--border-gold); border-radius: var(--radius-xl); max-width: 360px; width: 100%; padding: 24px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(10px) scale(.98); transition: transform .25s ease; }
.changelog-ov.show .changelog-box { transform: none; }
.changelog-ic { width: 56px; height: 56px; border-radius: 50%; background: rgba(232,131,26,.15); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 12px; }
.changelog-title { font-size: 17px; font-weight: 900; color: var(--text-0); margin-bottom: 12px; }
.changelog-list { list-style: none; padding: 0; margin: 0 0 18px; text-align: right; }
.changelog-list li { position: relative; font-size: 13px; color: var(--text-2); line-height: 1.9; padding-right: 18px; }
.changelog-list li::before { content: ''; position: absolute; right: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.dash-perf-card {
  background: linear-gradient(170deg, #16203a 0%, var(--bg-2) 62%);
  border: 1px solid rgba(232,131,26,.16);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
/* Gold shimmer line at the very top */
.dash-perf-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(232,131,26,.9) 38%,
              rgba(232,131,26,.5) 62%, transparent 100%);
}
/* Ambient glow blob */
.dash-perf-card::after {
  content: '';
  position: absolute;
  top: -50px; left: 50%;
  transform: translateX(-50%);
  width: 220px; height: 130px;
  background: radial-gradient(ellipse at center, rgba(232,131,26,.09) 0%, transparent 70%);
  pointer-events: none;
}

.dash-rank-row { display: flex; align-items: stretch; }
.dash-rank-item {
  flex: 1;
  text-align: center;
  padding: 24px 12px 18px;
  position: relative;
  z-index: 1;
}
.dash-rank-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  flex-shrink: 0;
  align-self: stretch;
  margin: 10px 0;
}
.dash-rank-num {
  font-size: 46px;
  font-weight: 900;
  color: var(--text-0);
  line-height: 1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
/* Gold glow for top-3 ranks */
.dash-rank-num.rank-gold   { color: var(--gold);    text-shadow: 0 0 28px rgba(232,131,26,.5); }
.dash-rank-num.rank-silver { color: #c8d0dc;        text-shadow: 0 0 20px rgba(200,208,220,.3); }
.dash-rank-num.rank-bronze { color: #c87d4a;        text-shadow: 0 0 20px rgba(200,125,74,.35); }

.dash-rank-label {
  font-size: 10px;
  color: var(--text-4);
  margin-top: 7px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.dash-rank-sub {
  font-size: 10px;
  color: var(--text-5);
  margin-top: 3px;
}

/* Pills row */
.dash-pills { display: flex; border-top: 1px solid var(--border-soft); }
.dash-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
}
.dash-pill + .dash-pill { border-right: 1px solid var(--border-soft); }
.dash-pill-label { font-size: 11px; color: var(--text-4); }
.dash-pill-val   { font-size: 15px; font-weight: 800; color: var(--text-1); }

/* ── Financial card ── */
.dash-fin-card {
  background: var(--bg-2);
  border: 1px solid rgba(232,131,26,.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
.dash-fin-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(232,131,26,.6) 50%, transparent 90%);
}
.dash-fin-header {
  background: linear-gradient(135deg, rgba(232,131,26,.14) 0%, rgba(232,131,26,.04) 100%);
  border-bottom: 1px solid rgba(232,131,26,.12);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-fin-label {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dash-fin-label i { font-size: 16px; color: var(--gold); }
.dash-fin-pool {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(232,131,26,.4);
}
.dash-fin-unit {
  font-size: 11px;
  color: var(--gold);
  opacity: .65;
  margin-right: 3px;
}
.dash-fin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.dash-fin-row-lbl { font-size: 12px; color: var(--text-4); }
.dash-fin-row-val { font-size: 13px; font-weight: 700; color: var(--text-2); }
/* Share breakdown (transparency) */
.share-calc-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px 4px; cursor: pointer; font-size: 12px; color: var(--text-3); }
.share-calc-head .sc-chev { color: var(--text-5); font-size: 14px; transition: transform .2s ease; }
.share-calc-head.open .sc-chev { transform: rotate(180deg); }
.share-calc { display: none; padding: 2px 16px 12px; }
.share-calc.open { display: block; }
.sc-formula { font-size: 11px; color: var(--text-4); text-align: center; background: var(--bg-3); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; line-height: 1.8; }
.sc-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border-soft); }
.sc-row b { color: var(--text-1); font-variant-numeric: tabular-nums; font-weight: 700; }
.sc-row.sc-total { border-bottom: none; margin-top: 3px; }
.sc-row.sc-total span { color: var(--text-1); font-weight: 700; }
.sc-row.sc-total b { color: var(--gold); font-weight: 900; }
/* Utility color helpers */
.clr-success {
  color: var(--success) !important;
}
.clr-danger {
  color: var(--danger) !important;
}
.clr-gold {
  color: var(--gold) !important;
}

/* ===== MATCH CARD (legacy stub — kept for any stray references) ===== */
.match-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.2s ease-in-out infinite;
  display: inline-block;
}

/* ===== NUMBER PICKER ===== */
.score-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.score-picker-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.picker-team-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  width: 72px;
  text-align: center;
}
.picker-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 6px;
}
.picker-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.picker-btn:active {
  background: var(--bg-5);
  transform: scale(0.94);
}
.picker-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-0);
  min-width: 40px;
  text-align: center;
  line-height: 1;
}

/* ===== LEADERBOARD ===== */
.lb-row, .lb-head {
  display: grid;
  /* tighter rank/score/form columns → more room for the name (shares column
     removed from the board — still shown on the profile) */
  grid-template-columns: 26px 1fr 44px 80px;
  gap: 5px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
}
/* 5-column variant: adds the champion/golden-boot column (knockout phase) */
.lb-head.lb-5col, .lb-row.lb-5col { grid-template-columns: 22px 1fr 32px 54px 58px; gap: 4px; }
.lb-fcol { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lb-fc { display: inline-flex; align-items: center; gap: 3px; max-width: 88px; font-size: 9.5px; font-weight: 800; line-height: 1; padding: 2px 5px; border-radius: var(--radius-full); white-space: nowrap; }
.lb-fc i { font-size: 9px; flex-shrink: 0; }
.lb-fc-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-fc-flag { width: 14px; height: 10px; border-radius: 1px; object-fit: cover; flex-shrink: 0; }
.lb-fc-g.hit { background: rgba(34,197,94,.16); color: var(--success); }
.lb-fc-c { background: rgba(232,131,26,.12); color: var(--gold); }
.lb-fc-c.hit { background: rgba(34,197,94,.16); color: var(--success); }
.lb-fc-g { background: var(--bg-3); color: var(--text-3); }
.lb-fc-none { color: var(--text-5); font-size: 12px; }

/* LIVE champion + top-scorer banner (leaderboard, knockout phase) */
.lb-final { background: linear-gradient(150deg, rgba(232,131,26,.08), var(--bg-2) 65%); border: 1px solid rgba(232,131,26,.22); border-radius: var(--radius-lg); padding: 12px 13px; margin-bottom: 12px; }
.lb-final-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--gold); margin-bottom: 10px; }
.lb-final-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.lb-final-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lb-final-lbl { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-4); font-weight: 700; }
.lb-final-lbl i { color: var(--gold); font-size: 11px; }
.lb-final-val { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--text-0); min-width: 0; }
.lb-final-val.lb-final-wait { color: var(--text-4); font-weight: 600; font-size: 12px; }
.lb-final-flag { width: 22px; height: 15px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.lb-final-photo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.lb-final-goals { color: var(--gold); font-weight: 900; font-size: 11px; margin-right: auto; white-space: nowrap; }
.lb-final-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-final-note { display: flex; align-items: flex-start; gap: 5px; font-size: 10.5px; color: var(--text-4); margin-top: 10px; line-height: 1.7; }
.lb-final-note i { color: var(--gold); margin-top: 2px; flex-shrink: 0; }

/* «apply gifts to ranking» toggle */
.lb-giftsw { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 11px; padding: 9px 12px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-2); font-size: 11.5px; font-weight: 800; font-family: inherit; cursor: pointer; text-align: right; transition: border-color .2s, color .2s; }
.lb-giftsw .lb-sw { position: relative; width: 34px; height: 19px; border-radius: 999px; background: var(--bg-3); flex-shrink: 0; transition: background .2s; }
.lb-giftsw .lb-sw::after { content: ''; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--text-4); transition: right .2s, background .2s; }
.lb-giftsw.on { border-color: var(--border-gold); color: var(--gold); }
.lb-giftsw.on .lb-sw { background: var(--gold); }
.lb-giftsw.on .lb-sw::after { right: 17px; background: #fff; }

/* preview standings grid (live view): rank · name · [قهرمان/گل] · امتیاز */
.lb-head.lb-prevrow, .lb-row.lb-prevrow { grid-template-columns: 24px 1fr 62px; gap: 5px; }
.lb-head.lb-prevrow-fc, .lb-row.lb-prevrow-fc { grid-template-columns: 20px 1fr 88px 42px; gap: 4px; }
.lb-prev-plus { font-size: 9px; color: var(--success); font-weight: 800; margin-right: 3px; }

/* admin settings: the two data-provider sections (Varzesh3 / API-Football) */
.s-provsec { border: 1px solid var(--border); border-radius: 12px; padding: 13px; margin-bottom: 12px; opacity: .55; transition: opacity .2s, border-color .2s, background .2s; }
.s-provsec.active { opacity: 1; border-color: var(--border-gold); background: rgba(232,131,26,.04); }
.s-provsec-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--text-1); margin-bottom: 12px; }
.s-provsec-h i { color: var(--gold); margin-left: 5px; }
.s-provsec-sub { font-size: 10px; font-weight: 700; color: var(--text-4); background: var(--bg-3); padding: 2px 7px; border-radius: 999px; margin-right: 5px; }
.s-provsec-badge { display: none; font-size: 10px; font-weight: 800; color: var(--success); background: rgba(34,197,94,.14); padding: 2px 9px; border-radius: 999px; }
.s-provsec.active .s-provsec-badge { display: inline-block; }
.lb-row {
  transition: var(--transition);
  cursor: pointer;
}
.lb-row:active {
  background: var(--bg-3);
}
.lb-row.me {
  background: var(--gold-pale);
  border-color: var(--border-gold);
}
.lb-rank {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
  text-align: center;
}
.lb-rank.top1 {
  color: #ffd700;
}
.lb-rank.top2 {
  color: #c0c0c0;
}
.lb-rank.top3 {
  color: #cd7f32;
}
.rank-change {
  font-size: 9px;
  display: block;
  text-align: center;
  margin-top: 1px;
}
.rank-up {
  color: var(--success);
}
.rank-down {
  color: var(--danger);
}
.rank-same {
  color: var(--text-5);
}
.lb-user {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.lb-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-value {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;            /* let large shares values ellipsis instead of overflowing the row */
}
.lb-value.pending {
  color: var(--gold);
}
/* Official / Live toggle + live (provisional) table */
/* Live on/off switch (single toggle replaces the two tabs) */
.lb-livesw { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.lb-livesw-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px;
  border-radius: 22px; background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-2); font-family: inherit; font-size: 13px; font-weight: 800;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lb-livesw-btn.on { background: rgba(239,68,68,.12); border-color: #ef4444; color: #ef4444; }
.lb-sw { position: relative; width: 38px; height: 21px; border-radius: 11px; background: var(--bg-5);
  border: 1px solid var(--border); transition: background .15s ease, border-color .15s ease; flex-shrink: 0; }
.lb-livesw-btn.on .lb-sw { background: #ef4444; border-color: #ef4444; }
.lb-sw::after { content: ''; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; transition: transform .18s ease; }
.lb-livesw-btn.on .lb-sw::after { transform: translateX(-17px); }
.lb-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; display: inline-block; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
/* live-table rank movement vs official rank */
.lb-row-live .lb-rank { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.05; }
.lb-mv { font-size: 8.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 1px; }
.lb-mv i { font-size: 8px; }
.lb-mv.up { color: var(--success); }
.lb-mv.dn { color: var(--danger); }
.lb-mv.dn i { display: inline-block; transform: rotate(180deg); }
/* payment help notice (Telegram support) */
.pay-help { display: flex; align-items: center; gap: 12px; text-decoration: none; background: linear-gradient(135deg, rgba(232,131,26,.14), rgba(232,131,26,.04)); border: 1px solid rgba(232,131,26,.35); border-radius: 14px; padding: 13px 14px; margin-bottom: 14px; }
.pay-help-ic { width: 40px; height: 40px; border-radius: 11px; background: rgba(232,131,26,.18); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.pay-help-body { flex: 1; min-width: 0; }
.pay-help-title { font-size: 13px; font-weight: 800; color: var(--text-0); margin-bottom: 3px; }
.pay-help-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.pay-help-sub b { color: var(--gold); }
.pay-help-arrow { color: var(--gold); font-size: 16px; flex-shrink: 0; }

/* Promotional popup (admin-controlled banner) */
.adpop-overlay { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(4px); animation: adpopIn .2s ease; }
@keyframes adpopIn { from { opacity: 0; } to { opacity: 1; } }
.adpop { position: relative; width: 100%; max-width: 340px; display: flex; flex-direction: column; }
.adpop-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; min-height: 32px; }
.adpop-timer { font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.2); padding: 6px 13px; border-radius: 16px; }
.adpop-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.25); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.adpop-close i { font-size: 16px; }
.adpop a { display: block; }
.adpop-img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: var(--radius-lg);
  display: block; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-row-live, .lb-head-live { grid-template-columns: 28px 1fr 58px 64px !important; }
.lb-live-pts { color: #f59e0b !important; font-weight: 900 !important; }
.lb-live-delta { text-align: center; font-weight: 800; font-size: 12px; }
.lb-live-delta.pos { color: var(--success); }
.lb-live-delta.neg { color: var(--danger); }
.lb-live-delta.zero { color: var(--text-4); }
/* rank-jump windows schedule */
.rjw { display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--bg-3); border:1px solid var(--border); border-radius:10px; }
.rjw-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; background:var(--text-5); }
.rjw-tag { flex-shrink:0; font-size:10px; font-weight:800; padding:3px 9px; border-radius:var(--radius-full); }
.rjw-open  { border-color:rgba(34,197,94,.35); }
.rjw-open  .rjw-dot { background:var(--success); box-shadow:0 0 6px var(--success); animation:pulse 1.4s ease-in-out infinite; }
.rjw-open  .rjw-tag { background:rgba(34,197,94,.15); color:var(--success); }
.rjw-soon  .rjw-dot { background:var(--info); }
.rjw-soon  .rjw-tag { background:rgba(59,130,246,.15); color:var(--info); }
.rjw-wait  .rjw-dot { background:var(--gold); }
.rjw-wait  .rjw-tag { background:rgba(232,131,26,.15); color:var(--gold); }
.rjw-done  { opacity:.6; }
.rjw-done  .rjw-tag { background:rgba(148,163,184,.12); color:var(--text-4); }

/* live countdown box on gift pages */
.cd-box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, rgba(232,131,26,.1), rgba(232,131,26,.03));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 13px;
  font-size: 13px; color: var(--text-2);
}
.cd-box i { color: var(--gold); font-size: 15px; }
.cd-box .bcd-val { font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }

/* "how it works" explainer box on gift pages */
.gift-how-title { font-size:13px; font-weight:800; color:var(--gold); margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.gift-how { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
.gift-how li { position:relative; padding-right:18px; font-size:12.5px; line-height:1.7; color:var(--text-3); }
.gift-how li::before { content:'•'; position:absolute; right:0; top:-1px; color:var(--gold); font-weight:900; }
.gift-how li strong { color:var(--text-1); }

/* user-detail sheet helpers */
.ud-stat { display:flex; align-items:center; justify-content:space-between; padding:7px 10px; border-radius:6px; font-size:12px; color:var(--text-2); }
.ud-stat b { font-size:14px; font-weight:800; }
.ud-pick { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; background:var(--bg-3); border-radius:8px; margin-bottom:6px; font-size:12px; color:var(--text-2); }
.ud-gift { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--border-soft); }
/* per-type gift totals (cards) */
.ud-gb-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.ud-gb { background:var(--bg-2); border:1px solid var(--border-soft); border-radius:12px; padding:11px 12px; }
.ud-gb-top { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.ud-gb-label { font-size:12px; font-weight:700; color:var(--text-1); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ud-gb-cnt { font-size:10px; color:var(--text-4); flex-shrink:0; }
.ud-gb-total { font-size:18px; font-weight:900; margin-top:6px; }

/* user-profile sheet — redesigned hero + sections */
.up-hero { display:flex; flex-direction:column; align-items:center; gap:9px; padding:4px 0 18px; }
.up-avatar-wrap { position:relative; }
.up-avatar { width:84px; height:84px; border-radius:50%; object-fit:cover; border:3px solid var(--gold); }
.up-rank-badge { position:absolute; bottom:-5px; left:50%; transform:translateX(-50%); min-width:28px; height:24px; padding:0 8px; border-radius:12px; background:var(--bg-1); border:2px solid var(--gold); color:var(--gold); font-size:12px; font-weight:900; display:inline-flex; align-items:center; justify-content:center; gap:3px; box-shadow:0 2px 8px rgba(0,0,0,.45); }
.up-name { font-size:19px; font-weight:800; color:var(--text-0); text-align:center; }
.up-chips { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; }
.up-chip { font-size:11px; font-weight:700; padding:4px 11px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; }
.up-stats3 { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.up-stat { background:var(--bg-3); border:1px solid var(--border-soft); border-radius:10px; padding:12px 8px; text-align:center; }
.up-stat-v { font-size:20px; font-weight:900; line-height:1; }
.up-stat-l { font-size:10px; color:var(--text-4); margin-top:6px; }
.up-sec { font-size:11px; color:var(--text-4); font-weight:700; margin:18px 0 9px; display:flex; align-items:center; gap:7px; }
.up-sec::before { content:''; width:3px; height:13px; background:var(--gold); border-radius:2px; flex-shrink:0; }
.up-day { background:var(--bg-3); border:1px solid var(--border-soft); border-radius:10px; padding:10px 12px; margin-bottom:8px; }
.up-mark-ok { color:var(--success); }
.up-mark-no { color:var(--danger); }
/* profile sheet — tabbed sections (one visible at a time) */
.up-tabs { display:flex; gap:4px; margin:16px 0 14px; background:var(--bg-3); padding:4px; border-radius:12px; overflow-x:auto; scrollbar-width:none; }
.up-tabs::-webkit-scrollbar { display:none; }
.up-tab { flex:1 0 auto; white-space:nowrap; text-align:center; padding:8px 14px; border-radius:9px; font-size:12px; font-weight:800; color:var(--text-3); background:transparent; border:none; cursor:pointer; font-family:'Shabnam',Tahoma,sans-serif; transition:background .15s ease, color .15s ease; }
.up-tab.active { background:var(--gold); color:#fff; }
.up-panel { display:none; }
.up-panel.active { display:block; animation:upFade .2s ease; }
@keyframes upFade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.up-panel .up-sec:first-child { margin-top:2px; }
.up-list { display:flex; flex-direction:column; }
.up-prow { display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border-soft); }
.up-prow:last-child { border-bottom:none; }
/* collapsible daily cards */
.up-acc { background:var(--bg-3); border:1px solid var(--border-soft); border-radius:10px; margin-bottom:8px; overflow:hidden; }
.up-acc-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 13px; cursor:pointer; }
.up-acc-chev { color:var(--text-4); font-size:13px; transition:transform .2s ease; }
.up-acc.open .up-acc-chev { transform:rotate(180deg); }
.up-acc-tag { font-size:11px; font-weight:800; padding:2px 9px; border-radius:20px; }
.up-acc-body { display:none; padding:0 13px 11px; }
.up-acc.open .up-acc-body { display:block; }
.up-qrow { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; font-size:11.5px; border-top:1px solid var(--border-soft); }
.up-qtext { color:var(--text-3); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.up-qans { flex-shrink:0; color:var(--text-1); font-weight:700; }
.form-badges {
  display: flex;
  gap: 3px;
  justify-content: center;
}
.form-badge {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  flex-shrink: 0;
}
.fb-10 {
  background: #22c55e;
}
.fb-7 {
  background: #3b82f6;
}
.fb-5 {
  background: #f59e0b;
}
.fb-2 {
  background: #6b7280;
}
.fb-m {
  background: #ef4444;
}

/* ===== SCORE BADGES ===== */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}
.badge-exact {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}
.badge-diff {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}
.badge-outcome {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}
.badge-wrong {
  background: rgba(107, 114, 128, 0.18);
  color: #9ca3af;
}
.badge-missed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.badge-neutral {
  background: var(--bg-4);
  color: var(--text-4);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}
.btn-lg {
  padding: 15px 24px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  width: 100%;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.btn-xs {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 131, 26, 0.3);
}
.btn-primary:active {
  transform: scale(0.98);
  box-shadow: none;
}
.btn-secondary {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:active {
  background: var(--bg-4);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold);
}
.btn-outline:active {
  background: var(--gold-pale);
}
.btn-ghost {
  background: transparent;
  color: var(--text-3);
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.3px;
}
.form-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text-1);
  font-family: "Shabnam", sans-serif;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus {
  border-color: var(--gold);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.form-input::placeholder {
  color: var(--text-5);
  font-size: 13px;
}
.form-input[dir="ltr"] {
  text-align: left;
  direction: ltr;
}
.form-hint {
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.5;
}
.form-error {
  font-size: 11px;
  color: var(--danger);
}
.input-wrap {
  position: relative;
}
.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 14px;
  color: var(--text-4);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.input-icon:hover {
  color: var(--text-2);
}

/* ===== NOTICES ===== */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
}
.notice-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.notice-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.notice-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}
.notice-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
.notice-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}
.notice-gold {
  background: var(--gold-pale);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}

/* ===== BOTTOM SHEET ===== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  z-index: 201;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(20px + var(--safe-bottom));
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet.open {
  transform: translateX(-50%) translateY(0);
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--text-5);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
}
.sheet-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}
.sheet-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-1);
}
.sheet-body {
  padding: 20px;
}

/* ===== BANNER ===== */
.banner {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 60%
  );
  pointer-events: none;
}
.banner-telegram {
  background: linear-gradient(135deg, #142240 0%, #0c1a2e 100%);
  border: 1px solid rgba(41, 182, 246, 0.22);
  box-shadow: 0 2px 16px rgba(29,78,216,.12);
}
.banner-champion {
  background: linear-gradient(135deg, #2e1d06 0%, #180e03 100%);
  border: 1px solid rgba(232,131,26,.35);
  box-shadow: 0 2px 16px rgba(232,131,26,.1);
}
.banner-icon {
  font-size: 28px;
  flex-shrink: 0;
  color: var(--gold);
}
.banner-telegram .banner-icon {
  color: #29b6f6;
}
.banner-content {
  flex: 1;
  min-width: 0;
}
.banner-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 2px;
}
.banner-sub {
  font-size: 11px;
  color: var(--text-4);
}
.banner-arrow {
  font-size: 16px;
  color: var(--text-5);
  flex-shrink: 0;
}

/* ===== TELEGRAM IMAGE BANNER ===== */
.gift-banner {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
  border: 1px solid var(--border);
  line-height: 0;
  transition: transform .15s ease;
}
.gift-banner:active { transform: scale(.985); }
.gift-banner img { width: 100%; height: auto; display: block; border-radius: inherit; }

/* ===== ELEGANT GIFT BANNERS (HTML) ===== */
/* ===== Invite (referral) dashboard banner ===== */
.invite-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border-gold);
  background: linear-gradient(120deg, rgba(232,131,26,.16), rgba(232,131,26,.05) 60%, var(--bg-2));
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  transition: transform .15s ease;
}
.invite-banner:active { transform: scale(.99); }
.invite-banner-glow {
  position: absolute; top: -40px; right: -20px; width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(232,131,26,.28), transparent 70%); pointer-events: none;
}
.invite-banner-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(232,131,26,.18); display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 20px;
}
.invite-banner-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.invite-banner-title { font-size: 14.5px; font-weight: 800; color: var(--text-0); }
.invite-banner-sub { font-size: 12px; color: var(--text-3); }
.invite-banner-arrow { color: var(--gold); font-size: 18px; }

/* ===== Tournament-end dashboard banner (celebratory, animated) ===== */
.te-banner {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 15px; margin-bottom: 14px; border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; border: 1px solid var(--gold);
  background: linear-gradient(120deg, rgba(232,131,26,.22), rgba(232,131,26,.06) 55%, var(--bg-2));
  box-shadow: 0 6px 24px rgba(232,131,26,.18);
  animation: te-banner-glow 2.4s ease-in-out infinite;
}
@keyframes te-banner-glow {
  0%, 100% { box-shadow: 0 6px 24px rgba(232,131,26,.18); }
  50%      { box-shadow: 0 6px 32px rgba(232,131,26,.4); }
}
.te-banner-glow { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 45%, transparent 60%);
  background-size: 240% 100%; animation: te-shimmer 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes te-shimmer { 0% { background-position: 180% 0; } 100% { background-position: -60% 0; } }
.te-banner-ic { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(232,131,26,.2);
  display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 21px;
  animation: te-trophy-bounce 1.8s ease-in-out infinite; }
@keyframes te-trophy-bounce { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
.te-banner-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.te-banner-title { font-size: 14.5px; font-weight: 800; color: var(--text-0); }
.te-banner-sub { font-size: 12px; color: var(--text-3); }
.te-banner-arrow { color: var(--gold); font-size: 18px; }

/* ===== Tournament-end page ===== */
.te-page { position: relative; display: flex; flex-direction: column; gap: 12px; }

.te-confetti { position: fixed; inset: 0 0 auto 0; height: 100vh; overflow: hidden; pointer-events: none; z-index: 0; }
.te-piece {
  position: absolute; top: -20px; left: calc(var(--i) * 4.2%); width: 8px; height: 14px;
  background: hsl(calc(var(--i) * 35), 85%, 58%); opacity: .85; border-radius: 2px;
  animation: te-fall calc(3.2s + (var(--i) * .15s)) linear calc(var(--i) * .12s) infinite;
}
.te-piece:nth-child(odd) { border-radius: 50%; }
@keyframes te-fall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: .9; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* Firework bursts — plays once on page load, anchored to the page content
   (NOT position:fixed — this app shell (.app-wrapper) is a scroll-clipped,
   overflow:hidden container, where position:fixed can render behind content
   or get trapped relative to the scroll container on some mobile browsers).
   Absolute-within-.te-page + a high z-index sidesteps that entirely and
   guarantees it plays right where the hero/closing text is, at the top. */
.te-fireworks { position: absolute; top: 0; left: 0; right: 0; height: 420px; overflow: hidden; pointer-events: none; z-index: 30; }
.te-burst { position: absolute; width: 0; height: 0; }
.te-spark {
  position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%;
  transform: rotate(var(--a)) translateX(0); opacity: 0;
  box-shadow: 0 0 8px 1px currentColor;
  animation: te-spark-fly 1.3s cubic-bezier(.15,.65,.25,1) forwards;
  animation-delay: inherit;
}
@keyframes te-spark-fly {
  0%   { transform: rotate(var(--a)) translateX(0) scale(1.2);    opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(110px) scale(.2); opacity: 0; }
}

.te-hero { position: relative; z-index: 1; text-align: center; padding: 22px 16px 8px; }
.te-trophy { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(232,131,26,.28), rgba(232,131,26,.05) 70%); color: var(--gold); font-size: 38px;
  animation: te-trophy-float 2.6s ease-in-out infinite; text-shadow: 0 0 24px rgba(232,131,26,.6); }
@keyframes te-trophy-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.05); } }
.te-title { font-size: 20px; font-weight: 900; color: var(--text-0); margin-bottom: 8px; }
.te-sub { font-size: 13px; color: var(--text-3); line-height: 1.8; max-width: 320px; margin: 0 auto; }

.te-rankcard { position: relative; z-index: 1; background: var(--bg-2); border: 1px solid rgba(232,131,26,.2); border-radius: var(--radius-xl);
  padding: 20px; text-align: center; }
.te-rank-num { font-size: 52px; font-weight: 900; line-height: 1; color: var(--text-0); font-variant-numeric: tabular-nums; }
.te-rank-num.rank-gold   { color: var(--gold); text-shadow: 0 0 30px rgba(232,131,26,.55); }
.te-rank-num.rank-silver { color: #c8d0dc; text-shadow: 0 0 22px rgba(200,208,220,.35); }
.te-rank-num.rank-bronze { color: #c87d4a; text-shadow: 0 0 22px rgba(200,125,74,.4); }
.te-rank-label { font-size: 12px; color: var(--text-4); font-weight: 700; margin-top: 4px; }
.te-score-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.te-score-row b { font-size: 18px; color: var(--text-0); font-variant-numeric: tabular-nums; }

.te-champ { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; font-size: 13px; color: var(--text-2); }
.te-champ i.icf-crown { color: var(--gold); font-size: 15px; }
.te-champ-hit { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--success);
  background: rgba(34,197,94,.14); border-radius: var(--radius-full); padding: 3px 9px; margin-right: auto; }

/* Success ribbon — "جایزهٔ شما واریز شد", top of the page so it's the first
   thing a paid user sees, no scrolling required. */
.te-paidbar { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(34,197,94,.05)); border: 1px solid rgba(34,197,94,.35);
  border-radius: var(--radius-lg); padding: 13px 16px; margin-bottom: 4px; }
.te-paidbar-ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(34,197,94,.18); color: var(--success); font-size: 20px; flex-shrink: 0; }
.te-paidbar-body { display: flex; flex-direction: column; gap: 2px; }
.te-paidbar-title { font-size: 14px; font-weight: 800; color: var(--text-0); }
.te-paidbar-sub { font-size: 11.5px; color: var(--text-4); }

.te-card { position: relative; z-index: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.te-card-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--text-2); margin-bottom: 12px; }
.te-card-h i { color: var(--gold); }

/* The headline prize card gets a distinct gold-glow treatment — it's the star
   of the page. */
.te-prize-card { border-color: rgba(232,131,26,.4); background: linear-gradient(180deg, rgba(232,131,26,.06), var(--bg-2) 55%);
  box-shadow: 0 0 0 1px rgba(232,131,26,.08), 0 12px 32px -16px rgba(232,131,26,.35); }
.te-prize-big { font-size: 32px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; text-align: center;
  margin-bottom: 6px; text-shadow: 0 0 26px rgba(232,131,26,.35); }
.te-prize-big span { font-size: 13px; font-weight: 700; color: var(--text-4); margin-right: 6px; text-shadow: none; }
.te-prize-sub { text-align: center; font-size: 11.5px; color: var(--text-4); margin-bottom: 14px; }
.te-prize-divider { height: 1px; background: var(--border); margin-bottom: 4px; }
.te-final-row { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 9px !important; }
.te-final-row span { font-weight: 800; color: var(--text-1); }
.te-final-row b { color: var(--gold) !important; font-size: 15px; }
.sc-row .te-pos { color: var(--success); }
.sc-row .te-neg { color: var(--danger); }

.te-form-hint { font-size: 12px; color: var(--text-4); line-height: 1.8; margin-bottom: 12px; }
.te-pending-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-4); margin-top: 10px; }

/* Payment receipt — full width, natural height, no click-to-zoom affordance. */
.te-receipt-img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.te-closing-text { font-size: 13px; color: var(--text-2); line-height: 1.9; margin-bottom: 14px; }
.te-closing-text b { color: var(--text-0); }
.te-closing-actions { display: flex; flex-direction: column; gap: 8px; }

/* Telegram CTA gets its own brand-blue accent — everything else on this page
   is gold, and a second solid-gold button here made it look like the most
   urgent thing on the screen (it isn't; the prize is). */
.btn-telegram { background: rgba(41,169,235,.14); border: 1px solid rgba(41,169,235,.4); color: #5bc2f2; }
.btn-telegram:active { background: rgba(41,169,235,.24); }
.btn-telegram i { color: #29a9eb; }
.btn-outline-muted { background: transparent; border: 1px solid var(--border); color: var(--text-3); }
.btn-outline-muted:active { background: var(--bg-3); }

@media (prefers-reduced-motion: reduce) {
  .te-banner, .te-banner-glow, .te-banner-ic, .te-piece, .te-trophy, .te-burst, .te-spark { animation: none !important; }
}

.gbn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-2);
  box-shadow: 0 2px 14px rgba(0,0,0,.32);
  transition: transform .15s ease, border-color .15s ease;
}
.gbn:active { transform: scale(.985); }
/* glow blob (themed) */
.gbn-glow {
  position: absolute;
  inset-inline-start: -40px; top: 50%;
  transform: translateY(-50%);
  width: 180px; height: 180px;
  border-radius: 50%;
  opacity: .16;
  pointer-events: none;
  filter: blur(14px);
}
/* icon bubble */
.gbn-icon {
  position: relative;
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.gbn-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gbn-title { font-size: 14px; font-weight: 800; color: var(--text-0); }
.gbn-sub {
  font-size: 11.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gbn-sub .banner-cd { font-weight: 800; font-variant-numeric: tabular-nums; }
.gbn-arrow { position: relative; font-size: 16px; color: var(--text-5); flex-shrink: 0; }
.gbn-state {
  position: relative;
  flex-shrink: 0;
  font-size: 10px; font-weight: 800;
  padding: 3px 9px; border-radius: var(--radius-full);
}
.gbn-state-action { background: rgba(34,197,94,.15); color: var(--success); }
.gbn-state-soon   { background: rgba(59,130,246,.15); color: var(--info); }
.gbn-state-closed { background: rgba(148,163,184,.12); color: var(--text-4); }

/* themes */
.gbn-gold   { border-color: rgba(232,131,26,.28); }
.gbn-gold   .gbn-glow { background: var(--gold); }
.gbn-gold   .gbn-icon { background: rgba(232,131,26,.15); color: var(--gold); }
.gbn-blue   { border-color: rgba(59,130,246,.28); }
.gbn-blue   .gbn-glow { background: #3b82f6; }
.gbn-blue   .gbn-icon { background: rgba(59,130,246,.15); color: #60a5fa; }
.gbn-orange { border-color: rgba(232,131,26,.28); }
.gbn-orange .gbn-glow { background: #fb923c; }
.gbn-orange .gbn-icon { background: rgba(251,146,60,.15); color: #fb923c; }
.gbn-sub .banner-cd { color: inherit; }
.gbn-gold .gbn-sub .banner-cd, .gbn-orange .gbn-sub .banner-cd { color: var(--gold); }
.gbn-blue .gbn-sub .banner-cd { color: #60a5fa; }
/* state dimming */
.gbn-closed { opacity: .6; cursor: default; }
.gbn-closed:active { transform: none; }
.gbn-closed .gbn-glow { opacity: .06; }

/* ===== Gift cards (redesigned) ===== */
.gcard-list { display: flex; flex-direction: column; gap: 9px; }
.gcard {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-2);
  box-shadow: 0 2px 14px rgba(0,0,0,.3); cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.gcard:active { transform: scale(.985); }
.gcard-glow {
  position: absolute; inset-inline-start: -50px; top: 50%; transform: translateY(-50%);
  width: 190px; height: 190px; border-radius: 50%; opacity: .15; filter: blur(16px); pointer-events: none;
}
.gcard-icon {
  position: relative; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
}
.gcard-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gcard-top { display: flex; align-items: center; gap: 8px; }
.gcard-title { font-size: 14px; font-weight: 800; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.gcard-chip { flex-shrink: 0; font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-full); border: 1px solid transparent; }
.gcard-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 1px; }
.gcard-pick {
  display: inline-flex; align-items: center; gap: 4px; max-width: 62%;
  font-size: 10.5px; font-weight: 700; color: var(--gold);
  background: var(--gold-pale); padding: 2px 8px; border-radius: var(--radius-full);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gcard-pick i { font-size: 10px; flex-shrink: 0; }
.gcard-cd { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-4); font-weight: 700; }
.gcard-cd i { font-size: 10px; }
.gcard-cd-val { font-variant-numeric: tabular-nums; color: var(--text-2); }
.gcard-arrow { position: relative; font-size: 16px; color: var(--text-5); flex-shrink: 0; }

.gcard-chip-active   { color: #22c55e; background: rgba(34,197,94,.14);  border-color: rgba(34,197,94,.3); }
.gcard-chip-soon     { color: #60a5fa; background: rgba(59,130,246,.14);  border-color: rgba(59,130,246,.3); }
.gcard-chip-closed   { color: #94a3b8; background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.25); }
.gcard-chip-disabled { color: #64748b; background: rgba(100,116,139,.10); border-color: rgba(100,116,139,.22); }

.gcard-gold   { border-color: rgba(232,131,26,.26); }
.gcard-gold   .gcard-icon { background: rgba(232,131,26,.15); color: var(--gold); }
.gcard-gold   .gcard-glow { background: var(--gold); }
.gcard-blue   { border-color: rgba(59,130,246,.26); }
.gcard-blue   .gcard-icon { background: rgba(59,130,246,.15); color: #60a5fa; }
.gcard-blue   .gcard-glow { background: #3b82f6; }
.gcard-orange { border-color: rgba(251,146,60,.26); }
.gcard-orange .gcard-icon { background: rgba(251,146,60,.15); color: #fb923c; }
.gcard-orange .gcard-glow { background: #fb923c; }

.gcard-closed, .gcard-disabled { opacity: .72; }
.gcard-closed .gcard-glow, .gcard-disabled .gcard-glow { opacity: .07; }
.gcard-active .gcard-icon::after {
  content: ''; position: absolute; inset: -3px; border-radius: 16px;
  border: 1.5px solid currentColor; opacity: .35; animation: gcardPulse 2.2s ease-out infinite;
}
@keyframes gcardPulse { 0% { transform: scale(.92); opacity: .5; } 100% { transform: scale(1.22); opacity: 0; } }

/* ===== Gift detail modal ===== */
.gm-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: 20px 16px 16px; text-align: center; margin-bottom: 14px;
  background: var(--bg-2); border: 1px solid var(--border);
}
.gm-hero-icon {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.gm-gold   { background: radial-gradient(120% 80% at 50% 0%, rgba(232,131,26,.14), var(--bg-2) 70%); }
.gm-gold   .gm-hero-icon { background: rgba(232,131,26,.16); color: var(--gold); }
.gm-blue   { background: radial-gradient(120% 80% at 50% 0%, rgba(59,130,246,.14), var(--bg-2) 70%); }
.gm-blue   .gm-hero-icon { background: rgba(59,130,246,.16); color: #60a5fa; }
.gm-orange { background: radial-gradient(120% 80% at 50% 0%, rgba(251,146,60,.14), var(--bg-2) 70%); }
.gm-orange .gm-hero-icon { background: rgba(251,146,60,.16); color: #fb923c; }
.gm-hero-chip { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 12px; border-radius: var(--radius-full); border: 1px solid transparent; }
.gm-hero-sub { font-size: 13px; color: var(--text-2); margin-top: 9px; line-height: 1.6; }
.gm-hero-cd { margin-top: 10px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.gm-hero-cd b { color: var(--gold); font-variant-numeric: tabular-nums; }
.gm-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--gold-pale); border: 1px solid rgba(232,131,26,.25);
  border-radius: var(--radius); padding: 11px 13px; margin-bottom: 12px;
}
.gm-pick span { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.gm-pick b { font-size: 14px; font-weight: 800; color: var(--gold); }
.gm-sec-h { font-size: 11px; font-weight: 800; color: var(--text-4); margin: 14px 2px 8px; }
.gm-how { font-size: 12.5px; color: var(--text-2); line-height: 1.85; background: var(--bg-3); border-radius: var(--radius); padding: 11px 13px; }
.gm-tiers, .gm-facts { display: flex; flex-direction: column; gap: 6px; }
.gm-facts { margin-bottom: 4px; }
.gm-tier, .gm-fact {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-3); border-radius: var(--radius-sm); padding: 9px 13px;
}
.gm-tier span, .gm-fact span { font-size: 12px; color: var(--text-3); }
.gm-tier b { font-size: 13px; font-weight: 900; color: #22c55e; }
.gm-fact b { font-size: 13px; font-weight: 800; color: var(--text-0); }
.gm-cta { margin-top: 16px; }
.gm-note { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-4); background: var(--bg-3); border-radius: var(--radius); padding: 12px; }

/* ===== Group standings (chip selector + table) ===== */
.grp-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.grp-chip {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-3); border: 1px solid var(--border); color: var(--text-4);
  font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.grp-chip:active { transform: scale(.92); }
.grp-chip.active {
  background: linear-gradient(135deg, var(--gold), #c46e12);
  border-color: transparent; color: #fff; box-shadow: 0 3px 12px var(--gold-glow);
}
.grp-panel { display: none; }
.grp-panel.active {
  display: block; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2px 10px 6px;
}
.grp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.grp-table thead th { font-size: 10px; font-weight: 700; color: var(--text-5); padding: 9px 6px; text-align: center; }
.grp-table thead th:nth-child(2) { text-align: right; padding-right: 8px; }
.grp-table tbody td { padding: 10px 6px; text-align: center; color: var(--text-2); border-top: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
.grp-rank { width: 30px; }
.grp-pos {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: var(--text-4); background: var(--bg-3);
}
.grp-team { display: flex; align-items: center; gap: 9px; color: var(--text-0) !important; font-weight: 700; padding-right: 8px !important; }
.grp-flag { width: 25px; height: 17px; border-radius: 3px; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.grp-pts { font-weight: 900; color: var(--gold) !important; font-size: 13.5px; }
/* qualification states: 1–2 advance, 3rd = best-8 chance */
.grp-table tr.q1 .grp-pos { background: rgba(34, 197, 94, .2); color: #22c55e; }
.grp-table tr.q3 .grp-pos { background: rgba(245, 158, 11, .2); color: #f59e0b; }
.grp-table tr.q1 td { background: rgba(34, 197, 94, .05); }
.grp-table tr.q3 td { background: rgba(245, 158, 11, .05); }
.grp-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--text-4); }
.grp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.grp-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.grp-dot-q1 { background: #22c55e; }
.grp-dot-q3 { background: #f59e0b; }

/* gift section wrapper — makes it clear these are gifts/challenges */
.gift-section {
  background: linear-gradient(160deg, rgba(232,131,26,.05) 0%, var(--bg-1) 60%);
  border: 1px solid rgba(232,131,26,.14);
  border-radius: var(--radius-xl);
  padding: 12px;
}
.gift-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  padding: 2px 4px 10px;
}
.gift-section-head i { font-size: 15px; }
.gift-section-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(232,131,26,.3), transparent); }
.gift-section-list { display: flex; flex-direction: column; gap: 9px; }
.gift-section .gbn { background: var(--bg-2); }

/* ===== GIFT BANNER STATES (legacy text banners) ===== */
/* "soon" = countdown to open (muted) · "closed" = window ended (greyed) */
.banner.gb-soon   { opacity: .9; }
.banner.gb-closed { opacity: .5; filter: saturate(.4); }
.banner.gb-action { border-color: rgba(34,197,94,.4) !important; }
.banner-cd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  direction: rtl;
}
.banner-cd i { font-size: 10px; }
.banner-state-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.banner-state-open   { background: rgba(34,197,94,.15); color: var(--success); }
.banner-state-soon   { background: rgba(59,130,246,.15); color: var(--info); }
.banner-state-closed { background: rgba(148,163,184,.12); color: var(--text-4); }

/* ===== DATE GROUP ===== */
.date-group-header {
  padding: 6px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-group-header::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(232,131,26,.5);
}
.date-group-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-soft), transparent);
}

/* ===== PAYMENT ===== */
.wallet-card {
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.wallet-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(232, 131, 26, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.wallet-balance-label {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.wallet-balance-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-0);
  line-height: 1;
  margin-bottom: 4px;
}
.wallet-balance-unit {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
}
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.5px;
}
.network-badge.trc20 {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.network-badge.bep20 {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}
.status-pending {
  background: var(--warning);
}
.status-confirmed {
  background: var(--success);
}
.status-rejected {
  background: var(--danger);
}

/* ===== RULES SECTION HEADER ===== */
.rules-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  margin: 20px 2px 10px;
}
.rules-sec:first-of-type { margin-top: 6px; }
.rules-sec i { font-size: 15px; }
.rules-sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-gold), transparent);
}

/* ===== ACCORDION ===== */
.accordion-item {
  border-bottom: 1px solid var(--border-soft);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  background: none;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  transition: var(--transition);
  gap: 12px;
}
.accordion-trigger:active {
  background: var(--bg-3);
}
.accordion-trigger .icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: var(--gold);
}
.accordion-trigger .chevron {
  font-size: 14px;
  color: var(--text-5);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.accordion-trigger.open .chevron {
  transform: rotate(90deg);
}
.accordion-body {
  display: none;
  padding: 0 16px 16px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.8;
}
.accordion-body.open {
  display: block;
}

/* ===== INLINE FRACTION (formulas) ===== */
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  text-align: center;
  margin: 0 3px;
  line-height: 1.35;
}
.frac > .frac-num {
  padding: 0 7px 1px;
  border-bottom: 1.5px solid currentColor;
}
.frac > .frac-den {
  padding: 1px 7px 0;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  background: var(--bg-3);
  color: var(--text-4);
  font-weight: 700;
  padding: 10px 12px;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* ===== AVATAR ===== */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm {
  width: 28px;
  height: 28px;
}
.avatar-md {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-gold);
}
.avatar-lg {
  width: 80px;
  height: 80px;
  border: 3px solid var(--border-gold);
}
.avatar-xl {
  width: 100px;
  height: 100px;
  border: 3px solid var(--border-gold);
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.tag-gold {
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}
.tag-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.tag-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.tag-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.tag-neutral {
  background: var(--bg-4);
  color: var(--text-4);
  border: 1px solid var(--border);
}
.tag-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-3) 25%,
    var(--bg-4) 50%,
    var(--bg-3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.sk-text {
  height: 14px;
  margin: 4px 0;
}
.sk-title {
  height: 20px;
  margin: 6px 0;
}
.sk-card {
  height: 80px;
  border-radius: var(--radius-lg);
}
.sk-avatar {
  border-radius: 50%;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 420px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.toast.hiding {
  animation: toastOut 0.25s ease forwards;
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
}
.toast-success {
  background: rgba(17, 30, 20, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.toast-error {
  background: rgba(30, 12, 12, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.toast-info {
  background: rgba(12, 20, 35, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}
.toast-gold {
  background: rgba(28, 18, 6, 0.95);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}
.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.toast-msg {
  flex: 1;
}

/* ===== PROFILE ===== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  gap: 12px;
  text-align: center;
}
.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-0);
}
.profile-sub {
  font-size: 12px;
  color: var(--text-4);
}
.settings-list {
  display: flex;
  flex-direction: column;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: var(--transition);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:active {
  background: var(--bg-3);
}
.settings-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-3);
  flex-shrink: 0;
}
.settings-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.settings-value {
  font-size: 12px;
  color: var(--text-4);
}
.settings-arrow {
  font-size: 14px;
  color: var(--text-5);
}

/* ===== REFERRAL ===== */
.referral-box {
  background: var(--bg-3);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.referral-code {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 2px;
  direction: ltr;
}

/* ===== DESKTOP BLOCK ===== */
.desktop-block {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-0);
  gap: 24px;
}
.desktop-block-icon {
  font-size: 64px;
  color: var(--gold);
  opacity: 0.6;
}
.desktop-block-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
}
.desktop-block-sub {
  font-size: 15px;
  color: var(--text-4);
  max-width: 340px;
  line-height: 1.8;
}

/* ===== PWA GATE ===== */
.pwa-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  background: var(--bg-0);
}
.pwa-logo {
  margin-bottom: 32px;
}
.pwa-logo img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(232, 131, 26, 0.25);
}
.pwa-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-0);
  text-align: center;
  margin-bottom: 8px;
}
.pwa-sub {
  font-size: 14px;
  color: var(--text-4);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 300px;
}
.pwa-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.pwa-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.pwa-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pwa-step-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ===== LOGIN ===== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  background: var(--bg-0);
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-lg);
}
.login-box-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-0);
  text-align: center;
}
.login-box-sub {
  font-size: 13px;
  color: var(--text-4);
  text-align: center;
  margin-top: -8px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
  text-align: center;
}
.empty-icon {
  font-size: 48px;
  color: var(--text-5);
  margin-bottom: 4px;
}
.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-3);
}
.empty-sub {
  font-size: 13px;
  color: var(--text-5);
  line-height: 1.6;
}

/* ===== COPY FIELD ===== */
.copy-field {
  display: flex;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.copy-field-text {
  flex: 1;
  padding: 11px 12px;
  font-size: 12px;
  color: var(--text-3);
  direction: ltr;
  word-break: break-all;
}
.copy-field-btn {
  padding: 11px 14px;
  background: var(--bg-4);
  border-right: 1px solid var(--border);
  color: var(--text-3);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.copy-field-btn:active {
  color: var(--gold);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.tab-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-4);
  background: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
}
.tab-btn.active {
  background: var(--bg-5);
  color: var(--text-1);
}

/* ===== ADMIN ===== */
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar {
  display: none;
}
.admin-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-4);
  background: var(--bg-3);
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.admin-tab.active,
.admin-tab:hover {
  background: var(--gold-pale);
  color: var(--gold);
  border-color: var(--border-gold);
}

/* ===== UTILITIES ===== */
.flex {
  display: flex;
}
.flex-1 {
  flex: 1;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 4px;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 16px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 16px;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-gold {
  color: var(--gold);
}
.text-muted {
  color: var(--text-4);
}
.text-danger {
  color: var(--danger);
}
.text-success {
  color: var(--success);
}
.text-sm {
  font-size: 12px;
}
.text-xs {
  font-size: 11px;
}
.font-bold {
  font-weight: 700;
}
.font-black {
  font-weight: 900;
}
.w-full {
  width: 100%;
}
.rounded {
  border-radius: var(--radius);
}
.rounded-full {
  border-radius: var(--radius-full);
}
.overflow-hidden {
  overflow: hidden;
}
.relative {
  position: relative;
}
.hidden {
  display: none !important;
}
.divider {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 0;
}

/* ===== ANIMATIONS ===== */
.animate-in {
  animation: fadeSlideIn 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-in:nth-child(2) {
  animation-delay: 0.04s;
}
.animate-in:nth-child(3) {
  animation-delay: 0.08s;
}
.animate-in:nth-child(4) {
  animation-delay: 0.12s;
}
.animate-in:nth-child(5) {
  animation-delay: 0.16s;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-5);
  border-radius: 3px;
}

/* ===== MATCH STATUS BADGES ===== */
.match-status-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.match-status-calc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  background: var(--gold-pale);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
}


/* ===== ENHANCED CARD DEPTH ===== */
.stat-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.stat-card.highlight {
  box-shadow:
    0 4px 20px rgba(232, 131, 26, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== ENHANCED HEADER BORDER ===== */
.app-header {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

/* ===== ENHANCED BOTTOM NAV ACTIVE ===== */
.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(232, 131, 26, 0.5));
}

/* ===== ENHANCED WALLET CARD ===== */
.wallet-card {
  box-shadow:
    0 4px 24px rgba(232, 131, 26, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ===== ENHANCED SCORE DISPLAY ===== */
.score-display {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.score-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-0);
  min-width: 24px;
  text-align: center;
  line-height: 1;
  letter-spacing: -0.5px;
}

/* ===== ENHANCED LOGIN BOX ===== */
.login-box {
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ===== STAGE TABS ===== */
.stage-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.stage-tab.active,
.stage-tab:active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* ── Second-level stage chips ── */
.stage-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.stage-chips::-webkit-scrollbar { display: none; }
.stage-chip {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-4);
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.stage-chip.active {
  background: rgba(232,131,26,.12);
  color: var(--gold);
  border-color: rgba(232,131,26,.3);
}
.stage-chip:not(.active):active {
  background: var(--bg-3);
}

/* ===== NEW MATCH CARD ===== */
/* ===== MATCH LIST & CARDS v3 ===== */
.match-list { display: flex; flex-direction: column; gap: 10px; }

/* Base card */
.match-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.3);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.match-card[onclick] { cursor: pointer; }
.match-card[onclick]:active { transform: scale(0.985); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* knockout slot with undrawn teams — not clickable, no tap hint */
.match-card.mc-tbd { opacity: .72; }
.match-card.mc-tbd .mc-tap-hint { display: none; }

/* Status variants */
.match-card.mc-live {
  border-color: rgba(239,68,68,.3);
  background: linear-gradient(148deg, rgba(239,68,68,.06) 0%, var(--bg-2) 52%);
}
.match-card.mc-live::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ef4444 0%, rgba(239,68,68,.12) 100%);
}
.match-card.mc-wait {
  border-color: rgba(232,131,26,.2);
  background: linear-gradient(148deg, rgba(232,131,26,.04) 0%, var(--bg-2) 52%);
}
.match-card.mc-done {
  border-color: var(--border-soft);
  opacity: .72;
  filter: saturate(.55);
}
.match-card.mc-done:hover,
.match-card.mc-done:active { opacity: .88; filter: saturate(.75); }

/* ── Head ── */
.mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 0;
  gap: 8px;
}
.mc-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4);
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  flex-wrap: wrap;
  row-gap: 2px;
}
.mc-meta-dot {
  width: 2px; height: 2px; border-radius: 50%;
  background: var(--text-5); display: inline-block; flex-shrink: 0;
}
.mc-status-area { display: flex; align-items: center; }

/* Status labels */
.mst-live { display:flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:#ef4444; background:rgba(239,68,68,.12); padding:3px 9px; border-radius:20px; }
.mst-wait { display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--gold); background:rgba(232,131,26,.12); padding:3px 9px; border-radius:20px; }
.mst-done { display:flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--text-4); background:rgba(255,255,255,.05); padding:3px 9px; border-radius:20px; }
.mst-calc { display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--gold); background:rgba(232,131,26,.12); padding:3px 9px; border-radius:20px; }
.mst-time { font-size:14px;font-weight:800;color:var(--text-1);letter-spacing:.4px;font-variant-numeric:tabular-nums; }
.live-dot { width:6px;height:6px;border-radius:50%;background:#ef4444;flex-shrink:0;
            animation:pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.35)} }

/* ── Main body ── */
.mc-main {
  display: flex;
  align-items: center;
  padding: 10px 10px 8px;
  gap: 4px;
}
.mc-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  min-width: 0;
}
.mc-flag {
  width: 48px; height: 32px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.mc-team-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-0);
  line-height: 1.2;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Center */
.mc-center {
  flex-shrink: 0;
  width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mc-vs { font-size:12px;font-weight:300;color:var(--text-5);letter-spacing:4px; }
.mc-vs-wait { color:var(--text-5);font-size:22px;font-weight:200; }
/* knockout: actual (after-ET) result + penalty note (we score on the 90-min result) */
.mc-real { font-size: 9.5px; color: var(--text-4); text-align: center; margin-top: 2px; white-space: nowrap; }
.md-realnote { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: var(--text-4); margin-top: 7px; }
.md-realnote i { color: var(--gold); font-size: 11px; }
.mc-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  width: 100%;
}
.mc-score-live { border-color: rgba(239,68,68,.32); background: rgba(239,68,68,.055); }
.mc-score-wait { border-color: rgba(232,131,26,.28); background: rgba(232,131,26,.045); }
.mc-score-num { font-size:22px;font-weight:900;color:var(--text-0);min-width:18px;text-align:center;line-height:1; }
.mc-score-sep { font-size:18px;font-weight:200;color:var(--text-5);padding:0 1px;line-height:1; }
.score-pulse { animation: scorePulse 1.5s ease-in-out infinite; }
@keyframes scorePulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Footer ── */
.mc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 11px;
  border-top: 1px solid var(--border-soft);
  gap: 8px;
  min-height: 36px;
}
.mc-cta { font-size:12px;font-weight:800;color:var(--gold);display:flex;align-items:center;gap:5px;
          background:rgba(232,131,26,.14);border:1px solid rgba(232,131,26,.34);border-radius:20px;padding:5px 13px;
          transition:background .15s ease; }
.match-card[onclick]:active .mc-cta { background:rgba(232,131,26,.24); }
.mc-cta-locked { color:var(--text-4);font-size:11px;font-weight:600;display:flex;align-items:center;gap:4px;
                 background:var(--bg-3);border-radius:20px;padding:5px 11px; }
.mc-countdown { display:flex;align-items:center;gap:5px;font-size:11px;color:var(--text-4);
                background:var(--bg-3);padding:4px 10px;border-radius:20px; }
.mc-cd-value { font-variant-numeric:tabular-nums;font-weight:800;color:var(--text-1);font-size:12px; }
.mc-cd-label { font-size:10px;color:var(--text-5); }
.mc-pred-chip {
  font-size:12px;font-weight:700;color:var(--text-2);
  background:var(--bg-3);border:1px solid var(--border);border-radius:20px;padding:3px 10px;
}
.mc-pred-row { display:flex;align-items:center;gap:6px;font-size:12px;flex:1;min-width:0; }
.mc-pred-label { color:var(--text-4);white-space:nowrap;font-size:11px; }
.mc-pred-score { display:flex;align-items:center;gap:5px;font-weight:700;color:var(--text-1);white-space:nowrap; }
.mc-footer-action { flex-shrink:0; display:flex; align-items:center; }
.mc-footer-pred   { flex:1;display:flex;align-items:center;gap:6px;min-width:0;font-size:12px;overflow:hidden; }

.mc-detail-btn {
  flex-shrink:0;font-size:11px;font-weight:700;color:var(--text-3);
  background:transparent;border:1px solid var(--border);border-radius:20px;
  padding:4px 10px;display:flex;align-items:center;gap:4px;cursor:pointer;
  transition:var(--transition);
}
.mc-detail-btn:active { background:var(--bg-3); }
.mc-tap-hint { display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--gold);white-space:nowrap; }
.mc-pred-none { color:var(--text-4)!important;display:flex;align-items:center;gap:4px; }

/* detail-sheet header predict button */
.md-predict-btn {
  flex-shrink:0;font-family:inherit;font-size:12px;font-weight:800;color:#fff;cursor:pointer;
  background:var(--gold);border:none;border-radius:20px;padding:7px 14px;margin-left:8px;
  display:flex;align-items:center;gap:5px;transition:filter .15s ease;
}
.md-predict-btn:active { filter:brightness(.92); }

/* prematch — full group table */
.md-gtbl { display:flex;flex-direction:column;border:1px solid var(--border-soft);border-radius:10px;overflow:hidden; }
.md-gtbl-h, .md-gtbl-r { display:grid;grid-template-columns:26px 1fr 30px 44px 40px;align-items:center;gap:4px;padding:8px 10px;font-size:11.5px; }
.md-gtbl-h { background:var(--bg-2);color:var(--text-4);font-weight:700;font-size:10px; }
.md-gtbl-h span:not(:nth-child(2)), .md-gtbl-r span:not(.md-gtbl-t):not(:nth-child(2)), .md-gtbl-r b { text-align:center; }
.md-gtbl-r { border-top:1px solid var(--border-soft);color:var(--text-2); }
.md-gtbl-r b { color:var(--text-0);font-weight:800; }
.md-gtbl-hl { background:rgba(232,131,26,.10); }
.md-gtbl-t { display:flex;align-items:center;gap:7px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.md-gtbl-flag { width:20px;height:14px;border-radius:2px;object-fit:cover;flex-shrink:0; }


/* ===== MATCH DETAIL SHEET ===== */
.md-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  padding: 18px 12px 14px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid var(--border-soft);
}
.md-scoreboard-live { border-color: rgba(239,68,68,.25); background: linear-gradient(145deg,rgba(239,68,68,.055) 0%,var(--bg-3) 55%); }
.md-scoreboard-wait { border-color: rgba(232,131,26,.18); }

/* Team column (flag + name) */
.md-st {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.md-flag-lg {
  width: 54px; height: 36px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  display: block;
}
.md-st-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Center column: score + status label */
.md-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.md-score-nums-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.md-score-big { font-size: 36px; font-weight: 900; color: var(--text-0); line-height: 1; min-width: 24px; text-align: center; }
.md-score-colon { font-size: 26px; font-weight: 200; color: var(--text-5); line-height: 1; }

/* Legacy aliases (no longer used in new template but kept for safety) */
.md-score-team { flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--text-1);min-width:0; }
.md-flag { width:36px;height:auto;border-radius:3px; }
.md-score-nums { flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:4px; }
.md-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-4);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.md-events-wrap {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: var(--bg-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.md-events-col { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.md-events-divider { width: 1px; background: var(--border-soft); flex-shrink: 0; }
.md-event {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.md-ev-min { font-size: 10px; color: var(--text-4); font-variant-numeric: tabular-nums; min-width: 24px; }
.md-ev-icon { font-size: 13px; }
.md-ev-player { color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-preds { display: flex; flex-direction: column; gap: 1px; }
.md-pred-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.md-pred-row:last-child { border-bottom: none; }
.md-pred-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.md-pred-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-pred-val { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.md-pred-pts { font-size: 13px; font-weight: 800; min-width: 28px; text-align: left; }

/* ===== Match detail — tabbed (events / stats / lineups / predictions) ===== */
.md-tabs { display: flex; gap: 4px; margin: 14px 0 12px; background: var(--bg-2); padding: 4px; border-radius: 12px; }
.md-tab { flex: 1 1 0; min-width: 0; padding: 7px 3px; border: none; background: transparent; color: var(--text-3); font-family: inherit; font-size: 11px; font-weight: 700; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap; }
.md-tab i { font-size: 15px; opacity: .9; }
.md-tab.active { background: var(--gold); color: #fff; }
.md-sb-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; direction: rtl; font-size: 11px; color: var(--text-4); margin: 9px 0 2px; }
.md-sb-seg { white-space: nowrap; unicode-bidi: isolate; }
.md-sb-seg:not(:last-child)::after { content: '·'; margin-right: 4px; color: var(--text-5); opacity: .7; }
.md-panel { display: none; }
.md-panel.active { display: block; }
.md-livenote { text-align: center; font-size: 10px; color: var(--text-5); margin: 8px 0; }

/* timeline */
.md-timeline { display: flex; flex-direction: column; gap: 9px; padding: 6px 2px; }
.md-tl-row { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: center; gap: 6px; }
.md-tl-h { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.md-tl-a { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.md-tl-min { text-align: center; font-size: 10px; font-weight: 800; color: var(--text-4); background: var(--bg-3); border-radius: 999px; padding: 2px 0; }
.md-tl-ic { flex-shrink: 0; font-size: 13px; display: flex; align-items: center; }
.md-tl-name { font-size: 12.5px; color: var(--text-1); font-weight: 600; display: flex; flex-direction: column; }
.md-tl-a .md-tl-name { align-items: flex-start; text-align: left; }
.md-tl-h .md-tl-name { align-items: flex-end; text-align: right; }
.md-tl-note { font-size: 10px; color: var(--text-4); font-weight: 400; }
.md-tl-assist { font-size: 10px; color: var(--text-5); font-weight: 400; }
.md-card { width: 9px; height: 13px; border-radius: 2px; display: inline-block; }
.md-card-y { background: #fbbf24; }
.md-card-r { background: #ef4444; }

/* stats */
.md-stats { display: flex; flex-direction: column; gap: 13px; padding: 8px 2px; }
.md-stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-1); margin-bottom: 5px; }
.md-stat-lbl { font-size: 11px; color: var(--text-4); font-weight: 600; }
.md-stat-bar { height: 6px; background: rgba(96,165,250,.28); border-radius: 999px; overflow: hidden; direction: rtl; }
.md-stat-h { height: 100%; background: var(--gold); border-radius: 999px; }
/* comparison: tie bar colors to win-prob (home=green, away=blue) for consistency */
.md-cmp .md-stat-bar { background: rgba(59,130,246,.30); }
.md-cmp .md-stat-h { background: #22c55e; }
.md-cmp .md-stat-top b:first-child { color: #34d399; }
.md-cmp .md-stat-top b:last-child { color: #60a5fa; }
/* small inline hint under section headers */
.md-hint { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.7; color: var(--text-4); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 8px; padding: 7px 10px; margin: -2px 0 11px; }
.md-hint i { color: var(--gold); font-size: 12px; flex-shrink: 0; margin-top: 2px; }

/* lineups */
/* ===== Schematic lineup pitch ===== */
.pitch {
  position: relative; width: 100%; aspect-ratio: 3 / 4; margin: 4px 0 14px;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(180deg, #16633f 0%, #1a7a4c 50%, #16633f 100%);
  border: 1px solid rgba(255,255,255,.12);
  background-image: repeating-linear-gradient(180deg, transparent, transparent 9%, rgba(255,255,255,.035) 9%, rgba(255,255,255,.035) 18%),
                    linear-gradient(180deg, #16633f 0%, #1a7a4c 50%, #16633f 100%);
}
.pitch-line { position: absolute; top: 50%; left: 5%; right: 5%; height: 2px; background: rgba(255,255,255,.25); }
.pitch-circle { position: absolute; top: 50%; left: 50%; width: 26%; aspect-ratio: 1; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.22); border-radius: 50%; }
.pitch-badge { position: absolute; right: 8px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(0,0,0,.45); padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; z-index: 3; }
.pitch-badge-top { top: 7px; }
.pitch-badge-bot { bottom: 7px; }
.pitch-p { position: absolute; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 56px; z-index: 2; }
.pitch-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pitch-home .pitch-dot { background: var(--gold); }
.pitch-away .pitch-dot { background: #2563eb; }
.pitch-name { font-size: 9px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }

.md-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 0; }
.md-lineup { display: flex; flex-direction: column; gap: 4px; }
.md-lineup-form { text-align: center; font-size: 12px; font-weight: 800; color: var(--gold); background: var(--bg-3); border-radius: 8px; padding: 5px; margin-bottom: 4px; }
.md-lineup-sub { font-size: 10px; color: var(--text-4); font-weight: 700; margin: 8px 0 2px; text-align: center; }
.md-lp { display: flex; align-items: center; gap: 7px; padding: 5px 7px; background: var(--bg-2); border-radius: 8px; }
.md-lp-num { width: 18px; text-align: center; font-size: 11px; font-weight: 800; color: var(--text-4); flex-shrink: 0; }
.md-lp-name { font-size: 11.5px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.md-lp-rt { flex-shrink: 0; min-width: 26px; text-align: center; font-size: 10.5px; font-weight: 800; color: #fff; border-radius: 6px; padding: 2px 5px; }
.md-lp-cap { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 3px; background: var(--gold-pale); color: var(--gold); font-size: 8px; font-weight: 800; margin-right: 4px; vertical-align: middle; }
.md-lp-motm { color: var(--gold); font-size: 11px; margin-right: 4px; }
/* player rating on the pitch + MOTM ring */
.pitch-rt { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 8.5px; font-weight: 800; color: #fff; border-radius: 8px; padding: 0 3px; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pitch-motm .pitch-dot { box-shadow: 0 0 0 2px var(--gold), 0 1px 4px rgba(0,0,0,.4); }
/* best player of the match */
.md-motm { background: linear-gradient(135deg, var(--gold-pale), rgba(232,131,26,.05)); border: 1px solid var(--border-gold); border-radius: 12px; padding: 11px 12px; margin-bottom: 12px; }
.md-motm-h { font-size: 11.5px; font-weight: 800; color: var(--gold); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.md-motm-body { display: flex; align-items: center; gap: 11px; }
.md-motm-av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-5); flex-shrink: 0; }
.md-motm-av img { width: 100%; height: 100%; object-fit: cover; }
.md-motm-info { flex: 1; min-width: 0; }
.md-motm-name { font-size: 13.5px; font-weight: 800; color: var(--text-1); }
.md-motm-team { font-size: 11px; color: var(--text-4); margin-top: 1px; }
.md-motm-stats { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.md-motm-rt { flex-shrink: 0; min-width: 38px; text-align: center; font-size: 16px; font-weight: 900; color: #fff; background: #0a9d58; border-radius: 9px; padding: 6px 8px; }

/* ===== Match detail — pre-match tab ===== */
.md-sec-h { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; color: var(--text-2); margin: 18px 0 9px; letter-spacing: .3px; }
.md-sec-h::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--gold); flex-shrink: 0; }
.md-wp { margin: 8px 0 4px; }
.md-wp-cells { display: flex; align-items: flex-end; }
.md-wp-cell { flex: 1; text-align: center; min-width: 0; }
.md-wp-cell:nth-child(2) { flex: 0 0 28%; }
.md-wp-pct { font-size: 20px; font-weight: 900; }
.md-wp-team { font-size: 11px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.md-wp-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 11px; }
.md-wp-h { background: #22c55e; }
.md-wp-d { background: #64748b; }
.md-wp-a { background: #3b82f6; }
.md-wp-note { text-align: center; font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 11px; }
.md-two-h { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 11px; font-weight: 800; color: var(--text-3); text-align: center; margin: 4px 0 7px; }
.md-h2h { display: flex; flex-direction: column; gap: 6px; }
.md-h2h-row { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-2); border-radius: 8px; font-size: 12px; }
.md-h2h-d { font-size: 10px; color: var(--text-5); }
.md-h2h-t { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-h2h-l { text-align: left; }
.md-h2h-s { color: var(--text-0); font-weight: 900; white-space: nowrap; }
/* ===== PRE-MATCH ANALYSIS (minimal, image-rich) ===== */
.pm-sec { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; color: var(--text-2); margin: 18px 0 9px; padding-right: 10px; position: relative; }
.pm-sec::before { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 13px; border-radius: 2px; background: var(--gold); }
.pm-sec i { color: var(--gold); font-size: 13px; }
.pm-card { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 13px; }
.pm-na { color: var(--text-5); font-size: 12px; text-align: center; padding: 6px 0; }
.pm-flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* "coming soon" placeholder (AI analysis) */
.pm-soon { text-align: center; padding: 48px 20px; }
.pm-soon-ic { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(232,131,26,.12); color: var(--gold); font-size: 28px; margin-bottom: 14px; }
.pm-soon-t { font-size: 15px; font-weight: 800; color: var(--text-0); margin-bottom: 6px; }
.pm-soon-s { font-size: 12.5px; color: var(--text-4); }

/* compact column legend (home | away) */
.pm-colhead { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 7px; }
.pm-colhead span { font-size: 11px; font-weight: 800; color: var(--text-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FIFA ranking cells */
.pm-rk { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 13px 10px; text-align: center; }
.pm-rk-num { font-size: 26px; font-weight: 900; color: var(--gold); margin-top: 6px; direction: ltr; }
.pm-rk-lbl { font-size: 11px; color: var(--text-4); margin-top: 2px; }

/* weather */
.pm-wx { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pm-wx-main { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pm-wx-temp { font-size: 30px; font-weight: 900; color: var(--text-0); direction: ltr; }
.pm-wx-lbl { font-size: 14px; font-weight: 700; color: var(--gold); }
.pm-wx-extra { font-size: 11.5px; color: var(--text-3); }

/* recent-10 list */
.pm-duo-top { align-items: start; }
.pm-flist { display: flex; flex-direction: column; gap: 5px; }
.pm-fl-row { display: flex; align-items: center; gap: 7px; background: var(--bg-2); border-radius: 8px; padding: 6px 8px; }
.pm-fl-date { font-size: 10px; color: var(--text-5); flex-shrink: 0; }
.pm-fl-opp { flex: 1; min-width: 0; font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-fres { direction: ltr; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 7px; border-radius: 7px; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.pm-pw  { background: rgba(34,197,94,.16);  color: #22c55e; box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.pm-pd  { background: rgba(148,163,184,.16); color: #94a3b8; box-shadow: inset 0 0 0 1px rgba(148,163,184,.3); }
.pm-pll { background: rgba(239,68,68,.16);  color: #ef4444; box-shadow: inset 0 0 0 1px rgba(239,68,68,.35); }
.pm-flist-solo { margin-top: 8px; }

/* Nested sub-tabs: رودررو / میزبان / میهمان (inside the آمار tab) */
.pm-subtabs-wrap { margin-top: 8px; }
.pm-subtabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 11px; margin-bottom: 10px; }
.pm-subtab { flex: 1 1 0; min-width: 0; padding: 8px 6px; border: none; background: transparent; color: var(--text-3); font-family: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-subtab.active { background: var(--gold); color: #fff; }
.pm-subpanel { display: none; }
.pm-subpanel.active { display: block; }

/* stat comparison with diverging bar */
.pm-cmp { padding: 9px 2px; border-bottom: 1px solid var(--border-soft); }
.pm-cmp:last-child { border-bottom: none; }
.pm-cmp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 7px; }
.pm-cmp-top b { font-size: 14px; font-weight: 800; color: var(--text-3); text-align: center; white-space: nowrap; }
.pm-cmp-top b.pm-hi { color: var(--gold); }
.pm-cmp-top span { font-size: 11px; color: var(--text-4); text-align: center; white-space: nowrap; }
.pm-cmp-bar { height: 5px; border-radius: 999px; background: rgba(96,165,250,.30); overflow: hidden; direction: rtl; }
.pm-cmp-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.pm-cmp-plain { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.pm-cmp-plain b { font-size: 13px; font-weight: 800; color: var(--text-0); text-align: center; }
.pm-cmp-plain span { font-size: 11px; color: var(--text-4); text-align: center; }

/* person cards (top scorer / coach) */
.pm-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm-person { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 13px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pm-person-tm { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text-4); max-width: 100%; }
.pm-person-tm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-person-tm .pm-flag { width: 18px; height: 12px; }
.pm-person-av { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-5); font-size: 24px; box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0,0,0,.4); }
.pm-person-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pm-person-name { font-size: 13px; font-weight: 800; color: var(--text-0); line-height: 1.3; }
.pm-person-sub { font-size: 11.5px; color: var(--gold); font-weight: 700; display: flex; align-items: center; gap: 4px; }

/* venue banner */
.pm-venue { position: relative; overflow: hidden; border-radius: 14px; min-height: 112px; border: 1px solid var(--border-soft);
            background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); display: flex; flex-direction: column; justify-content: flex-end; }
.pm-venue-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pm-venue-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,16,.25), rgba(8,10,16,.90)); }
.pm-venue-noimg .pm-venue-grad { background: linear-gradient(135deg, rgba(232,131,26,.10), rgba(8,10,16,.25)); }
.pm-venue-body { position: relative; padding: 14px; }
.pm-venue-name { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.pm-venue-meta { font-size: 11.5px; color: rgba(255,255,255,.85); margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pm-venue-noimg .pm-venue-name { color: var(--text-0); text-shadow: none; }
.pm-venue-noimg .pm-venue-meta { color: var(--text-3); text-shadow: none; }
.pm-kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg-2); border-radius: 10px; padding: 10px 13px; margin-top: 8px; font-size: 12px; color: var(--text-1); }
.pm-kv-k { color: var(--text-4); font-weight: 700; font-size: 11px; display: flex; align-items: center; gap: 5px; }

/* injuries */
.pm-inj { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pm-inj-h { font-size: 11px; font-weight: 800; color: var(--text-3); text-align: center; margin-bottom: 7px; padding-bottom: 6px; border-bottom: 1px solid var(--border-soft); }
.pm-inj-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-1); padding: 4px 0; }
.pm-inj-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }

/* odds */
.pm-odds { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pm-odd { position: relative; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 8px 12px; text-align: center; }
.pm-odd-fav { border-color: var(--gold); background: rgba(232,131,26,.08); }
.pm-odd-l { display: block; font-size: 11px; color: var(--text-4); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-odd-v { font-size: 19px; font-weight: 900; color: var(--text-2); }
.pm-odd-fav .pm-odd-v { color: var(--gold); }
.pm-odd-tag { display: block; font-size: 9px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.pm-odds-book { text-align: center; font-size: 10px; color: var(--text-5); margin-top: 9px; }
/* ===== AI ANALYSIS TAB ===== */
.ai-cta { text-align: center; padding: 22px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(232,131,26,.16), rgba(232,131,26,.03)); border: 1px solid rgba(232,131,26,.3); }
.ai-cta-ic { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; background: rgba(232,131,26,.18); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 0 22px rgba(232,131,26,.35); }
.ai-cta-t { font-size: 15px; font-weight: 800; color: var(--text-0); margin-bottom: 6px; }
.ai-cta-s { font-size: 12px; color: var(--text-3); line-height: 1.8; margin-bottom: 14px; }
.ai-cta-btn { background: var(--gold); color: #1a0f02; border: none; font-family: inherit; font-size: 14px; font-weight: 800; padding: 12px 26px; border-radius: 12px; cursor: pointer; box-shadow: 0 6px 18px rgba(232,131,26,.4); animation: aiPulse 2s ease-in-out infinite; display: inline-flex; align-items: center; gap: 7px; }
@keyframes aiPulse { 0%,100% { transform: scale(1); box-shadow: 0 6px 18px rgba(232,131,26,.4); } 50% { transform: scale(1.04); box-shadow: 0 8px 26px rgba(232,131,26,.6); } }
.ai-result { margin-top: 6px; }
.ai-card { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px; }
.ai-card-h { font-size: 12px; font-weight: 800; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ai-text { font-size: 13px; line-height: 2; color: var(--text-1); white-space: pre-wrap; }
.ai-rebtn { display: block; width: 100%; margin-top: 12px; background: transparent; border: 1px solid var(--border); color: var(--text-2); font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 10px; border-radius: 11px; cursor: pointer; }
.ai-ro-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-4); background: var(--bg-2); border-radius: 9px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6; }
.ai-ro-note i { color: var(--gold); flex-shrink: 0; }
.ai-timer { position: relative; width: 96px; height: 96px; margin: 20px auto 8px; }
.ai-ring { width: 100%; height: 100%; }
.ai-ring-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 5; }
.ai-ring-fg { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
.ai-timer-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; color: var(--gold); }
.ai-timer-lbl { text-align: center; font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.ai-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(6,8,12,.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.ai-modal-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 22px; max-width: 340px; text-align: center; }
.ai-modal-ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: rgba(232,131,26,.16); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ai-modal-t { font-size: 16px; font-weight: 800; color: var(--text-0); margin-bottom: 10px; }
.ai-modal-b { font-size: 12.5px; color: var(--text-2); line-height: 2; margin-bottom: 18px; }
.ai-modal-acts { display: flex; gap: 10px; }
.ai-modal-no { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text-3); font-family: inherit; font-weight: 700; padding: 11px; border-radius: 11px; cursor: pointer; }
.ai-modal-yes { flex: 1; background: var(--gold); border: none; color: #1a0f02; font-family: inherit; font-weight: 800; padding: 11px; border-radius: 11px; cursor: pointer; }
.ai-cta-badge { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--gold); background: rgba(232,131,26,.14); border: 1px solid rgba(232,131,26,.3); border-radius: 999px; padding: 5px 12px; margin-bottom: 10px; line-height: 1.6; }
/* ===== weather backdrop: real photo per condition, dimmed for the dark theme ===== */
/* Drop photos in assets/weather/ (clear|cloud|rain|snow|storm.webp). The dark
   gradient overlay keeps them faint + text readable; if a photo is missing the
   condition-tinted gradient alone still reads as that weather. */
.pm-wx { position: relative; overflow: hidden; background-size: cover; background-position: center; }
.pm-wx-clear        { background-image: linear-gradient(160deg, rgba(24,58,110,.60), rgba(10,16,30,.90)), url('../weather/clear.webp'); }
.pm-wx-cloud, .pm-wx-fog { background-image: linear-gradient(160deg, rgba(54,64,84,.66), rgba(14,18,26,.92)), url('../weather/cloud.webp'); }
.pm-wx-rain         { background-image: linear-gradient(160deg, rgba(28,42,66,.66), rgba(10,14,24,.93)), url('../weather/rain.webp'); }
.pm-wx-storm        { background-image: linear-gradient(160deg, rgba(30,36,60,.66), rgba(8,10,20,.94)), url('../weather/storm.webp'); }
.pm-wx-snow         { background-image: linear-gradient(160deg, rgba(70,86,110,.60), rgba(16,20,30,.90)), url('../weather/snow.webp'); }
.pm-wx-temp, .pm-wx-lbl, .pm-wx-extra { text-shadow: 0 1px 6px rgba(0,0,0,.7); }

/* ===== World Cup 2026 hub ===== */
/* festive World-Cup hero — multicolor poster stripes under a dark overlay (dark
   base kept, but the section gets a distinct tournament vibe) */
.wc-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-gold); border-radius: var(--radius-lg); padding: 18px 16px; margin-bottom: 14px;
  background: repeating-linear-gradient(115deg, #e2342f 0 26px, #d8801a 26px 52px, #e6c21d 52px 78px, #6db33f 78px 104px, #1dc8b4 104px 130px, #2f6ff7 130px 156px, #6e3ff5 156px 182px, #c0388f 182px 208px); }
.wc-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,20,.5), rgba(8,11,20,.82)); }
.wc-hero > * { position: relative; z-index: 1; }
.wc-hero-ic { width: 48px; height: 48px; border-radius: 13px; background: rgba(0,0,0,.32); display: flex; align-items: center; justify-content: center; flex-shrink: 0; backdrop-filter: blur(2px); }
.wc-hero-ic i { font-size: 24px; color: #fff; }
.wc-hero-logo { width: 34px; height: 40px; object-fit: contain; }
.wc-hero-t { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.wc-hero-s { font-size: 12px; color: rgba(255,255,255,.85); margin-top: 2px; }

.wc-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: var(--radius); margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wc-tabs::-webkit-scrollbar { display: none; }
.wc-tab { flex: 1 0 auto; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 8px; border: none; background: transparent; color: var(--text-3); font-family: inherit; font-size: 11px; font-weight: 700; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.wc-tab i { font-size: 16px; }
.wc-tab.active { background: linear-gradient(135deg, #e8831a, #d83a6a); color: #fff; box-shadow: 0 2px 10px rgba(216,58,106,.25); }

.wc-panel { min-height: 120px; }
.wc-loading, .wc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 40px 16px; color: var(--text-4); font-size: 12.5px; text-align: center; line-height: 1.7; }
.wc-loading i, .wc-empty i { font-size: 22px; color: var(--text-5); }
.wc-spin { display: inline-block; animation: wc-spin 1s linear infinite; }
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* group tables */
.wc-grp { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.wc-grp-h { font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.wc-grp-row { display: grid; grid-template-columns: 20px 1fr 34px 36px 36px; gap: 6px; align-items: center; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.wc-grp-row:last-child { border-bottom: none; }
.wc-grp-row > span:nth-child(n+3), .wc-grp-row > b { text-align: center; }
.wc-grp-head { font-size: 10px; color: var(--text-4); font-weight: 700; padding: 2px 0 5px; border-bottom: 1px solid var(--border); }
.wc-grp-rank { text-align: center; color: var(--text-4); font-size: 12px; }
.wc-grp-team { display: flex; align-items: center; gap: 7px; min-width: 0; }
.wc-grp-team > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-grp-row b { color: var(--text-0); font-weight: 800; }
.wc-flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
/* qualification bar on the RANK side (right edge in RTL), next to the position number */
.wc-q1 { box-shadow: inset -3px 0 0 var(--success); padding-right: 6px; border-radius: 2px; }
.wc-q3 { box-shadow: inset -3px 0 0 var(--warning); padding-right: 6px; border-radius: 2px; }
.wc-qx { box-shadow: inset -3px 0 0 var(--danger); padding-right: 6px; border-radius: 2px; opacity: .72; }
.wc-q1 .wc-grp-rank { color: var(--success); }
.wc-q3 .wc-grp-rank { color: var(--warning); }
.wc-qx .wc-grp-rank { color: var(--danger); }
.wc-grp-thirds { margin-top: 14px; border: 1px solid var(--border-gold); border-radius: 12px; padding: 10px; }
.wc-grp-h-s { font-size: 10px; font-weight: 600; color: var(--text-4); }
.wc-third-g { font-size: 9.5px; font-weight: 800; color: var(--gold); background: var(--gold-pale); border-radius: 5px; padding: 1px 5px; margin-right: 4px; }
.wc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-4); padding: 4px 2px 2px; }
.wc-legend span { display: flex; align-items: center; gap: 5px; }
.wc-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.wc-dot-g { background: var(--success); }
.wc-dot-a { background: var(--warning); }
.wc-dot-x { background: var(--danger); }

/* stars (scorers / assists / cards) */
.wc-seg { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: var(--radius); margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wc-seg::-webkit-scrollbar { display: none; }
.wc-seg-b { flex: 0 0 auto; padding: 8px 12px; border: none; background: transparent; color: var(--text-3); font-family: inherit; font-size: 12px; font-weight: 700; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.wc-seg-b.active { background: var(--gold); color: #fff; }
.wc-stars { display: flex; flex-direction: column; gap: 6px; }
.wc-star-row { display: flex; align-items: center; gap: 10px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.wc-star-rk { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); color: var(--text-3); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wc-rank-1 { background: var(--gold); color: #fff; }
.wc-rank-2 { background: #9aa7b8; color: #0b0e16; }
.wc-rank-3 { background: #c08457; color: #0b0e16; }
.wc-star-ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.wc-star-ph-x { display: flex; align-items: center; justify-content: center; color: var(--text-5); }
.wc-star-ph-x i { font-size: 18px; }
.wc-star-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wc-star-name { font-size: 13px; font-weight: 700; color: var(--text-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-star-team { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-4); }
.wc-star-val { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; line-height: 1.2; }
.wc-star-val b { font-size: 16px; font-weight: 800; color: var(--gold); }
.wc-star-val span { font-size: 10px; color: var(--text-4); }

/* bracket */
.wc-br-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); background: var(--bg-2); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px; line-height: 1.6; }
.wc-br-note i { color: var(--gold); flex-shrink: 0; }
/* diagram bracket — equal-height columns auto-align pair centers; pseudo-element
   connector lines join each pair into the next round. LTR flow (R32 → Final). */
.wc-brk-scroll { overflow: auto; -webkit-overflow-scrolling: touch; direction: ltr; padding-bottom: 8px; }
/* height must fit all 16 R32 cells evenly (≈61px each + header) so every column
   distributes the SAME way and the connector lines line up with the cells. */
.wc-brk { display: flex; direction: ltr; height: 1040px; padding: 6px 2px; width: max-content; }
.wc-brk-col { display: flex; flex-direction: column; width: 150px; flex: 0 0 auto; }
.wc-brk-col:not(:last-child) { margin-right: 22px; }
.wc-brk-colh { height: 26px; line-height: 26px; text-align: center; font-size: 11px; font-weight: 800; color: var(--gold); flex: 0 0 auto; }
.wc-brk-list { flex: 1; display: flex; flex-direction: column; }
.wc-bm { flex: 1; display: flex; align-items: center; position: relative; min-height: 46px; }
/* visual gap between the top half and bottom half of the bracket */
.wc-brk-half { flex: 0 0 34px; align-self: stretch; position: relative; }
.wc-brk-half::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 1px dashed var(--border); opacity: .5; }
.wc-bm-cell { width: 100%; background: var(--bg-1); border: 1px solid var(--border); border-radius: 9px; padding: 3px 7px; }
.wc-bm-team { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 11.5px; color: var(--text-2); }
.wc-bm-team + .wc-bm-team { border-top: 1px dashed var(--border-soft); }
.wc-bm-win { color: var(--text-0); font-weight: 800; }
.wc-bm-flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.wc-bm-flag-x { background: var(--bg-3); }
.wc-bm-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-bm-sc { font-size: 11.5px; color: var(--gold); font-weight: 800; flex-shrink: 0; }
.wc-brk-col:not(:last-child) .wc-bm::after { content: ""; position: absolute; left: 100%; top: 50%; width: 22px; height: 2px; background: var(--border); }
.wc-brk-col:not(:first-child) .wc-bm::before { content: ""; position: absolute; right: 100%; top: 25%; height: 50%; width: 2px; background: var(--border); }

/* news */
.wc-news { display: flex; flex-direction: column; gap: 8px; }
.wc-news-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 80px; text-align: right; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer; font-family: inherit; }
.wc-news-it:active { transform: scale(.99); }
.wc-news-thumb { width: 84px; height: 60px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.wc-news-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wc-news-t { font-size: 13px; font-weight: 700; color: var(--text-0); line-height: 1.55; max-height: 2.6em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wc-news-d { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.wc-news-m { font-size: 11px; color: var(--text-4); margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 4px; }
.wc-news-src { text-align: center; font-size: 11px; color: var(--text-5); padding: 12px 0 2px; }

/* videos (highlights) */
.wc-vids { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.wc-vid { text-align: right; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; font-family: inherit; display: flex; flex-direction: column; }
.wc-vid:active { transform: scale(.98); }
.wc-vid-thumb { position: relative; width: 100%; height: 96px; background: var(--bg-3); }
.wc-vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wc-vid-play { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.wc-vid-dur { position: absolute; bottom: 6px; left: 6px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.6); border-radius: 5px; padding: 1px 6px; }
.wc-vid-t { font-size: 12px; font-weight: 700; color: var(--text-1); line-height: 1.6; padding: 8px 10px 10px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wc-vid-modal { padding: 0 !important; }
/* Close bar ABOVE the video so the X never overlaps the player's own
   fullscreen control (which sits top-left on iOS Safari). */
.wc-vid-bar { display: flex; justify-content: flex-start; align-items: center; padding: 8px 10px; background: var(--bg-1); }
.wc-vid-x { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--bg-3); color: var(--text-1); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.wc-player { width: 100%; aspect-ratio: 16/9; display: block; background: #000; border: none; }
/* match-detail highlight tab */
.md-hl { padding: 4px 0; }
.md-hl .wc-player { border-radius: 12px; }
.md-hl-t { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.7; margin-top: 10px; }
.md-hl-src { font-size: 10.5px; color: var(--text-5); margin-top: 6px; }

/* news modal */
.wc-modal { position: fixed; inset: 0; z-index: 4000; display: none; }
.wc-modal.open { display: block; }
.wc-modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.wc-modal-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow-y: auto; background: var(--bg-1); border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl); border-top: 1px solid var(--border-gold); animation: wc-modal-up .26s ease; }
@keyframes wc-modal-up { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.wc-modal-x { position: absolute; top: 10px; left: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wc-modal-img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.wc-modal-body { padding: 16px 18px 26px; }
.wc-modal-t { font-size: 17px; font-weight: 800; color: var(--text-0); line-height: 1.7; }
.wc-modal-m { font-size: 11.5px; color: var(--text-4); margin: 8px 0 14px; display: flex; align-items: center; gap: 4px; }
.wc-modal-content { font-size: 14px; line-height: 2.1; color: var(--text-1); }
.wc-modal-content p { margin: 0 0 12px; }
.wc-modal-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.wc-modal-content h2, .wc-modal-content h3, .wc-modal-content h4 { color: var(--text-0); font-size: 15px; margin: 16px 0 8px; }
.wc-modal-content ul, .wc-modal-content ol { padding-right: 20px; margin: 0 0 12px; }
.wc-modal-content li { margin-bottom: 6px; }
.wc-modal-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--gold); text-decoration: none; }
/* desktop: a centered, constrained dialog instead of a full-width bottom sheet */
@media (min-width: 640px) {
  .wc-modal.open { display: flex; align-items: center; justify-content: center; padding: 28px; }
  .wc-modal-card { position: relative; left: auto; right: auto; bottom: auto; width: 100%; max-width: 600px; max-height: 86vh; border-radius: var(--radius-xl); border: 1px solid var(--border-gold); animation: wc-modal-pop .22s ease; }
}
@keyframes wc-modal-pop { from { transform: scale(.96); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* admin announcement / changelog modal (shown once per version) */
.ann-modal { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.ann-modal.open { opacity: 1; pointer-events: auto; }
.ann-back { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.ann-card { position: relative; width: 100%; max-width: 380px; background: var(--bg-1); border: 1px solid var(--border-gold); border-radius: var(--radius-xl); padding: 24px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(16px) scale(.97); transition: transform .25s; }
.ann-modal.open .ann-card { transform: translateY(0) scale(1); }
.ann-icon { width: 60px; height: 60px; border-radius: 50%; background: rgba(232,131,26,.15); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.ann-icon i { font-size: 28px; color: var(--gold); }
.ann-title { font-size: 17px; font-weight: 800; color: var(--text-0); margin-bottom: 14px; }
.ann-list { text-align: right; margin: 0 0 18px; padding-right: 18px; }
.ann-list li { font-size: 13.5px; color: var(--text-2); line-height: 2; }
.ann-ok { width: 100%; }

/* ============================ کل‌کل ============================ */
.kk-soon { text-align: center; padding: 60px 24px; }
.kk-soon-ic { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(232,131,26,.2), rgba(216,58,106,.12)); border: 1px solid var(--border-gold); }
.kk-soon-ic i { font-size: 34px; color: var(--gold); }
.kk-soon-t { font-size: 18px; font-weight: 800; color: var(--text-0); }
.kk-soon-s { font-size: 13px; color: var(--text-3); margin-top: 8px; line-height: 1.8; max-width: 280px; margin-inline: auto; }
.kk-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, rgba(232,131,26,.18), rgba(216,58,106,.10)); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 14px; }
.kk-hero-t { font-size: 17px; font-weight: 800; color: var(--text-0); display: flex; align-items: center; gap: 7px; }
.kk-hero-t i { color: var(--gold); }
.kk-hero-s { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.kk-new-btn { flex-shrink: 0; background: linear-gradient(135deg, #e8831a, #d83a6a); color: #fff; border: none; border-radius: var(--radius); font-family: inherit; font-size: 12.5px; font-weight: 800; padding: 10px 13px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.kk-new-btn:active { transform: scale(.97); }
.kk-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: var(--radius); margin-bottom: 14px; }
.kk-tab { flex: 1 1 0; padding: 9px 4px; border: none; background: transparent; color: var(--text-3); font-family: inherit; font-size: 12.5px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.kk-tab.active { background: var(--gold); color: #fff; }
.kk-panel { min-height: 140px; }
.kk-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: var(--text-4); font-size: 12px; }
.kk-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--gold); animation: nav-spin .7s linear infinite; }

/* invites strip (main page) */
.kk-inv-wrap { margin-bottom: 16px; }
.kk-inv-row { display: flex; align-items: center; gap: 11px; background: var(--bg-1); border: 1px solid var(--border-gold); border-radius: 14px; padding: 10px; margin-bottom: 9px; }
.kk-inv-img { width: 52px; height: 52px; border-radius: 11px; object-fit: cover; flex: 0 0 auto; }
.kk-inv-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--accent, #e8831a); font-size: 22px; }
.kk-inv-info { flex: 1 1 auto; min-width: 0; }
.kk-inv-title { font-size: 13.5px; font-weight: 700; color: var(--text-1); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-inv-sub { font-size: 10.5px; color: var(--text-4); line-height: 1.9; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kk-inv-stake { color: var(--accent, #e8831a); font-weight: 700; }
.kk-inv-stake.kk-friendly { color: var(--text-3); }
.kk-inv-declined { color: var(--danger, #e5484d); }
.kk-inv-btns { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.kk-inv-btns .btn { white-space: nowrap; padding: 6px 12px; }

/* list */
.kk-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.kk-card { position: relative; text-align: right; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; font-family: inherit; display: flex; flex-direction: column; }
.kk-card:active { transform: scale(.98); }
.kk-card-img { width: 100%; height: 92px; object-fit: cover; background: var(--bg-3); }
.kk-card-noimg { display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 30px; background: linear-gradient(135deg, rgba(232,131,26,.16), rgba(216,58,106,.10)); }
.kk-card-lock { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.kk-card-locked { opacity: .92; }
.kk-card-body { padding: 9px 10px 10px; }
.kk-card-title { font-size: 13px; font-weight: 800; color: var(--text-0); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-card-meta { display: flex; gap: 10px; font-size: 10.5px; color: var(--text-4); margin-top: 5px; }
.kk-card-meta i { font-size: 10px; }
.kk-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.kk-card-stake { font-size: 10.5px; font-weight: 700; color: var(--gold); display: inline-flex; align-items: center; gap: 3px; }
.kk-card-stake.kk-friendly { color: var(--text-3); }
.kk-bdg { font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.kk-bdg-wait { background: rgba(245,158,11,.15); color: #f59e0b; }
.kk-bdg-live { background: rgba(34,197,94,.15); color: #22c55e; animation: kk-live-pulse 1.8s ease-in-out infinite; }
@keyframes kk-live-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.0); } 50% { box-shadow: 0 0 0 3px rgba(34,197,94,.18); } }
.kk-bdg-done { background: var(--bg-3); color: var(--text-4); }

/* modal (bottom sheet on mobile, centered on desktop) */
.kk-modal { position: fixed; inset: 0; z-index: 4000; display: none; }
.kk-modal.open { display: block; }
.kk-modal-back { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.kk-modal-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--bg-1); border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl); border-top: 1px solid var(--border-gold); animation: wc-modal-up .26s ease; }
.kk-modal-x { position: absolute; top: 10px; left: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media (min-width: 640px) {
  .kk-modal.open { display: flex; align-items: center; justify-content: center; padding: 24px; }
  .kk-modal-card { position: relative; left: auto; right: auto; bottom: auto; width: 100%; max-width: 560px; border-radius: var(--radius-xl); border: 1px solid var(--border-gold); }
}

/* detail */
.kk-detail-img { width: 100%; max-height: 180px; object-fit: cover; display: block; }
.kk-detail-body { padding: 16px 18px 24px; }
.kk-detail-title { font-size: 18px; font-weight: 800; color: var(--text-0); }
.kk-detail-meta { font-size: 11px; color: var(--text-4); margin: 8px 0 4px; line-height: 1.9; }
.kk-detail-meta i { font-size: 10px; color: var(--gold); }
.kk-sec { font-size: 11px; color: var(--text-4); font-weight: 700; margin: 16px 0 9px; display: flex; align-items: center; gap: 7px; }
.kk-sec::before { content: ''; width: 3px; height: 13px; background: var(--gold); border-radius: 2px; }
.kk-standings { display: flex; flex-direction: column; gap: 5px; }
.kk-st-row { display: flex; align-items: center; gap: 9px; background: var(--bg-2); border-radius: 10px; padding: 8px 10px; }
.kk-st-1 { background: var(--gold-pale, rgba(232,131,26,.10)); border: 1px solid var(--border-gold); }
.kk-st-rk { width: 18px; text-align: center; font-weight: 800; color: var(--text-4); font-size: 12px; }
.kk-st-1 .kk-st-rk { color: var(--gold); }
.kk-st-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.kk-st-nm { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.kk-st-crown { color: var(--gold); font-size: 12px; flex-shrink: 0; }
.kk-st-pts { display: flex; flex-direction: column; align-items: center; line-height: 1.05; flex-shrink: 0; min-width: 32px; }
.kk-st-pts b { font-size: 14px; font-weight: 900; color: var(--gold); }
.kk-st-pts span { font-size: 8.5px; color: var(--text-5); margin-top: 1px; }
.kk-medal-1 { color: #f0b429 !important; }
.kk-medal-2 { color: #c0c7d1 !important; }
.kk-medal-3 { color: #cd8b62 !important; }
.kk-pend { display: flex; flex-wrap: wrap; gap: 6px; }
.kk-pend-u { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); background: var(--bg-2); border-radius: 999px; padding: 3px 9px 3px 4px; }
.kk-pend-u img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.kk-pend-u em { font-style: normal; font-size: 9.5px; color: var(--text-5); }
.kk-detail-note { font-size: 10.5px; color: var(--text-5); margin-top: 14px; line-height: 1.7; }
.kk-locked { text-align: center; padding: 40px 24px; }
.kk-locked-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-3); color: var(--text-4); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 14px; }
.kk-locked-t { font-size: 16px; font-weight: 800; color: var(--text-1); }
.kk-locked-s { font-size: 12px; color: var(--text-4); margin-top: 8px; line-height: 1.8; }

/* user picker */
.kk-userlist { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.kk-u { display: flex; align-items: center; gap: 9px; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.kk-u-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.kk-u-nm { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-u-sh { font-size: 10.5px; color: var(--gold); font-weight: 700; flex-shrink: 0; }
.kk-u-chk { width: 20px; height: 20px; accent-color: var(--gold); flex-shrink: 0; }

/* wizard */
.kk-wiz-dots { display: flex; gap: 6px; justify-content: center; padding: 18px 0 4px; }
.kk-dot { width: 22px; height: 5px; border-radius: 3px; background: var(--bg-3); }
.kk-dot.on { background: var(--gold); }
.kk-dot.done { background: rgba(232,131,26,.5); }
.kk-wiz-body { padding: 12px 18px 4px; min-height: 220px; }
.kk-wiz-h { font-size: 15px; font-weight: 800; color: var(--text-0); margin-bottom: 12px; }
.kk-wiz-sub { font-size: 11px; color: var(--text-4); margin: 10px 0; line-height: 1.7; }
.kk-wiz-nav { display: flex; gap: 10px; padding: 14px 18px 22px; }
.kk-wiz-nav > * { flex: 1; }
.kk-imgpick { display: flex; align-items: center; justify-content: center; height: 120px; margin-top: 12px; border: 1.5px dashed var(--border); border-radius: 12px; color: var(--text-4); font-size: 12px; cursor: pointer; overflow: hidden; }
.kk-imgpick img { width: 100%; height: 100%; object-fit: cover; }
.kk-scopes { display: flex; flex-wrap: wrap; gap: 7px; }
.kk-scope { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-3); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.kk-scope.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.kk-dates { display: flex; gap: 10px; margin-top: 12px; }
.kk-dates label { flex: 1; font-size: 11px; color: var(--text-3); display: flex; flex-direction: column; gap: 4px; }
.kk-dates input { background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px; color: var(--text-1); font-family: inherit; }

/* match-range picker (create wizard step 3) */
.kk-mp-sum { font-size: 11.5px; font-weight: 700; color: var(--text-3); margin: 4px 2px 8px; display: flex; align-items: center; gap: 6px; }
.kk-mp-sum .icf-check-circled { color: #3ba55d; }
.kk-mp-list { max-height: 42vh; overflow-y: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.kk-mp-day { font-size: 10.5px; font-weight: 800; color: var(--text-4); padding: 8px 8px 4px; position: sticky; top: 0; background: var(--bg-1); }
.kk-mp-row { display: flex; align-items: center; gap: 6px; width: 100%; text-align: center; background: transparent; border: 1px solid transparent; border-radius: 9px; padding: 8px 9px; margin: 2px 0; font-family: inherit; color: var(--text-1); cursor: pointer; }
.kk-mp-row:active { background: var(--bg-3); }
.kk-mp-mid { background: var(--gold-pale); }
.kk-mp-end { background: var(--gold); border-color: var(--gold); color: #fff; }
.kk-mp-end .kk-mp-vs { color: rgba(255,255,255,.85); }
.kk-mp-t { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.kk-mp-row .kk-mp-t:first-of-type { justify-content: flex-end; }
.kk-mp-row .kk-mp-t:last-of-type { justify-content: flex-start; }
.kk-mp-vs { flex: 0 0 auto; font-size: 10px; color: var(--text-4); padding: 0 4px; }
.kk-mp-flag { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; flex: 0 0 auto; }
.kk-mp-tbd { flex: 1; font-size: 11.5px; color: var(--text-4); font-weight: 700; }
.kk-mp-end .kk-mp-tbd { color: #fff; }
.kk-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.kk-toggle-row span { font-size: 13px; color: var(--text-1); }
.kk-toggle-row em { font-style: normal; font-size: 10.5px; color: var(--text-4); }
.kk-switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.kk-switch input { display: none; }
.kk-switch span { position: absolute; inset: 0; background: var(--bg-3); border-radius: 999px; transition: background .2s; }
.kk-switch span::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.kk-switch input:checked + span { background: var(--gold); }
.kk-switch input:checked + span::after { transform: translateX(-18px); }
.kk-stake-row { margin-top: 16px; }
.kk-stake-row label { font-size: 12.5px; color: var(--text-2); display: block; margin-bottom: 7px; }
.kk-warn { margin-top: 12px; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.3); border-radius: 10px; padding: 10px 12px; font-size: 11px; color: #f59e0b; line-height: 1.8; }
.kk-review { display: flex; flex-direction: column; gap: 2px; }
.kk-review > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.kk-review span { font-size: 12px; color: var(--text-4); flex-shrink: 0; }
.kk-review b { font-size: 12.5px; color: var(--text-1); text-align: left; }

/* blocking invite modal (app.js) */
.kk-invite { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 22px; }
.kk-invite.open { display: flex; }
.kk-invite-back { position: absolute; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(4px); }
.kk-invite-card { position: relative; width: 100%; max-width: 360px; background: var(--bg-1); border: 1px solid var(--border-gold); border-radius: var(--radius-xl); padding: 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.kk-invite-img { width: 100%; height: 130px; object-fit: cover; border-radius: 14px; margin-bottom: 14px; }
.kk-invite-ic { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e8831a, #d83a6a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 14px; }
.kk-invite-h { font-size: 12px; color: var(--gold); font-weight: 700; }
.kk-invite-title { font-size: 18px; font-weight: 800; color: var(--text-0); margin-top: 4px; }
.kk-invite-meta { font-size: 12px; color: var(--text-4); margin-top: 8px; }
.kk-invite-stake { margin-top: 14px; font-size: 13px; font-weight: 800; color: var(--gold); }
.kk-invite-stake.kk-invite-friendly { color: var(--text-3); }
.kk-invite-warn { margin-top: 8px; font-size: 11px; color: #f59e0b; line-height: 1.8; background: rgba(245,158,11,.10); border-radius: 10px; padding: 9px 11px; }
.kk-invite-btns { display: flex; gap: 10px; margin-top: 18px; }
.kk-invite-btns > * { flex: 1; }
.kk-invite-count { font-size: 10.5px; color: var(--text-5); margin-top: 12px; }

/* کل‌کل chat */
.kk-chat { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }
.kk-chat-empty { text-align: center; color: var(--text-5); font-size: 11.5px; padding: 24px 0; }
.kk-msg { display: flex; gap: 7px; align-items: flex-end; max-width: 85%; }
.kk-msg-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.kk-msg-b { position: relative; background: var(--bg-2); border-radius: 12px; padding: 8px 11px; font-size: 12.5px; color: var(--text-1); line-height: 1.7; word-break: break-word; }
.kk-msg-n { display: block; font-size: 10px; font-weight: 800; color: var(--gold); margin-bottom: 2px; }
.kk-msg-t { display: block; font-size: 9px; color: var(--text-5); margin-top: 3px; }
.kk-msg-me { margin-right: auto; flex-direction: row-reverse; }
.kk-msg-me .kk-msg-b { background: linear-gradient(135deg, rgba(232,131,26,.22), rgba(216,58,106,.14)); border: 1px solid var(--border-gold); }
/* Telegram-style unified pill: borderless input + round send button share
   one rounded container, so the button never looks detached from the field. */
.kk-chat-bar { display: flex; gap: 6px; margin-top: 10px; align-items: center; background: var(--bg-3); border: 1px solid var(--border); border-radius: 24px; padding: 4px 14px 4px 4px; transition: var(--transition); }
.kk-chat-bar:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); }
.kk-chat-bar .form-input { flex: 1 1 auto; min-width: 0; background: transparent; border: none; border-radius: 0; padding: 9px 0; box-shadow: none !important; }
.kk-chat-bar .form-input:focus { background: transparent; border: none; box-shadow: none; }
.kk-chat-send { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--gold); color: #fff; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.kk-chat-send:active { transform: scale(.94); }
.kk-chat-readonly { text-align: center; font-size: 11px; color: var(--text-5); margin-top: 10px; padding: 8px; background: var(--bg-2); border-radius: 10px; }

/* ── کل‌کل detail PAGE (kalkal_view) ── */
.kkv-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; min-height: 152px; display: flex; align-items: flex-end; transition: min-height .32s cubic-bezier(.4,0,.2,1); }
.kkv-hero-sm { min-height: 66px; }
.kkv-hero-sm .kkv-hero-badges, .kkv-hero-sm .kkv-hero-s { display: none; }
.kkv-hero-sm .kkv-hero-t { font-size: 15px; }
.kkv-hero-sm .kkv-hero-body { padding: 10px 14px; }
.kkv-hero-edit { position: absolute; top: 10px; left: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.kkv-hero-edit:active { transform: scale(.92); }
.kkv-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kkv-hero-noimg { display: flex; align-items: center; justify-content: center; font-size: 48px; color: rgba(255,255,255,.55); background: linear-gradient(135deg, #e8831a, #d83a6a); }
.kkv-hero-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,20,.08), rgba(8,11,20,.86)); }
.kkv-hero-body { position: relative; z-index: 1; padding: 14px 16px; width: 100%; }
.kkv-hero-badges { display: flex; gap: 7px; margin-bottom: 8px; }
.kkv-hero-stake { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.42); color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.kkv-hero-t { font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); line-height: 1.4; }
.kkv-hero-s { font-size: 12px; color: rgba(255,255,255,.88); margin-top: 5px; }
.kkv-hero-s i { font-size: 11px; opacity: .9; }
.kkv-panel { min-height: 140px; }
.kkv-winner { display: flex; align-items: center; gap: 7px; background: var(--gold-pale, rgba(232,131,26,.1)); border: 1px solid var(--border-gold); border-radius: 12px; padding: 11px 14px; margin-bottom: 12px; font-size: 13px; color: var(--text-1); }
.kkv-winner i, .kkv-winner b { color: var(--gold); }
.kkv-about { display: flex; flex-direction: column; }
.kkv-about-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.kkv-about-row span { font-size: 12.5px; color: var(--text-4); flex-shrink: 0; }
.kkv-about-row b { font-size: 12.5px; color: var(--text-1); text-align: left; }
.kkv-about-warn { margin-top: 12px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); border-radius: 10px; padding: 10px 12px; font-size: 11.5px; color: #f59e0b; line-height: 1.8; }
.kkv-note { font-size: 11px; color: var(--text-5); margin-top: 14px; line-height: 1.7; }
/* messenger-style chat on the detail page: a bounded, self-scrolling message box
   with the input directly beneath it (always visible, never overlaps the nav). */
.kkv-chat { max-height: 48vh; min-height: 160px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.kkv-page .kk-chat-bar { margin-top: 8px; }

/* Chat tab: fill the whole content area so the input is ALWAYS pinned to the
   bottom (like a real messenger) — messages grow upward and scroll internally,
   even when the conversation is empty. Only the message list scrolls; the page
   itself doesn't. Scoped to the chat tab so other tabs keep normal page scroll. */
.kkv-page.kkv-chatmode { height: 100%; min-height: 0; }
.kkv-page.kkv-chatmode #kkv-root { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.kkv-page.kkv-chatmode .kkv-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.kkv-page.kkv-chatmode .kkv-chat { flex: 1 1 auto; max-height: none; min-height: 0; }
.kkv-page.kkv-chatmode .kk-chat-bar { flex: 0 0 auto; }
.kkv-page.kkv-chatmode .kk-chat-readonly { flex: 0 0 auto; }
/* center the empty-state hint when there are no messages yet */
.kkv-page.kkv-chatmode .kkv-chat:has(.kk-chat-empty:only-child) { display: flex; align-items: center; justify-content: center; }
.kk-mst { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.kk-mst-ok { background: rgba(34,197,94,.15); color: #22c55e; }
.kk-mst-wait { background: rgba(245,158,11,.15); color: #f59e0b; }
.kk-mst-no { background: var(--bg-3); color: var(--text-5); }

/* لیست بازی‌ها (matches + predictions, hidden until kickoff) */
.kkm-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; margin-bottom: 10px; }
.kkm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kkm-team { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.kkm-team-h { justify-content: flex-end; text-align: right; }
.kkm-team-a { justify-content: flex-start; text-align: left; }
.kkm-flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; flex: 0 0 auto; }
.kkm-score { flex: 0 0 auto; font-size: 16px; font-weight: 800; color: var(--gold); padding: 0 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1; }
.kkm-score-live { color: #22c55e; }
.kkm-live { font-size: 8.5px; font-weight: 800; color: #22c55e; background: rgba(34,197,94,.14); border-radius: 999px; padding: 1px 6px; }
.kkm-time { flex: 0 0 auto; font-size: 10px; color: var(--text-4); text-align: center; line-height: 1.5; padding: 0 4px; }
.kkm-locked { margin-top: 9px; padding: 9px; border-radius: 10px; background: var(--bg-3); color: var(--text-4); font-size: 11px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.kkm-preds { margin-top: 9px; border-top: 1px dashed var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.kkm-pred { display: flex; align-items: center; gap: 8px; }
.kkm-pav { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.kkm-pnm { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kkm-pval { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.kkm-nopred { color: var(--text-5); }
.kkm-pts { flex: 0 0 auto; min-width: 26px; text-align: center; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 8px; background: var(--bg-3); color: var(--text-4); }
.kkm-pts-ok { background: rgba(59,165,93,.16); color: #3ba55d; }
.kkm-pts-hi { background: var(--gold-pale); color: var(--gold); }
