/* candy-kit component styles. Built ONLY on the custom properties in tokens.css.
 * Layout breakpoints are container queries on .ck-shell (phone < 768 ≤ tablet < 1200 ≤ desktop),
 * mirrored in ui/shell.js BREAKPOINTS.
 * Visual language: layered flat surfaces, 1px hairline edges, no glow / gloss / blur, accent only on
 * the primary action, the active tab, focus and small highlights; every number is tabular.
 */

/* ============ base ============ */
/* Kit roots: every component works on its own (gallery, sheets) and inside the shell. */
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) {
  font-family: var(--ck-font); color: var(--ck-text); font-size: var(--ck-fs-md); line-height: 1.4;
  font-weight: var(--ck-fw-regular); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage),
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) *,
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) *::before,
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) *::after { box-sizing: border-box; }
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) :where(button) { cursor: pointer; }
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) :where(button:disabled) { cursor: not-allowed; }
:where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) :focus-visible {
  outline: 2px solid var(--ck-focus); outline-offset: 2px;
}
/* `hidden` always wins over component display rules */
[class*="ck-"][hidden], :where(.ck-shell, .ck-overlay, .ck-popover, .ck-toasts, .ck-topbar, .ck-history, .ck-bets, .ck-betpanel, .ck-feed, .ck-stage) [hidden] { display: none !important; }
.ck-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.ck-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.ck-icon { flex: none; display: block; }
.ck-empty { margin: var(--ck-space-6) var(--ck-space-2); text-align: center; color: var(--ck-text-dim); font-size: var(--ck-fs-sm); line-height: 1.5; }

/* ============ shell ============ */
.ck-shell {
  container: ck-shell / inline-size;
  position: relative;
  height: 100%;
  min-height: 0;
  background: var(--ck-bg);
}
.ck-app {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--ck-frame);
  border: 1px solid var(--ck-frame-border);
  border-radius: var(--ck-radius-frame);
  grid-template-columns: minmax(0, 1fr);
}
.ck-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ck-frame); }
.ck-col--left { border-right: 1px solid var(--ck-col-divider); padding: 0 var(--ck-col-pad) var(--ck-col-pad); }
.ck-col--right { border-left: 1px solid var(--ck-col-divider); padding: 0 var(--ck-col-pad) var(--ck-col-pad); }
.ck-col__logo {
  height: var(--ck-topbar-h); flex: none; display: flex; align-items: center; justify-content: center;
  /* the top-bar divider continues under the logo, so it meets the sidebar border in one line */
  margin-inline: calc(-1 * var(--ck-col-pad)); padding-inline: var(--ck-col-pad);
  border-bottom: 1px solid var(--ck-col-divider); margin-bottom: var(--ck-gap);
}
.ck-slot--logo { display: flex; align-items: center; justify-content: center; max-height: 100%; }
.ck-slot--logo img, .ck-slot--logo svg { max-height: calc(var(--ck-topbar-h) - 20px); width: auto; }
.ck-slot--left, .ck-slot--feed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ck-col--center {
  display: flex; flex-direction: column; gap: var(--ck-gap);
  padding: 0 var(--ck-col-pad) var(--ck-col-pad);
  overflow-y: auto; overflow-x: hidden;
}
.ck-topbar-row {
  height: var(--ck-topbar-h); flex: none; display: flex; align-items: center; justify-content: flex-end;
  /* divider between the top bar and the history strip: the same line as the sidebar border,
     full width of the centre column (bleeds through its padding) */
  margin-inline: calc(-1 * var(--ck-col-pad)); padding-inline: var(--ck-col-pad);
  border-bottom: 1px solid var(--ck-col-divider);
}
.ck-slot--topbar { display: flex; justify-content: flex-end; width: 100%; }
.ck-history-row { flex: none; }
.ck-slot--stage { flex: 1 1 auto; min-height: 240px; display: flex; }
.ck-slot--stage > * { flex: 1; }
.ck-slot--controls {
  flex: none; display: grid; gap: var(--ck-gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}
.ck-phonetop, .ck-bottombar { display: none; }
.ck-scrim { position: absolute; inset: 0; background: var(--ck-scrim); z-index: 20; }

/* phone (default, < 768) */
@container ck-shell (max-width: 767.98px) {
  .ck-app { border-radius: 0; border: 0; }
  .ck-col--center { padding: 0 var(--ck-space-3); gap: var(--ck-space-3); }
  .ck-phonetop { display: block; flex: none; position: sticky; top: 0; z-index: 5; background: var(--ck-frame); }
  .ck-topbar-row, .ck-history-row { display: none; }
  .ck-slot--stage { flex: none; aspect-ratio: 16 / 11; min-height: 200px; }
  .ck-slot--controls { grid-template-columns: minmax(0, 1fr); gap: var(--ck-space-2); }
  .ck-bottombar {
    display: block; flex: none; position: sticky; bottom: 0; z-index: 5; margin: auto calc(-1 * var(--ck-space-3)) 0;
    padding: var(--ck-space-2) var(--ck-space-3) calc(var(--ck-space-2) + env(safe-area-inset-bottom, 0px));
    background: var(--ck-frame); border-top: 1px solid var(--ck-col-divider);
  }
  .ck-col--left, .ck-col--right {
    position: absolute; top: 0; bottom: 0; z-index: 30; width: var(--ck-drawer-w);
    transition: transform var(--ck-dur) var(--ck-ease); box-shadow: var(--ck-shadow-pop);
  }
  .ck-col--left { left: 0; transform: translateX(-105%); }
  .ck-col--right { right: 0; transform: translateX(105%); padding-top: var(--ck-space-3); }
  .ck-app--open-left .ck-col--left, .ck-app--open-right .ck-col--right { transform: none; }
  .ck-app:not(.ck-app--open-left) .ck-col--left, .ck-app:not(.ck-app--open-right) .ck-col--right { visibility: hidden; transition: transform var(--ck-dur) var(--ck-ease), visibility 0s var(--ck-dur); }
}
/* tablet */
@container ck-shell (min-width: 768px) and (max-width: 1199.98px) {
  .ck-app { grid-template-columns: var(--ck-left-w-tablet) minmax(0, 1fr); }
  .ck-app.ck-app--no-left { grid-template-columns: minmax(0, 1fr); }
  .ck-col--right {
    position: absolute; top: 0; bottom: 0; right: 0; z-index: 30; width: min(var(--ck-right-w), 80%);
    transform: translateX(105%); visibility: hidden; padding-top: var(--ck-space-3);
    transition: transform var(--ck-dur) var(--ck-ease), visibility 0s var(--ck-dur); box-shadow: var(--ck-shadow-pop);
  }
  .ck-app--open-right .ck-col--right { transform: none; visibility: visible; transition: transform var(--ck-dur) var(--ck-ease); }
}
/* desktop */
@container ck-shell (min-width: 1200px) {
  .ck-app { grid-template-columns: var(--ck-left-w) minmax(0, 1fr) var(--ck-right-w); }
  .ck-app.ck-app--right-collapsed { grid-template-columns: var(--ck-left-w) minmax(0, 1fr) var(--ck-right-rail); }
  .ck-app.ck-app--no-right { grid-template-columns: var(--ck-left-w) minmax(0, 1fr); }
  .ck-app.ck-app--no-left { grid-template-columns: minmax(0, 1fr) var(--ck-right-w); }
  .ck-app.ck-app--no-left.ck-app--no-right { grid-template-columns: minmax(0, 1fr); }
  .ck-scrim { display: none; }
}
@container ck-shell (min-width: 768px) {
  .ck-app--no-left .ck-col--left { display: none; }
}
@container ck-shell (min-width: 1200px) {
  .ck-app--no-right .ck-col--right { display: none; }
  .ck-app--right-collapsed .ck-col--right { padding: 0 var(--ck-space-2); }
}

/* ============ shared controls ============ */
.ck-iconbtn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--ck-control-h); height: var(--ck-control-h);
  padding: 0; border: 1px solid var(--ck-line); border-radius: var(--ck-radius-pill);
  background: var(--ck-surface-2); color: var(--ck-text-muted);
  transition: background var(--ck-dur), color var(--ck-dur), border-color var(--ck-dur);
}
.ck-iconbtn .ck-icon { width: 18px; height: 18px; }
.ck-iconbtn:hover { background: var(--ck-surface-hover); color: var(--ck-text); }
.ck-iconbtn:active { background: var(--ck-surface-active); }
.ck-iconbtn[aria-pressed="false"], .ck-iconbtn.is-off { color: var(--ck-text-dim); }
.ck-iconbtn--square { border-radius: var(--ck-radius-pill); }
.ck-iconbtn--accent { background: var(--ck-close-bg); color: var(--ck-close-fg); border-color: var(--ck-close-border); }
.ck-iconbtn--accent:hover { background: var(--ck-surface-hover); color: var(--ck-text); }
.ck-iconbtn--mini { width: 28px; height: 28px; border-radius: var(--ck-radius-chip); background: var(--ck-surface-2); }
.ck-iconbtn--mini .ck-icon { width: 14px; height: 14px; }
.ck-iconbtn.is-done { color: var(--ck-success); }
.ck-pill {
  display: inline-flex; align-items: center; gap: var(--ck-space-2);
  height: var(--ck-control-h); padding: 0 var(--ck-space-3);
  border: 1px solid var(--ck-line); border-radius: var(--ck-radius-pill);
  background: var(--ck-pill-bg); color: var(--ck-pill-fg);
  font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-semibold); white-space: nowrap;
}
.ck-pill > .ck-icon { width: 16px; height: 16px; }
button.ck-pill:hover { background: var(--ck-surface-hover); }
.ck-pill__icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ck-accent-soft); color: var(--ck-accent-2); }
.ck-pill__icon .ck-icon { width: 12px; height: 12px; }
.ck-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: var(--ck-fw-bold); text-transform: uppercase; letter-spacing: .06em; line-height: 1; }
.ck-tag--demo { background: var(--ck-accent-soft); color: var(--ck-accent-2); }
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ck-space-2);
  min-height: var(--ck-input-h); padding: 0 var(--ck-space-5); border: 0; border-radius: var(--ck-radius-input);
  font-size: var(--ck-fs-md); font-weight: var(--ck-fw-semibold); letter-spacing: .01em;
  transition: background var(--ck-dur), filter var(--ck-dur);
}
.ck-btn--primary { background: var(--ck-cta-gradient); color: var(--ck-cta-text); text-transform: uppercase; letter-spacing: var(--ck-tracking-caps); font-weight: var(--ck-fw-bold); }
.ck-btn--primary:hover { filter: brightness(1.07); }
.ck-btn--primary:active { filter: brightness(.94); }
.ck-btn--ghost { background: var(--ck-surface-2); color: var(--ck-text); box-shadow: inset 0 0 0 1px var(--ck-line); }
.ck-btn--ghost:hover { background: var(--ck-surface-hover); }
.ck-btn[aria-busy="true"] { opacity: .7; }
.ck-btn:disabled { opacity: .5; filter: saturate(.5); }
.ck-input, .ck-overlay .ck-input {
  width: 100%; min-height: var(--ck-input-h); padding: 0 var(--ck-space-3);
  border: 1px solid var(--ck-line); border-radius: var(--ck-radius-input);
  background: var(--ck-surface-3); color: var(--ck-text); font-family: var(--ck-font-mono); font-size: var(--ck-fs-sm);
}
.ck-input::placeholder { color: var(--ck-text-dim); }
.ck-input:focus { border-color: var(--ck-accent); outline: none; }
.ck-card { background: var(--ck-modal-card); border: 1px solid var(--ck-line); border-radius: var(--ck-radius-card); padding: var(--ck-space-4); }
.ck-card__title { margin: 0 0 var(--ck-space-3); font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-semibold); text-transform: uppercase; letter-spacing: var(--ck-tracking-caps); color: var(--ck-text-muted); }

/* tiers (chips + multiplier pills) */
.ck-tier--low { background: var(--ck-tier-low-bg); color: var(--ck-tier-low-fg); }
.ck-tier--mid { background: var(--ck-tier-mid-bg); color: var(--ck-tier-mid-fg); }
.ck-tier--high { background: var(--ck-tier-high-bg); color: var(--ck-tier-high-fg); }
.ck-tier--none { background: var(--ck-tier-none-bg); color: var(--ck-tier-none-fg); }
.ck-mpill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; height: 24px; padding: 0 var(--ck-space-2); border-radius: var(--ck-radius-chip);
  font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1;
}
.ck-mpill.ck-tier--none { min-width: 0; }
/* where a lost bet's round crashed: muted, outlined in the crash colour (not a win tier) */
.ck-mpill--lost {
  background: color-mix(in srgb, var(--ck-mult-crashed) 12%, transparent);
  color: var(--ck-mult-crashed); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ck-mult-crashed) 35%, transparent);
}

/* avatars */
.ck-avatar {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  color: var(--ck-avatar-fg); font-size: 11px; font-weight: var(--ck-fw-semibold); line-height: 1;
}
.ck-avatar--sm { width: 20px; height: 20px; font-size: 10px; }
.ck-avatar--0 { background: var(--ck-avatar-0); } .ck-avatar--1 { background: var(--ck-avatar-1); }
.ck-avatar--2 { background: var(--ck-avatar-2); } .ck-avatar--3 { background: var(--ck-avatar-3); }
.ck-avatar--4 { background: var(--ck-avatar-4); } .ck-avatar--5 { background: var(--ck-avatar-5); }
.ck-avatar--6 { background: var(--ck-avatar-6); } .ck-avatar--7 { background: var(--ck-avatar-7); }

/* ============ top bar ============ */
.ck-topbar { display: flex; align-items: center; gap: var(--ck-space-2); }
.ck-topbar--desktop { justify-content: flex-end; flex-wrap: nowrap; }
.ck-topbar__group { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--ck-line); border-radius: calc(var(--ck-radius-pill) + 2px); background: var(--ck-surface-3); }
.ck-topbar__group .ck-iconbtn { width: calc(var(--ck-control-h) - 6px); height: calc(var(--ck-control-h) - 6px); border-color: transparent; background: transparent; }
.ck-topbar__group .ck-iconbtn:hover { background: var(--ck-surface-2); }
.ck-balance { font-variant-numeric: tabular-nums; font-size: var(--ck-fs-md); font-weight: var(--ck-fw-semibold); }
.ck-balance .ck-icon { color: var(--ck-text-muted); }
.ck-balance__frac { color: var(--ck-text-muted); }
.ck-balance__cur { color: var(--ck-text-muted); font-weight: var(--ck-fw-medium); font-size: var(--ck-fs-sm); }
.ck-topbar--phone { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--ck-space-2); height: 56px; }
.ck-topbar--desktop .ck-topbar__players { display: none; }
@container ck-shell (min-width: 768px) and (max-width: 1199.98px) {
  .ck-app:not(.ck-app--no-right) .ck-topbar--desktop .ck-topbar__players { display: inline-grid; }
}
.ck-topbar--phone .ck-topbar__start { justify-self: start; min-width: 0; }
.ck-topbar--phone .ck-topbar__logo { justify-self: center; display: flex; align-items: center; max-height: 40px; }
.ck-topbar--phone .ck-topbar__logo img, .ck-topbar--phone .ck-topbar__logo svg { max-height: 28px; width: auto; }
.ck-topbar--phone .ck-balance { font-size: var(--ck-fs-sm); gap: 6px; }
.ck-topbar--phone .ck-topbar__end { justify-self: end; display: flex; gap: 0; }
.ck-topbar--phone .ck-iconbtn { width: var(--ck-hit); height: var(--ck-hit); border-color: transparent; background: transparent; color: var(--ck-text-muted); }
.ck-topbar--phone .ck-iconbtn .ck-icon { width: 20px; height: 20px; }
.ck-topbar--phone .ck-balance { background: transparent; border-color: transparent; padding: 0; height: var(--ck-hit); font-size: var(--ck-fs-md); }
.ck-topbar--phone .ck-balance .ck-icon { color: var(--ck-text-muted); }
/* Phone: the start column is ~1/3 of the bar, so an inline DEMO tag after the balance spills into
   the centred logo. Ride it on the balance's top edge instead and keep the column from overflowing. */
.ck-topbar--phone .ck-topbar__start { overflow: hidden; }
/* Side groups size to content (three 44px icons need ~140px, more than a third of a 375px bar);
   the logo takes the space between them and scales down instead of being overlapped. */
.ck-topbar--phone { grid-template-columns: auto minmax(0, 1fr) auto; }
.ck-topbar--phone .ck-topbar__logo { min-width: 0; max-width: 100%; }
.ck-topbar--phone .ck-topbar__logo img, .ck-topbar--phone .ck-topbar__logo svg { max-width: 100%; height: auto; object-fit: contain; }
.ck-topbar--phone .ck-balance { position: relative; }
.ck-topbar--phone .ck-tag--demo {
  position: absolute; top: 1px; left: 24px;
  font-size: 9px; line-height: 1.2; height: auto; padding: 1px 4px; margin: 0;
}
.ck-iconbtn[data-badge]::after {
  content: attr(data-badge); position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ck-accent); color: var(--ck-text-on-accent);
  font-size: 10px; font-weight: var(--ck-fw-semibold); line-height: 16px; text-align: center; font-variant-numeric: tabular-nums;
}

/* ============ history strip ============ */
.ck-history { display: flex; align-items: center; gap: var(--ck-space-2); min-width: 0; }
.ck-history__track {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; overflow-y: visible; scrollbar-width: none; padding: 2px 2px 10px;
  -webkit-mask-image: linear-gradient(90deg, #000 75%, transparent);
  mask-image: linear-gradient(90deg, #000 75%, transparent);
}
.ck-history__track::-webkit-scrollbar { display: none; }
.ck-history__chips { display: flex; gap: 6px; }
.ck-chip {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--ck-chip-w); height: var(--ck-chip-h); padding: 0 var(--ck-space-2);
  border: 0; border-radius: var(--ck-radius-chip);
  font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1;
  transition: filter var(--ck-dur);
}
.ck-chip:hover { filter: brightness(1.12); }
.ck-chip[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ck-frame), 0 0 0 3px var(--ck-text); }
.ck-chip--current { background: var(--ck-chip-current-bg); color: var(--ck-chip-current-fg, var(--ck-tier-low-fg)); box-shadow: inset 0 0 0 1px var(--ck-line-strong); }
.ck-chip__marker {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--ck-text);
}
.ck-history__clock { border-color: transparent; background: transparent; color: var(--ck-text-muted); margin-top: -8px; }
.ck-history__clock:hover { color: var(--ck-text); }

/* ============ popover ============ */
.ck-popover {
  position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px));
  padding: var(--ck-space-4); border-radius: var(--ck-radius-panel);
  background: var(--ck-surface-1); box-shadow: var(--ck-shadow-pop);
}
.ck-popover__arrow {
  position: absolute; top: -7px; left: var(--ck-arrow-x, 50%); transform: translateX(-50%);
  width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--ck-surface-1);
}
.ck-popover[data-placement="above"] .ck-popover__arrow { top: auto; bottom: -7px; border-bottom: 0; border-top: 8px solid var(--ck-surface-1); }
.ck-popover__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--ck-space-3); }
.ck-popover__title { margin: 0; font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-semibold); text-transform: uppercase; letter-spacing: var(--ck-tracking-caps); color: var(--ck-text-muted); }
.ck-popover__summary { display: flex; align-items: center; gap: var(--ck-space-2); margin-bottom: var(--ck-space-2); }
.ck-popover__summary .ck-kv:first-child { flex: 1; min-width: 0; }
.ck-popover__verify { width: 36px; height: 36px; color: var(--ck-text); }
.ck-popover__rows, .ck-fair__rows { display: flex; flex-direction: column; gap: var(--ck-space-2); }
.ck-kv { display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 36px; padding: 0 var(--ck-space-3); border-radius: var(--ck-radius-pill); background: var(--ck-surface-2); border: 1px solid var(--ck-line); }
.ck-kv.ck-tier--low, .ck-kv.ck-tier--mid, .ck-kv.ck-tier--high, .ck-kv.ck-tier--none { background: var(--ck-surface-2); color: var(--ck-text); }
.ck-kv__label { color: var(--ck-pill-label); font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-medium); white-space: nowrap; }
.ck-kv__value { font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ck-kv.ck-tier--low .ck-kv__value { color: color-mix(in srgb, var(--ck-tier-low-bg) 45%, #fff); }
.ck-kv.ck-tier--mid .ck-kv__value { color: color-mix(in srgb, var(--ck-tier-mid-bg) 45%, #fff); }
.ck-kv.ck-tier--high .ck-kv__value { color: color-mix(in srgb, var(--ck-tier-high-bg) 60%, #fff); }
.ck-row { display: flex; align-items: center; gap: var(--ck-space-2); min-height: 44px; padding: 0 var(--ck-space-1) 0 var(--ck-space-3); border-radius: var(--ck-radius-input); background: var(--ck-surface-3); border: 1px solid var(--ck-line); }
.ck-row__label { flex: none; color: var(--ck-text-muted); font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium); }
.ck-row__value { flex: 1; min-width: 0; color: var(--ck-text); font-family: var(--ck-font-mono); font-size: var(--ck-fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-row__value.is-muted { font-family: var(--ck-font); font-style: normal; color: var(--ck-text-dim); white-space: normal; }
.ck-row__copy { background: transparent; border-color: transparent; }

/* ============ overlay / modal / sheet ============ */
.ck-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--ck-space-4); background: var(--ck-scrim); }
.ck-slot--overlay .ck-overlay { position: absolute; }
.ck-modal {
  width: min(640px, 100%); max-height: calc(100% - 16px); overflow: auto;
  padding: var(--ck-space-5); border-radius: var(--ck-radius-panel);
  background: var(--ck-modal-bg); box-shadow: var(--ck-shadow-pop);
  outline: none;
}
.ck-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ck-space-3); margin-bottom: var(--ck-space-4); }
.ck-modal__title { display: flex; align-items: center; gap: var(--ck-space-2); margin: 0; font-size: var(--ck-fs-lg); font-weight: var(--ck-fw-bold); letter-spacing: -.005em; }
.ck-modal__title .ck-icon { color: var(--ck-accent-2); width: 20px; height: 20px; }
.ck-modal__close { width: 36px; height: 36px; }
.ck-modal__close, .ck-popover__close { background: var(--ck-close-bg); color: var(--ck-close-fg); border: 1px solid var(--ck-close-border); }
.ck-modal__close:hover, .ck-popover__close:hover { background: var(--ck-surface-hover); color: var(--ck-text); }
.ck-modal__body { display: flex; flex-direction: column; gap: var(--ck-space-3); line-height: 1.5; }
.ck-overlay--sheet { align-items: end; padding: 0; }
.ck-overlay--drawer-left { justify-items: start; padding: 0; }
.ck-overlay--drawer-right { justify-items: end; padding: 0; }
.ck-sheet--bottom { width: 100%; max-width: 640px; max-height: 88%; border-radius: var(--ck-radius-panel) var(--ck-radius-panel) 0 0; padding-bottom: calc(var(--ck-space-4) + env(safe-area-inset-bottom, 0px)); animation: ck-up var(--ck-dur) var(--ck-ease); }
.ck-sheet--left, .ck-sheet--right { width: var(--ck-drawer-w); height: 100%; max-height: none; border-radius: 0; }
.ck-sheet__grip { width: 36px; height: 4px; margin: -8px auto var(--ck-space-3); border-radius: 2px; background: var(--ck-line-strong); }
@keyframes ck-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ fairness modal ============ */
.ck-fair__pills { display: flex; flex-wrap: wrap; gap: var(--ck-space-2); margin-bottom: var(--ck-space-3); }
.ck-fair__explain { margin: var(--ck-space-3) 0 0; color: var(--ck-text-muted); font-size: var(--ck-fs-md); line-height: 1.5; }
.ck-fair__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ck-space-3); margin-bottom: var(--ck-space-3); }
.ck-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-field--serverSeed { grid-column: 1 / -1; }
.ck-field__label { font-size: var(--ck-fs-xs); color: var(--ck-text-muted); font-weight: var(--ck-fw-medium); }
.ck-fair__check { width: 100%; }
.ck-fair__results { list-style: none; margin: var(--ck-space-3) 0 0; padding: 0; display: grid; gap: var(--ck-space-2); }
.ck-fair__result { display: flex; align-items: center; gap: var(--ck-space-2); min-height: 40px; padding: 0 var(--ck-space-3); border-radius: var(--ck-radius-input); background: var(--ck-surface-3); border: 1px solid var(--ck-line); font-size: var(--ck-fs-sm); }
.ck-fair__mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ck-surface-hover); }
.ck-fair__result.is-ok .ck-fair__mark { background: var(--ck-success); color: #052a1a; }
.ck-fair__result.is-bad .ck-fair__mark { background: var(--ck-danger); color: #2a0510; }
.ck-fair__rlabel { flex: 1; color: var(--ck-text-muted); }
.ck-fair__rvalue { font-variant-numeric: tabular-nums; font-weight: var(--ck-fw-semibold); }
.ck-fair__result.is-ok .ck-fair__rvalue { color: var(--ck-success); }
.ck-fair__result.is-bad .ck-fair__rvalue { color: var(--ck-danger); }
.ck-fair__error { margin: var(--ck-space-2) 0 0; color: var(--ck-danger); font-size: var(--ck-fs-sm); }
.ck-fair__rotatebox { display: flex; align-items: center; gap: var(--ck-space-3); margin-bottom: var(--ck-space-3); padding: var(--ck-space-3); border-radius: var(--ck-radius-card); background: var(--ck-accent-soft); }
.ck-fair__rotatebox > .ck-icon { color: var(--ck-accent-2); }
.ck-fair__rotatebox > div { flex: 1; min-width: 0; }
.ck-fair__hint { margin: 0; font-size: var(--ck-fs-sm); color: var(--ck-text); }
.ck-fair__rotate { flex: none; }
.ck-fair__how { border-top: 1px solid var(--ck-line); padding-top: var(--ck-space-2); }
.ck-fair__how summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; list-style: none; font-weight: var(--ck-fw-medium); }
.ck-fair__how summary::-webkit-details-marker { display: none; }
.ck-fair__how summary .ck-icon { color: var(--ck-text-muted); transition: transform var(--ck-dur); }
.ck-fair__how[open] summary .ck-icon { transform: rotate(180deg); }
.ck-fair__formula { margin: 0; padding-left: var(--ck-space-5); display: grid; gap: var(--ck-space-2); color: var(--ck-text-muted); font-size: var(--ck-fs-sm); }
.ck-fair__formula code { font-family: var(--ck-font-mono); font-size: var(--ck-fs-xs); color: var(--ck-text); overflow-wrap: anywhere; }

/* ============ bets panel (left) ============ */
.ck-bets { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: var(--ck-space-3); }
.ck-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border: 1px solid var(--ck-line); border-radius: calc(var(--ck-radius-pill) + 2px); background: var(--ck-surface-3); }
.ck-tab {
  height: calc(var(--ck-control-h) - 4px); border: 0; border-radius: var(--ck-radius-pill); background: transparent;
  color: var(--ck-text-muted); font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-semibold);
  transition: background var(--ck-dur), color var(--ck-dur);
}
.ck-tab:hover { color: var(--ck-text); }
.ck-tab[aria-selected="true"] { background: color-mix(in srgb, var(--ck-accent) 14%, var(--ck-surface-active)); color: var(--ck-text); box-shadow: inset 0 0 0 1px var(--ck-line); }
.ck-bets__header { display: flex; align-items: center; justify-content: space-between; gap: var(--ck-space-2); min-height: 40px; }
.ck-bets__total { display: flex; flex-direction: column; gap: 2px; }
.ck-bets__total-label { font-size: var(--ck-fs-xs); color: var(--ck-text-muted); font-weight: var(--ck-fw-medium); }
.ck-bets__total-value { font-size: var(--ck-fs-lg); font-weight: var(--ck-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ck-bets__action { height: var(--ck-control-h); }
.ck-bets__panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: calc(-1 * var(--ck-space-2)); padding-right: var(--ck-space-2); scrollbar-width: thin; scrollbar-color: var(--ck-surface-hover) transparent; }
.ck-bets__panel:focus-visible { outline-offset: -2px; }
.ck-bets__filters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ck-space-2); margin-bottom: var(--ck-space-3); }
.ck-select { position: relative; }
.ck-select__el {
  width: 100%; height: var(--ck-control-h); padding: 0 32px 0 var(--ck-space-3); appearance: none; -webkit-appearance: none;
  border: 1px solid var(--ck-line); border-radius: var(--ck-radius-pill); background: var(--ck-surface-2); color: var(--ck-text);
  font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium);
}
.ck-select__el:hover { background: var(--ck-surface-hover); }
.ck-select__chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ck-text-muted); }
.ck-bets__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-betrow {
  position: relative;
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 60px minmax(60px, auto); align-items: center; gap: var(--ck-space-2);
  width: 100%; min-height: var(--ck-row-h); padding: 0 var(--ck-space-2); border: 1px solid transparent; border-radius: var(--ck-radius-row);
  background: var(--ck-surface-2); color: var(--ck-text); text-align: left; font-size: var(--ck-fs-sm); line-height: 1.2;
  transition: background var(--ck-dur);
}
button.ck-betrow:hover { background: var(--ck-surface-hover); }
/* No coloured side stripes on rounded cards (a tell of generated UI). A cashed row is a quiet
   background tint; "mine" is carried by the name, not by an edge marker. */
.ck-betrow.is-cashed { background: linear-gradient(0deg, var(--ck-cashed-tint), var(--ck-cashed-tint)), var(--ck-surface-2); }
.ck-betrow.is-mine .ck-betrow__name { color: var(--ck-text); font-weight: var(--ck-fw-semibold); }
.ck-betrow__name { color: var(--ck-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-betrow__bet { font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-betrow .ck-mpill { justify-self: center; }
.ck-betrow__win { justify-self: end; color: var(--ck-win); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-betrow__win.is-empty { color: var(--ck-text-dim); font-weight: var(--ck-fw-regular); }
.ck-betrow__win.is-lost { color: var(--ck-text-dim); }
.ck-bets__list--top { gap: var(--ck-space-2); }
.ck-topcard {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--ck-space-2); align-items: center;
  padding: var(--ck-space-2); border-radius: var(--ck-radius-card); background: var(--ck-surface-1); border: 1px solid var(--ck-line);
}
.ck-topcard__who { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.ck-topcard__who .ck-avatar { width: 32px; height: 32px; font-size: var(--ck-fs-sm); }
.ck-topcard__name { font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ck-topcard__stats { margin: 0; display: grid; gap: 4px; }
.ck-topcard__stat { display: flex; align-items: center; justify-content: space-between; gap: var(--ck-space-1); min-width: 0; min-height: 30px; padding: 0 var(--ck-space-2); border-radius: var(--ck-radius-chip); background: var(--ck-surface-2); }
.ck-topcard__stat dt { color: var(--ck-text-muted); font-size: var(--ck-fs-xs); white-space: nowrap; }
.ck-topcard__stat dd { margin: 0; font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; }
.ck-topcard__stat dd.is-win { color: var(--ck-text); }
.ck-topcard__stat .ck-mpill { height: 22px; min-width: 0; padding: 0 6px; }
.ck-topcard__actions { display: flex; flex-direction: column; gap: 4px; }

/* ============ bet panel ============ */
.ck-betpanel { display: flex; flex-direction: column; gap: var(--ck-space-2); padding: var(--ck-space-2); border: 1px solid var(--ck-line); border-radius: var(--ck-radius-panel); background: var(--ck-surface-1); min-width: 0; }
.ck-betpanel__top { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, max-content) minmax(80px, 120px); justify-content: space-between; align-items: center; gap: var(--ck-space-2); min-height: var(--ck-input-h); padding: 0 0 0 var(--ck-space-2); }
.ck-check__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-check { position: relative; min-width: 0; display: inline-flex; align-items: center; gap: var(--ck-space-2); min-height: 32px; cursor: pointer; font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium); color: var(--ck-text); user-select: none; }
.ck-check__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ck-check__box { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: var(--ck-radius-chip); background: var(--ck-surface-3); box-shadow: inset 0 0 0 1px var(--ck-line-strong); color: transparent; transition: background var(--ck-dur), box-shadow var(--ck-dur); }
.ck-check__box .ck-icon { width: 14px; height: 14px; }
.ck-check:hover .ck-check__box { box-shadow: inset 0 0 0 1px var(--ck-text-dim); }
.ck-check__input:checked + .ck-check__box { background: var(--ck-accent); color: var(--ck-text-on-accent); box-shadow: none; }
.ck-check__input:focus-visible + .ck-check__box { outline: 2px solid var(--ck-focus); outline-offset: 2px; }
.ck-check__input:disabled ~ * { opacity: .5; cursor: not-allowed; }
.ck-xbox { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-width: 0; height: calc(var(--ck-input-h) - 4px); padding: 0 var(--ck-space-3); border-radius: var(--ck-radius-input); background: var(--ck-surface-3); box-shadow: inset 0 0 0 1px var(--ck-line); }
.ck-xbox.is-armed { box-shadow: inset 0 0 0 1px var(--ck-accent); }
.ck-xbox__x { color: var(--ck-text-muted); font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium); }
.ck-xbox__input { width: calc((var(--ck-target-ch, 4) + 0.6) * 1ch); max-width: 100%; min-width: 2ch; border: 0; background: transparent; color: var(--ck-text); font-weight: var(--ck-fw-semibold); font-size: var(--ck-fs-md); text-align: center; font-variant-numeric: tabular-nums; }
.ck-xbox__input:focus { outline: none; }
.ck-xbox:focus-within { box-shadow: inset 0 0 0 2px var(--ck-focus); }
.ck-betpanel__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ck-space-2); align-items: stretch; }
.ck-betpanel__amount { display: flex; flex-direction: column; justify-content: space-between; gap: var(--ck-space-2); padding: var(--ck-space-2); border-radius: var(--ck-radius-card); background: var(--ck-surface-3); box-shadow: inset 0 0 0 1px var(--ck-line); }
.ck-stepper { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--ck-space-1); height: var(--ck-control-h); }
.ck-stepper__btn { display: grid; place-items: center; width: var(--ck-control-h); height: var(--ck-control-h); border: 0; border-radius: var(--ck-radius-pill); background: var(--ck-surface-2); color: var(--ck-text); transition: background var(--ck-dur); }
.ck-stepper__btn .ck-icon { width: 16px; height: 16px; }
.ck-stepper__btn:hover:not(:disabled) { background: var(--ck-surface-hover); }
.ck-stepper__btn:active:not(:disabled) { background: var(--ck-surface-active); }
.ck-stepper__btn:disabled { opacity: .4; }
.ck-stepper__field { display: flex; align-items: baseline; justify-content: center; gap: 4px; min-width: 0; }
.ck-stepper__input { width: calc((var(--ck-amount-ch, 4) + 0.6) * 1ch); max-width: 100%; min-width: 2ch; border: 0; background: transparent; color: var(--ck-text); text-align: right; font-size: var(--ck-fs-xl); font-weight: var(--ck-fw-bold); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ck-stepper__input:focus { outline: none; }
.ck-stepper__field:focus-within { border-radius: 6px; box-shadow: 0 0 0 2px var(--ck-focus); }
.ck-stepper__input[aria-invalid="true"] { color: var(--ck-danger); }
.ck-stepper__cur { flex: none; color: var(--ck-text-muted); font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-medium); min-width: 0; padding-right: 2px; }
.ck-stepper__cur:empty { display: none; }
.ck-qchips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.ck-qchip { height: 28px; padding: 0 4px; border: 0; border-radius: var(--ck-radius-chip); background: var(--ck-surface-2); color: var(--ck-text-muted); font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; transition: background var(--ck-dur), color var(--ck-dur); }
.ck-qchip:hover:not(:disabled) { background: var(--ck-surface-hover); color: var(--ck-text); }
.ck-qchip:active:not(:disabled) { background: var(--ck-surface-active); }
.ck-qchip:disabled { opacity: .4; }
.ck-betpanel__cta { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.ck-cta {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--ck-cta-h); padding: 0 var(--ck-space-3); border: 0; border-radius: var(--ck-radius-card);
  background: var(--ck-cta-gradient); color: var(--ck-cta-text); box-shadow: var(--ck-cta-glow);
  font-size: var(--ck-fs-xl); font-weight: var(--ck-fw-bold); letter-spacing: var(--ck-tracking-caps); text-transform: uppercase; line-height: 1.15;
  transition: filter var(--ck-dur), transform var(--ck-dur);
}
.ck-cta:hover:not(:disabled) { filter: brightness(1.07); }
.ck-cta:active:not(:disabled) { filter: brightness(.93); transform: translateY(1px); }
.ck-cta--cashout { background: var(--ck-cashout-gradient); color: var(--ck-cashout-text); }
.ck-cta--cancel { background: var(--ck-cancel-bg); color: var(--ck-cancel-text); box-shadow: inset 0 0 0 1px var(--ck-line-strong); }
.ck-cta--waiting, .ck-cta--disabled, .ck-cta:disabled { filter: saturate(.35) brightness(.75); box-shadow: none; }
.ck-cta--waiting { text-transform: none; letter-spacing: 0; font-size: var(--ck-fs-md); font-weight: var(--ck-fw-semibold); }
.ck-cta__sub { font-size: var(--ck-fs-xs); font-weight: var(--ck-fw-medium); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; opacity: .85; }
.ck-cta__progress { position: relative; height: 3px; margin: 0 auto; width: 100%; border-radius: 2px; background: var(--ck-surface-3); overflow: hidden; }
.ck-cta__bar { position: absolute; inset: 0; transform-origin: left center; background: var(--ck-progress); border-radius: inherit; transition: transform 120ms linear; }
.ck-cta__progress.is-idle { width: 40%; background: var(--ck-progress); opacity: .45; }
.ck-cta__progress.is-idle .ck-cta__bar { display: none; }
.ck-betpanel__error { margin: 0; padding: 0 var(--ck-space-2); color: var(--ck-danger); font-size: var(--ck-fs-sm); }
.ck-betpanel.is-locked .ck-betpanel__amount { opacity: .7; }

/* ============ feed panel (right) ============ */
.ck-feed { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: var(--ck-space-3); }
.ck-feed__head { height: var(--ck-topbar-h); flex: none; display: flex; align-items: center; gap: var(--ck-space-3); }
.ck-status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ck-status-live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ck-status-live) 22%, transparent); }
.ck-status-dot.is-idle { background: var(--ck-status-idle); box-shadow: none; }
.ck-status-dot.is-offline { background: var(--ck-status-offline); box-shadow: none; }
.ck-feed__stat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-feed__count { font-size: var(--ck-fs-lg); font-weight: var(--ck-fw-bold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ck-feed__label { font-size: var(--ck-fs-xs); color: var(--ck-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-feed__list { list-style: none; margin: 0 calc(-1 * var(--ck-space-2)) 0 0; padding: 0 var(--ck-space-2) 0 0; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--ck-space-2); scrollbar-width: thin; scrollbar-color: var(--ck-surface-hover) transparent; }
.ck-feedcard { display: block; width: 100%; padding: var(--ck-space-3); border: 1px solid var(--ck-line); border-radius: var(--ck-radius-card); background: var(--ck-surface-1); color: var(--ck-text); text-align: left; transition: background var(--ck-dur); }
button.ck-feedcard:hover { background: var(--ck-surface-2); }
.ck-feedcard__who { display: flex; align-items: center; gap: var(--ck-space-2); margin: calc(-1 * var(--ck-space-1)) 0 var(--ck-space-3); padding-bottom: var(--ck-space-2); border-bottom: 1px solid var(--ck-line); font-size: var(--ck-fs-sm); }
.ck-feedcard__name { color: var(--ck-text-muted); }
.ck-feedcard__note { color: var(--ck-text); font-weight: var(--ck-fw-medium); }
.ck-feedcard__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ck-space-3) var(--ck-space-2); }
.ck-feedcard__cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ck-feedcard__cell.is-end { align-items: flex-end; text-align: right; }
.ck-feedcard__k { font-size: var(--ck-fs-xs); color: var(--ck-text-dim); line-height: 1.2; }
.ck-feedcard__v { font-size: var(--ck-fs-md); font-weight: var(--ck-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.25; }
.ck-feedcard__v.is-win { color: var(--ck-win); }
.ck-feedcard__v.is-empty { color: var(--ck-text-dim); font-weight: var(--ck-fw-regular); }
.ck-feedcard__v .ck-mpill, .ck-feedcard .ck-mpill { height: 24px; }
.ck-feed.is-collapsed .ck-feed__stat { display: none; }
.ck-feed.is-collapsed .ck-feed__head { flex-direction: column; justify-content: center; gap: var(--ck-space-2); }

/* ============ stage ============ */
.ck-stage {
  container: ck-stage / inline-size;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 220px; border-radius: var(--ck-radius-panel);
  background: var(--ck-stage-bg); border: 1px solid var(--ck-stage-border);
}
.ck-stage__canvas { position: absolute; inset: 0; z-index: 0; }
.ck-stage__canvas > canvas, .ck-stage__canvas > img, .ck-stage__canvas > svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.ck-stage__art { position: absolute; z-index: 1; right: 4%; top: 6%; bottom: 6%; width: 46%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ck-stage__art > img, .ck-stage__art > svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.ck-stage__trail { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ck-stage__trail.is-hidden { opacity: 0; }
.ck-stage__trail-line { stroke: var(--ck-trail-color); stroke-width: 2.5; stroke-linecap: round; }
.ck-stage__trail-glow { stroke: var(--ck-trail-glow); stroke-width: 8; stroke-linecap: round; filter: blur(3px); }
.ck-stage__hud { position: absolute; z-index: 3; left: 6%; top: 50%; transform: translateY(-50%); max-width: 52%; display: flex; flex-direction: column; gap: var(--ck-space-2); }
.ck-stage--hud-right .ck-stage__hud { left: auto; right: 6%; align-items: flex-end; text-align: right; }
.ck-stage--hud-right .ck-stage__art { right: auto; left: 4%; }
.ck-stage__mult {
  display: flex; align-items: baseline; white-space: nowrap;
  font-family: var(--ck-font-display); font-weight: var(--ck-fw-black); line-height: 1; letter-spacing: -.04em;
  font-size: min(var(--ck-fs-mult), calc(52cqi / (var(--ck-mult-len, 4) * 0.62 + 0.6)));
  color: var(--ck-mult-color); text-shadow: var(--ck-mult-glow); font-variant-numeric: tabular-nums;
}
@supports (-webkit-background-clip: text) {
  .ck-stage__digits, .ck-stage__x { background: var(--ck-mult-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.ck-stage__x { font-size: .55em; margin-right: .04em; letter-spacing: 0; }
.ck-stage.is-crashed .ck-stage__digits, .ck-stage.is-crashed .ck-stage__x { background: none; -webkit-text-fill-color: var(--ck-mult-crashed); color: var(--ck-mult-crashed); }
.ck-stage.is-cashed .ck-stage__digits, .ck-stage.is-cashed .ck-stage__x { background: none; -webkit-text-fill-color: var(--ck-mult-cashed); color: var(--ck-mult-cashed); }
.ck-stage.is-idle .ck-stage__mult { opacity: .85; }
.ck-stage__caption { margin: 0; font-size: clamp(12px, 1.6cqi, 14px); font-weight: var(--ck-fw-medium); color: var(--ck-text-muted); font-variant-numeric: tabular-nums; }
.ck-stage__waiting { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ck-space-3); padding: var(--ck-space-4); text-align: center; }
.ck-stage__wait-label { margin: 0; font-size: clamp(13px, 2cqi, 16px); font-weight: var(--ck-fw-semibold); text-transform: uppercase; letter-spacing: var(--ck-tracking-caps); color: var(--ck-text); }
.ck-stage__wait-bar { position: relative; width: min(280px, 60%); height: 4px; border-radius: 2px; background: var(--ck-wait-track); overflow: hidden; }
.ck-stage__wait-fill { position: absolute; inset: 0; transform-origin: left center; background: var(--ck-wait-fill); border-radius: inherit; transition: transform 200ms linear; }

/* ============ toasts ============ */
.ck-toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: var(--ck-space-2); pointer-events: none; }
.ck-toasts--top { top: var(--ck-space-4); }
.ck-toasts--bottom { bottom: calc(var(--ck-space-4) + env(safe-area-inset-bottom, 0px)); }
.ck-slot--overlay .ck-toasts { position: absolute; }
.ck-toasts__lane { display: flex; flex-direction: column; gap: var(--ck-space-2); }
.ck-toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--ck-space-3);
  padding: var(--ck-space-2) var(--ck-space-2) var(--ck-space-2) var(--ck-space-4); border-radius: var(--ck-radius-card);
  background: var(--ck-surface-2); border: 1px solid var(--ck-line); box-shadow: var(--ck-shadow-pop);
  animation: ck-up var(--ck-dur) var(--ck-ease);
}
/* Status via the title colour, not a side stripe. */
.ck-toast--success .ck-toast__title { color: var(--ck-success); }
.ck-toast--warn .ck-toast__title { color: var(--ck-warn); }
.ck-toast--error .ck-toast__title { color: var(--ck-danger); }
.ck-toast__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--ck-fs-sm); color: var(--ck-text-muted); }
.ck-toast__title { font-size: var(--ck-fs-md); font-weight: var(--ck-fw-semibold); color: var(--ck-text); }
.ck-toast__action { min-height: 36px; padding: 0 var(--ck-space-3); border: 1px solid var(--ck-line); border-radius: var(--ck-radius-pill); background: var(--ck-surface-hover); font-size: var(--ck-fs-sm); font-weight: var(--ck-fw-semibold); }
.ck-toast__close { background: transparent; border-color: transparent; }

/* ============ phone sizing: 44px tap targets ============ */
@container ck-shell (max-width: 767.98px) {
  .ck-iconbtn, .ck-history__clock { width: var(--ck-hit); height: var(--ck-hit); }
  .ck-chip { height: 30px; min-height: 30px; }
  .ck-history__track { padding-top: 7px; padding-bottom: 12px; }
  .ck-history__track .ck-chip::before { content: ""; position: absolute; inset: -7px -3px; } /* 44px hit area */
  .ck-history__clock { margin-top: -6px; }
  .ck-tab { height: var(--ck-hit); }
  .ck-betrow { min-height: var(--ck-hit); }
  .ck-check { min-height: var(--ck-hit); }
  .ck-check__box { width: 22px; height: 22px; }
  .ck-xbox { height: var(--ck-hit); padding: 0 var(--ck-space-2); }
  .ck-betpanel__top { gap: 6px; padding: 0 0 0 var(--ck-space-1); grid-template-columns: minmax(0, max-content) minmax(0, max-content) minmax(72px, 96px); }
  .ck-check { gap: 6px; }
  .ck-stepper { height: var(--ck-hit); }
  .ck-stepper__btn { width: var(--ck-hit); height: var(--ck-hit); }
  .ck-qchip { height: var(--ck-hit); font-size: var(--ck-fs-sm); }
  .ck-betpanel__main { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .ck-cta { min-height: 76px; }
  .ck-iconbtn--mini { width: var(--ck-hit); height: 32px; }
  .ck-select__el { height: var(--ck-hit); }
  .ck-bottombar .ck-history__clock { margin-top: -6px; }
}
/* the phone bottom bar: "Bets <count>" + history strip */
.ck-bottombar-row { display: flex; align-items: center; gap: var(--ck-space-3); min-width: 0; }
.ck-bottombar-row > .ck-history { flex: 1; }
.ck-betscount { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: var(--ck-hit); padding: 0 var(--ck-space-1); border: 0; background: transparent; color: var(--ck-text-muted); font-size: var(--ck-fs-xs); line-height: 1.1; }
.ck-betscount strong { color: var(--ck-text); font-size: var(--ck-fs-lg); font-weight: var(--ck-fw-bold); font-variant-numeric: tabular-nums; }
/* overlays (popover, modal, toast) rendered OUTSIDE a phone shell still get phone tap sizes */
@media (max-width: 767.98px) {
  .ck-popover .ck-iconbtn, .ck-overlay .ck-iconbtn, .ck-toasts .ck-iconbtn { width: 44px; height: 44px; }
  .ck-fair__fields { grid-template-columns: minmax(0, 1fr); }
  /* rotate box: hint text gets the whole row beside the icon, the button its own full-width row
     (flex-wrap alone never wrapped: the text block could shrink to a one-word column) */
  .ck-fair__rotatebox { flex-wrap: wrap; align-items: flex-start; }
  .ck-fair__rotatebox > .ck-icon { margin-top: 2px; }
  .ck-fair__rotatebox > div { flex: 1 1 calc(100% - 18px - var(--ck-space-3)); }
  .ck-fair__rotate { flex: 1 1 100%; min-height: var(--ck-hit); }
  .ck-modal { padding: var(--ck-space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .ck-shell *, .ck-overlay *, .ck-popover, .ck-toasts * { transition: none !important; animation: none !important; }
}

/* inline popover (phone sheet, gallery) */
.ck-popover.ck-popover--inline { position: relative; left: auto; top: auto; z-index: auto; width: 100%; max-width: 360px; }
.ck-popover--inline .ck-popover__arrow { left: 32px; }
.ck-stage.is-waiting .ck-stage__art, .ck-stage.is-waiting .ck-stage__canvas { opacity: .4; transition: opacity var(--ck-dur); }

/* ---- confetti burst (ui/confetti.js) ----------------------------------------------------------
   The layer covers its positioned host; pieces fall by `top` (a % of the layer, so no container
   query is needed) while drifting and spinning. */
.ck-confetti { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; border-radius: inherit; }
.ck-confetti i { position: absolute; top: -16px; width: 8px; height: 13px; border-radius: 2px; opacity: 0;
  animation: ck-confetti-fall 2400ms cubic-bezier(.2, .6, .4, 1) forwards; will-change: top, transform; }
.ck-confetti i.is-round { width: 9px; height: 9px; border-radius: 50%; }
@keyframes ck-confetti-fall {
  0% { opacity: 1; top: -16px; transform: translateX(0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; top: 104%; transform: translateX(var(--ck-drift, 0)) rotate(var(--ck-spin, 540deg)); }
}
@media (prefers-reduced-motion: reduce) { .ck-confetti { display: none; } }
