/* ==========================================================================
   Leaderboard + bonuses
   ========================================================================== */
:root { interpolate-size: allow-keywords; }

[data-swap] { transition: opacity 0.2s var(--ease-io), transform 0.2s var(--ease-io); }
.is-swapping [data-swap] { opacity: 0; transform: translateY(8px); }

/* ---------- leaderboard overview (tabs + split header/timer) ---------- */
.tabs-row { display: flex; justify-content: flex-start; margin-bottom: 24px; }
.tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.tabs__thumb { position: absolute; top: 0; left: 0; border-radius: var(--r); background: var(--surface-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255, 176, 32, 0.45); transition: transform 0.55s var(--ease), width 0.55s var(--ease), height 0.55s var(--ease); }
.tabs.is-instant .tabs__thumb { transition: none; }
.tabs button { position: relative; display: grid; justify-items: start; gap: 3px; min-width: 148px; padding: 10px 16px; border: 0; border-radius: var(--r); background: none; color: var(--muted); text-align: left; transition: color 0.25s var(--ease); }
.tabs button:hover, .tabs button[aria-selected='true'] { color: var(--text); }
.tabs .casino-tag { color: inherit; font-size: 14.5px; }
.tabs small { color: var(--dim); font: 600 10px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }

.lb-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 36px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(480px 260px at 0% 0%, rgba(255, 176, 32, 0.09), transparent 65%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.lbh { display: grid; justify-items: start; gap: 10px; text-align: left; }
.lbh > * { animation: enter 0.8s var(--ease) backwards; }
.lbh > :nth-child(2) { animation-delay: 0.06s; }
.lbh > :nth-child(3) { animation-delay: 0.12s; }
.lbh__casino { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.lbh__casino .casino-tag { font-size: 15px; }
.lbh__title { font: 800 clamp(24px, 3vw, 34px)/1.02 var(--f-display); letter-spacing: -0.025em; }
.lbh__title .gold-text { display: block; margin-bottom: 0.08em; font-size: clamp(44px, 5.4vw, 66px); line-height: 0.92; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #ffe299 0%, var(--yolk) 55%, #e58e00 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lbh__sub { color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.lbh__sub b { color: var(--yolk); }

/* ---------- timer ---------- */
.timer { display: grid; justify-items: end; gap: 10px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); text-align: right; animation: enter 0.8s var(--ease) backwards 0.18s; }
.timer__meta { color: var(--dim); font: 500 12px/1.3 var(--f-mono); }
.timer__meta .is-fresh { color: var(--mint); }

/* ---------- podium ---------- */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 18px; margin-top: 44px; }
.pod {
  --m: var(--silver);
  --m-hi: var(--silver-hi);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 20px 20px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 7%, transparent) 0%, transparent 45%), var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
  text-align: center;
  animation: pod-in 1s var(--ease) backwards;
  animation-delay: var(--d, 0s);
}
.pod::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--m), transparent); opacity: 0.85; }
.pod--1 { --m: var(--gold); --m-hi: var(--gold-hi); padding-top: 56px; padding-bottom: 24px; border-color: color-mix(in srgb, var(--gold) 32%, transparent); box-shadow: inset 0 1px 0 rgba(255, 216, 122, 0.2), 0 24px 48px -28px rgba(245, 184, 58, 0.25); }
.pod--3 { --m: var(--bronze); --m-hi: var(--bronze-hi); }
.pod__rank { position: absolute; top: 16px; right: 18px; color: var(--m); font: 700 20px/1 var(--f-mono); }
.pod__rank sup { margin-left: 1px; font-size: 0.55em; vertical-align: 0.6em; }
.pod--1 .pod__rank { font-size: 24px; }
.pod__face { position: relative; }
.pod__crown { position: absolute; bottom: calc(100% + 8px); left: 50%; width: 34px; color: var(--m); transform: translateX(-50%); animation: crown-in 0.75s var(--ease-spring) backwards; animation-delay: calc(var(--d, 0s) + 0.4s); }
.pod--1 .pod__crown { width: 44px; }
@keyframes crown-in { from { opacity: 0; transform: translate(-50%, 12px) scale(0.6); } }
.pod__avatar { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: hsl(var(--h, 260) 30% 24%); color: hsl(var(--h, 260) 65% 90%); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--m); font: 700 22px/1 var(--f-mono); text-transform: uppercase; }
.pod__avatar--img { display: block; object-fit: cover; background: var(--surface-3); }
.pod--1 .pod__avatar { width: 96px; height: 96px; font-size: 28px; }
.pod.is-empty .pod__avatar { background: var(--surface-3); color: var(--dim); }
.pod__name { max-width: 100%; margin-top: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 18px/1.2 var(--f-display); }
.pod--1 .pod__name { font-size: 21px; }
.pod.is-empty .pod__name { color: var(--dim); }
.pod__label { margin-top: 10px; color: var(--dim); font: 600 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.pod__wager { margin-top: 4px; font: 600 17px/1.2 var(--f-mono); font-variant-numeric: tabular-nums; }
.pod__prize { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: linear-gradient(135deg, var(--m-hi), var(--m)); color: var(--ink); }
.pod__prize span { font: 700 10.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.pod__prize strong { font: 800 24px/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pod--1 .pod__prize strong { font-size: 28px; }

/* ---------- join bar ---------- */
.joinbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 28px; padding: 16px 18px 16px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--yolk); animation: enter 0.8s var(--ease) backwards 0.3s; }
.joinbar__text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: 14.5px; }
.joinbar__text strong { color: var(--text); }
.joinbar__text b { color: var(--yolk); }
.joinbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- standings ---------- */
.standings { margin-top: 48px; }
.standings__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { position: relative; display: flex; align-items: center; width: min(100%, 280px); }
.search svg { position: absolute; left: 14px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; transition: color 0.25s; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); outline: 0; font-size: 14px; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease); }
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--yolk); background: var(--surface-2); }
.search:focus-within svg { color: var(--yolk); }
.rows { display: grid; gap: 6px; }
.rows__head, .rows .row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 170px 120px; align-items: center; gap: 12px; padding: 0 20px; }
.rows__head { padding-bottom: 6px; color: var(--dim); font: 600 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.rows__head span:nth-child(n + 3), .rows .row > :nth-child(n + 3) { text-align: right; }
.rows .row { min-height: 58px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); animation: row-in 0.55s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 12) * 30ms + 0.08s); transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); }
.rows .row:hover { background: var(--surface-2); border-color: var(--line-2); }
.row__rank { color: var(--muted); font: 700 14px/1 var(--f-mono); }
.row__rank::before { content: '#'; margin-right: 1px; color: var(--dim); font-weight: 500; }
.row__player { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.row__wager { font: 600 14.5px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.row__prize { color: var(--yolk); font: 700 15px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.row__prize.is-zero { color: var(--dim); font-weight: 500; }
.row mark { background: rgba(255, 176, 32, 0.28); color: inherit; border-radius: 3px; }
.st__note { margin-top: 14px; color: var(--dim); font-size: 13.5px; text-align: center; }
.is-static .rows .row, .is-static .pod, .is-static .pod__crown { animation: none; }

/* ---------- rules ---------- */
.rules { margin-top: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.rules::details-content { block-size: 0; overflow: hidden; transition: block-size 0.5s var(--ease), content-visibility 0.5s allow-discrete; }
.rules[open]::details-content { block-size: auto; }
.rules summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font: 700 15px/1.2 var(--f-display); }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--yolk); font-size: 18px; font-weight: 500; transition: transform 0.45s var(--ease); }
.rules[open] summary::after { transform: rotate(45deg); }
.rules ul { display: grid; gap: 6px; margin: 0; padding: 0 20px 18px 38px; color: var(--muted); font-size: 14.5px; }

/* ---------- bonuses ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-bottom: 26px; }
.chip { height: 36px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13.5px; transition: color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed='true'] { background: var(--yolk); border-color: var(--yolk); color: var(--ink); }
.bonus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }

/* modern offer card */
.bonus {
  --accent: var(--yolk);
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent) 0%, transparent 42%), var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: transform 0.45s var(--ease), border-color 0.35s var(--ease), box-shadow 0.45s var(--ease);
  overflow: hidden;
}
.bonus:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 38%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 26px 46px -26px rgba(0, 0, 0, 0.95); }
.bonus::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.75; }
.bonus[data-accent='comb'] { --accent: var(--comb); }
.bonus[data-accent='mint'] { --accent: var(--mint); }
.bonus[data-accent='lilac'] { --accent: var(--lilac); }
.bonus[data-accent='pearl'] { --accent: var(--pearl); }
.bonus__body { display: grid; align-content: start; gap: 12px; flex: 1; padding: 24px 22px 18px; }
.bonus__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.bonus__badge { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.bonus__logo { height: 26px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.bonus__title { font: 800 23px/1.12 var(--f-display); letter-spacing: -0.02em; }
.bonus__desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.bonus__perks { list-style: none; display: grid; gap: 7px; margin: 4px 0 0; padding: 0; }
.bonus__perks li { display: flex; gap: 10px; font-size: 14px; color: var(--text); }
.bonus__perks li::before { content: ''; flex: none; width: 6px; height: 10px; margin: 4px 2px 0 3px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bonus__foot { display: grid; gap: 10px; padding: 16px 22px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.16); }
.bonus__code { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 6px 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); text-align: left; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease); }
.bonus__code:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--surface-2); }
.bonus__code small { color: var(--dim); font: 600 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.bonus__code strong { flex: 1; color: var(--accent); font: 700 15px/1 var(--f-mono); letter-spacing: 0.06em; }
.bonus__code em { padding: 8px 12px; border-radius: var(--r-sm); background: var(--accent); color: var(--ink); font: 700 12px/1 var(--f-body); font-style: normal; transition: background-color 0.25s var(--ease); }
.bonus__code.is-copied em { background: var(--mint); animation: stamp 0.4s var(--ease); }
.bonus .btn { --btn-bg: var(--accent); --btn-fg: var(--ink); }
.bonus .btn:hover { --btn-bg: color-mix(in srgb, var(--accent) 84%, white); }
.bonus__nolink { color: var(--dim); font-size: 13.5px; text-align: center; }
.fineprint { max-width: 72ch; margin: 30px 0 0; color: var(--dim); font-size: 13px; text-align: left; }

/* ---------- 404 ---------- */
.lost { display: grid; justify-items: center; gap: 16px; padding: clamp(40px, 9vw, 110px) 0; text-align: center; }
.lost .mark { width: 84px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lb-overview { grid-template-columns: 1fr; }
  .timer { justify-items: start; text-align: left; width: 100%; }
}
@media (max-width: 820px) {
  .podium { grid-template-columns: 1fr; gap: 18px; max-width: 440px; margin-left: auto; margin-right: auto; }
  .pod--1 { order: -1; }
}
@media (max-width: 700px) {
  .rows__head { display: none; }
  .rows .row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: 'rank player prize' 'rank wager prize'; row-gap: 3px; padding: 12px 16px; min-height: 0; }
  .row__rank { grid-area: rank; }
  .row__player { grid-area: player; }
  .row__wager { grid-area: wager; padding-left: 46px; color: var(--muted); font-size: 12.5px; text-align: left !important; }
  .row__prize { grid-area: prize; }
}
@media (max-width: 520px) {
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1; min-width: 0; padding: 10px 8px; }
  .joinbar { padding: 16px; }
  .joinbar__actions, .joinbar__actions .btn { width: 100%; }
  .joinbar__actions .codechip { width: 100%; justify-content: space-between; }
}
