/* Everyday Blackjack, sharing the StakeHouse room: felt, gold, and the same type. */

:root {
  --felt-950: #0c1410;
  --felt-900: #12201a;
  --felt-800: #1a2f25;
  --felt-700: #1f5a3f;
  --felt-600: #256e4c;
  --gold-100: #f6ecd2;
  --gold-200: #ecd9a4;
  --gold-300: #dfc178;
  --gold-400: #d4a03c;
  --gold-500: #b8862c;
  --win: #6ee7b7;
  --loss: #fda4af;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

[x-cloak] { display: none !important; }

body.house-site {
  font-family: var(--font-body);
}

body.is-table,
body.is-home {
  background: var(--felt-950) !important;
  color: #e7e5e4 !important;
}

/* Table pages: the table root fills site-main; nothing else lives there. */
body.is-table .site-main {
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* ---------- Nav / footer ---------- */

.house-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 20, 16, 0.86);
  backdrop-filter: blur(14px);
}

.house-nav__bar {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.house-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.house-logo__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: inset 0 0 0 3px var(--felt-950), 0 0 0 1px var(--gold-400);
}

.house-nav__links {
  display: none;
  align-items: center;
  gap: 1.35rem;
}

.house-nav__links a,
.house-nav__side a.house-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: #a8a29e;
  text-decoration: none;
}

.house-nav__links a:hover,
.house-nav__side a.house-link:hover,
.house-nav__links a.is-active {
  color: #fff;
}

.house-nav__side {
  display: none;
  align-items: center;
  gap: 1.1rem;
}

.house-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 0.4rem;
  background: var(--gold-400);
  color: var(--felt-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.house-btn:hover { background: var(--gold-300); color: var(--felt-950); }

.house-btn--ghost {
  background: transparent;
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.house-btn--ghost:hover {
  border-color: rgba(212, 160, 60, 0.7);
  color: #fff;
  background: transparent;
}

.house-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.house-menu span {
  display: block;
  height: 2px;
  background: #d6d3d1;
}

.house-menu span:nth-child(1),
.house-menu span:nth-child(2) { width: 18px; }
.house-menu span:nth-child(3) { width: 12px; }

.house-drawer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.house-drawer a {
  font-family: var(--font-display);
  font-weight: 600;
  color: #d6d3d1;
  text-decoration: none;
  font-size: 1rem;
}

.house-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
}

.house-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #78716c;
  font-size: 0.9rem;
}

.house-footer a { color: #a8a29e; text-decoration: none; }
.house-footer a:hover { color: #e7e5e4; }
.house-footer nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }

body.is-table .house-footer { display: none; }
body.is-table { background: var(--felt-950); }

body.is-drills {
  background: var(--felt-950) !important;
  color: #e7e5e4 !important;
}

@media (min-width: 900px) {
  .house-nav__links, .house-nav__side { display: flex; }
  .house-menu, .house-drawer { display: none !important; }
  .house-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Marketing ---------- */

.house-hero {
  min-height: calc(100vh - 60px);
  display: grid;
  align-items: center;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(37, 110, 76, 0.45), transparent 55%),
    var(--felt-950);
}

.house-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.house-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  max-width: 14ch;
}

.house-hero p.lede {
  font-size: 1.2rem;
  color: #d6d3d1;
  max-width: 38rem;
}

.house-band { background: var(--felt-900); }
.house-band h3, .house-section h2, .house-section h4 {
  font-family: var(--font-display);
  color: #fff;
}
.house-card {
  display: block;
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 32, 26, 0.8);
  color: #e7e5e4;
  text-decoration: none;
  padding: 1.1rem;
}
.house-card:hover { border-color: rgba(212, 160, 60, 0.45); }
.house-card p, .house-card .color-contrast-medium { color: #a8a29e; }
.house-section blockquote, .house-section .color-contrast-medium, .house-section h2, .house-section h4 { color: #f5f5f4; }
.house-section { background: var(--felt-950); color: #d6d3d1; }
.house-section p { color: #a8a29e; }

.bg-casino-gradient {
  background: radial-gradient(ellipse at top, #1a2f25 0%, #0c1410 62%) !important;
}
.bg-casino-gradient .card {
  background: var(--felt-900);
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}
.bg-casino-gradient .card h1,
.bg-casino-gradient .card h2,
.bg-casino-gradient .card p,
.bg-casino-gradient .card label,
.bg-casino-gradient .card a { color: #f5f5f4; }
.bg-casino-gradient .card a { color: var(--gold-300); }
.bg-casino-gradient input,
.bg-casino-gradient .form-control {
  background: rgba(0, 0, 0, 0.35);
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}
/* ---------- Table ----------
   One stage, absolute anchors. HTMX only ever replaces the seats' contents,
   the dock, and the pot; the stage keeps its height no matter what swaps. */

.bj-table {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
}

.bj-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.25rem;
  min-height: 48px;
}

.bj-bar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bj-wallet {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
}

.bj-wallet span,
.bj-meta,
.bj-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.bj-meta.is-warning { color: #fbbf24; }
.bj-label { color: rgba(246, 236, 210, 0.72); letter-spacing: 0.16em; }

.bj-iconbtn {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #f5f5f4;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.bj-iconbtn:hover { border-color: rgba(212, 160, 60, 0.6); color: var(--gold-200); }

/* Stage */

.bj-stage {
  position: relative;
  flex: 1 1 auto;
  height: clamp(520px, 68vh, 700px);
  min-height: 520px;
  max-height: 700px;
  overflow: visible;
}

.bj-felt {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 28px;
  bottom: 24px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, #256e4c 0%, #1f5a3f 55%, #163f2d 100%);
  box-shadow:
    inset 0 0 0 10px #3b2a1a,
    inset 0 0 0 12px #6b4a2b,
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.bj-anchor {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(94%, 600px);
  display: flex;
  justify-content: center;
  z-index: 2;
}
.bj-anchor--dealer { top: 44px; }
.bj-anchor--center { top: 50%; transform: translate(-50%, -50%); }
.bj-anchor--player { bottom: 26px; }
.bj-anchor--slam {
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
}

/* Seats */

.bj-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.bj-hands {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
}

.bj-handbox {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 6px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.bj-seat--player[data-split="1"] .bj-handbox { padding: 6px 12px 8px; }
.bj-seat--player[data-split="1"] .bj-handbox[data-active="1"] {
  border-color: rgba(212, 160, 60, 0.75);
  box-shadow: 0 0 0 1px rgba(212, 160, 60, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.bj-seat--player[data-split="1"] .bj-handbox[data-active="0"]:not([data-kind]) .bj-card,
.bj-seat--player[data-split="1"] .bj-handbox[data-active="0"][data-kind=""] .bj-card { filter: brightness(0.82); }

.bj-tag {
  position: absolute;
  top: -8px;
  right: -4px;
  border-radius: 999px;
  background: var(--felt-950);
  color: var(--gold-100);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid rgba(212, 160, 60, 0.45);
}

/* The fan is sized by the cards that have landed; house.js FLIPs it over when a card arrives. */
.bj-hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 90px;
  min-width: 64px;
  transition: transform var(--bj-card-ms, 480ms) cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bj-score {
  margin: 0;
  min-height: 1.3em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.04em;
}
.bj-score.is-pulse { animation: bj-pulse-once 0.4s ease-out 1; }

.bj-result {
  margin: 0;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-100);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bj-result:not(:empty) { opacity: 1; transform: none; }
.bj-result b { font-family: var(--font-mono); font-weight: 700; }
.bj-result[data-kind="win"] { color: var(--win); }
.bj-result[data-kind="loss"] { color: var(--loss); }
.bj-result[data-kind="push"] { color: #e7e5e4; }

/* Verdict slam: lands hard on the result beat, holds a breath, then lifts off. */

.bj-slam {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.bj-slam::before {
  content: "";
  position: absolute;
  inset: -70% -10%;
  background: radial-gradient(ellipse at center, rgba(6, 18, 12, 0.78) 0%, rgba(6, 18, 12, 0.45) 40%, rgba(6, 18, 12, 0) 72%);
  opacity: 0;
  pointer-events: none;
}
.bj-slam span {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.6rem, 17vw, 7rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
  opacity: 0;
  transform: scale(2.4);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 14px 40px rgba(0, 0, 0, 0.6),
    0 0 36px currentColor;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.25);
  will-change: transform, opacity;
}
.bj-slam span.is-long { font-size: clamp(2.3rem, 10.5vw, 4.8rem); letter-spacing: 0.06em; }
.bj-slam[data-kind="win"] span { color: var(--win); }
.bj-slam[data-kind="loss"] span { color: var(--loss); }
.bj-slam[data-kind="push"] span { color: #e7e5e4; }
.bj-slam.is-live span { animation: bj-slam 1.3s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.bj-slam.is-live::before { animation: bj-slam-glow 1.3s ease both; }

@keyframes bj-slam {
  0% { opacity: 0; transform: scale(2.6) rotate(-5deg); filter: blur(8px); }
  14% { opacity: 1; transform: scale(0.94) rotate(-1deg); filter: blur(0); }
  22% { transform: scale(1.04) rotate(0deg); }
  30%, 66% { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(1.14) translateY(-14px); }
}
@keyframes bj-slam-glow {
  0% { opacity: 0; }
  14%, 66% { opacity: 1; }
  100% { opacity: 0; }
}

/* Cards: outer element deals in (transform), inner element flips (rotateY). */

.bj-card {
  position: relative;
  flex: none;
  width: 64px;
  height: 90px;
  margin-left: -22px;
  perspective: 700px;
  opacity: 0;
  transform: translate3d(70px, -90px, 0) rotate(-16deg) scale(0.84);
  transition:
    transform var(--bj-card-ms, 480ms) cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s ease;
  will-change: transform, opacity;
}
/* A card that has not been dealt yet is not in the fan at all (no telegraphed slot). */
.bj-card:not(.is-staged):not(.bj-card--ghost) { display: none; }
.bj-card:first-child { margin-left: 0; }
.bj-card.is-in { opacity: 1; transform: none; }

.bj-card__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform var(--bj-card-ms, 480ms) cubic-bezier(0.3, 0.7, 0.3, 1);
}
.bj-card.is-up .bj-card__inner { transform: rotateY(0deg); }

.bj-card__face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.bj-card__front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #14181c;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
}
.bj-card__front.is-red { color: #c81e1e; }
.bj-card__front b { font-size: 26px; }
.bj-card__front i { font-style: normal; font-size: 18px; margin-top: 2px; }

.bj-card__back {
  transform: rotateY(180deg);
  background: repeating-linear-gradient(45deg, #1f5a3f 0 3px, #12201a 3px 6px);
  box-shadow: 0 0 0 1px rgba(212, 160, 60, 0.55), 0 8px 18px rgba(0, 0, 0, 0.45);
}

/* Departing card: pinned clone on the stage, slides to the discard. */
.bj-card--ghost {
  position: absolute;
  margin: 0;
  z-index: 3;
  pointer-events: none;
  transition:
    transform var(--bj-card-ms, 480ms) cubic-bezier(0.4, 0, 0.8, 0.4),
    opacity 0.32s ease;
}
.bj-card--ghost.is-out { opacity: 0; transform: translate3d(-60px, -40px, 0) rotate(10deg) scale(0.9); }

/* Center: idle copy or the pot. */

.bj-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bj-center.is-shown { opacity: 1; }

.bj-bet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--gold-100);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 3px 10px 3px 3px;
}

.bj-chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: inset 0 0 0 2px var(--gold-500), inset 0 0 0 4px var(--gold-100);
}

.bj-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #fff;
  text-align: center;
  padding: 0 1rem;
}
.bj-empty h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0;
}
.bj-empty p { color: #d1fae5; margin: 0; max-width: 34ch; }
.bj-empty a { color: var(--gold-200); font-family: var(--font-display); font-weight: 600; }

.bj-history {
  width: min(100%, 360px);
  margin-top: 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 20, 16, 0.72);
  padding: 0.5rem 0.9rem;
  color: #d6d3d1;
  font-size: 0.9rem;
}
.bj-history td { padding: 0.2rem 0; }
.bj-history td:last-child { text-align: right; font-family: var(--font-mono); }

/* Dock: the one row of buttons under the felt. Appears on its beat. */

.bj-dock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 3.4rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.bj-dock.is-shown { opacity: 1; transform: none; pointer-events: auto; }

.bj-dock__ask {
  margin: 0;
  text-align: center;
  color: var(--gold-100);
  font-family: var(--font-display);
  font-weight: 600;
}

.bj-dock__row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.bj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  flex: 0 1 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  min-width: 3.6rem;
  background: transparent;
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.bj-btn:hover { border-color: rgba(212, 160, 60, 0.6); }
.bj-btn--primary { background: var(--gold-400); color: var(--felt-950); border-color: transparent; }
.bj-btn--primary:hover { background: var(--gold-300); }
.bj-btn--ghost { border-color: transparent; color: #d6d3d1; }
.bj-btn--compact {
  min-width: 3.2rem;
  padding-inline: 0.7rem;
  letter-spacing: 0.04em;
}
.bj-btn--icon {
  min-width: 2.75rem;
  width: 2.75rem;
  padding: 0.65rem;
  flex: 0 0 auto;
}
.bj-btn__icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.bj-btn:disabled, .bj-btn[disabled] { opacity: 0.45; cursor: default; }
.bj-btn.htmx-request { opacity: 0.6; }

@media (max-width: 380px) {
  .bj-dock__row { gap: 6px; }
  .bj-btn {
    font-size: 0.88rem;
    padding: 0.65rem 0.7rem;
    min-width: 3.1rem;
  }
  .bj-btn--icon {
    min-width: 2.5rem;
    width: 2.5rem;
    padding: 0.55rem;
  }
}

/* Sheets */

.bj-betsheet {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
  max-width: 460px;
  margin: 0 auto;
}
.bj-betline {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0;
}
.bj-betsheet__wallet { text-align: center; color: #a8a29e; margin: 0; font-size: 0.9rem; }
.bj-betsheet__quick { display: flex; justify-content: center; gap: 8px; }
.bj-betsheet__chips { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.4rem; }
.bj-betsheet__chips h3 { color: #a8a29e; font-family: var(--font-display); text-align: center; margin: 0 0 0.4rem; }
.bj-betsheet__submit { width: 100%; margin-top: 0.4rem; }
.bj-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bj-chips img { width: 56px; height: auto; cursor: pointer; transition: transform 0.15s ease, opacity 0.2s ease; }
.bj-chips img:active { transform: scale(0.92); }
.bj-chips img.is-dim { opacity: 0.3; cursor: default; }

.bj-book { display: flex; flex-direction: column; gap: 0.5rem; }
.bj-book__line { margin: 0; color: #a8a29e; font-family: var(--font-display); font-size: 1rem; }
.bj-book__says { margin: 0; font-size: 1.05rem; }
.bj-book__says strong { color: var(--gold-200); }
.bj-book__card { width: 100%; border-radius: 10px; margin-top: 0.4rem; }

.bj-info { display: flex; flex-direction: column; gap: 0.9rem; }
.bj-info__cta {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  text-align: center;
}
.bj-info__cta h3 { margin: 0 0 0.3rem; color: #fff; font-family: var(--font-display); }
.bj-info__cta p { margin: 0 0 0.8rem; color: #a8a29e; font-size: 0.92rem; }
.bj-info__cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bj-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}
.bj-info__grid > div {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.7rem 0.8rem;
}
.bj-info__grid dt { color: #a8a29e; font-size: 0.8rem; order: 2; }
.bj-info__grid dd { margin: 0; color: #fff; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; }
.bj-info__grid dd.is-warning { color: #fbbf24; }
.bj-info__note { margin: 0; color: #78716c; font-size: 0.85rem; text-align: center; }

.bj-modal__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }

@keyframes bj-pulse-once {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.bj-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.bj-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bj-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.bj-modal.is-open .bj-modal__backdrop {
  opacity: 1;
}

.bj-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: var(--felt-900);
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(28px) scale(0.98);
  opacity: 0.92;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.bj-modal.is-open .bj-modal__panel {
  transform: none;
  opacity: 1;
}

/* Alpine x-transition class hooks for change-bet (and reusable). */
.bj-modal-motion { transition: opacity 0.28s ease; }
.bj-modal-enter-from { opacity: 0; }
.bj-modal-enter-to { opacity: 1; }
.bj-modal-panel-motion {
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}
.bj-modal-panel-from {
  transform: translateY(28px) scale(0.98);
  opacity: 0;
}
.bj-modal-panel-to {
  transform: none;
  opacity: 1;
}

.bj-modal__head, .bj-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bj-modal__foot { border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.bj-modal__head h2, .bj-modal__panel h1, .bj-modal__panel h2 {
  font-family: var(--font-display);
  color: #fff;
  margin: 0;
}
.bj-modal__body { padding: 1rem 1.1rem 1.25rem; }
.bj-modal__close {
  background: none;
  border: 0;
  color: #d6d3d1;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
}

.bj-modal h3 { color: #a8a29e; font-family: var(--font-display); text-align: center; margin: 0; }
.bj-modal .btn {
  font-family: var(--font-display);
  font-weight: 700;
  background: transparent;
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
}

.bj-betline {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0.2rem 0;
}

.bj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.bj-chips img { width: 64px; height: auto; cursor: pointer; }
.bj-chips img:active { transform: scale(0.92); }
.bj-chips img.chip-animation { animation: bj-pop 0.35s ease; }

.bj-toast {
  position: fixed;
  top: 76px;
  right: 12px;
  z-index: 70;
  max-width: 320px;
  background: var(--felt-800);
  color: #f5f5f4;
  border: 1px solid rgba(212, 160, 60, 0.35);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}


/* ---------- Session recap ---------- */

body.is-recap {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(37, 110, 76, 0.5), transparent 60%),
    var(--felt-950) !important;
  color: #e7e5e4 !important;
}

.recap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

.recap-hero {
  text-align: center;
  padding: 1.5rem 0 2.25rem;
}
.recap-hero .house-kicker { margin: 0 0 0.9rem; }
.recap-hero__net {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.recap-hero h1 {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: -0.02em;
  color: #fff;
}
.recap-hero__sub {
  margin: 0 auto;
  max-width: 44rem;
  color: #a8a29e;
  font-size: 1.05rem;
}
.recap-hero__sub b { color: #fff; font-weight: 600; }
.recap-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.recap-net[data-kind="win"] { color: var(--win); }
.recap-net[data-kind="loss"] { color: var(--loss); }
.recap-net[data-kind="push"] { color: #e7e5e4; }

.recap-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.recap-card {
  grid-column: span 12;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 32, 26, 0.8);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.recap-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.recap-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.recap-card__head p, .recap-card__note { margin: 0.2rem 0 0; color: #a8a29e; font-size: 0.92rem; }

.recap-legend {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #a8a29e;
  font-family: var(--font-display);
  font-size: 0.8rem;
}
.recap-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.recap-legend__line, .recap-legend__dash { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--gold-300); }
.recap-legend__dash { border-top-style: dashed; border-color: rgba(255, 255, 255, 0.5); }

/* Chart (SVG built by recap.js); the series colour follows the session's result. */
.recap-chart {
  position: relative;
  height: clamp(240px, 36vw, 340px);
  color: var(--gold-300);
}
.recap-chart[data-kind="win"] { color: var(--win); }
.recap-chart[data-kind="loss"] { color: var(--loss); }
.recap-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.recap-chart.is-empty::after {
  content: attr(data-empty);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a8a29e;
}
.recap-chart__grid { stroke: rgba(255, 255, 255, 0.07); }
.recap-chart__base { stroke: rgba(255, 255, 255, 0.5); stroke-dasharray: 4 5; }
.recap-chart__label { fill: #a8a29e; font-family: var(--font-mono); font-size: 11px; }
.recap-chart__axis { fill: #78716c; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.recap-chart__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.recap-chart__line.is-drawn { stroke-dashoffset: 0 !important; }
.recap-chart__area { transition: opacity 0.9s ease 0.5s; }
.recap-chart__end { fill: currentColor; stroke: var(--felt-950); stroke-width: 2.5; }
.recap-chart__cursor { stroke: rgba(255, 255, 255, 0.3); transition: opacity 0.15s ease; }
.recap-chart__dot { fill: #fff; stroke: currentColor; stroke-width: 3; transition: opacity 0.15s ease; }
.recap-chart__tip {
  position: absolute;
  transform: translate(14px, -50%);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(12, 20, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 2;
}
.recap-chart__tip.is-shown { opacity: 1; }
.recap-chart__tip.is-flip { transform: translate(calc(-100% - 14px), -50%); }
.recap-chart__tip b { display: block; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #a8a29e; margin-bottom: 0.15rem; }
.recap-chart__tip small { display: block; font-size: 0.78rem; color: #a8a29e; margin-top: 0.1rem; }
.recap-chart__tip small.is-win { color: var(--win); }
.recap-chart__tip small.is-loss { color: var(--loss); }

/* Record */
.recap-record {
  margin: 0.6rem 0 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  color: #e7e5e4;
}
.recap-record__sep { color: #57534e; margin: 0 0.15em; }
.recap-bar {
  display: flex;
  height: 8px;
  margin: 0.9rem 0 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.recap-bar i { display: block; height: 100%; }
.recap-bar__win { background: var(--win); }
.recap-bar__push { background: #a8a29e; }
.recap-bar__loss { background: var(--loss); }
.recap-card--record { display: flex; flex-direction: column; }
.recap-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 0.75rem;
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.recap-dl dd small { margin-left: 0.3rem; font-family: var(--font-display); font-weight: 500; font-size: 0.78rem; color: #a8a29e; }
.recap-dl dt, .recap-stat dt {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8a29e;
}
.recap-dl dd, .recap-stat dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

/* Stat tiles */
.recap-stats {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.recap-stat {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 32, 26, 0.6);
  padding: 0.9rem 1rem;
}
.recap-stat dd { font-size: 1.35rem; }
.recap-stat dd small {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #a8a29e;
}

/* Leaderboard name */
.recap-name { display: flex; flex-direction: column; gap: 0.5rem; }
.recap-name__label { margin: 0; font-family: var(--font-display); font-weight: 700; color: #fff; }
.recap-name__label strong { color: var(--gold-200); }
.recap-name__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.recap-name__input {
  flex: 1 1 14rem;
  min-width: 0;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 20, 16, 0.7);
  color: #fff;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
}
.recap-name__input:focus { outline: 2px solid rgba(212, 160, 60, 0.6); outline-offset: 1px; border-color: transparent; }
.recap-name__hint, .recap-name__error { margin: 0; font-size: 0.88rem; color: #a8a29e; }
.recap-name__hint a { color: var(--gold-200); }
.recap-name__error { color: var(--loss); }
.recap-card--name.recap-card { background: rgba(18, 32, 26, 0.5); }

/* Hand log */
.recap-card--log { padding: 0; overflow: hidden; }
.recap-card--log summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.recap-card--log summary::-webkit-details-marker { display: none; }
.recap-card--log summary::after { content: "+"; color: #a8a29e; font-family: var(--font-mono); font-size: 1.2rem; }
.recap-card--log[open] summary::after { content: "\2212"; }
.recap-card--log summary .recap-card__note { margin-left: auto; }
.recap-log { max-height: 24rem; overflow: auto; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.recap-log table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.recap-log th, .recap-log td { padding: 0.55rem 1.25rem; text-align: left; white-space: nowrap; }
.recap-log th {
  position: sticky;
  top: 0;
  background: #142620;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8a29e;
}
.recap-log td { border-top: 1px solid rgba(255, 255, 255, 0.06); color: #d6d3d1; }
.recap-log td.is-num, .recap-log th.is-num { text-align: right; font-family: var(--font-mono); }
.recap-log tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

.recap-foot { margin-top: 2.5rem; text-align: center; color: #78716c; font-size: 0.95rem; }
.recap-foot a { color: var(--gold-200); }

@media (min-width: 768px) {
  .recap-card--chart { grid-column: span 8; }
  .recap-card--record { grid-column: span 4; }
  .recap-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recap-card--name { grid-column: span 12; }
}
@media (min-width: 1024px) {
  .recap-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- Drills (shared felt shell) ---------- */

.bj-table--drill .bj-dock.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.bj-anchor--drill {
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(100%, 320px);
  text-align: center;
}

.bj-hand--drill {
  min-height: 96px;
  min-width: 68px;
  justify-content: center;
}

.bj-hand--drill .bj-card {
  margin-left: 0;
}

.bj-drill-prompt {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-200);
  letter-spacing: 0.04em;
}

.bj-drill-chart {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.bj-drill-chart > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bj-drill-chart dt {
  margin: 0;
  color: #d6d3d1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.bj-drill-chart dd {
  margin: 0;
  color: var(--gold-200);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
}

.drills-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

.drills-hero { margin-bottom: 2rem; }
.drills-hero .house-kicker { margin: 0 0 0.75rem; }
.drills-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: #fff;
  letter-spacing: -0.02em;
}
.drills-hero__sub {
  margin: 0.75rem 0 0;
  max-width: 36ch;
  color: #a8a29e;
  font-size: 1.05rem;
  line-height: 1.45;
}

.drills-list {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.drills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
}

.drills-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
}

.drills-row p {
  margin: 0.35rem 0 0;
  color: #a8a29e;
  font-size: 0.95rem;
  max-width: 40ch;
  line-height: 1.4;
}

.drills-row .house-btn { flex-shrink: 0; }

.drills-row:hover h2 { color: var(--gold-200); }

.drills-note {
  margin: 1.75rem 0 0;
  color: #78716c;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .bj-felt { left: 70px; right: 70px; top: 36px; bottom: 36px; }
  .bj-stage {
    height: clamp(560px, 70vh, 740px);
    min-height: 560px;
    max-height: 740px;
  }
  .bj-anchor--dealer { top: 52px; }
  .bj-anchor--player { bottom: 34px; }
  .bj-card { width: 74px; height: 104px; margin-left: -26px; }
  .bj-hand--drill .bj-card { margin-left: 0; }
  .bj-hand { min-height: 104px; min-width: 74px; }
  .bj-hand--drill { min-height: 104px; min-width: 74px; }
  .bj-card__front b { font-size: 30px; }
  .bj-chips img { width: 64px; }
  .bj-modal { place-items: center; }
  .bj-modal__panel { border-radius: 16px; }
  .bj-modal:not(.is-open) .bj-modal__panel {
    transform: translateY(16px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bj-card,
  .bj-card__inner,
  .bj-card--ghost,
  .bj-hand,
  .bj-dock,
  .bj-center,
  .bj-result { transition-duration: 0.12s; }
  .bj-score.is-pulse { animation: none; }
  .bj-slam.is-live span { animation-duration: 0.9s; }
  .bj-modal,
  .bj-modal__backdrop,
  .bj-modal__panel {
    transition-duration: 0.01ms !important;
  }
}
