/* ============================================================
   PINNICKLE — Whistler book (mockup-aligned sportsbook shell)
   Palette:
     --navy:   #0b1b2e  header / tab bar chrome
     --orange: #ff6a00  brand accent / primary CTAs
     --blue:   #1d6fd0  odds & numbers
     --bg:     #f2f4f7  page sheet background
     --card:   #ffffff  surfaces
     --ink:    #0f1a28  primary text
     --lose:   #d64545  --win: #1f9d57
   Type: Oswald (display) / Barlow (body) / IBM Plex Mono (digits)
   ============================================================ */

/* #region TOKENS */
:root {
  /* legacy var names kept so inline styles in app.js keep resolving */
  --board: #0b1b2e;
  --board-2: #12293f;
  --felt: #ffffff;
  --felt-lite: #f4f6f8;
  --amber: #ff6a00;
  --amber-dim: #e85e00;
  --chalk: #0f1a28;
  --chalk-dim: #5b6875;
  --slip: #ffffff;
  --slip-ink: #1b2430;
  --lose: #d64545;
  --win: #1f9d57;

  /* new semantic tokens */
  --navy: #0b1b2e;
  --orange: #ff6a00;
  --orange-hi: #ff8533;
  --blue: #1d6fd0;
  --blue-lite: #eaf2fc;
  --bg: #f2f4f7;
  --card: #ffffff;
  --ink: #0f1a28;
  --ink-dim: #5b6875;
  --line: #e6eaef;
  --sheet-radius: 1.25rem;
  --page-pad-x: 1rem;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  height: 100dvh;
}

body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--navy);
  color: var(--ink);
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.hidden { display: none !important; }
.mono { font-family: 'IBM Plex Mono', monospace; }
/* #endregion */

/* #region BRAND / LOGO */
.brand-banner {
  background: var(--navy);
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem 1.375rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0.5rem 1.5rem rgba(11, 27, 46, 0.25);
}
.brand-logo { width: 100%; max-width: 15rem; height: auto; display: block; cursor: pointer; }
.topbar-logo { height: 1.75rem; width: auto; display: block; cursor: pointer; }
/* #endregion */

/* #region LOGIN */
.login-screen {
  position: relative;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  height: 100dvh;
  display: flex; justify-content: center;
  overflow-y: auto;
  padding: 1.5rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: url("entry_bg.jpg") center center / cover no-repeat;
}
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(11, 27, 46, 0.62), rgba(11, 27, 46, 0.74));
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%; max-width: 23.75rem; text-align: center;
  margin-block: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 0.75rem 2.5rem rgba(11, 27, 46, 0.12);
}
.marquee-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.22em; color: var(--ink-dim);
  margin: 1rem 0 1.5rem;
}
.login-form { text-align: left; padding: 0 0.25rem 0.5rem; }
.terms-link {
  display: inline-block; margin-top: 1rem;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.12em; color: var(--ink-dim); text-decoration: none;
}
.terms-link:hover { color: var(--orange); text-decoration: underline; }
.board-foot {
  text-align: center;
  padding: 1.75rem 0 0.5rem;
  margin-top: 0.5rem;
}
.board-foot .board-terms { margin-top: 0; }
/* #endregion */

/* #region FORM ELEMENTS */
.field-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim);
  margin: 0.875rem 0 0.375rem;
}
input, select {
  width: 100%;
  background: var(--felt-lite);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-size: 1.05rem;
  padding: 0.75rem 0.875rem;
  appearance: none;
}
input::placeholder { color: #9aa5b1; }
input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6875' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.875rem center;
}

.btn {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; border-radius: 0.5rem;
  padding: 0.75rem 1.125rem; cursor: pointer;
  transition: transform 0.06s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-amber {
  background: linear-gradient(180deg, var(--orange-hi) 0%, var(--orange) 55%, var(--amber-dim) 100%);
  color: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(255, 106, 0, 0.35);
}
.btn-amber:hover { filter: brightness(1.04); }
.btn-amber:active { box-shadow: 0 0.125rem 0.375rem rgba(255, 106, 0, 0.28); }
.btn-ghost { background: var(--card); color: var(--ink-dim); border: 1px solid var(--line); }
.btn-big { width: 100%; padding: 0.9375rem; font-size: 1.1rem; margin-top: 1.375rem; }
.btn-small { padding: 0.4375rem 0.75rem; font-size: 0.78rem; margin-top: 0.5rem; }
.btn-danger { background: var(--lose); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: default; }

.error-msg { color: var(--lose); font-size: 0.9rem; min-height: 1.2em; margin-top: 0.625rem; }
.ok-msg { color: var(--win); }
/* #endregion */

/* #region DROPDOWN */
.dd { position: relative; width: 100%; }
.dd-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: var(--felt-lite);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  font-family: 'Barlow', sans-serif; font-size: 1.05rem;
  padding: 0.75rem 0.875rem;
  min-height: 2.9rem;
  cursor: pointer; text-align: left;
  transition: border-color 0.12s ease;
}
.dd.open .dd-trigger { border-color: var(--orange); }
.dd-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-label.placeholder { color: #9aa5b1; }
.dd-caret { display: inline-flex; color: var(--ink-dim); transition: transform 0.18s ease; }
.dd.open .dd-caret { transform: rotate(180deg); }
.dd-menu {
  display: none;
  margin-top: 0.375rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(11, 27, 46, 0.16);
  max-height: min(15rem, 45vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dd.open .dd-menu { display: block; animation: ddOpen 0.16s ease both; }
@keyframes ddOpen { from { opacity: 0; transform: translateY(-0.25rem); } to { opacity: 1; transform: translateY(0); } }
.dd-option {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; text-align: left;
  background: none; border: none; border-radius: 0; cursor: pointer;
  font-family: 'Barlow', sans-serif; font-size: 1rem; color: var(--ink);
  padding: 0.75rem 0.875rem; min-height: 2.75rem;
  border-bottom: 1px solid var(--line);
}
.dd-option:last-child { border-bottom: none; }
.dd-option.sel { background: var(--blue-lite); color: var(--blue); font-weight: 600; }
.dd-option.sel::after { content: "\2713"; font-weight: 700; }
@media (hover: hover) {
  .dd-option:hover { background: var(--blue-lite); color: var(--blue); }
}
/* #endregion */

/* #region APP CHROME */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--navy);
  padding-bottom: 0;
}

.slots-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("bg_slots.jpg") center center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.app.tab-casino .slots-bg { opacity: 1; }

.topbar {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  background: var(--navy);
  border-bottom: none;
  padding: 0.75rem var(--page-pad-x);
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

/* #region CHIP RELOAD */
.broke-banner {
  display: block;
  width: 100%;
  border: none;
  margin: 0;
  padding: 0.625rem var(--page-pad-x);
  background: linear-gradient(90deg, #7a1f1f, #c45a12 55%, #7a1f1f);
  color: #fff8e8;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 19;
  flex-shrink: 0;
}
.broke-banner:hover { filter: brightness(1.08); }
.broke-banner.hidden { display: none; }

/* #region CONNECTION STATUS */
.conn-banner {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem var(--page-pad-x);
  background: var(--navy);
  color: #fff8e8;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  position: relative;
  z-index: 19;
  flex-shrink: 0;
}
.conn-banner.hidden { display: none; }
/* #endregion */

.reload-card { text-align: center; }
.reload-status {
  min-height: 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
}
/* #endregion */
.topbar-me { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.me-name { font-size: 0.85rem; color: #b9c6d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}
.topbar-currency {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.currency-ico { width: 1rem; height: 1rem; flex-shrink: 0; }
.topbar-currency.is-chips .currency-ico { color: var(--orange); }
.topbar-currency.is-juke .currency-ico { color: #f0d060; }
.currency-amt {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}
.topbar-currency.is-chips .currency-amt { color: var(--orange); }
.topbar-currency.is-juke .currency-amt { color: #f0d060; }
.currency-amt.bump { animation: chipBump 0.5s cubic-bezier(0.2, 0.8, 0.25, 1); display: inline-block; }
.topbar-logout {
  display: inline-flex; align-items: center; gap: 0.375rem;
  flex-shrink: 0; white-space: nowrap;
  font-family: 'Oswald', sans-serif; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; color: #b9c6d6;
  border: 1px solid rgba(185, 198, 214, 0.35); border-radius: 0.5rem;
  padding: 0.375rem 0.625rem; cursor: pointer; margin-left: 0.25rem;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.topbar-logout span { white-space: nowrap; }
.topbar-logout .tab-ico { width: 1rem; height: 1rem; }
.topbar-logout:hover { color: var(--orange); border-color: var(--orange); }
.topbar-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: transparent; color: #b9c6d6;
  border: 1px solid rgba(185, 198, 214, 0.35); border-radius: 0.5rem;
  padding: 0.375rem; cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.topbar-icon-btn .tab-ico { width: 1.125rem; height: 1.125rem; }
.topbar-icon-btn:hover { color: var(--orange); border-color: var(--orange); }
.topbar-icon-btn.on { color: var(--orange); border-color: var(--orange); }

.topbar-relics {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.topbar-relic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(185, 198, 214, 0.35);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.topbar-relic-btn.relic-angel:hover { border-color: #8ec5ff; box-shadow: 0 0 0.5rem rgba(142, 197, 255, 0.35); }
.topbar-relic-btn.relic-crown:hover { border-color: #f0d060; box-shadow: 0 0 0.5rem rgba(240, 208, 96, 0.35); }
.topbar-relic-btn.relic-pop { animation: relicPop 0.55s cubic-bezier(0.2, 0.8, 0.25, 1); }

@keyframes relicPop {
  0% { transform: scale(0.5); opacity: 0.2; }
  55% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--bg);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  box-shadow: 0 -0.25rem 1.5rem rgba(0, 0, 0, 0.18);
  padding: 1.25rem var(--page-pad-x) 1rem;
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
}
.app.has-parlay-dock main {
  padding-bottom: calc(9.5rem + env(safe-area-inset-bottom));
}
.app.tab-casino main {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
/* #endregion */

/* #region TAB BAR */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -0.375rem 1.25rem rgba(0, 0, 0, 0.28);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: none; border: none;
  font-family: 'Oswald', sans-serif; font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(185, 198, 214, 0.72);
  padding: 0.625rem 0.25rem 0.75rem; cursor: pointer;
  border-top: 0.1875rem solid transparent;
}
.tab.active { color: var(--orange); border-top-color: var(--orange); }
.tab-ico { width: 1.375rem; height: 1.375rem; flex-shrink: 0; }
.tab-label { display: inline-flex; align-items: center; }
.pill {
  display: inline-block; min-width: 1.125rem;
  background: var(--orange); color: #fff;
  border-radius: 0.5625rem; font-size: 0.7rem; font-weight: 700;
  padding: 0.0625rem 0.3125rem; margin-left: 0.1875rem;
}
/* #endregion */

/* #region PARLAY DOCK */
.parlay-dock {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(11, 27, 46, 0.28);
  cursor: pointer;
}
.parlay-dock-main { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.parlay-dock-icon { font-size: 1.375rem; line-height: 1; flex-shrink: 0; }
.parlay-dock-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.parlay-dock-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 0.125rem;
}
.parlay-dock-clear {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
/* #endregion */

/* #region SECTION HEADS */
.section-head {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.625rem;
  margin: 1.5rem 0 0.875rem;
}
.section-head::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.section-subhead {
  font-family: 'Oswald', sans-serif; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  margin: 1.25rem 0 0.625rem;
}

.board-head {
  display: flex; align-items: center; gap: 0.625rem;
  margin: 0.25rem 0 1rem;
}
.board-head .sh-label {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
}
.board-head .sh-line { flex: 1; border-top: 1px solid var(--line); }
.help-btn {
  flex: none;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-dim);
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.9rem; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.help-btn:hover { color: var(--orange); border-color: var(--orange); }
.help-btn:active { transform: scale(0.92); }

.cat-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.75rem rgba(11, 27, 46, 0.06);
}
.cat-head {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.875rem 1rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: none;
  border-bottom: 1px solid var(--line);
  border-left: 0.25rem solid var(--orange);
  border-radius: 0;
  box-shadow: none;
}
.cat-group .bet-card {
  margin: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.cat-group .bet-card:last-child { border-bottom: none; }
/* #endregion */

/* #region BET CARDS */
.bet-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  margin-bottom: 0.875rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.75rem rgba(11, 27, 46, 0.06);
}
.bet-head {
  display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem;
  background: transparent;
  padding: 0.875rem 1rem;
  cursor: pointer;
  user-select: none;
}
.bet-title { flex: 1; font-weight: 600; font-size: 0.95rem; line-height: 1.35; color: var(--ink); }
.bet-kind {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.1em; padding: 0.1875rem 0.4375rem; border-radius: 0.25rem;
}
.kind-pari { background: rgba(255, 106, 0, 0.12); color: var(--orange); }
.kind-standoff { background: rgba(220, 60, 60, 0.12); color: #c43a3a; }
.st-rolling { background: rgba(220, 60, 60, 0.1); color: #c43a3a; }
.standoff-hint { color: #c45a12; font-size: 0.75rem; font-weight: 600; }
.standoff-result {
  margin-top: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(220, 60, 60, 0.08);
  border: 0.0625rem solid rgba(220, 60, 60, 0.2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.countdown.closed { color: #ff6b6b; }
.kind-house { background: rgba(29, 111, 208, 0.1); color: var(--blue); }
.bet-in-dot {
  flex-shrink: 0;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 0.1875rem rgba(255, 106, 0, 0.25);
}
.bet-caret {
  flex-shrink: 0; display: inline-flex; color: var(--ink-dim);
  transition: transform 0.2s ease;
}
.bet-card.expanded .bet-caret { transform: rotate(180deg); }

.bet-body { display: none; }
.bet-card.expanded .bet-body { display: block; animation: betBodyOpen 0.18s ease both; }
@keyframes betBodyOpen { from { opacity: 0; transform: translateY(-0.25rem); } to { opacity: 1; transform: translateY(0); } }

.bet-meta {
  padding: 0.5rem 0.875rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; color: var(--ink-dim);
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.875rem;
  border-bottom: 1px solid var(--line);
}
.countdown { color: var(--orange); }
.countdown.closed { color: var(--lose); }

.opt-row {
  display: flex; align-items: center; gap: 0.625rem;
  border-top: 1px solid var(--line);
  padding: 0.375rem 0.875rem;
}
.opt-row:first-of-type { border-top: none; }
.opt-label { flex: 1; font-size: 0.98rem; color: var(--ink); }
.opt-stat {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700; font-size: 0.9rem; line-height: 1.15;
  color: var(--blue);
  background: var(--blue-lite);
  border: 1px solid #d3e3f7;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  text-align: right; min-width: 4.25rem;
}
.opt-sub {
  display: block;
  font-size: 0.58rem; font-weight: 500; color: var(--ink-dim);
  letter-spacing: 0.05em;
}
.opt-bet-btn {
  flex-shrink: 0;
  font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--orange); color: #fff;
  border: none; border-radius: 0.3125rem;
  padding: 0.375rem 0.6875rem; cursor: pointer;
}
.opt-bet-btn:active { filter: brightness(0.95); }
.opt-parlay-btn {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; font-weight: 600;
  background: transparent; color: var(--blue);
  border: 1px dashed rgba(29, 111, 208, 0.5); border-radius: 0.3125rem;
  padding: 0.375rem 0.5rem; cursor: pointer;
}
.opt-parlay-btn.in-slip { background: var(--blue); color: #fff; border-style: solid; }
.opt-self {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  color: var(--ink-dim); font-style: italic;
  padding: 0.375rem 0.25rem;
}

.opt-winner { background: rgba(31, 157, 87, 0.1); }
.opt-winner .opt-label::after { content: " ✔ WINNER"; color: var(--win); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; }

.bet-foot {
  border-top: 1px solid var(--line);
  background: var(--felt-lite);
  padding: 0.5rem 0.875rem;
  font-size: 0.78rem; color: var(--ink-dim);
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.status-badge {
  font-family: 'Oswald', sans-serif; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.1875rem 0.5rem; border-radius: 0.25rem;
}
.st-locked { background: rgba(214, 69, 69, 0.15); color: var(--lose); }
.st-settled { background: rgba(31, 157, 87, 0.15); color: var(--win); }
.st-voided { background: rgba(91, 104, 117, 0.12); color: var(--ink-dim); }

.my-position {
  padding: 0.375rem 0.875rem 0.625rem;
  font-size: 0.78rem; color: var(--amber-dim);
  font-family: 'IBM Plex Mono', monospace;
  background: var(--felt-lite);
}
/* #endregion */

/* #region BETTING SLIPS */
.slip {
  background: var(--slip);
  color: var(--slip-ink);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 0.75rem;
  position: relative;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.08);
  overflow: hidden;
}
.slip::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 0.3125rem;
  background: repeating-linear-gradient(90deg, var(--orange) 0 0.875rem, transparent 0.875rem 1.375rem);
}
.slip-title { font-weight: 700; font-size: 0.95rem; margin-top: 0.25rem; }
.slip-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.25rem;
}
.slip-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-top: 0.25rem;
}
.slip-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem; margin-top: 0.3125rem;
  display: flex; justify-content: space-between; gap: 0.625rem;
}
.slip-line .lo { color: var(--ink-dim); }
.slip-leg {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.slip-leg + .slip-leg {
  border-top: 0.0625rem dashed var(--line);
}
.slip-market {
  font-size: 0.78rem;
  color: var(--ink-dim);
  line-height: 1.3;
}
.slip-pick-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.625rem;
  margin-top: 0.25rem;
}
.slip-pick {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slip-ink);
}
.slip-on {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-right: 0.25rem;
}
.slip-leg-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}
.slip-leg-res {
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.slip-leg-live { color: var(--orange); }
.slip-leg-won { color: var(--win); }
.slip-leg-lost { color: var(--lose); }
.slip-leg-void { color: var(--ink-dim); }
.slip-closed { opacity: 0.78; }
.slip-result {
  margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--line);
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.r-won { color: var(--win); }
.r-lost { color: var(--lose); }
.r-open { color: var(--orange); }
.r-void { color: var(--ink-dim); }
.r-cashed { color: var(--amber); }
/* #endregion */

/* #region PARLAY CASHOUT */
.slip-cashout {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.slip-cashout-hint {
  font-size: 0.72rem;
  color: var(--ink-dim);
  flex: 1;
  min-width: 8rem;
}
.slip-cashout-btn { margin-top: 0; }
.pco-summary {
  background: var(--card);
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  margin: 0.75rem 0;
}
.pco-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  margin-top: 0.25rem;
  color: var(--ink-dim);
}
.pco-line:first-child { margin-top: 0; }
.pco-offer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 0.0625rem dashed var(--line);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.pco-offer .lo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0;
}
/* #endregion */

/* #region LEADERBOARD */
.lb-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 0.5rem;
  padding: 0.625rem 0.875rem; margin-bottom: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.05);
}
.lb-rank {
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.1rem;
  color: var(--ink-dim); width: 1.75rem;
}
.lb-row:first-child .lb-rank { color: var(--orange); }
.lb-name-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}
.lb-name-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.lb-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-highs {
  display: flex; flex-wrap: wrap; gap: 0.375rem 0.75rem;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  color: var(--ink-dim);
}
.lb-high b { color: var(--ink); font-weight: 700; }
.lb-high-gem b { color: #7c3aed; }
.lb-high-bj b { color: #0f766e; }
.lb-relics {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.relic-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  line-height: 1;
  border: 0.0625rem solid var(--line);
  background: var(--card);
}
.relic-badge-btn {
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.relic-badge-btn.relic-angel:hover { border-color: #8ec5ff; }
.relic-badge-btn.relic-crown:hover { border-color: #f0d060; }
.relic-badge-btn:active { transform: scale(0.94); }
.lb-chips {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  color: var(--blue);
}
/* #endregion */

/* #region LEDGER */
.ledger-row {
  display: flex; gap: 0.625rem; align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.125rem;
  font-size: 0.82rem;
}
.ledger-time { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--ink-dim); flex-shrink: 0; width: 4.625rem; }
.ledger-desc { flex: 1; color: var(--ink); }
.ledger-desc .who { color: var(--orange); font-weight: 600; }
.ledger-delta { font-family: 'IBM Plex Mono', monospace; font-weight: 600; flex-shrink: 0; }
.d-pos { color: var(--win); }
.d-neg { color: var(--lose); }
/* #endregion */

/* #region PARLAY BUILDER */
.parlay-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  padding: 0.875rem;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.06);
}
.parlay-leg {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0; font-size: 0.9rem;
}
.parlay-leg .odds { font-family: 'IBM Plex Mono', monospace; color: var(--blue); font-weight: 600; }
.leg-remove { background: none; border: none; color: var(--lose); font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.5rem; }
.parlay-total {
  display: flex; justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  color: var(--blue); font-size: 1.05rem;
  padding-top: 0.75rem;
}
.parlay-payout { font-size: 0.85rem; color: var(--ink-dim); margin-top: 0.25rem; text-align: right; }
/* #endregion */

/* #region JUKEBOX */
.jukebox-credits {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--blue-lite);
  border: 1px solid rgba(29, 111, 208, 0.25);
  border-radius: 0.625rem;
  padding: 0.75rem 0.875rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink);
}
.jukebox-credits.is-empty {
  background: rgba(214, 69, 69, 0.08);
  border-color: rgba(214, 69, 69, 0.28);
  color: var(--lose);
}
.jukebox-credits-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
.jukebox-credits-text { line-height: 1.35; }
.jukebox-hint { margin-bottom: 0.75rem; }
.jukebox-status { margin-bottom: 0.75rem; }
.jukebox-device {
  font-size: 0.82rem;
  color: var(--ink-dim);
  background: var(--felt-lite);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
}
.jukebox-connect-card {
  background: var(--felt-lite);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  padding: 1rem;
}
.jukebox-connect-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.375rem;
}
.jukebox-now-wrap { margin-bottom: 1rem; }
.jukebox-track-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.875rem;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.06);
}
.jukebox-track-card.is-now { border-color: rgba(29, 111, 208, 0.35); background: var(--blue-lite); }
.jukebox-art {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}
.jukebox-art-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 1.5rem;
}
.jukebox-art-sm {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}
.jukebox-track-meta { min-width: 0; flex: 1; }
.jukebox-track-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jukebox-track-artist {
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jukebox-paused {
  display: inline-block;
  margin-top: 0.375rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}
.jukebox-subhead {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}
.jukebox-queue-scroll {
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.jukebox-queue { display: flex; flex-direction: column; gap: 0.5rem; }
.jukebox-queue-row,
.jukebox-result-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.jukebox-queue-row:last-child,
.jukebox-result-row:last-child { border-bottom: none; }
.jukebox-upnext-row { padding: 0.5rem 0; }
.jukebox-queued-by {
  font-size: 0.72rem;
  color: var(--orange);
  margin-top: 0.25rem;
  font-weight: 600;
}
.jukebox-autoplay {
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-top: 0.25rem;
  font-style: italic;
}
.jukebox-search-btn {
  width: 100%;
  margin-top: 0.75rem;
}
.juke-search-modal { max-height: 90vh; }
.juke-search-modal .jukebox-results {
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 0.75rem;
}
.juke-search-modal #jukebox-search { width: 100%; margin-top: 0.375rem; }

.juke-queue-confirm {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.875rem;
  padding: 0.875rem;
  background: var(--felt-lite);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.juke-queue-art {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}
.juke-queue-art-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 1.5rem;
}
.juke-queue-meta { min-width: 0; flex: 1; }
.juke-queue-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.25;
}
.juke-queue-artist {
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin-top: 0.25rem;
}
.juke-queue-album {
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-top: 0.125rem;
  font-style: italic;
}
.juke-queue-text { margin-top: 0.75rem; line-height: 1.4; }
/* #endregion */

/* #region MODALS */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(11, 27, 46, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-card {
  width: 100%; max-width: 30rem;
  max-height: 88vh; overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 0.875rem 0.875rem 0 0;
  padding: 1.25rem 1.125rem 1.75rem;
}
.modal-card-scroll { max-height: 90vh; }
.modal-title {
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.04em; color: var(--navy);
}
.modal-hint { font-size: 0.82rem; color: var(--ink-dim); margin-top: 0.375rem; line-height: 1.4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.625rem; margin-top: 1.125rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.w-option {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink); background: var(--felt-lite);
  border: 1px solid var(--line); border-radius: 0.375rem;
  padding: 0.625rem 0.75rem; margin-top: 0.75rem; font-size: 0.9rem;
}
.w-preview { font-size: 0.85rem; color: var(--blue); margin-top: 0.625rem; font-family: 'IBM Plex Mono', monospace; }

.help-block {
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--felt-lite);
  padding: 0.875rem;
  margin-top: 1rem;
}
.help-kind {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  font-size: 0.62rem; letter-spacing: 0.1em;
  padding: 0.1875rem 0.5rem; border-radius: 0.25rem; color: #fff;
}
.help-pari { background: var(--orange); }
.help-house { background: var(--blue); }
.help-name {
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--navy); margin-top: 0.5rem;
}
.help-text { font-size: 0.88rem; color: var(--ink-dim); line-height: 1.5; margin-top: 0.375rem; }
/* #endregion */

/* #region ADMIN */
.admin-block {
  background: var(--card);
  border: 1px solid var(--line); border-radius: 0.625rem;
  padding: 0.875rem; margin-bottom: 1rem;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.06);
}
.admin-block .modal-title { font-size: 1rem; }
/* bet-title is white for the dark feed header; on the light admin panel it must be ink */
.admin-block .bet-title { color: var(--ink); }
.ho-row { display: grid; grid-template-columns: 1fr 5.25rem; gap: 0.5rem; margin-top: 0.5rem; }
.settle-opts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; }
.settle-btn {
  font-family: 'Oswald', sans-serif; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: transparent; color: var(--win);
  border: 1px solid rgba(31, 157, 87, 0.5); border-radius: 0.3125rem;
  padding: 0.5rem 0.75rem; cursor: pointer;
}
.admin-inline { display: flex; gap: 0.5rem; margin-top: 0.625rem; }
.admin-inline > * { flex: 1; }

.empty-note { color: var(--ink-dim); font-size: 0.9rem; padding: 1.125rem 0.25rem; text-align: center; font-style: italic; }

.fab-newpool {
  width: 100%;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-radius: 0.875rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  box-shadow: 0 0.375rem 1rem rgba(255, 106, 0, 0.32);
}
.fab-newpool-plus {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.fab-newpool-text { flex: 1; text-align: left; }
.fab-newpool-go {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
/* #endregion */

/* #region ADMIN RIBBON */
.admin-ribbon {
  margin-left: auto; margin-right: 0.5rem;
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #2a1500; background: var(--orange);
  border: none; cursor: pointer;
  padding: 0.4375rem 0.625rem 0.4375rem 0.9375rem;
  clip-path: polygon(0.4rem 0, 100% 0, 100% 100%, 0.4rem 100%, 0 50%);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.3);
  transition: filter 0.12s ease;
}
.admin-ribbon:hover { filter: brightness(1.06); }
.admin-ribbon.open { background: #fff; color: var(--navy); }
/* #endregion */

/* #region SHOP */
/* #region SHOP INTRO */
.shop-intro {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  background: var(--felt-lite, rgba(11, 27, 46, 0.04));
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-dim);
}
.shop-intro p { margin: 0 0 0.5rem; }
.shop-intro p:last-child { margin-bottom: 0; }
.shop-intro strong { color: var(--ink); font-weight: 600; }
/* #endregion */

.shop-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 0.625rem; padding: 0.875rem; margin-bottom: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(11, 27, 46, 0.06);
}
.shop-info { flex: 1; }
.shop-name { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 1rem; color: var(--ink); }
.shop-text { font-size: 0.82rem; color: var(--ink-dim); margin-top: 0.25rem; line-height: 1.35; }
.shop-target-ph { color: var(--orange); font-weight: 600; }
.card-holdings {
  margin: 0.75rem 0 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--blue-lite);
  border: 1px solid #d3e3f7;
  border-radius: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--blue);
}
.crown-holdings {
  background: #fff8e8;
  border-color: #f0d9a8;
  color: #9a6b00;
}
.shop-category-head {
  margin: 1.25rem 0 0.625rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.shop-category-head:first-of-type { margin-top: 0.5rem; }
.redirect-chip {
  flex-shrink: 0;
  font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--orange); color: #fff;
  border: none; border-radius: 0.3125rem;
  padding: 0.375rem 0.625rem; cursor: pointer;
}
.redirect-chip:active { filter: brightness(0.95); }
.shop-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 0.375rem; flex-shrink: 0; }
.shop-price { font-family: 'IBM Plex Mono', monospace; font-weight: 700; color: var(--blue); font-size: 0.95rem; }
.shop-admin-row { border-top: 1px solid var(--line); padding: 0.625rem 0; display: flex; align-items: center; gap: 0.5rem; }
.shop-card-oos {
  opacity: 0.55;
  filter: grayscale(0.35);
}
.shop-card-oos .shop-name { color: var(--ink-dim); }
.shop-oos {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: right;
}
.shop-stock-hint {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
}
.lb-wearables {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.wear-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  line-height: 1;
  border: 0.0625rem solid var(--line);
  background: var(--card);
}
.cooldown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  line-height: 1;
  border: 0.0625rem solid #e8c96a;
  background: #fff8e8;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.cooldown-badge:hover { border-color: #d4a800; }
.cooldown-badge:active { transform: scale(0.94); }
.cooldown-timer {
  margin-top: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--orange);
  text-align: center;
}
/* #endregion */

/* #region SLOTS */
.slot-machine {
  /* cell scales with viewport height so the whole cabinet always fits without scrolling */
  --cell: clamp(3.25rem, 10vh, 5rem);
  width: min(100%, 26rem); min-width: 0;
  margin: 0 auto; text-align: center;
}
/* centre the slot machine in the space between the top bar and the tab bar,
   pinned to that height so it never grows past the viewport (no scrolling) */
main:has(.slot-machine) {
  display: flex; flex-direction: column; justify-content: center;
  height: calc(100vh - 8.5rem);
  height: calc(100dvh - 8.5rem);
  overflow: hidden;
}
.slot-head {
  display: flex; justify-content: center; align-items: center;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}
.slot-logo-img {
  width: auto; max-width: 100%; height: auto;
  max-height: clamp(3rem, 13vh, 7rem);
  margin: 0 auto; display: block;
}

.slot-cab {
  position: relative;
  background: linear-gradient(180deg, #16324e 0%, #0b1b2e 100%);
  border: 0.125rem solid var(--orange);
  border-radius: 1rem;
  padding: 0.875rem;
  box-shadow: 0 0.75rem 2rem rgba(11, 27, 46, 0.35), inset 0 0 1.5rem rgba(0, 0, 0, 0.45);
}
.slot-window {
  position: relative;
  display: flex; gap: 0.375rem;
  height: calc(var(--cell) * 3);
  background: #05101d;
  border-radius: 0.625rem;
  padding: 0 0.375rem;
  overflow: hidden;
  box-shadow: inset 0 0.75rem 1rem rgba(0, 0, 0, 0.55), inset 0 -0.75rem 1rem rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.25s ease;
}
.slot-reel {
  flex: 1;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcfe 0%, #dfe6ef 50%, #fbfcfe 100%);
  border-radius: 0.375rem;
  box-shadow: inset 0 0 0.5rem rgba(11, 27, 46, 0.25);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@keyframes reel-tap-flash {
  0% { box-shadow: inset 0 0 0.5rem rgba(11, 27, 46, 0.25), 0 0 0 0 rgba(255, 200, 90, 0); }
  35% { box-shadow: inset 0 0 0.75rem rgba(255, 200, 90, 0.45), 0 0 0.75rem rgba(255, 180, 60, 0.35); }
  100% { box-shadow: inset 0 0 0.5rem rgba(11, 27, 46, 0.25), 0 0 0 0 rgba(255, 200, 90, 0); }
}
.slot-reel.reel-tap-flash {
  animation: reel-tap-flash 0.35s ease-out;
}
.reel-strip { display: flex; flex-direction: column; will-change: transform; }
.reel-cell {
  height: var(--cell);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.slot-sym { font-size: calc(var(--cell) * 0.55); line-height: 1; display: inline-flex; }
.slot-sym img {
  height: calc(var(--cell) * 0.75); width: auto; max-width: 92%;
  object-fit: contain; display: block; border-radius: 0.375rem;
}

/* dim the top & bottom rows so only the centre payline row reads as live */
.slot-fade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(5, 16, 29, 0.62) 0,
    rgba(5, 16, 29, 0.34) var(--cell),
    rgba(5, 16, 29, 0) var(--cell),
    rgba(5, 16, 29, 0) calc(var(--cell) * 2),
    rgba(5, 16, 29, 0.34) calc(var(--cell) * 2),
    rgba(5, 16, 29, 0.62) calc(var(--cell) * 3));
}

/* payline — the single centre row */
.slot-payline {
  z-index: 2;
  position: absolute; left: 0.375rem; right: 0.375rem;
  top: var(--cell); height: var(--cell);
  border-top: 0.1875rem solid rgba(255, 106, 0, 0.85);
  border-bottom: 0.1875rem solid rgba(255, 106, 0, 0.85);
  pointer-events: none;
  box-shadow: 0 0 0.75rem rgba(255, 106, 0, 0.35);
}
.slot-window.win { box-shadow: inset 0 0 1.5rem rgba(255, 200, 90, 0.55), 0 0 1.25rem rgba(255, 180, 60, 0.55); }
.slot-window.win .slot-payline {
  border-color: #ffd166;
  box-shadow: 0 0 1.5rem rgba(255, 209, 102, 0.9);
  animation: paylinePulse 0.6s ease-in-out 3;
}
.slot-window.curse { box-shadow: inset 0 0 1.5rem rgba(214, 69, 69, 0.55), 0 0 1.25rem rgba(214, 69, 69, 0.55); }
.slot-window.curse .slot-payline {
  border-color: var(--lose);
  box-shadow: 0 0 1.5rem rgba(214, 69, 69, 0.9);
  animation: paylinePulse 0.6s ease-in-out 3;
}
/* #region SLOT TEASE — two matching king/evil reels, dramatic third */
.slot-window.tease-jackpot {
  box-shadow: inset 0 0 1.75rem rgba(255, 200, 90, 0.45), 0 0 1.5rem rgba(255, 180, 60, 0.4);
}
.slot-window.tease-jackpot .slot-payline {
  border-color: #ffd166;
  box-shadow: 0 0 1.25rem rgba(255, 209, 102, 0.75);
  animation: paylineTease 0.85s ease-in-out infinite;
}
.slot-window.tease-curse {
  box-shadow: inset 0 0 1.75rem rgba(214, 69, 69, 0.45), 0 0 1.5rem rgba(214, 69, 69, 0.4);
}
.slot-window.tease-curse .slot-payline {
  border-color: var(--lose);
  box-shadow: 0 0 1.25rem rgba(214, 69, 69, 0.75);
  animation: paylineTease 0.85s ease-in-out infinite;
}
.slot-reel.reel-dramatic {
  position: relative;
  z-index: 3;
  box-shadow: inset 0 0 1rem rgba(255, 255, 255, 0.35), 0 0 1.25rem rgba(255, 106, 0, 0.55);
  animation: reelDramaticPulse 1.1s ease-in-out infinite;
}
.slot-window.tease-curse .slot-reel.reel-dramatic {
  box-shadow: inset 0 0 1rem rgba(255, 255, 255, 0.25), 0 0 1.25rem rgba(214, 69, 69, 0.55);
}
@keyframes paylineTease {
  0%, 100% { opacity: 0.75; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.06); }
}
@keyframes reelDramaticPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
/* #endregion */
.reel-landed { animation: reelBounce 0.28s cubic-bezier(0.2, 0.8, 0.25, 1.4); }

.slot-result {
  width: 100%; min-width: 0; overflow-wrap: anywhere;
  min-height: 1.5rem; margin: 0.5rem 0 0.25rem;
  font-family: 'Oswald', sans-serif; font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.04em; color: var(--ink-dim);
}
.slot-inline-ico { height: 1.5em; width: auto; vertical-align: -0.45em; border-radius: 0.2rem; }
.slot-result.hit-win { color: var(--win); }
.slot-result.hit-jackpot { color: #d99400; }
.slot-result.hit-curse { color: var(--lose); }

.slot-controls { display: flex; gap: 0.625rem; margin-top: 0.5rem; }
.slot-paytable-btn { flex: none; margin: 0; }
.slot-mute-btn {
  flex: none; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem;
  background: var(--card); color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.slot-mute-btn svg { width: 1.375rem; height: 1.375rem; }
.slot-mute-btn:hover { color: var(--orange); border-color: var(--orange); }
.slot-mute-btn.muted { color: var(--lose); border-color: var(--lose); }
.slot-turbo-btn {
  flex: none; margin: 0;
  min-width: 4.25rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.slot-turbo-btn.active {
  color: #12293f;
  background: linear-gradient(180deg, #ffe28a 0%, #d4a017 100%);
  border-color: #b8860b;
  box-shadow: 0 0 0.75rem rgba(255, 213, 128, 0.35);
}
.slot-spin {
  flex: 1; margin: 0;
  font-size: 1.15rem; letter-spacing: 0.14em;
  background: linear-gradient(180deg, #ff8a2b 0%, var(--orange) 60%, var(--amber-dim) 100%);
  box-shadow: 0 0.25rem 0 var(--amber-dim);
}
.slot-spin .slot-spin-cost {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.02em; opacity: 0.85; margin-left: 0.5rem;
}
.slot-spin.spinning { animation: spinPulse 0.7s ease-in-out infinite; }

/* jackpot / curse celebration overlay */
.slot-hit-card { text-align: center; position: relative; overflow: hidden; }
.slot-hit-card.is-jackpot { border: 0.125rem solid #ffd166; box-shadow: 0 0 2rem rgba(255, 209, 102, 0.5); }
.slot-hit-card.is-curse { border: 0.125rem solid var(--lose); box-shadow: 0 0 2rem rgba(214, 69, 69, 0.45); }
.slot-hit-burst {
  position: absolute; top: 6.5rem; left: 50%; width: 30rem; height: 30rem;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(255, 209, 102, 0.28) 0deg 12deg, transparent 12deg 24deg);
}
.is-jackpot .slot-hit-burst { animation: burstSpin 9s linear infinite; }
.is-curse .slot-hit-burst { background: conic-gradient(from 0deg, rgba(214, 69, 69, 0.28) 0deg 12deg, transparent 12deg 24deg); animation: burstSpin 9s linear infinite; }
.slot-hit-img {
  position: relative; z-index: 1;
  max-height: 38vh; width: auto; max-width: 72%;
  margin: 0.5rem auto 0.75rem; display: block;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
  animation: slotHitPop 0.55s cubic-bezier(0.2, 0.8, 0.25, 1.4) both;
}
.slot-hit-title {
  position: relative; z-index: 1;
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: 1.4rem; letter-spacing: 0.06em;
}
.is-jackpot .slot-hit-title { color: #d99400; }
.is-curse .slot-hit-title { color: var(--lose); }
.slot-hit-text {
  position: relative; z-index: 1;
  font-size: 0.92rem; color: var(--ink-dim); line-height: 1.5; margin-top: 0.5rem;
}
.slot-hit-text strong { color: var(--ink); }

/* #region SCREEN FX — fullscreen jackpot confetti / curse doom */
.screen-fx {
  position: fixed; inset: 0; z-index: 49;
  pointer-events: none; overflow: hidden;
}
.screen-fx-flash {
  position: absolute; inset: 0;
}
.screen-fx-flash-gold {
  background: radial-gradient(circle at 50% 38%, rgba(255, 214, 102, 0.6) 0%, transparent 58%);
  animation: fxFlashGold 0.9s ease-out both;
}
.screen-fx-flash-curse {
  background: rgba(26, 0, 0, 0.88);
  animation: fxFlashCurse 0.5s ease-out both;
}
.screen-fx-vignette-curse {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 18%, rgba(50, 0, 0, 0.78) 100%);
  animation: fxCurseVignette 2.25s ease-in-out infinite alternate;
}
.screen-fx-glitch {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(214, 69, 69, 0.1) 0,
    rgba(214, 69, 69, 0.1) 0.125rem,
    transparent 0.125rem,
    transparent 0.375rem
  );
  animation: fxGlitchScan 0.32s steps(3) infinite;
  opacity: 0.4;
  mix-blend-mode: multiply;
}
.screen-fx-curse::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(120, 0, 0, 0.28);
  animation: fxCursePulse 1.15s ease-in-out infinite alternate;
}
.screen-fx-confetti,
.screen-fx-fireworks,
.screen-fx-ash {
  position: absolute; inset: 0;
}
.confetti-piece {
  position: absolute; top: -1rem;
  border-radius: 0.125rem;
  opacity: 0;
  animation: confettiFall linear forwards;
}
.firework-burst {
  position: absolute;
  width: 0; height: 0;
}
.firework-spark {
  position: absolute;
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  left: 0; top: 0;
  opacity: 0;
  animation: fireworkSpark 1.05s ease-out forwards;
  transform: rotate(var(--angle)) translateY(0);
}
.curse-ember {
  position: absolute; top: -1.25rem;
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, #ff4444 0%, #660000 65%, transparent 100%);
  box-shadow: 0 0 0.75rem rgba(214, 69, 69, 0.75);
  opacity: 0;
  animation: curseFall linear forwards;
}
body.curse-shake { animation: curseShake 0.5s ease-in-out 5; }

@keyframes fxFlashGold {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes fxFlashCurse {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}
@keyframes fxCurseVignette {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}
@keyframes fxCursePulse {
  0% { opacity: 0.15; }
  100% { opacity: 0.5; }
}
@keyframes fxGlitchScan {
  0% { transform: translateY(0); }
  100% { transform: translateY(0.75rem); }
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg); }
  100% { opacity: 0.65; transform: translateY(110vh) translateX(var(--drift)) rotate(var(--spin)); }
}
@keyframes fireworkSpark {
  0% { opacity: 1; transform: rotate(var(--angle)) translateY(0) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--angle)) translateY(calc(-1 * var(--dist))) scale(0.15); }
}
@keyframes curseFall {
  0% { opacity: 0.85; transform: translateY(0) translateX(0) scale(1); }
  100% { opacity: 0; transform: translateY(110vh) translateX(var(--drift)) scale(0.25); }
}
@keyframes curseShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-0.4rem); }
  40% { transform: translateX(0.4rem); }
  60% { transform: translateX(-0.25rem); }
  80% { transform: translateX(0.25rem); }
}
/* #endregion */

/* paytable */
.paytable-body { margin-top: 1rem; }
.pt-row {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.375rem;
  border-bottom: 1px solid var(--line);
}
.pt-row:last-child { border-bottom: none; }
.pt-syms { display: flex; gap: 0.125rem; }
.pt-syms .slot-sym { font-size: 1.4rem; }
.pt-syms .slot-sym img { height: 1.75rem; border-radius: 0.25rem; }
.pt-name {
  text-align: left; font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.pt-pay {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700;
  font-size: 0.95rem; color: var(--blue); white-space: nowrap;
}
.pt-jackpot { background: rgba(255, 209, 102, 0.16); border-radius: 0.375rem; }
.pt-jackpot .pt-pay { color: #d99400; }
.pt-curse { background: rgba(214, 69, 69, 0.1); border-radius: 0.375rem; }
.pt-curse .pt-pay { color: var(--lose); }

@keyframes paylinePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes reelBounce { 0% { transform: translateY(0.375rem); } 100% { transform: translateY(0); } }
@keyframes spinPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
@keyframes slotHitPop { 0% { opacity: 0; transform: scale(0.4) rotate(-8deg); } 60% { transform: scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes burstSpin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
/* #endregion */

/* #region TOAST */
#toast-wrap {
  position: fixed; left: 50%; bottom: 5.5rem; z-index: 60;
  transform: translateX(-50%);
  width: calc(100% - 2rem); max-width: 22rem;
  display: flex; flex-direction: column-reverse; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--navy); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 0.25rem solid var(--orange);
  border-radius: 0.625rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.85rem; line-height: 1.4;
  box-shadow: 0 0.5rem 1.5rem rgba(11, 27, 46, 0.35);
  opacity: 0; transform: translateY(1.25rem) scale(0.96);
  transition: opacity 0.28s ease, transform 0.42s cubic-bezier(0.18, 0.9, 0.24, 1.2);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
/* #endregion */

/* #region ANIMATIONS */
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(0.9rem); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp {
  from { opacity: 0; transform: translateY(1.75rem) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dropDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes riseUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(1rem) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes iconPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes chipBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.28); color: #ffd27a; }
  100% { transform: scale(1); }
}
@keyframes winGlow {
  0% { background: rgba(31, 157, 87, 0.32); }
  100% { background: rgba(31, 157, 87, 0.1); }
}
@keyframes ribbonIn {
  from { opacity: 0; transform: translateX(1.5rem); }
  to   { opacity: 1; transform: translateX(0); }
}

/* staggered view entrance (applied by JS on tab switch / first load) */
.stagger-in { animation: staggerIn 0.42s cubic-bezier(0.2, 0.75, 0.3, 1) both; }

/* app chrome slides in when you enter the book */
.topbar { animation: dropDown 0.44s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
.tabbar { animation: riseUp 0.44s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
.admin-ribbon:not(.hidden) { animation: ribbonIn 0.5s 0.15s cubic-bezier(0.18, 0.9, 0.24, 1.2) both; }

/* login entrance */
.login-card { animation: popIn 0.5s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
.brand-logo { animation: fadeIn 0.7s 0.1s ease both; }

/* modal entrance */
.modal:not(.hidden) { animation: fadeIn 0.22s ease both; }
.modal:not(.hidden) .modal-card { animation: sheetUp 0.36s cubic-bezier(0.2, 0.8, 0.25, 1) both; }

/* tab icon pops when its tab becomes active */
.tab.active .tab-ico { animation: iconPop 0.36s cubic-bezier(0.2, 0.8, 0.25, 1); }

/* chip counter bump on change (toggled by JS) */

/* winner row flashes green as the card staggers in (not on every poll) */
.stagger-in .opt-winner { animation: winGlow 1.1s ease both; }

/* pointer-device niceties: lift on hover */
@media (hover: hover) {
  .btn { transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease; }
  .btn-amber:hover, .btn-danger:hover { transform: translateY(-0.0625rem); }
  .bet-card, .shop-card, .lb-row, .slip {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
  }
  .bet-card:hover, .shop-card:hover, .lb-row:hover, .slip:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1.25rem rgba(11, 27, 46, 0.14);
  }
  .opt-bet-btn:hover, .opt-parlay-btn:hover { transform: translateY(-0.0625rem); }
  .tab:hover .tab-ico { transform: translateY(-0.125rem); transition: transform 0.14s ease; }
}
/* #endregion */

/* #region RESPONSIVE / MOTION */
/* mid-width and below: collapse the Log Out button to just its icon so the
   top bar never wraps or squishes (admin ribbon + chips + 3 buttons fit) */
@media (max-width: 34rem) {
  :root { --page-pad-x: 0.875rem; }
  .topbar { padding: 0.75rem var(--page-pad-x); padding-top: max(0.75rem, env(safe-area-inset-top)); }
  .topbar-logout span { display: none; }
  .topbar-logout { padding: 0.375rem; margin-left: 0; }
  .topbar-logout .tab-ico { width: 1.125rem; height: 1.125rem; }
}

@media (max-width: 26rem) {
  /* seven items now (incl. the raised Games button) — trim so nothing wraps */
  .tab { padding: 0.5rem 0.125rem 0.625rem; font-size: 0.6rem; letter-spacing: 0.02em; }
  .tab-ico { width: 1.25rem; height: 1.25rem; }
  .tab-games { padding: 0.5rem 0.125rem 0.625rem; font-size: 0.55rem; letter-spacing: 0.02em; }
  .tab-games-badge { width: 2.875rem; height: 2.875rem; margin-top: -1.5rem; }
  .tab-games-ico { width: 1.5rem; height: 1.5rem; }
}

@media (min-width: 35rem) {
  .modal { align-items: center; }
  .modal-card { border-radius: 0.875rem; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* #endregion */

/* #region THE CORONATION GAMES */
:root {
  --g-purple-deep: #160b28;
  --g-purple: #241340;
  --g-purple-2: #35205a;
  --g-gold: #f0d27a;
  --g-gold-hi: #f7df8f;
  --g-gold-mid: #d8ad4a;
  --g-gold-deep: #9a7226;
  --g-cream: #f4ecd8;
  --g-blue: #2f6fd0;
  --g-blue-deep: #173f7f;
  --g-crimson: #a01e2e;
  --g-crimson-deep: #6f1120;
}

/* ---- raised center tab button ---- */
.tab-games {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: none; border: none; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--g-gold-deep);
  padding: 0.625rem 0.25rem 0.75rem;
}
.tab-games-badge {
  margin-top: -1.75rem;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, var(--orange-hi) 0%, var(--orange) 48%, var(--amber-dim) 100%);
  border: 0.1875rem solid var(--navy);
  box-shadow: 0 0.375rem 0.875rem rgba(0, 0, 0, 0.35), inset 0 0 0 0.0625rem rgba(255, 255, 255, 0.35);
  color: #fff;
  transition: transform 0.12s ease;
}
.tab-games-ico { width: 1.75rem; height: 1.75rem; }
.tab-games-label { color: rgba(185, 198, 214, 0.72); }
.tab-games { color: rgba(185, 198, 214, 0.72); }
.tab-games:active .tab-games-badge { transform: translateY(0.125rem); }
@media (hover: hover) { .tab-games:hover .tab-games-badge { transform: translateY(-0.125rem); } }

/* ---- full-screen overlay ---- */
body.games-lock { overflow: hidden; }
.games-screen {
  position: fixed; inset: 0; z-index: 40;
  color: var(--g-cream);
  background: var(--g-purple-deep);
  overflow: hidden;
}

/* ---- intro ---- */
.games-intro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 1.5rem;
  background: radial-gradient(120% 80% at 50% 0%, var(--g-purple-2) 0%, var(--g-purple) 46%, var(--g-purple-deep) 100%);
  animation: fadeIn 0.3s ease both;
}
.games-intro-frame {
  border-radius: 1rem;
  overflow: hidden;
  padding: 0.1875rem;
  background: linear-gradient(160deg, var(--g-gold-hi), var(--g-gold-deep) 62%, #5f3f14);
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.55);
}
.games-intro-poster {
  display: block;
  border-radius: 0.8125rem;
  max-height: 62vh; max-width: 84vw; width: auto; height: auto;
}
.games-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #2a1a08;
  padding: 0.875rem 1.75rem;
  border: none; border-radius: 0.75rem; cursor: pointer;
  background: linear-gradient(180deg, var(--g-gold-hi) 0%, var(--g-gold) 45%, var(--g-gold-mid) 100%);
  box-shadow: 0 0.375rem 0 var(--g-gold-deep), 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.games-cta svg { width: 1.4rem; height: 1.4rem; }
.games-cta:active { transform: translateY(0.25rem); box-shadow: 0 0.125rem 0 var(--g-gold-deep); }
.games-close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top)); right: 1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.35); border: 0.0625rem solid rgba(240, 210, 120, 0.4);
  color: var(--g-gold); font-size: 1.1rem; cursor: pointer; z-index: 2;
}

/* ---- scoreboard ---- */
.games-board {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 70% at 50% 0%, var(--g-purple-2) 0%, var(--g-purple) 50%, var(--g-purple-deep) 100%);
  animation: fadeIn 0.3s ease both;
}
.games-board-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top));
  border-bottom: 0.0625rem solid rgba(240, 210, 120, 0.25);
  flex-shrink: 0;
}
.games-board-title {
  font-family: 'Oswald', sans-serif; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--g-gold); font-size: 0.95rem;
}
.games-back, .games-replay {
  width: 2.25rem; height: 2.25rem; border-radius: 0.625rem;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); border: 0.0625rem solid rgba(240, 210, 120, 0.3);
  color: var(--g-gold); cursor: pointer; flex-shrink: 0;
}
.games-back svg, .games-replay svg { width: 1.25rem; height: 1.25rem; }
.games-board-scroll {
  flex: 1; overflow-y: auto;
  padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  max-width: 40rem; margin: 0 auto; width: 100%;
}
.games-crest {
  display: block; width: min(58vw, 12.5rem); height: auto;
  margin: 0.25rem auto 1rem;
  filter: drop-shadow(0 0.5rem 1rem rgba(0, 0, 0, 0.55));
}

/* team totals */
.games-totals {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 0.5rem; margin-bottom: 1.25rem;
}
.games-team-card {
  border-radius: 0.875rem; padding: 1rem 0.75rem; text-align: center;
  border: 0.0625rem solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}
.games-team-card.team-gattvia { background: linear-gradient(180deg, var(--g-crimson) 0%, var(--g-crimson-deep) 100%); }
.games-team-card.team-fedocratic { background: linear-gradient(180deg, var(--g-blue) 0%, var(--g-blue-deep) 100%); }
.games-team-card.is-leading {
  border-color: var(--g-gold);
  box-shadow: 0 0 0 0.125rem rgba(240, 210, 120, 0.6), 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}
.gt-crest {
  width: 3.5rem; height: 3.5rem; margin: 0 auto;
  display: grid; place-items: center;
  background: #fff8ec; border-radius: 50%;
  border: 0.125rem solid var(--g-gold);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
}
.gt-crest img { width: 2.5rem; height: 2.5rem; object-fit: contain; display: block; }
.gt-name {
  font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 0.8rem; margin-top: 0.25rem; color: #fff;
  min-height: 2rem; display: flex; align-items: center; justify-content: center;
}
.gt-score {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 2.5rem;
  color: #fff; line-height: 1; margin-top: 0.25rem;
  text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.4);
}
.gt-lead {
  font-family: 'Oswald', sans-serif; font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--g-gold); margin-top: 0.25rem; min-height: 0.9rem;
}
.gt-roster { font-size: 0.68rem; color: rgba(255, 255, 255, 0.82); margin-top: 0.5rem; line-height: 1.35; }
.games-vs {
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.25rem;
  color: var(--g-gold); text-align: center;
}

/* toolbar */
.games-toolbar { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.games-tool-btn {
  font-family: 'Oswald', sans-serif; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.75rem;
  padding: 0.5rem 1rem; border-radius: 0.625rem; cursor: pointer;
  color: #2a1a08; border: none;
  background: linear-gradient(180deg, var(--g-gold-hi), var(--g-gold-mid));
  box-shadow: 0 0.1875rem 0 var(--g-gold-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.games-tool-btn:active { transform: translateY(0.125rem); box-shadow: 0 0.0625rem 0 var(--g-gold-deep); }
.games-tool-danger { color: #fff; background: linear-gradient(180deg, #d64545, #a52222); box-shadow: 0 0.1875rem 0 #7a1414; }

/* per-game cards */
.games-list { display: flex; flex-direction: column; gap: 0.75rem; }
.game-card {
  border-radius: 0.875rem; padding: 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.0625rem solid rgba(240, 210, 120, 0.22);
}
.game-card-head { display: flex; align-items: center; gap: 0.5rem; }
.game-ico { font-size: 1.25rem; line-height: 1; }
.game-name {
  font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 0.9rem; color: var(--g-cream); flex: 1;
}
.game-scoreline {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.game-scoreline i { color: rgba(255, 255, 255, 0.4); font-style: normal; }
.gs-g { color: #ff8a97; }
.gs-f { color: #8fc0ff; }
.gs-g.win, .gs-f.win { color: var(--g-gold); }
.game-hint { font-size: 0.68rem; color: rgba(244, 236, 216, 0.6); margin: 0.375rem 0 0.625rem; }
.game-rounds { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.round-chip {
  flex: 1 1 auto; min-width: 5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.125rem;
  padding: 0.5rem 0.625rem; border-radius: 0.625rem; cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  border: 0.0625rem dashed rgba(240, 210, 120, 0.4);
  color: var(--g-cream);
}
.round-chip.filled { border-style: solid; border-color: rgba(240, 210, 120, 0.5); background: rgba(240, 210, 120, 0.1); }
.rc-label {
  font-family: 'Oswald', sans-serif; font-size: 0.6rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(244, 236, 216, 0.72);
}
.rc-add { font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600; color: var(--g-gold); }
.rc-score { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 0.85rem; }

/* themed modals */
.games-modal-card { background: linear-gradient(180deg, #2f1e52, #1e1236); border: 0.0625rem solid rgba(240, 210, 120, 0.35); }
.games-modal-card .modal-title { color: var(--g-gold); }
.games-modal-card .modal-hint { color: rgba(244, 236, 216, 0.72); }
.gr-field { margin-top: 0.875rem; }
.gr-flabel {
  font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--g-cream); margin-bottom: 0.375rem;
}
.gr-seg { display: flex; gap: 0.5rem; }
.gr-seg-btn {
  flex: 1; padding: 0.75rem 0.5rem; border-radius: 0.625rem; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--g-cream); background: rgba(255, 255, 255, 0.06);
  border: 0.125rem solid rgba(255, 255, 255, 0.12);
}
.gr-seg-btn.sel { border-color: var(--g-gold); background: rgba(240, 210, 120, 0.22); color: #fff; }
.gr-seg-btn.seg-gattvia.sel { background: linear-gradient(180deg, var(--g-crimson), var(--g-crimson-deep)); border-color: var(--g-gold); color: #fff; }
.gr-seg-btn.seg-fedocratic.sel { background: linear-gradient(180deg, var(--g-blue), var(--g-blue-deep)); border-color: var(--g-gold); color: #fff; }
.gr-player-grid { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.gr-player-btn {
  padding: 0.5rem 0.625rem; border-radius: 0.5rem; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
  color: var(--g-cream); background: rgba(255, 255, 255, 0.06); border: 0.0625rem solid rgba(255, 255, 255, 0.12);
}
.gr-player-btn.used { opacity: 0.35; cursor: default; }
.gr-player-btn.seg-gattvia.sel { background: var(--g-crimson); border-color: var(--g-gold); color: #fff; }
.gr-player-btn.seg-fedocratic.sel { background: var(--g-blue); border-color: var(--g-gold); color: #fff; }
.gr-player-nums { display: flex; flex-direction: column; gap: 0.375rem; }
.gr-pn-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.5rem; border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
}
.gr-pn-name {
  flex: 0 0 5.5rem; font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 0.8rem;
  color: var(--g-cream);
}
.gr-step-compact .gr-step-btn { width: 2.25rem; height: 2.25rem; font-size: 1.25rem; }
.gr-step-compact .gr-step-val { font-size: 1rem; padding: 0.375rem; }
.gs-body { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.625rem; }
.gs-row {
  padding: 0.75rem; border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.25); border: 0.0625rem solid rgba(240, 210, 120, 0.25);
}
.gs-row.gs-skipped { opacity: 0.45; }
.gs-title { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--g-cream); }
.gs-meta { font-size: 0.72rem; color: rgba(244, 236, 216, 0.65); margin-top: 0.25rem; }
.gs-pick { font-size: 0.85rem; color: var(--g-gold); margin: 0.375rem 0 0.5rem; }
.gs-pick b { color: #fff; }
.gr-step { display: flex; align-items: center; gap: 0.5rem; }
.gr-step-btn {
  width: 2.75rem; height: 2.75rem; border-radius: 0.625rem; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: #2a1a08; border: none;
  background: linear-gradient(180deg, var(--g-gold-hi), var(--g-gold-mid));
  display: grid; place-items: center;
}
.gr-step-val {
  flex: 1; text-align: center; font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1.25rem;
  padding: 0.625rem; border-radius: 0.625rem;
  background: rgba(0, 0, 0, 0.3); border: 0.0625rem solid rgba(240, 210, 120, 0.3); color: #fff;
}
.gr-preview { display: flex; gap: 0.5rem; margin-top: 1rem; }
.grp-team {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.875rem; border-radius: 0.625rem;
}
.grp-team span { font-family: 'Oswald', sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; }
.grp-team b { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1.25rem; color: #fff; }
.grp-team.team-gattvia { background: linear-gradient(180deg, var(--g-crimson), var(--g-crimson-deep)); }
.grp-team.team-fedocratic { background: linear-gradient(180deg, var(--g-blue), var(--g-blue-deep)); }

/* set-teams modal */
.gt-body { margin-top: 0.5rem; }
.gt-row {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0;
  border-top: 0.0625rem solid rgba(240, 210, 120, 0.15);
}
.gt-row:first-child { border-top: none; }
.gt-uname { flex: 1; font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 0.9rem; color: var(--g-cream); }
.gt-seg { display: flex; gap: 0.25rem; }
.gt-seg-btn {
  padding: 0.5rem 0.625rem; border-radius: 0.5rem; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.7rem; text-transform: uppercase;
  color: var(--g-cream); background: rgba(255, 255, 255, 0.06); border: 0.0625rem solid rgba(255, 255, 255, 0.12);
}
.gt-seg-btn.seg-gattvia.sel { background: var(--g-crimson); border-color: var(--g-gold); color: #fff; }
.gt-seg-btn.seg-fedocratic.sel { background: var(--g-blue); border-color: var(--g-gold); color: #fff; }
.gt-seg-btn.seg-none.sel { background: rgba(255, 255, 255, 0.22); border-color: #fff; }

/* per-person team pill (standings leaderboard, name lists) */
.team-badge {
  display: inline-flex; align-items: center; gap: 0.1875rem;
  flex-shrink: 0;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.6rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.0625rem 0.375rem; margin-left: 0.375rem;
  border-radius: 0.625rem; color: #fff; line-height: 1.5;
}
.team-badge.tb-gattvia { background: var(--g-crimson); }
.team-badge.tb-fedocratic { background: var(--g-blue); }
.tb-icon {
  width: 0.875rem; height: 0.875rem; object-fit: contain;
  background: #fff8ec; border-radius: 50%; padding: 0.0625rem;
  flex-shrink: 0;
}
.tb-c {
  display: inline-grid; place-items: center;
  width: 0.875rem; height: 0.875rem; border-radius: 50%;
  background: var(--g-gold); color: #2a1a08;
  font-size: 0.5rem; font-weight: 700; margin-left: 0.0625rem;
}

/* captain / doubler markers on the scoreboard rosters */
.gt-cap { color: #fff; font-weight: 700; }
.gt-cap-tag {
  display: inline-grid; place-items: center;
  width: 0.875rem; height: 0.875rem; border-radius: 50%;
  background: var(--g-gold); color: #2a1a08; font-size: 0.5rem; font-weight: 700;
}
.gt-dbl { color: var(--g-gold); font-weight: 700; font-size: 0.6rem; margin-left: 0.1875rem; }

/* #region GAMES — EXTRA MAN (DOUBLER) */
/* per-event extra-man line on each game card */
.game-doubler {
  display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap;
  font-size: 0.7rem; color: var(--g-cream);
  margin: -0.25rem 0 0.625rem;
}
.game-doubler b { color: #fff; }
.game-doubler .gd-flag {
  font-family: 'Oswald', sans-serif; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: #fff;
  background: var(--g-blue); border-radius: 0.375rem; padding: 0.0625rem 0.3125rem;
}

/* extra-man modal */
.gd-body { display: flex; flex-direction: column; gap: 0.5rem; }
.gd-empty { font-size: 0.85rem; color: rgba(244, 236, 216, 0.7); padding: 0.5rem 0; }
.gd-summary {
  display: flex; flex-wrap: wrap; gap: 0.375rem 0.625rem; align-items: center;
  padding: 0.5rem 0.625rem; border-radius: 0.625rem;
  background: rgba(0, 0, 0, 0.25); border: 0.0625rem solid rgba(240, 210, 120, 0.25);
}
.gd-sum-lbl {
  font-family: 'Oswald', sans-serif; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 236, 216, 0.6);
  width: 100%;
}
.gd-count { font-size: 0.72rem; color: var(--g-cream); }
.gd-count b { color: var(--g-gold); }
.gd-row {
  display: flex; flex-direction: column; gap: 0.375rem;
  padding-top: 0.5rem; border-top: 0.0625rem solid rgba(240, 210, 120, 0.18);
}
.gd-event {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.02em; color: var(--g-cream);
}
.gd-seg { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.gd-chip {
  padding: 0.3125rem 0.5625rem; border-radius: 0.5rem; cursor: pointer;
  font-size: 0.72rem; color: var(--g-cream);
  background: rgba(0, 0, 0, 0.25);
  border: 0.0625rem solid rgba(143, 192, 255, 0.4);
}
.gd-chip.sel { background: var(--g-blue); border-color: var(--g-gold); color: #fff; font-weight: 700; }
.gd-chip.locked { opacity: 0.35; cursor: not-allowed; border-style: dashed; }
/* #endregion */

/* admin — Coronation betting slate */
.slate-group { margin-top: 0.5rem; }
.slate-cat {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim);
  margin: 0.75rem 0 0.25rem;
}
.slate-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4375rem 0; border-top: 0.0625rem solid var(--line);
}
.slate-title { flex: 1; font-size: 0.85rem; color: var(--ink); line-height: 1.35; }
.slate-go { margin-top: 0 !important; white-space: nowrap; flex-shrink: 0; }
.slate-rm { margin-top: 0 !important; flex-shrink: 0; padding-left: 0.5rem; padding-right: 0.5rem; }
.slate-restore { margin-top: 0.75rem !important; }
.slate-tag {
  font-family: 'Oswald', sans-serif; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.06em; color: #fff; background: var(--g-blue);
  border-radius: 0.375rem; padding: 0.0625rem 0.25rem; margin-left: 0.25rem; vertical-align: middle;
}
/* #endregion */

/* #region CASINO HUB */
.casino-hub {
  max-width: 30rem; margin: 0 auto; width: 100%;
  padding-top: 0.5rem;
}
.casino-hub-title {
  font-family: 'Oswald', sans-serif; font-size: 1.75rem; font-weight: 700;
  letter-spacing: 0.02em; color: #fff;
  text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.45);
}
.casino-hub-sub {
  font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 1.25rem;
}
.casino-hub-grid { display: flex; flex-direction: column; gap: 0.875rem; }
.casino-card {
  display: flex; align-items: center; gap: 0.875rem; text-align: left;
  width: 100%; padding: 1rem; cursor: pointer;
  background: rgba(0, 0, 0, 0.32); border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-radius: var(--sheet-radius);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(0.25rem);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.casino-card:active { transform: scale(0.99); }
.casino-card:hover { background: rgba(0, 0, 0, 0.42); box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.45); }
.casino-card-ico {
  flex-shrink: 0; width: 3.25rem; height: 3.25rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; border-radius: 0.875rem; color: #fff;
}
.casino-card-bj .casino-card-ico { background: radial-gradient(circle at 30% 25%, #1c6b45, #0c3d27); }
.casino-card-slots .casino-card-ico { background: radial-gradient(circle at 30% 25%, var(--orange-hi), var(--amber-dim)); }
.casino-card-gem .casino-card-ico { background: radial-gradient(circle at 30% 25%, #5b2d8f, #2c1150); }
.casino-card-ico-img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.casino-card-body { flex: 1; display: flex; flex-direction: column; gap: 0.1875rem; }
.casino-card-title {
  font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 700; color: #fff;
}
.casino-card-desc { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); line-height: 1.35; }
.casino-card-go { font-size: 1.5rem; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; }

/* floating "back to lobby" button on the slots view (dark background) */
.slot-back {
  position: absolute; top: 0.75rem; left: var(--page-pad-x); z-index: 5;
  display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer;
  background: rgba(0, 0, 0, 0.4); border: 0.0625rem solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Barlow', sans-serif; font-size: 0.85rem; font-weight: 600;
  padding: 0.375rem 0.75rem; border-radius: 999px;
  backdrop-filter: blur(0.25rem);
}
.slot-back:hover { color: #fff; background: rgba(0, 0, 0, 0.6); }
/* #endregion */

/* #region BLACKJACK */
/* The reference uses one continuous table image across the whole game screen.
   Keep the image on main—not the inner card area—so the header, table and
   controls all share one uninterrupted backdrop beneath the fixed tab bar. */
.app.tab-blackjack main:has(.bj-table) {
  display: flex; flex-direction: column; overflow: hidden;
  background: #071b12 url("assets/bj_images/bg_bj.jpg") center center / cover no-repeat;
}
.app.tab-blackjack .slots-bg { opacity: 0; }
.bj-table {
  position: relative;
  display: flex; flex-direction: column; flex: 1; min-height: 0;
  width: 100%; max-width: 40rem; margin: 0 auto;
  color: #eef3ef;
}
.bj-head {
  position: absolute; z-index: 4; top: 0.25rem; right: 0.25rem;
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.5rem; flex-shrink: 0;
}
.bj-head-title {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem;
  font-family: 'Oswald', sans-serif; font-size: 1.35rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: #fff; text-align: right;
}
.bj-head-suits {
  font-size: 0.75rem; letter-spacing: 0.28em; font-weight: 400;
  color: rgba(212, 175, 90, 0.85);
}

/* Stable two-row stage: the dealer fills the upper row and is bottom-aligned
   directly against the lower table row. Since these rows share one grid edge,
   her position cannot drift away from the table at different aspect ratios. */
.bj-felt {
  position: relative;
  flex: 1; min-height: 0;
  display: grid;
  grid-template-rows: minmax(7rem, 42%) minmax(0, 58%);
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
/* Dealer lives in the upper stage and meets the table at its bottom edge. */
.bj-portrait-wrap {
  position: relative; z-index: 1; min-height: 0;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: auto; overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bj-portrait {
  height: 100%; width: auto; max-width: 100%;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 0.5rem 1rem rgba(0, 0, 0, 0.45));
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.bj-portrait-wrap.video-playing .bj-portrait { opacity: 0; }
/* The lower row is the foreground table. Its curved top edge masks the rail in
   the photograph, so the dealer always appears to stand behind this table. */
.bj-felt-content {
  position: relative; z-index: 2; min-height: 0;
  container-type: size;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0.25rem; padding: 0.5rem 1rem; overflow: hidden;
  border-top: 0.0625rem solid rgba(214, 184, 104, 0.65);
  border-radius: 45% 45% 0 0 / 1.25rem 1.25rem 0 0;
  background:
    radial-gradient(100% 40% at 50% 0%, rgba(27, 119, 76, 0.9), rgba(7, 67, 42, 0.96) 65%),
    #07432b;
  box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.25);
  --bj-card-w: clamp(3rem, 22cqh, 4.75rem);
}
@keyframes bjPortraitPop {
  0% { transform: scale(0.9); opacity: 0.5; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}
.bj-portrait-pop { animation: bjPortraitPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.3); }

/* Section header — "DEALER" / "YOU" flanked by hairline gold rules. */
.bj-area { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.15rem; }
.bj-area-label { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.bj-area-label::before, .bj-area-label::after {
  content: ""; height: 0.0625rem; width: 3.5rem; max-width: 18vw;
  background: linear-gradient(90deg, rgba(212, 175, 90, 0), rgba(212, 175, 90, 0.55));
}
.bj-area-label::after { transform: scaleX(-1); }
.bj-area-label span {
  font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: #d9c48a;
}
/* Cards centred, the total pill parked to their right. */
.bj-area-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 0.5rem;
}
.bj-area-row > .bj-cards, .bj-area-row > .bj-hands { grid-column: 2; justify-self: center; }
.bj-area-row > .bj-total { grid-column: 3; justify-self: start; }
.bj-hands { display: flex; align-items: flex-start; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.bj-total {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 3.5rem; padding: 0.35rem 0.55rem; border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.34); border: 0.0625rem solid rgba(255, 255, 255, 0.12);
}
.bj-total.hidden { display: none; }
.bj-total-num { font-family: 'Oswald', sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1; color: #fff; }
.bj-total-cap { margin-top: 0.15rem; font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
/* Before any cards are dealt the labelled rows + banner collapse so the dealer fills the felt. */
.bj-area:has(.bj-cards:empty), .bj-area:has(.bj-hands:empty) { display: none; }
.bj-banner:empty { display: none; }

/* card rows — cards fan with a slight overlap */
.bj-cards, .bj-hand-cards { position: relative; display: flex; align-items: flex-start; min-height: calc(var(--bj-card-w) * 1.34); }
.bj-bust {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.bj-bust.show { opacity: 1; }
.bj-bust-tag {
  font-family: 'Oswald', sans-serif; font-weight: 800; font-size: 1.35rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
  background: rgba(177, 47, 47, 0.94); border: 0.125rem solid #ff8177;
  padding: 0.3rem 0.85rem; border-radius: 0.5rem;
  box-shadow: 0 0.375rem 0.9rem rgba(0, 0, 0, 0.55);
  transform: rotate(-8deg) scale(1.35);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}
.bj-bust.show .bj-bust-tag { transform: rotate(-8deg) scale(1); }
.bj-card {
  width: var(--bj-card-w); flex-shrink: 0; margin-left: calc(var(--bj-card-w) * -0.3);
  touch-action: none; -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
.bj-card:first-child { margin-left: 0; }
.bj-card img {
  width: 100%; height: auto; aspect-ratio: 251 / 333; display: block; border-radius: 0.4rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.4);
  pointer-events: none; -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}

.bj-hand { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; padding: 0.375rem; border-radius: 0.75rem; transition: background 0.2s ease; }
.bj-hand.active { background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 0.0625rem rgba(255, 213, 128, 0.5); }
.bj-hand-meta { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; justify-content: center; }
.bj-hand-score {
  padding: 0.0625rem 0.5rem; border-radius: 999px; background: rgba(0, 0, 0, 0.35);
  color: #fff; font-size: 0.75rem; letter-spacing: 0.02em;
}
.bj-hand-bet { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); }
.bj-hand-tag {
  font-family: 'Oswald', sans-serif; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
}
.bj-hand-tag.good { background: var(--win); color: #fff; }
.bj-hand-tag.bad { background: var(--lose); color: #fff; }
.bj-hand-tag.push { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* Result banner — a gold-bordered pill with a crown and an amber payout. */
.bj-banner {
  align-self: stretch; margin: 0.1rem auto; min-height: 2.25rem; max-width: 30rem; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.35rem 1rem; border-radius: 999px;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.03em; text-transform: uppercase; color: #fff;
  border: 0.09375rem solid transparent; background: transparent; box-shadow: none;
  opacity: 0; transform: translateY(0.375rem) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.bj-banner.show {
  opacity: 1; transform: translateY(0) scale(1);
  background: linear-gradient(180deg, rgba(16, 62, 41, 0.95), rgba(8, 38, 25, 0.95));
  border-color: rgba(212, 175, 90, 0.85);
  box-shadow: 0 0 1.5rem rgba(212, 175, 90, 0.22), inset 0 0 1rem rgba(0, 0, 0, 0.4);
}
.bj-banner-ico { display: inline-flex; flex-shrink: 0; color: #f2c65a; }
.bj-banner-ico svg { width: 1.45rem; height: 1.45rem; fill: currentColor; }
.bj-banner-amt { color: var(--orange-hi); font-weight: 700; }
.bj-banner.good .bj-banner-txt { color: #ffe6a6; }
.bj-banner.bad .bj-banner-txt { color: #fff; }
.bj-banner.push .bj-banner-txt { color: #eef3ef; }
.bj-banner.push .bj-banner-amt { color: rgba(255, 255, 255, 0.75); }

/* dock (betting / actions / result) — the bet circle is persistent so the
   wager stays in view all hand, and only the control row below it swaps. */
.bj-dock {
  margin-top: 0.5rem; padding: 0.75rem; flex-shrink: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  column-gap: 0.75rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.15);
  border-radius: 1.5rem;
  background: rgba(2, 36, 23, 0.72);
  box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.25);
}
.bj-dock-chips { display: flex; justify-content: center; }
.bj-dock-center { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.bj-dock-controls {
  min-height: 6rem; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.bj-dock-controls > * { width: 100%; }
.bj-bet-max {
  font-family: 'Oswald', sans-serif; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55);
  text-align: center;
}
.bj-bet-circle {
  position: relative; width: 6rem; height: 6rem; border-radius: 50%;
  border: 0.125rem dashed rgba(255, 255, 255, 0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bj-bet-circle.has-chips { border-color: rgba(255, 213, 128, 0.7); box-shadow: 0 0 1.25rem rgba(255, 213, 128, 0.2); }
.bj-bet-circle.locked { border-style: solid; border-color: rgba(255, 213, 128, 0.85); }
.bj-bet-stack { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); width: 3rem; height: 3rem; }
.bj-bet-stack .bj-chip { position: absolute; left: 50%; transform: translateX(-50%); }
.bj-bet-amount { position: relative; z-index: 2; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.5rem; color: #fff; text-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.6); }
.bj-bet-circle.has-chips .bj-bet-hint { opacity: 0; }
.bj-bet-hint { position: absolute; bottom: -1.375rem; font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); white-space: nowrap; transition: opacity 0.2s ease; }

.bj-tray { display: grid; grid-template-columns: repeat(2, auto); gap: 0.375rem; justify-content: center; }

/* In-hand layout: chips gone, wager + max bet on the left, buttons fill the rest. */
.bj-dock.playing { grid-template-columns: auto 1fr; }
.bj-dock.playing #bj-chips-col { display: none; }
.bj-dock.playing .bj-dock-center { justify-self: start; align-items: center; }
.bj-chip {
  width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.9rem;
  touch-action: none; user-select: none; position: relative;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.4), inset 0 0 0 0.25rem rgba(255, 255, 255, 0.18);
  transition: transform 0.12s ease;
}
.bj-tray .bj-chip:active { transform: translateY(-0.25rem) scale(1.05); }
.bj-chip::before {
  content: ""; position: absolute; inset: 0.375rem; border-radius: 50%;
  border: 0.125rem dashed rgba(255, 255, 255, 0.55);
}
.bj-chip-val { position: relative; z-index: 1; }
.bj-chip.denom-1 { background: radial-gradient(circle at 35% 30%, #ffffff, #d7dde4); color: #12293f; }
.bj-chip.denom-5 { background: radial-gradient(circle at 35% 30%, #e8564f, #b12f2f); color: #fff; }
.bj-chip.denom-25 { background: radial-gradient(circle at 35% 30%, #2bb56c, #147a45); color: #fff; }
.bj-chip.denom-100 { background: radial-gradient(circle at 35% 30%, #2a3140, #10141d); color: #ffd580; }
.bj-chip.denom-100::before { border-color: rgba(255, 213, 128, 0.65); }
.bj-chip.denom-1000 { background: radial-gradient(circle at 35% 30%, #7b5cff, #3a1fa8); color: #fff; }
.bj-chip.denom-1000::before { border-color: rgba(220, 210, 255, 0.7); }
.bj-chip.denom-10000 { background: radial-gradient(circle at 35% 30%, #ff4fa3, #a0125c); color: #fff; }
.bj-chip.denom-10000::before { border-color: rgba(255, 200, 230, 0.7); }
.bj-chip.denom-100000 { background: radial-gradient(circle at 35% 30%, #ffe28a, #d4a017); color: #3a2400; }
.bj-chip.denom-100000::before { border-color: rgba(90, 50, 0, 0.45); }
.bj-chip.denom-1000 .bj-chip-val,
.bj-chip.denom-10000 .bj-chip-val,
.bj-chip.denom-100000 .bj-chip-val { font-size: 0.78rem; letter-spacing: 0.02em; }
.bj-chip.stacked { width: 2.5rem; height: 2.5rem; font-size: 0.75rem; box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.45); }
.bj-chip.stacked.denom-1000 .bj-chip-val,
.bj-chip.stacked.denom-10000 .bj-chip-val,
.bj-chip.stacked.denom-100000 .bj-chip-val { font-size: 0.65rem; }
.bj-chip.drop { animation: bjChipDrop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.bj-chip-ghost {
  position: fixed; z-index: 200; width: 3rem; height: 3rem;
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0.9;
}

.bj-bet-actions { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.bj-bet-actions .btn { width: 100%; min-width: 0; }
.bj-allin-row { display: flex; gap: 0.375rem; width: 100%; }
.bj-allin-btn {
  flex: 1; min-width: 0;
  font-family: 'Oswald', sans-serif; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.5rem 0.375rem;
}

.bj-insurance, .bj-done { display: flex; flex-direction: column; align-items: stretch; gap: 0.625rem; width: 100%; }
.bj-ins-q { font-size: 0.8rem; color: #eef3ef; text-align: center; }
.bj-ins-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.bj-ins-actions .btn { width: 100%; min-width: 0; }
.bj-done .btn { width: 100%; }

.bj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; width: 100%; }
#bj-surrender { grid-column: 1 / -1; }
.bj-act {
  min-width: 0; padding: 0.6rem 0.5rem; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: #12293f;
  background: linear-gradient(180deg, #ffffff 0%, #e7ecf1 100%);
  border: none; border-radius: 0.75rem;
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.bj-act:active:not(:disabled) { transform: translateY(0.0625rem) scale(0.98); }
.bj-act:disabled { opacity: 0.4; cursor: default; }
#bj-hit { background: linear-gradient(180deg, var(--orange-hi) 0%, var(--amber-dim) 100%); color: #fff; }
#bj-stand { background: linear-gradient(180deg, #e8564f 0%, #b12f2f 100%); color: #fff; }

/* a card in mid-flight from the shoe (fixed to the viewport, above all clipping) */
.bj-fly {
  position: fixed; left: 0; top: 0; z-index: 300;
  pointer-events: none; transform-origin: center;
}
.bj-fly img {
  width: 100%; height: auto; aspect-ratio: 251 / 333; display: block; border-radius: 0.4rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}
@keyframes bjFlipIn {
  0% { transform: rotateY(90deg); opacity: 0.2; }
  100% { transform: rotateY(0); opacity: 1; }
}
.bj-card.bj-flip { animation: bjFlipIn 0.4s ease both; transform-origin: left center; }
@keyframes bjChipDrop {
  0% { transform: translateX(-50%) translateY(-1.75rem) scale(1.15); opacity: 0.6; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bj-card.bj-dealt,   .bj-card.bj-flip, .bj-chip.drop { animation: none; }
  .bj-bust-tag { transition: none; transform: rotate(-8deg); }
  .bj-portrait-pop { animation: none; }
}

/* Blackjack celebration replaces the dealer inside her stage. The source
   video is hidden and chroma-keyed onto this canvas. */
.bj-video-modal {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  padding: 0; cursor: pointer; pointer-events: auto;
  animation: bjVideoFade 0.2s ease;
}
@keyframes bjVideoFade { from { opacity: 0; } to { opacity: 1; } }
.bj-video-src { display: none; }
.bj-video {
  max-width: 100%; max-height: 100%; width: auto; height: 100%;
  filter: drop-shadow(0 0.5rem 1rem rgba(0, 0, 0, 0.55));
}
.bj-video-hint {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0.5rem;
  font-family: 'Barlow', sans-serif; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55); pointer-events: none;
}

/* Long-press card preview. */
.bj-card-preview-modal {
  z-index: 410; align-items: center;
  padding: 1rem;
  background: rgba(2, 14, 9, 0.82);
}
.bj-card-preview-shell {
  position: relative;
  width: 90vw;
  max-height: 90dvh;
  filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.65));
}
.bj-card-preview-shell img {
  display: block; width: 100%; height: auto; max-height: 90dvh;
  object-fit: contain; border-radius: 0.5rem;
}
.bj-card-preview-close {
  position: absolute; z-index: 2; top: 0.5rem; right: 0.5rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0.0625rem solid rgba(255, 255, 255, 0.35);
  background: rgba(7, 18, 13, 0.88); color: #fff;
  font-family: 'Barlow', sans-serif; font-size: 1.75rem; line-height: 1;
  cursor: pointer;
}
/* #endregion */

/* #region SHOT WITNESS */
.shot-banner { background: linear-gradient(180deg, #b12f2f 0%, #7f1f1f 100%); }
.shot-lock {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 1.5rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, #3a1416 0%, #1a0a0b 65%);
}
.shot-lock-card {
  width: 100%; max-width: 24rem; text-align: center; margin-block: auto;
  background: var(--card); border: 0.0625rem solid var(--line);
  border-radius: 1.25rem; padding: 1.75rem 1.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
}
.shot-lock-ico {
  width: 4rem; height: 4rem; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  border-radius: 1.25rem; background: linear-gradient(180deg, #e8564f 0%, #b12f2f 100%);
  box-shadow: 0 0.5rem 1.25rem rgba(177, 47, 47, 0.4);
}
.shot-lock-title {
  font-family: 'Oswald', sans-serif; font-size: 1.4rem; font-weight: 700;
  color: var(--ink); margin-bottom: 0.75rem; line-height: 1.15;
}
.shot-lock-lead { font-size: 0.95rem; color: var(--ink-dim); line-height: 1.45; margin-bottom: 1.25rem; }
.shot-lock-wait {
  font-family: 'Oswald', sans-serif; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: #ffb4a8;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.shot-lock-dot {
  width: 0.625rem; height: 0.625rem; border-radius: 50%; background: #ff8177;
  animation: shotPulse 1s ease-in-out infinite;
}
@keyframes shotPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.shot-witness-list { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 0.5rem; }
.shot-witness-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--felt-lite); border: 0.0625rem solid var(--line);
  border-radius: 0.875rem; padding: 0.625rem 0.875rem;
}
.shot-witness-name { font-weight: 600; color: var(--ink); }
.shot-witness-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.shot-witness-clear { font-size: 0.75rem; padding: 0.375rem 0.625rem; }
/* Admin escape hatch on the owing player's own lock screen. */
.shot-lock-admin { margin-top: 1.25rem; opacity: 0.75; }
/* #endregion */

/* #region PUSH GATE */
.push-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
  padding: 1.5rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, #12293f 0%, var(--navy) 60%);
}
.push-gate-card {
  width: 100%; max-width: 24rem; text-align: center;
  margin-block: auto;
  background: var(--card);
  border: 0.0625rem solid var(--line);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}
.push-gate-ico {
  width: 4rem; height: 4rem; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border-radius: 1.25rem;
  background: linear-gradient(180deg, var(--orange-hi) 0%, var(--amber-dim) 100%);
  box-shadow: 0 0.5rem 1.25rem rgba(255, 106, 0, 0.35);
}
.push-gate-title {
  font-family: 'Oswald', sans-serif; font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.01em; color: var(--ink); margin-bottom: 0.75rem; line-height: 1.15;
}
.push-gate-lead { font-size: 0.95rem; color: var(--ink-dim); line-height: 1.45; margin-bottom: 1.25rem; }
.push-gate-card .btn-big { width: 100%; }
.push-gate-fine { font-size: 0.75rem; color: var(--ink-dim); margin-top: 0.875rem; }

.push-gate-steps {
  text-align: left; background: var(--felt-lite);
  border: 0.0625rem solid var(--line); border-radius: 0.875rem;
  padding: 0.875rem 1rem; margin-bottom: 1.25rem;
  font-size: 0.9rem; color: var(--ink); line-height: 1.5;
}
.push-gate-ol {
  text-align: left; margin: 0 0 1rem; padding-left: 1.25rem;
  display: flex; flex-direction: column; gap: 0.625rem;
  font-size: 0.95rem; color: var(--ink); line-height: 1.45;
}
.push-gate-ol strong { color: var(--orange); }
.pg-share-ico {
  width: 1.1rem; height: 1.1rem; vertical-align: -0.2rem;
  display: inline-block; color: var(--blue);
}

.push-gate-escape { margin-top: 1.25rem; }
.push-gate-skip {
  background: none; border: none; cursor: pointer;
  font-family: 'Barlow', sans-serif; font-size: 0.8rem;
  color: var(--ink-dim); text-decoration: underline; padding: 0.25rem;
}
.push-gate-skip:hover { color: var(--ink); }
.push-gate-confirm {
  margin-top: 0.75rem; padding: 0.875rem 1rem;
  background: var(--felt-lite); border: 0.0625rem solid var(--line); border-radius: 0.875rem;
}
.push-gate-confirm p { font-size: 0.85rem; color: var(--ink); margin-bottom: 0.75rem; line-height: 1.4; }
.push-gate-confirm-actions { display: flex; gap: 0.625rem; }
.push-gate-confirm-actions .btn { flex: 1; }
/* #endregion */

/* #region GEMTASTIC */
/* Amethyst-cave backdrop across the whole game view. */
.app.tab-gem main:has(.gem-machine) {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(168, 85, 247, 0.35), transparent 60%),
    radial-gradient(ellipse 90% 50% at 50% 110%, rgba(88, 28, 135, 0.5), transparent 65%),
    linear-gradient(180deg, #1a0b2e 0%, #12081f 55%, #0a0514 100%);
  box-shadow: none; border-radius: 0;
}
.app.tab-gem .slots-bg { opacity: 0; }

.gem-machine {
  width: min(100%, 26rem); min-width: 0;
  margin: 0 auto; text-align: center;
  padding-bottom: 1rem;
}
.gem-head { padding: 0.5rem 0 0.25rem; }
.gem-logo-img {
  width: 100%; max-width: 15rem; height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 0.375rem 1rem rgba(0, 0, 0, 0.6));
}
.gem-loading { color: rgba(255, 255, 255, 0.75); }

.gem-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 1.75rem; margin: 0.25rem 0 0.5rem;
  font-family: 'Oswald', sans-serif; font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(233, 213, 255, 0.75);
}
.gem-banner.is-fs {
  color: #fde68a;
  animation: gemFsGlow 1.6s ease-in-out infinite alternate;
}
.gem-banner.is-ante { color: #ffd76a; }
.gem-banner-fs { font-weight: 700; font-size: 0.9rem; }
.gem-banner-count { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; color: #fff; }
.gem-banner-of { font-size: 0.75rem; color: rgba(253, 230, 138, 0.7); }
.gem-banner-win {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; color: #6ee7b7;
}
@keyframes gemFsGlow {
  from { text-shadow: 0 0 0.375rem rgba(253, 230, 138, 0.25); }
  to   { text-shadow: 0 0 1rem rgba(253, 230, 138, 0.7); }
}

/* Gold-trimmed cabinet holding the 5×5 grid. */
.gem-frame {
  position: relative;
  padding: 0.5rem;
  border-radius: 1rem;
  background: linear-gradient(160deg, #3b1d63 0%, #241040 55%, #170a2c 100%);
  border: 0.125rem solid rgba(250, 204, 21, 0.55);
  box-shadow:
    0 0 0 0.25rem rgba(88, 28, 135, 0.45),
    0 0.75rem 2rem rgba(0, 0, 0, 0.6),
    inset 0 0 2rem rgba(0, 0, 0, 0.5);
  overflow: visible;
}
.gem-frame.is-bonus {
  border-color: rgba(255, 230, 140, 0.95);
  box-shadow:
    0 0 0 0.25rem rgba(250, 204, 21, 0.35),
    0 0 1.75rem rgba(250, 204, 21, 0.45),
    0 0 3.5rem rgba(168, 85, 247, 0.4),
    0 0.75rem 2rem rgba(0, 0, 0, 0.6),
    inset 0 0 2rem rgba(0, 0, 0, 0.5);
  animation: gemBonusGlow 1.8s ease-in-out infinite alternate;
}
@keyframes gemBonusGlow {
  from {
    box-shadow:
      0 0 0 0.25rem rgba(250, 204, 21, 0.28),
      0 0 1.25rem rgba(250, 204, 21, 0.3),
      0 0 2.5rem rgba(168, 85, 247, 0.3),
      0 0.75rem 2rem rgba(0, 0, 0, 0.6),
      inset 0 0 2rem rgba(0, 0, 0, 0.5);
  }
  to {
    box-shadow:
      0 0 0 0.25rem rgba(255, 230, 140, 0.55),
      0 0 2.25rem rgba(255, 215, 106, 0.55),
      0 0 4rem rgba(196, 156, 255, 0.55),
      0 0.75rem 2rem rgba(0, 0, 0, 0.6),
      inset 0 0 2rem rgba(0, 0, 0, 0.5);
  }
}

/* Shimmering lights around the cabinet during free spins. */
.gem-shimmer {
  position: absolute; inset: -0.35rem;
  pointer-events: none; z-index: 5;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease;
}
.gem-frame.is-bonus .gem-shimmer {
  opacity: 1; visibility: visible;
}
.gem-shimmer-dot {
  position: absolute;
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  background: #fff8d6;
  box-shadow:
    0 0 0.375rem #ffd76a,
    0 0 0.75rem rgba(255, 215, 106, 0.85),
    0 0 1.25rem rgba(196, 156, 255, 0.6);
  transform: translate(-50%, -50%);
  animation: gemShimmerTwinkle 1.1s ease-in-out infinite;
}
@keyframes gemShimmerTwinkle {
  0%, 100% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.7); }
  40%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.35); }
  70%      { opacity: 0.55; transform: translate(-50%, -50%) scale(0.95); }
}
.gem-machine.is-bonus {
  filter: drop-shadow(0 0 1.25rem rgba(250, 204, 21, 0.2));
}
.gem-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.25rem;
  position: relative; z-index: 1; /* tiles sit above the win-line connectors */
}
.gem-col { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.gem-cell {
  position: relative; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.5rem;
  background: radial-gradient(circle at 50% 35%, rgba(168, 85, 247, 0.16), rgba(10, 5, 20, 0.85) 75%);
  border: 0.0625rem solid rgba(196, 156, 255, 0.14);
  overflow: hidden;
  transition: opacity 0.35s ease, filter 0.35s ease, box-shadow 0.25s ease;
}
.gem-cell img {
  width: 86%; height: 86%; object-fit: contain; display: block;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.55));
}

/* Spin blur while a column cycles. */
.gem-col.spinning .gem-cell:not(.locked) img {
  filter: blur(0.125rem) drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.55));
  animation: gemCellBob 0.15s linear infinite;
}
@keyframes gemCellBob {
  0% { transform: translateY(-6%); }
  50% { transform: translateY(6%); }
  100% { transform: translateY(-6%); }
}
.gem-col.settle .gem-cell { animation: gemSettle 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes gemSettle {
  0% { transform: translateY(-12%); }
  60% { transform: translateY(4%); }
  100% { transform: translateY(0); }
}

/* Two chests down — remaining reels go dramatic. */
.gem-col.dramatic .gem-cell {
  border-color: rgba(250, 204, 21, 0.8);
  box-shadow: 0 0 0.75rem rgba(250, 204, 21, 0.45), inset 0 0 0.5rem rgba(250, 204, 21, 0.2);
  animation: gemDramatic 0.5s ease-in-out infinite alternate;
}
@keyframes gemDramatic {
  from { box-shadow: 0 0 0.375rem rgba(250, 204, 21, 0.3), inset 0 0 0.375rem rgba(250, 204, 21, 0.15); }
  to   { box-shadow: 0 0 1.125rem rgba(250, 204, 21, 0.75), inset 0 0 0.625rem rgba(250, 204, 21, 0.3); }
}

/* Outcomes on the grid. */
.gem-cell.win {
  opacity: 1;
  filter: none;
  border-color: rgba(110, 231, 183, 0.9);
  box-shadow: 0 0 0.875rem rgba(110, 231, 183, 0.55), inset 0 0 0.5rem rgba(110, 231, 183, 0.25);
  animation: gemWinPulse 0.9s ease-in-out infinite alternate;
  z-index: 1;
}
@keyframes gemWinPulse {
  from { box-shadow: 0 0 0.5rem rgba(110, 231, 183, 0.4), inset 0 0 0.375rem rgba(110, 231, 183, 0.2); }
  to   { box-shadow: 0 0 1.25rem rgba(110, 231, 183, 0.8), inset 0 0 0.625rem rgba(110, 231, 183, 0.35); }
}
.gem-cell.dim {
  opacity: 0.22;
  filter: grayscale(0.35) brightness(0.7);
}
.gem-cell.bonus-cell {
  border-color: rgba(250, 204, 21, 0.9);
  box-shadow: 0 0 1rem rgba(250, 204, 21, 0.65);
  animation: gemDramatic 0.6s ease-in-out infinite alternate;
  z-index: 1;
}
/* Locked wilds ship their own gold frame — drop the cell chrome and fill the slot. */
.gem-cell.locked {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0.375rem;
  overflow: hidden;
}
.gem-cell.locked img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: none;
}
.gem-cell.locked.win {
  border: none;
  box-shadow: none;
}
.gem-cell.locked.win:not(.lock-in) { animation: none; }
.gem-cell.lock-in {
  z-index: 2;
  animation: gemLockIn 0.55s cubic-bezier(0.2, 1.45, 0.35, 1) both;
}
@keyframes gemLockIn {
  0%   { opacity: 0; transform: scale(0.45); }
  55%  { opacity: 1; transform: scale(1.14); }
  100% { opacity: 1; transform: scale(1); }
}

/* Overlays inside the frame (bonus trigger, big wins, summary). */
.gem-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 5, 20, 0.78);
  backdrop-filter: blur(0.125rem);
  border-radius: 0.875rem;
  animation: fadeIn 0.25s ease both;
  cursor: pointer;
}
.gem-overlay.closing { opacity: 0; transition: opacity 0.25s ease; }
.gem-overlay-card { text-align: center; padding: 1rem; animation: gemOvPop 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes gemOvPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.gem-ov-chest { width: 6rem; height: auto; display: block; margin: 0 auto 0.25rem; filter: drop-shadow(0 0 1.25rem rgba(250, 204, 21, 0.7)); }
.gem-ov-kicker {
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.5rem;
  letter-spacing: 0.12em; color: #fde68a;
  text-shadow: 0 0 1rem rgba(250, 204, 21, 0.6);
}
.gem-ov-amt {
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 2.75rem;
  color: #fff; text-shadow: 0 0 1.25rem rgba(168, 85, 247, 0.9);
}
.gem-ov-sub { font-size: 0.85rem; color: rgba(233, 213, 255, 0.8); letter-spacing: 0.06em; text-transform: uppercase; }
.gem-overlay.is-bigwin .gem-ov-amt { color: #6ee7b7; text-shadow: 0 0 1.25rem rgba(110, 231, 183, 0.8); }

/* Result line + bet + controls. */
.gem-result {
  min-height: 1.5rem; margin: 0.625rem 0 0.375rem;
  font-family: 'Oswald', sans-serif; font-size: 0.95rem; letter-spacing: 0.04em;
  color: rgba(233, 213, 255, 0.85);
}
.gem-result .gem-inline-ico { height: 1.25rem; width: auto; vertical-align: -0.25rem; }
.gem-result.is-win { color: #6ee7b7; font-size: 1.1rem; font-weight: 600; }
.gem-win-amt { font-family: 'IBM Plex Mono', monospace; }

.gem-bet-row {
  display: flex; align-items: center; justify-content: center; gap: 0.375rem;
  flex-wrap: wrap; margin-bottom: 0.625rem;
}
.gem-bet-label {
  font-family: 'Oswald', sans-serif; font-size: 0.7rem; letter-spacing: 0.14em;
  color: rgba(233, 213, 255, 0.6);
}
.gem-bet-chip {
  min-width: 2.75rem; padding: 0.375rem 0.5rem; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 0.0625rem solid rgba(196, 156, 255, 0.3);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.gem-bet-chip:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.gem-bet-chip.active {
  background: var(--orange); border-color: var(--orange-hi); color: #fff;
  box-shadow: 0 0 0.75rem rgba(255, 106, 0, 0.5);
  transform: scale(1.06);
}
.gem-bet-chip:disabled { opacity: 0.45; cursor: default; }
.gem-ante-btn {
  min-width: 3.5rem; padding: 0.375rem 0.75rem; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(255, 215, 106, 0.85);
  background: rgba(255, 215, 106, 0.08);
  border: 0.0625rem solid rgba(255, 215, 106, 0.4);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.gem-ante-btn:hover:not(:disabled) { background: rgba(255, 215, 106, 0.16); color: #ffe9ad; }
.gem-ante-btn.active {
  background: rgba(255, 215, 106, 0.28);
  border-color: #ffd76a; color: #fff4c8;
  box-shadow: 0 0 0.75rem rgba(255, 215, 106, 0.35);
  transform: scale(1.06);
}
.gem-ante-btn:disabled { opacity: 0.45; cursor: default; }
.gem-pay-ante-mark {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.95rem;
  color: #c9a14a; background: rgba(255, 215, 106, 0.15);
  border-radius: 0.5rem;
}

.gem-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.625rem; }
.gem-controls .btn { margin-top: 0; }
.gem-controls .slot-turbo-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 0.0625rem solid rgba(255, 255, 255, 0.3);
}
.gem-controls .slot-turbo-btn.active {
  color: #3a2400;
  background: linear-gradient(180deg, #ffe28a 0%, #d4a017 100%);
  border-color: rgba(255, 215, 106, 0.85);
}
.gem-pay-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 0.0625rem solid rgba(255, 255, 255, 0.3);
}
.gem-pay-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.gem-buy-btn {
  background: rgba(255, 215, 106, 0.1);
  color: #ffd76a;
  border: 0.0625rem solid rgba(255, 215, 106, 0.45);
  font-family: 'Oswald', sans-serif; letter-spacing: 0.06em;
}
.gem-buy-btn:hover { background: rgba(255, 215, 106, 0.2); color: #ffe9ad; }
.gem-buy-btn:disabled { opacity: 0.45; cursor: default; }
.gem-buy-btn .gem-spin-cost { color: rgba(255, 233, 173, 0.8); }

/* #region GEM BUY TIERS */
.gem-buy-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}
.gem-buy-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.125rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid rgba(201, 161, 74, 0.45);
  background: rgba(255, 215, 106, 0.1);
  color: #2a1f0a;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.gem-buy-tier:hover:not(:disabled) {
  background: rgba(255, 215, 106, 0.22);
  border-color: rgba(201, 161, 74, 0.75);
}
.gem-buy-tier:disabled,
.gem-buy-tier.is-broke {
  opacity: 0.45;
  cursor: default;
}
.gem-buy-tier-chests {
  grid-column: 1;
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9a14a;
}
.gem-buy-tier-spins {
  grid-column: 1;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.gem-buy-tier-cost {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.gem-buy-tier-x {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-dim);
  margin-top: 0.125rem;
}
/* #endregion */
.gem-spin-btn {
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; letter-spacing: 0.08em;
  padding: 0.75rem 2rem;
  box-shadow: 0 0 1.25rem rgba(255, 106, 0, 0.45);
}
.gem-spin-btn:disabled { opacity: 0.6; }
.gem-spin-cost { font-size: 0.75rem; opacity: 0.85; display: block; letter-spacing: 0.04em; }

/* Paytable modal. */
.gem-pay-card { max-height: 85vh; overflow-y: auto; }
.gem-pay-table { display: flex; flex-direction: column; }
.gem-pay-row {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0; border-top: 0.0625rem solid var(--line);
}
.gem-pay-ico { width: 2.25rem; height: 2.25rem; object-fit: contain; flex-shrink: 0; }
.gem-pay-name { font-weight: 700; font-size: 0.85rem; min-width: 5.5rem; text-align: left; }
.gem-pay-vals {
  display: flex; gap: 0.75rem; margin-left: auto;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--ink-dim);
}
.gem-pay-vals b { color: var(--ink); }
.gem-pay-note { font-size: 0.78rem; color: var(--ink-dim); text-align: left; line-height: 1.4; }

/* Winning line connectors — SVG drawn underneath the tiles, so the lines only
   peek through the gaps between winning squares. Stroke matches the win border. */
.gem-lines-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.gem-win-line {
  fill: none;
  stroke: rgba(110, 231, 183, 0.9);
  stroke-width: 0.25rem;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 0.45s ease-out;
}
/* #endregion */
