/* ================= Board Trivia =================
   A quiz-show wall: columns of glowing blue value tiles under category headers, a picked tile swelling into the
   question card, answers with glyph badges, the right one lit gold. */
/* the root is .bdt, not .bd: baccarat's bead class (wager.css) is also named .bd, and once leaked onto this root and clipped the game into a circle */
.bdt { position: relative; flex: 1; margin: -1.5vh -3vw -2.5vh; padding: 1.5vh 3vw 2.5vh; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); overflow: hidden; font-family: var(--display); --tile: #1f3fa8; --tile2: #0f2366; }
.bdt i, .bdt b, .bdt em { font-style: normal; }
/* one grid for the whole wall: the headers share a row (a two-line header no longer pushes its column's tiles out of line) */
.bd-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); grid-template-rows: auto repeat(5, minmax(0, 1fr)); grid-auto-flow: column; gap: 1vh; width: 100%; height: 100%; min-height: 0; }
.bd-col { display: contents; }
.bd-cat { display: grid; justify-items: center; gap: .2vh; padding: 1vh .6vw; border-radius: 1.2vh; text-align: center; font-weight: 900; font-size: 2.2vh; line-height: 1.1; color: #fff; text-transform: uppercase; background: linear-gradient(180deg, #2a1f6a, #150c3a); box-shadow: inset 0 0 0 .25vh rgba(255, 255, 255, .15); text-wrap: balance; }
.bd-cat span { font-size: 3vh; }
.bd-tile { display: grid; place-items: center; min-height: 0; border: 0; border-radius: 1.2vh; font: inherit; font-weight: 900; font-size: 4.6vh; color: var(--gold); text-shadow: 0 .4vh 0 rgba(0, 0, 0, .5);
    background: linear-gradient(180deg, var(--tile), var(--tile2)); box-shadow: inset 0 0 0 .3vh rgba(120, 160, 255, .5), inset 0 -1vh 2vh rgba(0, 0, 0, .35), 0 .8vh 2vh rgba(0, 0, 0, .4); }
.bd-tile.done { background: #0b0a16; box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .06); color: transparent; text-shadow: none; }
.bd-tile.live { background: linear-gradient(180deg, #ffd966, #e6a100); color: #1a1000; text-shadow: none; box-shadow: 0 0 0 .4vh #fff, 0 0 5vh color-mix(in srgb, var(--gold) 80%, transparent); animation: bd-live .6s ease-in-out infinite alternate; }
@keyframes bd-live { to { transform: scale(1.05); } }
/* waiting */
.bd-wait { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2vw; align-items: center; min-height: 0; }
.bd-wait .wt-qr { z-index: 50; }
.bd-wmain { display: grid; justify-items: center; gap: 1.6vh; min-height: 0; }
.bd-sign { display: flex; align-items: center; gap: 1.4vw; }
.bd-sign span { font-size: 7vh; line-height: 1; animation: bd-bob 2.4s ease-in-out infinite alternate; }
@keyframes bd-bob { to { transform: translateY(-.8vh) rotate(-6deg); } }
.bd-sign b { font-weight: 900; font-size: 7vh; line-height: 1; color: #fff; text-shadow: 0 .8vh 0 rgba(0, 0, 0, .5), 0 0 5vh color-mix(in srgb, #4f7bff 60%, transparent); }
.bd-demo { width: 100%; height: 34vh; }
.bd-demo .bd-tile { font-size: 3.2vh; } .bd-demo .bd-cat { font-size: 1.8vh; }
.bd-how { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vh 1vw; }
.bd-how span { padding: .9vh 1.4vw; border-radius: 99px; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.1vh; color: #fff; background: rgba(10, 8, 30, .7); box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .12); }
.bd-roster { padding: .9vh 2.2vw; border-radius: 99px; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.3vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
/* playing */
.bd-play { position: relative; z-index: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.4vh; min-height: 0; }
.bd-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2vw; }
.bd-top .wg-title span { font-size: 5.4vh; } .bd-top .wg-title b { font-size: 4.6vh; }
.bd-phase { justify-self: center; max-width: 100%; padding: 1vh 2.6vw; border-radius: 99px; font-weight: 900; font-size: 3.4vh; line-height: 1.15; text-align: center; overflow-wrap: anywhere; color: #fff; background: rgba(10, 8, 30, .75); box-shadow: 0 0 0 .3vh var(--gold); }
.bd-phase:empty { visibility: hidden; }
.bd-clock { display: grid; justify-items: center; width: 11vh; height: 11vh; align-content: center; border-radius: 50%; background: rgba(10, 8, 30, .8); box-shadow: 0 0 0 .4vh var(--gold); }
.bd-clock b { font-weight: 900; font-size: 5vh; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; } .bd-clock small { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 1.5vh; color: var(--gold); }
.bd-clock.low { box-shadow: 0 0 0 .4vh var(--blood), 0 0 4vh var(--blood); animation: bd-tick .5s ease-in-out infinite alternate; }
@keyframes bd-tick { to { transform: scale(1.08); } }
.bd-body { display: grid; grid-template-columns: minmax(0, 1fr) 34vh; gap: 2vw; min-height: 0; }
.bd-main { min-height: 0; display: grid; }
.bd-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.4vh; min-height: 0; }
.bd-pickbox { display: grid; gap: .3vh; padding: 1.4vh 1.4vw; border-radius: 1.8vh; background: rgba(10, 8, 30, .75); box-shadow: inset 0 0 0 .25vh color-mix(in srgb, var(--gold) 60%, transparent); }
.bd-pickbox small { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 1.9vh; color: var(--gold); letter-spacing: .03em; }
.bd-pickbox b { font-weight: 900; font-size: 3.6vh; line-height: 1.1; color: #fff; overflow-wrap: anywhere; } .bd-pickbox span { font-family: var(--body, Inter), sans-serif; font-weight: 700; font-size: 1.9vh; color: #cfc4e8; }
.bd-scores { display: grid; gap: .5vh; align-content: start; }
.bd-scores h4 { margin: 0 0 .3vh; font-size: 2.2vh; color: var(--gold); }
.bd-scores div { display: grid; grid-template-columns: 3vh minmax(0, 1fr) auto; gap: .6vw; align-items: center; padding: .5vh .8vw; border-radius: .9vh; font-weight: 800; font-size: 2vh; background: rgba(0, 0, 0, .45); }
.bd-scores span { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; color: #fff; } .bd-scores em { color: var(--gold); font-variant-numeric: tabular-nums; }
/* the question card grows out of a tile */
.bd-q { display: flex; flex-direction: column; gap: 1.6vh; padding: 2.4vh 2.4vw; border-radius: 2.4vh; min-height: 0; background: linear-gradient(180deg, var(--tile), var(--tile2)); box-shadow: inset 0 0 0 .4vh rgba(120, 160, 255, .5), 0 2vh 6vh rgba(0, 0, 0, .6); animation: bd-grow .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bd-grow { from { transform: scale(.3); opacity: 0; } }
.bd-qval { align-self: center; padding: .5vh 2vw; border-radius: 99px; font-weight: 900; font-size: 3vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
.bd-qimg { align-self: center; flex: 0 1 auto; min-height: 0; max-height: 22vh; max-width: 100%; object-fit: contain; border-radius: 1.2vh; }
.bd-qtext { flex: 1 1 auto; min-height: 0; display: grid; align-content: center; text-align: center; font-weight: 900; font-size: 4.6vh; line-height: 1.15; color: #fff; text-shadow: 0 .5vh 0 rgba(0, 0, 0, .4); text-wrap: balance; }
.bd-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2vh; }
.bd-opts.truefalse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bd-opt { display: flex; align-items: center; gap: 1vw; padding: 1.4vh 1.4vw; border-radius: 1.6vh; font-weight: 800; font-size: 2.8vh; color: #fff; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 .25vh rgba(255, 255, 255, .15); animation: bd-optin .4s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(.2s + var(--k) * .1s); transition: opacity .5s, background .5s; }
@keyframes bd-optin { from { transform: translateY(2vh); opacity: 0; } }
.bd-opt i { width: 5vh; height: 5vh; display: grid; place-items: center; flex: none; border-radius: 50%; font-size: 2.6vh; background: rgba(255, 255, 255, .12); }
.bd-opt.right { color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); box-shadow: 0 0 0 .4vh #fff, 0 0 5vh color-mix(in srgb, var(--gold) 80%, transparent); }
.bd-opt.wrong { opacity: .35; }
.bd-qtext.l { font-size: 3.8vh; } .bd-qtext.xl { font-size: 3.2vh; }
.bd-qfoot { display: grid; justify-items: center; gap: .6vh; min-height: 3vh; text-align: center; font-family: var(--body, Inter), sans-serif; }
.bd-qfoot b { font-weight: 900; font-size: 2.5vh; color: #fff; } .bd-qfoot span { max-width: 90%; font-weight: 600; font-size: 2.1vh; line-height: 1.25; color: #e8e0ff; }
.bd-over { display: grid; justify-items: center; align-content: center; gap: 1.2vh; min-width: 0; text-align: center; }
.bd-over i { font-size: 14vh; line-height: 1; filter: drop-shadow(0 0 3vh color-mix(in srgb, var(--gold) 70%, transparent)); animation: bd-bob 2.4s ease-in-out infinite alternate; }
.bd-over small { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.6vh; letter-spacing: .06em; color: var(--gold); }
.bd-over b { max-width: 100%; font-weight: 900; font-size: 10vh; line-height: 1.05; overflow-wrap: anywhere; color: #fff; text-shadow: 0 1vh 0 rgba(0, 0, 0, .5), 0 0 6vh color-mix(in srgb, var(--gold) 70%, transparent); } .bd-over b.long { font-size: 7vh; }
.bd-over span { padding: 1vh 2.4vw; border-radius: 99px; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 3.2vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
.bd-over.none b { font-size: 8vh; } .bd-over.none span { color: #fff; background: rgba(10, 8, 30, .75); box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .15); }
@media (prefers-reduced-motion: reduce) { .bdt *, .bdp * { animation: none !important; } }

/* ================= phone ================= */
.bdp { display: grid; gap: .9rem; grid-template-columns: minmax(0, 1fr); }
.bdp > * { min-width: 0; }
.bdp-head { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.bdp-head .ic { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.3rem; background: linear-gradient(180deg, #1f3fa8, #0f2366); }
.bdp-head small { display: block; font-family: var(--body, Inter), sans-serif; font-weight: 700; font-size: .8rem; color: var(--muted, #a7a2b0); }
.bdp-head > b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gold); }
.bdp-big { font-family: var(--display); font-weight: 900; font-size: 1.6rem; margin-bottom: .3rem; }
.bdp-how { display: grid; gap: .45rem; margin-bottom: .9rem; } .bdp-how span { padding: .55rem .75rem; border-radius: 10px; font-weight: 800; background: rgba(255, 255, 255, .06); }
.bdp-in { text-align: center; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ecto) 55%, transparent); }
.bdp-turn { padding: .75rem .9rem; border-radius: 12px; font-weight: 900; text-align: center; background: var(--panel2, #24242b); }
.bdp-turn.go { color: #140a00; background: linear-gradient(180deg, #fff6c8, var(--gold)); } .bdp-turn.got { color: #fff; background: color-mix(in srgb, var(--ecto) 35%, #0b0b10); box-shadow: inset 0 0 0 2px var(--ecto); }
.bdp-turn small { display: block; margin-top: .3rem; font-weight: 600; font-size: .85rem; color: #d9d2ea; }
.bdp-board .bd-grid { gap: 4px; height: auto; grid-template-rows: auto repeat(5, 44px); }
.bdp-board .bd-cat { padding: .3rem .2rem; font-size: .62rem; border-radius: 8px; } .bdp-board .bd-cat span { font-size: .9rem; }
.bdp-board .bd-tile { font-size: 1rem; border-radius: 8px; cursor: pointer; } .bdp-board.dim .bd-tile { opacity: .6; }
.bdp-val { text-align: center; font-family: var(--display); font-weight: 900; color: var(--gold); }
.bdp-q { padding: .9rem; border-radius: 14px; font-family: var(--display); font-weight: 900; font-size: 1.2rem; line-height: 1.2; text-align: center; color: #fff; background: linear-gradient(180deg, #1f3fa8, #0f2366); box-shadow: inset 0 0 0 2px rgba(120, 160, 255, .5); }
.bdp-opts { display: grid; gap: .5rem; }
.bdp-opts button { display: flex; align-items: center; gap: .7rem; min-height: 54px; padding: .6rem .9rem; border: 0; border-radius: 12px; font: inherit; font-weight: 800; font-size: 1rem; text-align: left; color: #fff; background: var(--panel2, #24242b); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); cursor: pointer; }
.bdp-opts button i { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; flex: none; border-radius: 50%; font-style: normal; background: rgba(255, 255, 255, .1); }
.bdp-opts button.on { box-shadow: inset 0 0 0 3px var(--pumpkin); } .bdp-opts button.right { color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); } .bdp-opts button.wrong { opacity: .5; box-shadow: inset 0 0 0 3px var(--blood); }
.bdp-result { display: grid; justify-items: center; gap: .3rem; padding: 1.2rem 1rem; border-radius: 16px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 30%, #1a1030), #0a0612); box-shadow: 0 0 0 3px var(--gold); }
.bdp-result span { color: var(--gold); font-weight: 800; } .bdp-result small { color: var(--muted, #a7a2b0); }
.pp-board { display: grid; place-items: center; }
.bd-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; padding: 0 10px; }
.bd-mini i { display: grid; place-items: center; height: 44px; border-radius: 8px; font-style: normal; font-family: var(--display); font-weight: 900; color: var(--gold); background: linear-gradient(180deg, #1f3fa8, #0f2366); animation: pp-bd 3s ease-in-out infinite; animation-delay: calc(var(--k, 0) * .3s); }
.bd-mini i:nth-child(2) { --k: 1; } .bd-mini i:nth-child(3) { --k: 2; } .bd-mini i:nth-child(4) { --k: 3; } .bd-mini i:nth-child(5) { --k: 4; }
@keyframes pp-bd { 0%, 100% { filter: brightness(.8); } 20% { filter: brightness(1.6); } }

/* the preshow round */
.bd-dbody { display: grid; grid-template-columns: minmax(0, 1fr) 24vh; gap: 1.6vw; width: 100%; height: 40vh; }
.bd-dside { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1vh; min-height: 0; }
.bd-dside .bd-pickbox b { font-size: 2.6vh; } .bd-dside .bd-scores div { font-size: 1.7vh; }
.bd-demo { position: relative; height: 100%; }
.bd-demo .bd-tile { font-size: 3.2vh; } .bd-demo .bd-cat { font-size: 1.8vh; }
.bd-dq { position: absolute; inset: 0; z-index: 3; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.bd-dq .bd-qtext { font-size: 3.6vh; } .bd-dq .bd-opt { font-size: 2.2vh; padding: 1vh 1vw; } .bd-dq .bd-opt i { width: 3.6vh; height: 3.6vh; font-size: 2vh; }
