/* Bingo Rapidísimo — game styles. Shared tokens come from common.css; ball colors are local. */
.bn-page {
  --bn-ink: #C8381A;              /* coral-deep text on light surfaces (AA) */
  --bn-brand: #FF6B4A;            /* the Juntos promo palette: coral → orange hero, cream, navy, white pills */
  --bn-brand-2: #FF9A3C;
  --bn-hero: linear-gradient(145deg, #FF6B4A 0%, #FF9A3C 100%);
  --bn-navy: radial-gradient(circle at 30% 18%, #3A3D5C 0%, #1F2137 78%);
  --bn-ink2: #2B2D42;
  --bn-edge: rgba(43, 45, 66, .08);
  --bn-hi: inset 0 1px 0 rgba(255, 255, 255, .85);
  --bn-lift: 0 14px 26px -20px rgba(43, 45, 66, .55), 0 3px 8px -4px rgba(43, 45, 66, .16);
  --bn-pill-sh: 0 8px 18px -10px rgba(43, 45, 66, .45), 0 1px 0 rgba(255, 255, 255, .9) inset;
  --bn-gold: #F5B428;
  --bn-gold-lt: #FFD45E;
  --bn-stage: linear-gradient(155deg, #2C2672 0%, #1B1748 55%, #141235 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bn-page { --bn-ink: #FF9A7C; --bn-edge: rgba(255, 255, 255, .1); --bn-hi: inset 0 1px 0 rgba(255, 255, 255, .07); --bn-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --bn-pill-sh: 0 8px 18px -10px rgba(0, 0, 0, .7); }
}
:root[data-theme="dark"] .bn-page { --bn-ink: #FF9A7C; --bn-edge: rgba(255, 255, 255, .1); --bn-hi: inset 0 1px 0 rgba(255, 255, 255, .07); --bn-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --bn-pill-sh: 0 8px 18px -10px rgba(0, 0, 0, .7); }

.ndj-app.bn-wide { max-width: 1180px; }
body.bn-tv-on .ndj-app.bn-wide { max-width: 1640px; }

/* ------------------------------------------------------------ column colors (B I N G O) */
/* neutral default with zero specificity, so a column class always wins whatever the order */
:where(.bn-ball, .bn-mini) { --c: #B9BCD3; --c-lt: #F4F5FB; --c-dk: #7F839E; }
.bn-c0 { --c: #3F7BE8; --c-lt: #98BCFF; --c-dk: #2152B8; }
.bn-c1 { --c: #EE4B5A; --c-lt: #FF9EA6; --c-dk: #B32237; }
.bn-c2 { --c: #9A55EE; --c-lt: #CFA9FF; --c-dk: #6A2CC0; }
.bn-c3 { --c: #17A863; --c-lt: #78E3AC; --c-dk: #0B7845; }
.bn-c4 { --c: #F07F1E; --c-lt: #FFC583; --c-dk: #B9520A; }

/* ------------------------------------------------------------ glossy balls */
.bn-ball {
  --size: 104px;
  position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  background:
    radial-gradient(circle at 50% 112%, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 36% 30%, var(--c-lt) 0%, var(--c) 44%, var(--c-dk) 100%);
  box-shadow: 0 16px 26px -12px rgba(0, 0, 0, .6), inset 0 -6px 14px rgba(0, 0, 0, .22), inset 0 4px 10px rgba(255, 255, 255, .25);
}
.bn-ball::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(ellipse 34% 22% at 33% 17%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 72%),
    radial-gradient(ellipse 18% 10% at 70% 88%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%);
}
.bn-ball__face {
  position: absolute; inset: 19%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: radial-gradient(circle at 42% 34%, #FFFFFF 0%, #F6F5FC 55%, #DADAEA 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .14), 0 0 0 2px rgba(255, 255, 255, .3);
  color: #23233F;
}
.bn-ball__l { font: 700 calc(var(--size) * .14)/1 var(--font-display); color: var(--c-dk); letter-spacing: .04em; }
.bn-ball__n { font: 700 calc(var(--size) * .31)/1 var(--font-display); font-variant-numeric: tabular-nums; margin-top: 1px; letter-spacing: -.02em; }
.bn-ball.is-idle .bn-ball__n { color: #6B6E85; }
.bn-ball.is-in { animation: bn-ball-in .72s cubic-bezier(.22, .9, .3, 1.05) both; }
.bn-ball--letter .bn-ball__n { font-size: calc(var(--size) * .36); color: var(--c-dk); }

.bn-mini {
  --size: 30px;
  position: relative; flex: none; display: grid; place-items: center;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, var(--c-lt), var(--c) 46%, var(--c-dk));
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .25), 0 3px 8px rgba(0, 0, 0, .28);
}
.bn-mini__n {
  display: grid; place-items: center; width: 64%; height: 64%; border-radius: 50%;
  background: #fff; color: #23233F; font: 700 calc(var(--size) * .36)/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.bn-mini.is-empty { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); }
.bn-mini.is-new { animation: bn-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }

/* ------------------------------------------------------------ entry: how to play */
.bn-how { max-width: 460px; margin: 22px auto 0; padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.bn-how__title { font-size: 1.15rem; margin-bottom: 12px; }
.bn-how__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bn-how__step { display: flex; align-items: center; gap: 12px; }
.bn-how__step .bn-mini { --size: 40px; }
.bn-how__txt { display: flex; flex-direction: column; line-height: 1.3; }
.bn-how__txt strong { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.bn-how__txt span { color: var(--fg-2); font-size: .92rem; }
.bn-how__note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--fg-2); font-size: .86rem; }
.bn-how__note .ndj-ic { width: 22px; height: 22px; }

/* ------------------------------------------------------------ shared bits */
.bn-h2 { font-size: 1.15rem; margin-bottom: 10px; }
.bn-h3 { font-size: .98rem; margin: 0 0 8px; }
.bn-note { color: var(--fg-2); font-size: .9rem; }
.bn-note:empty { display: none; }
.bn-chip-ic { width: 20px; height: 20px; flex: none; }
.bn-amount { display: inline-flex; align-items: center; gap: 4px; font: 700 1rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.bn-amount.is-plus { color: #1E9E5A; margin-left: 4px; }
.bn-bank .ndj-player__value { display: inline-flex; align-items: center; gap: 5px; }
.bn-bank .ndj-player__value::before {
  content: ""; width: 17px; height: 17px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #FFD45E 0 36%, #C98A0B 37% 43%, #F5B428 44%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75), 0 1px 2px rgba(0, 0, 0, .2);
}
.bn-plist .ndj-player { animation: none; }

.bn-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.bn-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  min-height: 96px; padding: 12px 6px 10px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--card-2); color: var(--fg); cursor: pointer; text-align: center;
  transition: border-color .2s, background .2s, transform .12s, box-shadow .2s;
}
.bn-opt:active { transform: scale(.97); }
.bn-opt[aria-pressed="true"] { border-color: var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 16%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-brand) 22%, transparent); }
.bn-opt__name { font: 600 .98rem/1.15 var(--font-display); }
.bn-opt__desc { font-size: .74rem; color: var(--fg-2); line-height: 1.25; }
.bn-opt__big { font: 700 1.55rem/1 var(--font-display); color: var(--bn-ink); }
.bn-opt__big small { font-size: .9rem; }
.bn-opt--speed, .bn-opt--chip { min-height: 74px; justify-content: center; }
.bn-pat { width: 40px; height: 40px; flex: none; }
.bn-pat rect { fill: color-mix(in srgb, var(--fg) 14%, transparent); }
.bn-pat rect.is-on { fill: var(--bn-brand); }

.bn-switch {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 2px 4px 8px;
  border: 0; background: none; cursor: pointer; color: var(--fg); font: 800 .92rem var(--font-body);
}
.bn-switch__label { display: inline-flex; align-items: center; gap: 8px; }
.bn-switch__track { position: relative; flex: none; width: 48px; height: 29px; border-radius: 99px; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .2s; }
.bn-switch__thumb { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.bn-switch[aria-checked="true"] .bn-switch__track { background: var(--bn-brand); box-shadow: none; }
.bn-switch[aria-checked="true"] .bn-switch__thumb { transform: translateX(19px); }

/* ------------------------------------------------------------ lobby */
.bn-lobby { display: flex; flex-direction: column; gap: 16px; }
.bn-lobby__side { display: flex; flex-direction: column; gap: 16px; }
.bn-lobby__note { margin-top: -4px; }
.bn-bar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; }
.bn-bar .ndj-wait { background: color-mix(in srgb, var(--bg-2) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }

.bn-settings .bn-betswitch { width: 100%; justify-content: space-between; padding: 8px 4px 8px 0; font: 600 1.08rem var(--font-display); }
.bn-settings .bn-betswitch .bn-chip-ic { width: 26px; height: 26px; }
.bn-betbox { margin: 6px 0 14px; padding: 14px 14px 12px; border-radius: 16px; background: color-mix(in srgb, var(--bn-gold-lt) 12%, var(--card-2)); border: 1.5px dashed color-mix(in srgb, var(--bn-gold) 55%, transparent); }
.bn-betbox .bn-opts { margin-bottom: 12px; }
.bn-resetchips { margin-bottom: 2px; }
.bn-betnote { font-size: .82rem; color: var(--fg-2); margin-top: 10px; line-height: 1.4; }

.bn-rules { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bn-rules li { display: flex; align-items: center; gap: 12px; line-height: 1.35; }
.bn-rules .bn-pat { width: 34px; height: 34px; }
.bn-rules strong { font-family: var(--font-display); font-weight: 600; }
.bn-rules__big { width: 34px; flex: none; text-align: center; font: 700 1rem var(--font-display); color: var(--bn-ink); }
.bn-rules__bet .bn-chip-ic { width: 30px; height: 30px; margin: 0 2px; }
.bn-rules__note { display: block !important; }
.bn-rules__note .bn-betnote { margin-top: 0; }

.bn-mine__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bn-mine__head .bn-h2 { margin: 0; }
.bn-mine__bal { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); font-weight: 800; font-size: .9rem; }
.bn-mine__bal:empty { display: none; }
.bn-mine__bal .bn-amount { color: var(--fg); font-size: 1.15rem; }
.bn-mine__q { font-weight: 700; color: var(--fg-2); font-size: .92rem; margin-bottom: 8px; }
.bn-cnts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bn-cnt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; border-radius: 16px; border: 2px solid var(--line); background: var(--card-2);
  color: var(--fg); cursor: pointer; transition: border-color .2s, background .2s, transform .12s;
}
.bn-cnt:active:not(:disabled) { transform: scale(.96); }
.bn-cnt__n { font: 700 1.55rem/1 var(--font-display); }
.bn-cnt__cost { display: inline-flex; align-items: center; gap: 3px; font-size: .76rem; font-weight: 800; color: var(--fg-2); min-height: 1.1em; }
.is-betting .bn-cnt__cost:not(:empty)::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle, #FFD45E 0 40%, #F5B428 42%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.bn-cnt[aria-pressed="true"] { border-color: var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 16%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-brand) 22%, transparent); }
.bn-cnt:disabled { opacity: .38; cursor: not-allowed; }
.bn-mine__sum { margin: 10px 0 12px; font-size: .92rem; color: var(--fg-2); line-height: 1.4; }
.bn-mine__sum strong { color: var(--fg); }
.bn-mine__sum.is-free { padding: 10px 12px; border-radius: 12px; color: var(--fg); background: color-mix(in srgb, var(--bn-gold-lt) 22%, var(--card)); font-weight: 700; }
.bn-mine__max { display: block; font-size: .84rem; margin-top: 2px; }
.bn-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.bn-minis[data-n="1"] { grid-template-columns: minmax(0, 300px); justify-content: center; }
.bn-minis:not([data-n="1"]) .bn-card--mini { padding: 4px; border-radius: 14px; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-card__inner { padding: 4px; border-radius: 10px; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-card__h { height: 20px; font-size: .78rem; border-radius: 6px; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-card__head,
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-card__grid { gap: 3px; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-cell { font-size: .8rem; border-radius: 6px; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-cell__free { display: none; }
.bn-minis:not([data-n="1"]) .bn-card__label { font-size: .64rem; padding: 0 4px 3px; }

.bn-tvcard { display: flex; align-items: center; gap: 14px; }
.bn-tvcard .bn-h2 { margin-bottom: 2px; font-size: 1.05rem; }
.bn-tvcard__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--bn-brand), var(--bn-brand)); box-shadow: var(--shadow-sm); }
.bn-tvcard__icon .ndj-ic { width: 24px; height: 24px; }
.bn-tvcard__txt { flex: 1; min-width: 0; }
.bn-tvcard__txt .bn-note { font-size: .85rem; line-height: 1.35; }
.bn-tvcard .bn-tvbtn { flex: none; }
.bn-tvcard.is-on { border-color: color-mix(in srgb, var(--bn-brand) 50%, transparent); }

/* ------------------------------------------------------------ cards */
.bn-card {
  position: relative; border-radius: 24px; padding: 8px;
  background: linear-gradient(145deg, #34CDBF, #20B2AA 50%, #138E87);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bn-card__label { padding: 0 6px 6px; color: #fff; font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.bn-card__inner { border-radius: 18px; padding: 8px; background: var(--card); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .08); }
.bn-card__head, .bn-card__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bn-card__head { margin-bottom: 6px; }
.bn-card__h {
  display: grid; place-items: center; height: 36px; border-radius: 11px;
  font: 700 1.4rem/1 var(--font-display); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .22);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff) -30%, var(--c) 40%, var(--c-dk) 115%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bn-cell {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / .86; min-width: 0; padding: 0;
  border: 0; border-radius: 13px; background: var(--card-2); color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font: 600 clamp(1.2rem, 6.2vw, 1.75rem)/1 var(--font-display); font-variant-numeric: tabular-nums;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
button.bn-cell { cursor: pointer; }
button.bn-cell:active { transform: scale(.94); }
.bn-cell__n { position: relative; z-index: 2; }
.bn-cell__daub {
  position: absolute; z-index: 1; inset: 7%;
  border-radius: 47% 53% 49% 51% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 34% 30%, var(--c-lt) 0%, var(--c) 42%, var(--c-dk) 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .2), 0 1px 2px rgba(0, 0, 0, .15);
  opacity: 0; transform: scale(.4) rotate(var(--r, 0deg));
}
.bn-cell.is-marked .bn-cell__daub { opacity: .96; transform: scale(1) rotate(var(--r, 0deg)); }
.bn-cell.is-marked .bn-cell__n { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); transition: color .12s var(--d, 0ms); }
.bn-cell.is-stamp .bn-cell__daub { animation: bn-stamp .5s cubic-bezier(.2, 1.5, .35, 1) var(--d, 0ms) both; }
.bn-cell.is-stamp::after {
  content: ""; position: absolute; inset: 3%; z-index: 0; border-radius: 50%; border: 3px solid var(--c);
  opacity: 0; pointer-events: none; animation: bn-splash .55s ease-out var(--d, 0ms) both;
}
.bn-cell.is-callable { box-shadow: inset 0 0 0 2.5px var(--c); animation: bn-callable 1.3s ease-in-out infinite; }
.bn-cell.is-nope { animation: ndj-shake .35s ease; }
.bn-cell.is-free {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(circle at 40% 30%, #FFF6CC, #FFD45E 55%, #F2B11E); color: #6B4A00;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1);
}
.bn-star { width: 44%; height: 44%; color: #fff; filter: drop-shadow(0 1px 1px rgba(150, 90, 0, .45)); }
.bn-cell__free { font: 800 .56rem/1 var(--font-body); letter-spacing: .1em; }
.bn-cell.is-win { z-index: 3; box-shadow: 0 0 0 3px #FFC83D, 0 0 16px rgba(255, 196, 61, .85); animation: bn-wincell 1.1s ease-in-out infinite alternate; }
.bn-cell.is-win .bn-cell__daub { background: radial-gradient(circle at 34% 30%, #FFF7C9, #FFC83D 50%, #E59A0C); opacity: 1; }
.bn-cell.is-win .bn-cell__n { color: #4A3300; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.bn-card.is-flip { animation: bn-flip .5s cubic-bezier(.3, 1.3, .5, 1) both; }
.bn-mycard.is-ready { box-shadow: 0 0 0 3px var(--bn-gold-lt), 0 0 26px rgba(255, 200, 61, .65), var(--shadow); }

.bn-card--mini { max-width: 300px; margin: 0 auto; width: 100%; padding: 6px; border-radius: 20px; }
.bn-card--mini .bn-card__inner { padding: 6px; border-radius: 15px; }
.bn-card--mini .bn-card__h { height: 28px; font-size: 1.05rem; border-radius: 8px; }
.bn-card--mini .bn-card__head, .bn-card--mini .bn-card__grid { gap: 4px; }
.bn-card--mini .bn-cell { font-size: 1.05rem; border-radius: 9px; }
.bn-card--mini .bn-cell__free { font-size: .5rem; }

/* several cards: numbered tabs over a swipeable track */
.bn-cardwrap.is-shake { animation: ndj-shake .4s ease; }
.bn-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.bn-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  min-height: 44px; padding: 3px 2px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--fg); cursor: pointer; transition: border-color .2s, background .2s;
}
.bn-tab__n { font: 600 .84rem/1.1 var(--font-display); white-space: nowrap; }
.bn-tab__st { font-size: .72rem; font-weight: 800; color: var(--fg-2); white-space: nowrap; }
.bn-tab[aria-selected="true"] { border-color: var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 16%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-brand) 22%, transparent); }
.bn-tab.is-hot .bn-tab__st { color: var(--coral); }
.bn-tab.is-ready { border-color: var(--bn-gold); background: color-mix(in srgb, var(--bn-gold-lt) 32%, var(--card)); animation: bn-tabglow 1s ease-in-out infinite; }
.bn-tab.is-ready .bn-tab__st { color: var(--fg); }
.bn-track { display: flex; gap: 12px; }
.bn-track > .bn-card { flex: 0 0 100%; min-width: 0; }
.bn-track.is-multi { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding: 4px; margin: -4px; }
.bn-track.is-multi::-webkit-scrollbar { display: none; }
.bn-track.is-multi > .bn-card { scroll-snap-align: center; scroll-snap-stop: always; }

/* ------------------------------------------------------------ play: stage */
.bn-play { display: flex; flex-direction: column; gap: 14px; }
.bn-col { display: contents; }
.bn-tvbar { order: 0; display: none; }
.bn-stage { order: 1; }
.bn-cardwrap { order: 3; }
.bn-bingo-wrap { order: 4; }
.bn-anima { order: 4; }
.bn-boardsec { order: 5; }
.bn-playsec { order: 6; }
.bn-actions { order: 7; }

.bn-stage {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px;
  min-height: 150px; padding: 10px 14px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(220px 150px at 18% 50%, rgba(78, 205, 196, .28), transparent 70%),
    radial-gradient(380px 200px at 110% -20%, rgba(168, 85, 247, .38), transparent 70%),
    var(--bn-stage);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.bn-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1.6px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000 75%, transparent);
}
.bn-stage__ball { position: relative; display: grid; place-items: center; width: 128px; height: 128px; }
.bn-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.bn-ring circle { fill: none; stroke-width: 4.5; }
.bn-ring__track { stroke: rgba(255, 255, 255, .12); }
.bn-ring__fill { stroke: #FFE66D; stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: 289.03; filter: drop-shadow(0 0 3px rgba(255, 230, 109, .7)); }
.bn-pausebadge {
  position: absolute; z-index: 2; right: 3%; bottom: 3%; display: none; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #FFE66D; color: #2B2470; box-shadow: 0 4px 10px rgba(0, 0, 0, .35), 0 0 0 3px rgba(20, 18, 53, .9);
  animation: bn-pop .3s cubic-bezier(.2, 1.4, .4, 1) both;
}
.bn-pausebadge .ndj-ic { width: 18px; height: 18px; }
.bn-stage.is-paused .bn-pausebadge { display: grid; }
.bn-stage.is-paused .bn-ball { filter: saturate(.7) brightness(.9); }
.bn-stage__info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bn-stage__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bn-kicker { font: 800 .7rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.bn-count { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bn-count__row { font: 700 2.15rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.bn-count__row small { font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .6); margin-left: 2px; }
.bn-ctrl:empty { display: none; }
.bn-ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; min-height: 42px; padding: 6px 10px;
  border-radius: 13px; border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .1); color: #fff;
  font: 600 .9rem var(--font-display); cursor: pointer; transition: background .2s;
}
.bn-ctl:hover { background: rgba(255, 255, 255, .18); }
.bn-ctl .ndj-ic { width: 17px; height: 17px; }
.bn-rail { display: flex; gap: 5px; }
.bn-rail .bn-mini:nth-child(4) { opacity: .8; }
.bn-rail .bn-mini:nth-child(5) { opacity: .6; }
.bn-pot {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 12px 4px 5px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 212, 94, .24), rgba(245, 180, 40, .12)); box-shadow: inset 0 0 0 1.5px rgba(255, 212, 94, .55);
}
.bn-pot .bn-chip-ic { width: 24px; height: 24px; }
.bn-pot__l { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #FFE7A3; }
.bn-pot__n { font: 700 1.3rem/1 var(--font-display); color: #FFD45E; font-variant-numeric: tabular-nums; }

.bn-stage__note { grid-column: 1 / -1; margin: -6px 0 -2px; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: rgba(255, 255, 255, .62); }
.bn-banner {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 214, 90, .28), transparent 62%), rgba(20, 18, 53, .9);
  animation: ndj-fade .2s ease both;
}
.bn-banner__big {
  font: 700 2.7rem/1 var(--font-display); letter-spacing: .04em;
  background: linear-gradient(180deg, #FFF6C2, #FFC83D 60%, #F59E0B); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)); animation: bn-zoom .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.bn-banner__who { font: 600 1.15rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.bn-banner__bar { display: block; width: min(220px, 70%); height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.bn-banner__bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFE66D, #FF9F43); transform-origin: left; animation: bn-shrink 1.5s linear forwards; }
.bn-banner__note { font-size: .82rem; color: rgba(255, 255, 255, .75); font-weight: 700; }

/* ------------------------------------------------------------ play: toolbar, BINGO button */
.bn-chip { display: inline-flex; align-items: center; gap: 7px; font: 600 1.02rem/1.2 var(--font-display); }
.bn-chip .bn-pat { width: 22px; height: 22px; }

.bn-bingo-wrap { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; }
.bn-bingo {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 100%; min-height: 74px; padding: 8px 16px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--card); color: var(--fg);
  box-shadow: var(--shadow), inset 0 0 0 2px var(--line), inset 0 -4px 0 rgba(0, 0, 0, .06);
  transition: transform .12s ease, box-shadow .25s, background .3s;
}
.bn-bingo:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.bn-bingo__txt { display: inline-flex; align-items: baseline; font: 700 2.05rem/1 var(--font-display); letter-spacing: .05em; }
.bn-bingo__txt .bn-l { color: var(--c); }
.bn-bingo__sub { font-size: .82rem; font-weight: 800; color: var(--fg-2); }
.bn-bingo.is-ready {
  color: #fff; background: linear-gradient(120deg, #FF5E62, #FF9F43 50%, #FFC83D);
  box-shadow: 0 14px 34px rgba(255, 120, 67, .5), inset 0 -4px 0 rgba(0, 0, 0, .12);
  animation: bn-pulse 1s ease-in-out infinite;
}
.bn-bingo.is-ready .bn-bingo__txt { animation: bn-breathe 1s ease-in-out infinite; }
.bn-bingo.is-ready .bn-bingo__txt .bn-l { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.bn-bingo.is-ready .bn-bingo__sub { color: #fff; }
.bn-bingo.is-ready::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg); animation: bn-shine 1.7s ease-in-out infinite;
}
.bn-bingo.is-locked { color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, var(--card)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--coral) 50%, transparent); cursor: not-allowed; animation: ndj-shake .4s ease; }
.bn-bingo.is-locked .bn-bingo__sub { color: var(--coral); }
.bn-bingo.is-checking { color: #fff; background: linear-gradient(120deg, var(--purple), var(--indigo)); cursor: progress; }
.bn-bingo.is-checking .bn-bingo__sub { color: rgba(255, 255, 255, .9); }
.bn-bingo.is-won { color: #fff; background: linear-gradient(120deg, #26D07C, #1E9E5A); }
.bn-bingo.is-won .bn-bingo__sub { color: rgba(255, 255, 255, .95); }

/* ------------------------------------------------------------ play: board, players, actions */
.bn-boardsec { padding: 12px 14px; }
.bn-board__toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer; color: var(--fg); font: 600 1.1rem var(--font-display); text-align: left;
}
.bn-board__count { margin-left: auto; font-size: .95rem; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.bn-chev { transition: transform .2s; }
.bn-board__toggle[aria-expanded="true"] .bn-chev { transform: rotate(180deg); }
.bn-board { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.bn-board__row { display: grid; grid-template-columns: 22px repeat(15, minmax(0, 1fr)); gap: 3px; align-items: center; }
.bn-board__l { display: grid; place-items: center; height: 22px; border-radius: 6px; color: #fff; font: 700 .82rem/1 var(--font-display); background: linear-gradient(180deg, var(--c), var(--c-dk)); }
.bn-board__n {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; min-width: 0;
  font: 600 clamp(.56rem, 2.5vw, .95rem)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
  color: color-mix(in srgb, var(--fg-2) 80%, transparent); background: var(--bg-2);
}
.bn-board__n.is-on { color: #fff; background: radial-gradient(circle at 35% 30%, var(--c-lt), var(--c) 50%, var(--c-dk)); text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.bn-board__n.is-last { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #FFC83D; animation: bn-blink 1s ease-in-out 3; }

.bn-actions { display: flex; flex-direction: column; gap: 6px; }
.bn-tools2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bn-tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 62px; padding: 8px 4px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); cursor: pointer;
  font: 600 .84rem/1.15 var(--font-display); text-align: center; transition: transform .12s, border-color .2s;
}
.bn-tool:active { transform: scale(.97); }
.bn-tool .ndj-ic { width: 22px; height: 22px; color: var(--bn-ink); }
.bn-tool[aria-pressed="true"] { border-color: var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 14%, var(--card)); }
.bn-actions__sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.bn-actions__sub .btn { min-height: 44px; }

/* "Anima la partida": the host's lines, one tap away, in a row that scrolls sideways */
.bn-anima { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bn-anima__t { margin: 0; padding-left: 4px; font: 700 .82rem/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); }
.bn-anima__row {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 2px 4px 6px; margin: 0 -4px; scroll-snap-type: x proximity;
}
.bn-anima__row::-webkit-scrollbar { display: none; }
.bn-anima__b {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px 6px 10px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm);
  font: 700 .9rem/1.1 var(--font-display); white-space: nowrap; cursor: pointer; scroll-snap-align: start;
  transition: transform .12s, opacity .2s, border-color .2s;
}
.bn-anima__b b { font-size: 1.25rem; line-height: 1; font-weight: 400; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.bn-anima__b:active { transform: scale(.95); }
.bn-anima__b.is-joke { border-color: var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 14%, var(--card)); }
.bn-anima.is-cool .bn-anima__b { opacity: .45; pointer-events: none; }
.bn-play.is-tv .bn-anima { display: none; }

/* ------------------------------------------------------------ won */
.bn-won__hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0 2px; }
.bn-won__balls { display: flex; gap: 8px; justify-content: center; margin-bottom: 4px; }
.bn-won__balls .bn-ball { --size: 54px; animation: bn-bounce 1.3s ease-in-out infinite; }
.bn-won__balls .bn-ball:nth-child(2) { animation-delay: .1s; }
.bn-won__balls .bn-ball:nth-child(3) { animation-delay: .2s; }
.bn-won__balls .bn-ball:nth-child(4) { animation-delay: .3s; }
.bn-won__balls .bn-ball:nth-child(5) { animation-delay: .4s; }
.bn-won__title { font-size: clamp(1.9rem, 8.5vw, 2.8rem); font-weight: 700; overflow-wrap: anywhere; }
.bn-won__sub { color: var(--fg-2); font-weight: 800; }
.bn-won__prize { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 999px; font: 600 1.1rem var(--font-display); background: color-mix(in srgb, var(--bn-gold-lt) 30%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bn-gold) 55%, transparent); }
.bn-won__prize .bn-chip-ic { width: 26px; height: 26px; }
.bn-won__chipnote { margin-top: -2px; font-size: .78rem; color: var(--fg-2); font-weight: 700; }
.bn-record { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 20%, var(--card)); font-weight: 800; font-size: .92rem; }
.bn-record .ndj-ic { width: 18px; height: 18px; color: #D99A0B; }
.bn-record.is-new { background: linear-gradient(120deg, #FFE66D, #FFC83D); color: #4A3300; }
.bn-won__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.bn-wcard { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bn-wcard .bn-card { animation: ndj-pop .4s ease both; }
.bn-wcard__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font: 600 1.05rem var(--font-display); }
.bn-won__fam:empty { display: none; }
.bn-won__fam .fam-card { padding: 12px; gap: 8px; }
.bn-won__fam .fam-row { padding: 5px 8px; }
.bn-won__actions { display: flex; flex-direction: column; gap: 10px; }
.bn-won__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bn-won__row .btn { flex: 1 1 160px; }

/* kit toasts float above the sticky BINGO / start buttons on this page */
body.bn-page .ndj-toasts { bottom: calc(98px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------------ invite modal */
.bn-invite__box { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.bn-invite__box .ndj-share { box-shadow: none; border: 0; padding: 0; }

/* ------------------------------------------------------------ desktop */
@media (min-width: 900px) {
  .bn-play:not(.is-tv) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 22px; align-items: start; }
  .bn-play:not(.is-tv) .bn-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .bn-play:not(.is-tv) .bn-col--b { position: sticky; top: 78px; }
  .bn-play:not(.is-tv) .bn-bingo-wrap { position: static; }
  .bn-play:not(.is-tv) .bn-stage { min-height: 200px; padding: 18px 22px; gap: 22px; }
  .bn-play:not(.is-tv) .bn-stage__ball { width: 168px; height: 168px; }
  .bn-play:not(.is-tv) .bn-stage .bn-ball { --size: 134px; }
  .bn-play:not(.is-tv) .bn-mini { --size: 40px; }
  .bn-play:not(.is-tv) .bn-rail { gap: 8px; }
  .bn-play:not(.is-tv) .bn-count__row { font-size: 2.8rem; }
  .bn-cell { font-size: 1.7rem; }
  .bn-card--mini .bn-cell { font-size: 1.05rem; }
  .bn-lobby.is-tv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 22px; }
  .bn-lobby.is-tv .bn-lobby__share { position: sticky; top: 78px; }
  .bn-won.is-tv .bn-won__title { font-size: 3.6rem; }
}
@media (min-width: 900px) and (min-height: 700px) {
  .bn-board__n { font-size: .9rem; }
}

/* ------------------------------------------------------------ big screen (TV) */
.bn-play.is-tv { --tvball: min(28vw, 40vh, 440px); }
.bn-play.is-tv .bn-cardwrap, .bn-play.is-tv .bn-bingo-wrap, .bn-play.is-tv .bn-actions { display: none; }
.bn-play.is-tv .bn-tvbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.bn-tvbar__qr .ndj-qr { width: 64px; height: 64px; padding: 3px; border-radius: 10px; }
.bn-tvbar__txt { display: flex; flex-direction: column; gap: 2px; }
.bn-tvbar__txt .bn-kicker { color: var(--fg-2); }
.bn-tvbar__code { font: 700 1.9rem/1 var(--font-display); letter-spacing: .14em; }
.bn-tvbar__sp { flex: 1; }
.bn-play.is-tv .bn-board__toggle { pointer-events: none; }
.bn-play.is-tv .bn-board__toggle .bn-chev { display: none; }
.bn-play.is-tv .bn-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; padding: 20px 20px 14px; }
.bn-play.is-tv .bn-stage__ball { width: var(--tvball); height: var(--tvball); }
.bn-play.is-tv .bn-stage .bn-ball { --size: calc(var(--tvball) * .8); }
.bn-play.is-tv .bn-stage__info { align-items: center; gap: 14px; }
.bn-play.is-tv .bn-stage__top { justify-content: center; align-items: center; gap: 16px; }
.bn-play.is-tv .bn-count { align-items: center; }
.bn-play.is-tv .bn-count__row { font-size: 3.2rem; }
.bn-play.is-tv .bn-kicker { font-size: .9rem; }
.bn-play.is-tv .bn-mini { --size: 50px; }
.bn-play.is-tv .bn-rail { gap: 10px; }
.bn-play.is-tv .bn-pot { align-self: center; padding: 6px 18px 6px 8px; }
.bn-play.is-tv .bn-pot .bn-chip-ic { width: 34px; height: 34px; }
.bn-play.is-tv .bn-pot__l { font-size: .9rem; }
.bn-play.is-tv .bn-pot__n { font-size: 2.3rem; }
.bn-play.is-tv .bn-banner__big { font-size: 5rem; }
.bn-play.is-tv .bn-pausebadge { width: 64px; height: 64px; }
.bn-play.is-tv .bn-pausebadge .ndj-ic { width: 30px; height: 30px; }
.bn-play.is-tv .bn-banner__who { font-size: 2rem; }
.bn-play.is-tv .bn-board__row { grid-template-columns: 40px repeat(15, minmax(0, 1fr)); gap: 5px; }
.bn-play.is-tv .bn-board__l { height: 40px; font-size: 1.4rem; border-radius: 10px; }
.bn-play.is-tv .bn-board { gap: 8px; }
.bn-play.is-tv .bn-board__n { font-size: clamp(.8rem, 1.5vw, 1.5rem); }
@media (min-width: 760px) {
  .bn-play.is-tv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); grid-template-areas: "bar bar" "stage board" "stage players"; gap: 20px; align-items: start; }
  .bn-play.is-tv .bn-col { display: contents; }
  .bn-play.is-tv .bn-tvbar { grid-area: bar; }
  .bn-play.is-tv .bn-stage { grid-area: stage; align-self: stretch; }
  .bn-play.is-tv .bn-boardsec { grid-area: board; }
  .bn-play.is-tv .bn-playsec { grid-area: players; }
  .bn-play.is-tv .bn-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ------------------------------------------------------------ small phones */
@media (max-width: 380px) {
  .bn-stage { gap: 10px; padding: 10px 12px; }
  .bn-stage__ball { width: 118px; height: 118px; }
  .bn-stage .bn-ball { --size: 94px; }
  .bn-mini { --size: 27px; }
  .bn-rail { gap: 4px; }
  .bn-count__row { font-size: 1.9rem; }
  .bn-opt__desc { display: none; }
  .bn-opt { min-height: 78px; }
}
@media (max-width: 520px) {
  .bn-ctl:not(.bn-ctl--wide) span { display: none; }
}

/* ------------------------------------------------------------ animations */
@keyframes bn-ball-in {
  0% { transform: translate(-46px, -150px) scale(.45) rotate(-170deg); opacity: 0; }
  40% { opacity: 1; }
  62% { transform: translate(0, 7px) scale(1.06, .94) rotate(8deg); }
  80% { transform: translate(0, -5px) scale(.98, 1.02) rotate(-3deg); }
  100% { transform: none; }
}
@keyframes bn-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bn-ring { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 289.03; } }
@keyframes bn-stamp {
  0% { opacity: 0; transform: scale(2.1) rotate(calc(var(--r, 0deg) - 24deg)); }
  40% { opacity: 1; transform: scale(.84) rotate(calc(var(--r, 0deg) + 6deg)); }
  70% { transform: scale(1.07) rotate(var(--r, 0deg)); }
  100% { opacity: .96; transform: scale(1) rotate(var(--r, 0deg)); }
}
@keyframes bn-splash { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: .75; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes bn-callable { 0%, 100% { box-shadow: inset 0 0 0 2.5px var(--c); } 50% { box-shadow: inset 0 0 0 2.5px var(--c), 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); } }
@keyframes bn-wincell { from { box-shadow: 0 0 0 3px #FFC83D, 0 0 10px rgba(255, 196, 61, .55); } to { box-shadow: 0 0 0 3px #FFC83D, 0 0 22px rgba(255, 196, 61, 1); } }
@keyframes bn-flip { 0% { transform: perspective(700px) rotateY(75deg) scale(.95); opacity: .3; } 100% { transform: none; opacity: 1; } }
@keyframes bn-pulse {
  0% { box-shadow: 0 14px 34px rgba(255, 120, 67, .45), 0 0 0 0 rgba(255, 159, 67, .6); }
  70%, 100% { box-shadow: 0 18px 40px rgba(255, 120, 67, .6), 0 0 0 14px rgba(255, 159, 67, 0); }
}
@keyframes bn-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes bn-shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes bn-tabglow { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 180, 40, .5); } 50% { box-shadow: 0 0 0 5px rgba(245, 180, 40, 0); } }
@keyframes bn-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes bn-zoom { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bn-blink { 0%, 100% { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #FFC83D; } 50% { box-shadow: 0 0 0 2px var(--card), 0 0 0 6px rgba(255, 200, 61, .4); } }
@keyframes bn-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } 60% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  .bn-ring__fill { animation: none !important; }
  .bn-bingo.is-ready::after { display: none; }
}

/* ============================================================ refinement pass: same identity, more finish */
.bn-card { border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 22px 36px -24px rgba(19, 142, 135, .75), 0 8px 14px -10px rgba(43, 45, 66, .35), inset 0 1px 0 rgba(255, 255, 255, .45); }
.bn-card__inner { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .25); }
.bn-card__h { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .4), 0 5px 8px -6px rgba(0, 0, 0, .45); }
.bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 70%, #fff) 0%, var(--card-2) 100%);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .85), 0 2px 3px -2px rgba(43, 45, 66, .3);
}
.bn-cell__daub { box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .22), inset 0 2px 3px rgba(255, 255, 255, .3), 0 3px 5px -2px rgba(0, 0, 0, .35); }
.bn-tab { border: 1px solid rgba(43, 45, 66, .1); box-shadow: 0 6px 12px -9px rgba(43, 45, 66, .5), inset 0 1px 0 rgba(255, 255, 255, .8); }
.bn-tab[aria-selected="true"] { border-color: var(--bn-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-brand) 22%, transparent), 0 8px 14px -10px rgba(15, 127, 121, .7); }
.bn-bingo { border: 1px solid rgba(43, 45, 66, .08); box-shadow: 0 18px 30px -20px rgba(43, 45, 66, .6), inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 0 rgba(0, 0, 0, .05); }
.bn-stage { box-shadow: 0 24px 40px -26px rgba(27, 23, 72, .85), inset 0 1px 0 rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable) { background: linear-gradient(180deg, color-mix(in srgb, var(--card-2) 82%, #fff) 0%, var(--card-2) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .07); }
  :root:not([data-theme="light"]) .bn-tab, :root:not([data-theme="light"]) .bn-bingo { border-color: rgba(255, 255, 255, .1); box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
}
:root[data-theme="dark"] .bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable) { background: linear-gradient(180deg, color-mix(in srgb, var(--card-2) 82%, #fff) 0%, var(--card-2) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .bn-tab, :root[data-theme="dark"] .bn-bingo { border-color: rgba(255, 255, 255, .1); box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }

/* ============================================================ round 7: the Juntos promo palette — coral→orange hero, warm cream, deep navy, white pills; roomy, one clear instruction, easy mode, funny captions */
body.bn-page {
  background: radial-gradient(900px 480px at 100% -5%, rgba(255, 154, 60, .16), transparent 62%), radial-gradient(800px 480px at -10% 8%, rgba(255, 107, 74, .12), transparent 60%), linear-gradient(180deg, #FFF7F0 0%, #FFE9DA 100%);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.bn-page { background: radial-gradient(circle at 30% 0%, #3A3D5C 0%, #1F2137 72%); background-attachment: fixed; }
}
:root[data-theme="dark"] body.bn-page { background: radial-gradient(circle at 30% 0%, #3A3D5C 0%, #1F2137 72%); background-attachment: fixed; }
.bn-page .ndj-card, .bn-page .ndj-share { border-radius: 24px; border: 1px solid var(--bn-edge); box-shadow: var(--bn-lift), var(--bn-hi); }
.bn-tb { display: inline-flex; flex: none; }

/* buttons: the hero gradient with a gentle top sheen and a coral glow */

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-page .btn-secondary { background: var(--card-2); color: var(--fg); } }
.bn-page .btn-wa::before { display: none; }

/* white tiles and chips; the chosen one gets the brand tint and a coral ring (and stays readable without color: bold border) */
.bn-opt, .bn-cnt, .bn-tool { background: #fff; border: 1.5px solid rgba(43, 45, 66, .1); border-radius: 16px; box-shadow: var(--bn-pill-sh); }
:root[data-theme="dark"] .bn-opt, :root[data-theme="dark"] .bn-cnt, :root[data-theme="dark"] .bn-tool { background: var(--card-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-opt, :root:not([data-theme="light"]) .bn-cnt, :root:not([data-theme="light"]) .bn-tool { background: var(--card-2); } }
.bn-opt[aria-pressed="true"], .bn-cnt[aria-pressed="true"], .bn-tool[aria-pressed="true"] { border: 2px solid var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 12%, var(--card)); box-shadow: 0 8px 16px -10px rgba(255, 107, 74, .75); }
.bn-opt__big, .bn-rules__big { color: var(--bn-ink); }
.bn-tool .ndj-ic { color: var(--bn-ink); }
.bn-cnt { min-height: 66px; }
.bn-cnt__n { font-size: 1.7rem; }
.bn-switch[aria-checked="true"] .bn-switch__track { background: var(--bn-hero); }
.bn-tvcard__icon { background: var(--bn-hero); box-shadow: 0 8px 16px -8px rgba(255, 107, 74, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.bn-tvcard.is-on { border-color: color-mix(in srgb, var(--bn-brand) 55%, transparent); }
.bn-betbox { background: color-mix(in srgb, #FFD45E 14%, var(--card-2)); }

/* helpers (easy mode, funny comments): two large switch rows */
.bn-aidscard .bn-h2 { margin-bottom: 8px; }
.bn-aids { display: flex; flex-direction: column; gap: 8px; }
.bn-sw {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 62px; padding: 8px 14px; border-radius: 16px;
  border: 1.5px solid rgba(43, 45, 66, .1); background: #fff; color: var(--fg); text-align: left; cursor: pointer; box-shadow: var(--bn-pill-sh);
}
:root[data-theme="dark"] .bn-sw { background: var(--card-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-sw { background: var(--card-2); } }
.bn-sw[aria-checked="true"] { border-color: color-mix(in srgb, var(--bn-brand) 60%, transparent); }
.bn-sw__txt { display: flex; flex-direction: column; min-width: 0; }
.bn-sw__t { font: 600 1.05rem/1.2 var(--font-display); }
.bn-sw__h { font-size: .84rem; line-height: 1.3; color: var(--fg-2); }
.bn-sw[aria-checked="true"] .bn-switch__track { background: var(--bn-hero); box-shadow: none; }
.bn-sw[aria-checked="true"] .bn-switch__thumb { transform: translateX(19px); }
.bn-actions .bn-aids { margin-bottom: 4px; }

/* the how-to on the entry screen */
.bn-how { background: #fff; border-radius: 24px; border: 1px solid var(--bn-edge); box-shadow: var(--bn-lift), var(--bn-hi); }
:root[data-theme="dark"] .bn-how { background: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-how { background: var(--card); } }
.bn-how .bn-mini { --size: 44px; }
.bn-how__txt strong { font-size: 1.08rem; }

/* ------------------------------------------------------------ cards: the coral frame, big readable cells */
.bn-card {
  padding: 8px; border-radius: 26px; border: 0;
  background: var(--bn-hero);
  box-shadow: 0 22px 34px -22px rgba(232, 72, 58, .75), 0 6px 14px -8px rgba(255, 107, 74, .5), inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(190, 55, 20, .18);
}
.bn-card__label { display: inline-block; margin: 0 0 6px 2px; padding: 3px 12px; border-radius: 999px; background: #fff; color: var(--bn-ink2); text-shadow: none; font-size: .74rem; letter-spacing: .1em; box-shadow: 0 4px 8px -5px rgba(160, 40, 10, .7); }
.bn-card__inner { padding: 10px; border-radius: 19px; background: var(--card); box-shadow: inset 0 2px 6px rgba(160, 40, 10, .14), 0 1px 0 rgba(255, 255, 255, .3); }
.bn-card__head, .bn-card__grid { gap: 6px; }
.bn-card__head { margin-bottom: 7px; }
.bn-card__h { height: 38px; font-size: 1.5rem; border-radius: 12px; }
.bn-cell { aspect-ratio: 1 / .92; border-radius: 14px; font: 700 clamp(1.5rem, 8.2vw, 2.15rem)/1 var(--font-display); }
.bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable):not(.is-need) { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(43, 45, 66, .12), 0 3px 4px -3px rgba(43, 45, 66, .35); color: var(--bn-ink2); }
:root[data-theme="dark"] .bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable):not(.is-need) { background: var(--card-2); color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-cell:not(.is-marked):not(.is-free):not(.is-win):not(.is-callable):not(.is-need) { background: var(--card-2); color: var(--fg); } }
.bn-cell__daub { inset: 4%; }
.bn-cell.is-marked .bn-cell__n { text-shadow: 0 2px 2px rgba(0, 0, 0, .35); }
.bn-cell.is-free { background: radial-gradient(circle at 40% 28%, #FFF6CC, #FFD45E 55%, #F5A81A); color: #5A3C00; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1), 0 3px 4px -3px rgba(160, 100, 0, .5); }
.bn-cell__free { font-size: .62rem; }
.bn-star { color: #fff; }
/* easy mode: the number that completes the pattern. A dashed ring and a soft pulse (a shape, not only a color) */
.bn-cell.is-need { outline: 3px dashed #E8860C; outline-offset: -3px; background: color-mix(in srgb, #FFB300 22%, var(--card)); box-shadow: 0 0 0 4px rgba(255, 179, 0, .35); animation: bn-need 1.2s ease-in-out infinite; }
.bn-cell.is-need::before { content: "?"; position: absolute; top: -7px; right: -5px; z-index: 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #E8860C; color: #fff; font: 800 .85rem/1 var(--font-display); box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.bn-cell.is-callable { box-shadow: 0 0 0 3px var(--c), 0 0 0 7px color-mix(in srgb, var(--c) 28%, transparent); }
.bn-mycard.is-ready { box-shadow: 0 0 0 4px #FFE66D, 0 0 28px rgba(255, 214, 61, .7), 0 22px 34px -22px rgba(232, 72, 58, .75); }
.bn-track { gap: 14px; }
.bn-tabs { gap: 8px; }
.bn-tab { min-height: 48px; border-radius: 14px; background: #fff; border: 1.5px solid rgba(43, 45, 66, .1); box-shadow: var(--bn-pill-sh); }
:root[data-theme="dark"] .bn-tab { background: var(--card-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-tab { background: var(--card-2); } }
.bn-tab__n { font-size: .92rem; }
.bn-tab[aria-selected="true"] { border: 2px solid var(--bn-brand); background: color-mix(in srgb, var(--bn-brand) 12%, var(--card)); box-shadow: 0 8px 14px -10px rgba(255, 107, 74, .75); }
.bn-tab.is-hot .bn-tab__st { color: var(--bn-ink); }
.bn-minis[data-n="1"] { grid-template-columns: minmax(0, 340px); }
.bn-card--mini { max-width: 340px; }
.bn-card--mini .bn-cell { font-size: 1.3rem; }
.bn-card--mini .bn-card__h { height: 32px; font-size: 1.2rem; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-cell { font-size: .95rem; }
.bn-minis:not([data-n="1"]) .bn-card--mini .bn-card__label { font-size: .68rem; padding: 2px 8px; margin-bottom: 4px; }

/* ------------------------------------------------------------ play: one clear instruction, the ball, the card, a giant BINGO */
.bn-play { gap: 12px; }
.bn-say { order: 1; }
.bn-stage { order: 2; }
.bn-cardwrap { order: 3; position: relative; }
.bn-play.is-tv .bn-say { display: none; }
.bn-say {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 10px 12px 10px 10px;
  --sayc: #B9BCD3;
  border-radius: 22px; background: #fff; color: var(--fg); border: 1px solid var(--bn-edge);
  box-shadow: inset 7px 0 0 var(--sayc), var(--bn-lift), var(--bn-hi);
}
:root[data-theme="dark"] .bn-say { background: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-say { background: var(--card); } }
.bn-say__ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #4A4D6A; background: color-mix(in srgb, #B9BCD3 28%, var(--card)); }
.bn-say__ic .ndj-ic { width: 26px; height: 26px; }
.bn-say__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bn-say__t { font: 700 clamp(1.2rem, 5.6vw, 1.5rem)/1.12 var(--font-display); overflow-wrap: anywhere; }
.bn-say__s { font-size: .92rem; line-height: 1.3; color: var(--fg-2); font-weight: 700; }
.bn-say .bn-chip { flex: none; flex-direction: column; justify-content: center; gap: 1px; min-width: 62px; padding: 5px 8px 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--bn-edge); box-shadow: var(--bn-pill-sh); color: var(--bn-ink2); font: 700 .72rem/1.1 var(--font-display); text-align: center; }
:root[data-theme="dark"] .bn-say .bn-chip { color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-say .bn-chip { color: var(--fg); } }
.bn-say .bn-chip .bn-pat { width: 26px; height: 26px; }
.bn-say.is-hit { --sayc: #2ED47A; }
.bn-say.is-hit .bn-say__ic { color: #0A5A32; background: color-mix(in srgb, #2ED47A 30%, var(--card)); }
.bn-say.is-tap { --sayc: var(--bn-brand); }
.bn-say.is-tap .bn-say__ic { color: var(--bn-ink); background: color-mix(in srgb, var(--bn-brand) 18%, var(--card)); }
.bn-say.is-one { --sayc: #FFB300; background: linear-gradient(180deg, #FFF8E0, #FFEFC2); border: 2px solid #FFB300; color: #2B2D42; }
.bn-say.is-one .bn-say__s { color: #5A4300; }
.bn-say.is-one .bn-say__ic { color: #7A4B00; background: #FFD45E; animation: bn-nudge 1.4s ease-in-out infinite; }
:root[data-theme="dark"] .bn-say.is-one { background: color-mix(in srgb, #FFB300 22%, var(--card)); color: var(--fg); }
:root[data-theme="dark"] .bn-say.is-one .bn-say__s { color: var(--fg-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-say.is-one { background: color-mix(in srgb, #FFB300 22%, var(--card)); color: var(--fg); } :root:not([data-theme="light"]) .bn-say.is-one .bn-say__s { color: var(--fg-2); } }
.bn-say.is-oops { background: color-mix(in srgb, #FF9A3C 14%, var(--card)); border-color: color-mix(in srgb, #E8860C 55%, transparent); --sayc: #E8860C; }
.bn-say.is-oops .bn-say__ic { color: #8A4A00; background: color-mix(in srgb, #FF9A3C 32%, var(--card)); }
.bn-say.is-check { color: #fff; background: var(--bn-navy); border-color: transparent; --sayc: #FFE66D; }
.bn-say.is-check .bn-say__s { color: rgba(255, 255, 255, .86); }
.bn-say.is-check .bn-say__ic { color: #FFE66D; background: rgba(255, 255, 255, .12); }
/* it is time to act (BINGO!) or you did: the hero gradient, large white title, the small line on a white pill */
.bn-say.is-go, .bn-say.is-won { color: #fff; background: var(--bn-hero); border: 0; box-shadow: 0 18px 30px -14px rgba(255, 107, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(190, 55, 20, .18); }
.bn-say.is-go::before, .bn-say.is-won::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; background: linear-gradient(rgba(255, 255, 255, .26), rgba(255, 255, 255, 0)); pointer-events: none; }
.bn-say.is-go .bn-say__t, .bn-say.is-won .bn-say__t { color: #fff; text-shadow: 0 2px 3px rgba(160, 40, 10, .4); }
.bn-say.is-go .bn-say__s, .bn-say.is-won .bn-say__s { align-self: flex-start; padding: 1px 12px; border-radius: 999px; background: #fff; color: var(--bn-ink2); text-shadow: none; box-shadow: 0 4px 10px -6px rgba(160, 40, 10, .7); }
.bn-say.is-go .bn-say__ic, .bn-say.is-won .bn-say__ic { color: #E04A2C; background: #fff; box-shadow: 0 6px 12px -6px rgba(160, 40, 10, .7); animation: bn-nudge 1.4s ease-in-out infinite; }
.bn-say.is-go .bn-chip, .bn-say.is-won .bn-chip { background: #fff; color: var(--bn-ink2); }

/* the ball: a navy panel, the glossy hero ball and the last five */
.bn-stage {
  min-height: 146px; border-radius: 26px;
  background: radial-gradient(220px 150px at 18% 50%, rgba(255, 154, 60, .26), transparent 70%), radial-gradient(380px 200px at 110% -20%, rgba(168, 85, 247, .3), transparent 70%), var(--bn-navy);
  box-shadow: 0 24px 38px -24px rgba(31, 33, 55, .9), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.bn-kicker { color: rgba(255, 255, 255, .85); }
.bn-ring__fill { stroke: #FFB24A; filter: drop-shadow(0 0 3px rgba(255, 154, 60, .8)); }
.bn-ctl { min-height: 44px; min-width: 44px; border-radius: 14px; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }
.bn-banner { background: radial-gradient(circle at 50% 40%, rgba(255, 154, 60, .32), transparent 62%), rgba(31, 33, 55, .92); }
.bn-banner__bar i { background: var(--bn-hero); }
.bn-pot { background: linear-gradient(180deg, rgba(255, 212, 94, .26), rgba(245, 180, 40, .14)); }

/* the BINGO button: giant, and it only lights up when it is true */
.bn-bingo { min-height: 82px; border-radius: 24px; background: #fff; color: var(--bn-ink2); border: 1px solid rgba(43, 45, 66, .1); }
:root[data-theme="dark"] .bn-bingo { background: var(--card); color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-bingo { background: var(--card); color: var(--fg); } }
.bn-bingo__txt { font-size: 2.3rem; }
.bn-bingo__sub { font-size: .86rem; color: var(--fg-2); }
.bn-bingo.is-ready {
  color: #fff; background: var(--bn-hero); border-color: transparent;
  box-shadow: 0 16px 34px -8px rgba(255, 107, 74, .75), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(190, 55, 20, .22);
}
.bn-bingo.is-ready .bn-bingo__sub { background: #fff; color: var(--bn-ink2); padding: 1px 12px; border-radius: 999px; }
.bn-bingo.is-oops { box-shadow: inset 0 0 0 2.5px color-mix(in srgb, #E8860C 70%, transparent), 0 18px 30px -20px rgba(43, 45, 66, .6); animation: ndj-shake .4s ease; }
.bn-bingo.is-oops .bn-bingo__sub { color: #9A5A00; }
:root[data-theme="dark"] .bn-bingo.is-oops .bn-bingo__sub { color: #FFB866; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-bingo.is-oops .bn-bingo__sub { color: #FFB866; } }
.bn-bingo.is-locked { color: var(--bn-ink2); background: color-mix(in srgb, #FF9A3C 16%, var(--card)); box-shadow: inset 0 0 0 2.5px color-mix(in srgb, #E8860C 70%, transparent); animation: none; }
:root[data-theme="dark"] .bn-bingo.is-locked { color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-bingo.is-locked { color: var(--fg); } }
.bn-bingo.is-locked .bn-bingo__sub { color: #9A5A00; }
:root[data-theme="dark"] .bn-bingo.is-locked .bn-bingo__sub { color: #FFB866; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-bingo.is-locked .bn-bingo__sub { color: #FFB866; } }
.bn-bingo.is-checking { background: var(--bn-navy); }
.bn-bingo.is-won { background: var(--bn-hero); }
.bn-bingo.is-won .bn-bingo__sub { color: #fff; }

/* funny captions (over the non-tappable BINGO letters row; with several cards the tabs sit above, so it drops by their height): a pill with an emoji pop, on the gap above the card header (it never catches a tap) */
.bn-quip {
  position: absolute; left: 50%; top: 37px; translate: -50% -50%; z-index: 12; width: max-content; max-width: 98%; display: flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 10px; border-radius: 999px; pointer-events: none; color: #fff; background: var(--bn-hero); text-shadow: 0 2px 3px rgba(160, 40, 10, .38);
  box-shadow: 0 14px 24px -12px rgba(150, 50, 20, .8), inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 3px rgba(255, 255, 255, .55);
  font: 800 clamp(1.02rem, 4.6vw, 1.25rem)/1.15 var(--font-display); animation: bn-quip 2.8s ease both;
}
.bn-cardwrap:not([data-cards="1"]) .bn-quip { top: 93px; }
.bn-quip__e { font-size: 1.6rem; line-height: 1; font-style: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; text-shadow: none; animation: bn-emojipop .6s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes bn-quip { 0% { opacity: 0; transform: translateY(-10px) scale(.9); } 10% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes bn-emojipop { 0% { transform: scale(.2) rotate(-25deg); } 60% { transform: scale(1.35) rotate(10deg); } 100% { transform: none; } }
@keyframes bn-nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1) rotate(-5deg); } }
@keyframes bn-need { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 179, 0, .35); } 50% { box-shadow: 0 0 0 8px rgba(255, 179, 0, .1); } }

/* the lower sections: roomy tools, a safe gutter for the reactions tab on the right edge */
.bn-boardsec, .bn-playsec { border-radius: 24px; }
.bn-board__toggle { min-height: 48px; font-size: 1.15rem; }
.bn-board__n.is-last { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--bn-brand-2); }
.bn-tool { min-height: 66px; }
.bn-tool .ndj-ic { width: 24px; height: 24px; }

/* ------------------------------------------------------------ how to play (first game + the ? button) */
.bn-modal__box { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 26px; padding: 20px; }
.bn-guide { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.bn-guide__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bn-guide__step { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--bn-edge); }
.bn-guide__n { position: absolute; left: -4px; top: -4px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: #C8381A; font: 800 .9rem var(--font-display); box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.bn-guide__ic { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--bn-edge), 0 6px 10px -8px rgba(43, 45, 66, .5); overflow: hidden; }
:root[data-theme="dark"] .bn-guide__ic { background: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-guide__ic { background: var(--card); } }
.bn-guide__ball { --size: 52px; }
.bn-guide__cell { width: 52px; aspect-ratio: 1 / .92; font-size: 1.5rem; }
.bn-guide__ic--pat .bn-pat { width: 44px; height: 44px; }
.bn-guide__ic--bingo { background: var(--bn-hero); color: #fff; text-shadow: 0 1px 2px rgba(160, 40, 10, .4); font: 700 .98rem/1 var(--font-display); letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 14px -8px rgba(255, 107, 74, .8); }
.bn-guide__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bn-guide__txt strong { font: 700 1.12rem/1.15 var(--font-display); }
.bn-guide__txt span { font-size: .95rem; line-height: 1.3; color: var(--fg-2); }
.bn-guide__note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #FFD45E 24%, var(--card)); font-weight: 700; font-size: .9rem; line-height: 1.3; }
.bn-guide__note .bn-chip-ic { width: 26px; height: 26px; }
.bn-modal .bn-guide__ok { margin-top: 2px; }

/* ------------------------------------------------------------ finish: the hero gradient, the winners as white pills */
.bn-won__hero {
  position: relative; overflow: hidden; gap: 10px; padding: 22px 16px 20px; border-radius: 28px; color: #fff;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%), var(--bn-hero);
  box-shadow: 0 24px 38px -20px rgba(255, 107, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(190, 55, 20, .18);
}
.bn-won__balls .bn-ball { --size: 56px; }
.bn-won__title { color: #fff; text-shadow: 0 3px 5px rgba(160, 40, 10, .4); }
.bn-won__sub { align-self: center; padding: 2px 14px; border-radius: 999px; background: #fff; color: var(--bn-ink2); box-shadow: 0 6px 12px -8px rgba(160, 40, 10, .7); }
.bn-won__who { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bn-won__pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; background: #fff; color: var(--bn-ink2); font: 700 1.05rem var(--font-display); box-shadow: 0 8px 14px -8px rgba(160, 40, 10, .75); }
.bn-won__pill b { font-weight: 700; overflow-wrap: anywhere; }
.bn-won__cup { width: 20px; height: 20px; color: #E8A010; }
.bn-won__quip { display: inline-flex; align-items: center; gap: 8px; font: 700 1.1rem/1.2 var(--font-display); color: #fff; text-shadow: 0 2px 3px rgba(160, 40, 10, .4); }
.bn-won__quip b { font-size: 1.5rem; font-style: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; text-shadow: none; animation: bn-emojipop .7s cubic-bezier(.2, 1.8, .4, 1) both; }
.bn-won__prize { background: #fff; color: var(--bn-ink2); box-shadow: 0 8px 14px -8px rgba(160, 40, 10, .75); }
.bn-won__chipnote { color: #fff; text-shadow: 0 1px 2px rgba(160, 40, 10, .45); }
.bn-record { background: #fff; color: var(--bn-ink2); box-shadow: 0 6px 12px -8px rgba(160, 40, 10, .7); }
.bn-record.is-new { background: #FFE66D; color: #4A3300; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bn-won__hero { background: radial-gradient(circle at 50% 20%, #3A3D5C 0%, #1F2137 78%); box-shadow: 0 24px 38px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
  :root:not([data-theme="light"]) .bn-won__title { color: #FFE66D; text-shadow: 0 3px 5px rgba(0, 0, 0, .5); }
  :root:not([data-theme="light"]) .bn-won__quip, :root:not([data-theme="light"]) .bn-won__chipnote { text-shadow: none; }
}
:root[data-theme="dark"] .bn-won__hero { background: radial-gradient(circle at 50% 20%, #3A3D5C 0%, #1F2137 78%); box-shadow: 0 24px 38px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .bn-won__title { color: #FFE66D; text-shadow: 0 3px 5px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .bn-won__quip, :root[data-theme="dark"] .bn-won__chipnote { text-shadow: none; }
.bn-won__cards { gap: 14px; }

/* the toast of the kit floats above the sticky BINGO button (a taller one now) */
body.bn-page .ndj-toasts { bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 380px) {
  .bn-say { gap: 9px; padding-right: 9px; }
  .bn-say__ic { width: 40px; height: 40px; }
  .bn-say .bn-chip { min-width: 54px; padding: 4px 5px 3px; }
  .bn-say .bn-chip .bn-pat { width: 22px; height: 22px; }
  .bn-card__inner { padding: 8px; }
  .bn-card__head, .bn-card__grid { gap: 5px; }
  .bn-cell { font-size: clamp(1.4rem, 7.6vw, 1.7rem); }
  .bn-guide__ic { width: 56px; height: 56px; }
}
@media (min-width: 900px) {
  .bn-play:not(.is-tv) .bn-say { order: 0; }
  .bn-cell { font-size: 2rem; }
  .bn-card--mini .bn-cell { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-say.is-go .bn-say__ic, .bn-say.is-won .bn-say__ic, .bn-say.is-one .bn-say__ic, .bn-cell.is-need, .bn-quip__e, .bn-won__quip b { animation: none !important; }
  .bn-quip { animation-name: ndj-fade; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-bingo.is-ready, .bn-bingo.is-ready .bn-bingo__txt, .bn-tab.is-ready, .bn-won__balls .bn-ball, .bn-cell.is-callable, .bn-cell.is-win { animation: none !important; }
}

/* dark mode: warm states keep a navy surface with a vivid border (tinting navy with orange turns brown) */
:root[data-theme="dark"] .bn-say.is-one, :root[data-theme="dark"] .bn-say.is-oops { background: var(--card-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-say.is-one, :root:not([data-theme="light"]) .bn-say.is-oops { background: var(--card-2); } }
:root[data-theme="dark"] .bn-bingo.is-locked { background: var(--card-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-bingo.is-locked { background: var(--card-2); } }

/* the guide: the OK button never scrolls out of reach */
.bn-modal__box { display: flex; flex-direction: column; overflow: hidden; }
.bn-modal__box .ndj-modal__title { flex: none; }
.bn-guide { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 4px 2px 6px; margin: 0 -4px 12px -6px; }
.bn-modal .bn-guide__ok { flex: none; }

/* short phones (360x640): a tighter banner and ball so the card and the BINGO button still fit */
@media (max-height: 700px) {
  .bn-play { gap: 9px; }
  .bn-say { min-height: 58px; padding-block: 7px; border-radius: 20px; }
  .bn-say__ic { width: 38px; height: 38px; }
  .bn-say__ic .ndj-ic { width: 22px; height: 22px; }
  .bn-say__t { font-size: clamp(1.1rem, 5.2vw, 1.3rem); }
  .bn-say__s { font-size: .84rem; line-height: 1.2; }
  .bn-stage { min-height: 108px; padding-block: 7px; gap: 10px; border-radius: 22px; }
  .bn-stage__ball { width: 98px; height: 98px; }
  .bn-stage .bn-ball { --size: 78px; }
  .bn-pausebadge { width: 30px; height: 30px; }
  .bn-count__row { font-size: 1.7rem; }
  .bn-stage__info { gap: 5px; }
  .bn-mini { --size: 26px; }
  .bn-card { padding: 6px; border-radius: 22px; }
  .bn-card__inner { padding: 7px; }
  .bn-card__head { margin-bottom: 5px; }
  .bn-card__head, .bn-card__grid { gap: 5px; }
  .bn-card__h { height: 30px; font-size: 1.25rem; }
  .bn-cell { aspect-ratio: 1 / .78; font-size: clamp(1.3rem, 6.6vw, 1.6rem); }
  .bn-quip { top: 30px; }
  .bn-bingo { min-height: 66px; }
  .bn-bingo__txt { font-size: 2rem; }
  .bn-bingo__sub { font-size: .8rem; }
  .bn-guide__step { padding: 8px 10px; gap: 10px; }
  .bn-guide__ic { width: 52px; height: 52px; }
  .bn-guide__ball { --size: 44px; }
  .bn-guide__cell { width: 44px; font-size: 1.25rem; }
  .bn-guide__txt strong { font-size: 1.02rem; }
  .bn-guide__txt span { font-size: .86rem; line-height: 1.22; }
  .bn-guide__note { padding: 7px 10px; font-size: .84rem; }
  .bn-modal__box { padding: 16px; }
}
.bn-say__ic { color: var(--fg-2); }
:root[data-theme="dark"] .bn-say.is-hit .bn-say__ic { color: #5BE3A0; }
:root[data-theme="dark"] .bn-say.is-oops .bn-say__ic { color: #FFB866; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bn-say.is-hit .bn-say__ic { color: #5BE3A0; } :root:not([data-theme="light"]) .bn-say.is-oops .bn-say__ic { color: #FFB866; } }
.bn-guide__ic--bingo { font-size: .9rem; }
.bn-track { position: relative; z-index: 0; }

/* the shared reactions tab (reactions.js) rests beside the ball box, under the pause button: never on the card, the numbers or BINGO */
html { --ndj-fxtab-top: 262px; }
