/* Areena Bingo (decision 2026-09-29): shared bingo components (also in the host view),
   the public page /bingo/ and the OBS broadcast view /bingo/lahetys/. */

/* ---------- Shared components ---------- */
.bingo-ball { display: block; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.bingo-ball.glow { filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.35)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }

.bingo-board { display: grid; gap: 5px; }
.bingo-board-row { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; }
.bingo-board-letter, .bingo-board-cell {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-weight: 800;
  font-variant-numeric: tabular-nums; font-size: clamp(0.62rem, 1.6vw, 0.95rem);
}
.bingo-board-letter { font-weight: 900; }
.bingo-board-cell { background: rgba(255, 255, 255, 0.06); color: rgba(232, 236, 246, 0.35); transition: background 0.4s, color 0.4s, transform 0.4s; }
.bingo-board-cell.on { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.bingo-board-cell.last { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255, 255, 255, 0.6); animation: bingo-pop 0.6s ease-out; }
@keyframes bingo-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1.18); } }

.coupon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 420px; margin: 0 auto; }
.coupon-head { display: grid; place-items: center; padding: 6px 0; border-radius: 10px; font-size: 1.5rem; font-weight: 900; }
.coupon-cell {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; font: inherit; font-size: 1.45rem; font-weight: 800;
  color: #0d1220; background: #fff; border: 2px solid #c9d1e0; cursor: pointer; position: relative; transition: transform 0.1s;
}
.coupon-cell:active { transform: scale(0.95); }
.coupon-cell:disabled { cursor: default; }
.coupon-cell.marked::after {
  content: ""; position: absolute; inset: 12%; border-radius: 50%; background: rgba(217, 70, 239, 0.55);
  box-shadow: inset 0 0 0 3px rgba(124, 92, 240, 0.9);
}
.coupon-cell.free { background: #fff6d6; color: #f5b400; font-size: 1.6rem; line-height: 1; grid-auto-flow: row; align-content: center; gap: 2px; }
.coupon-cell.free small { font-size: 0.55rem; font-weight: 800; color: #6b5410; letter-spacing: 0.08em; }
.coupon-cell.free img { width: 86%; height: 86%; object-fit: contain; }

.bingo-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.bingo-logo-word {
  font-weight: 900; letter-spacing: 0.18em; font-size: 1.35rem;
  background: linear-gradient(90deg, #5cc8ff, #a78bfa 55%, #e879f9); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bingo-logo-word b { font-weight: 900; }

/* ---------- Public page ---------- */
body.bingo-public {
  margin: 0; min-height: 100vh; color: #e8ecf6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 20% 0%, #27407a 0%, #111a33 45%, #0b1020 80%) fixed #0b1020;
}
html:has(body.bingo-public) { background: #0b1020; }
.bp { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; display: grid; gap: 16px; }
.bp-head { display: flex; justify-content: center; padding-top: 6px; }
.bp-head a { text-decoration: none; }
.bp-card { padding: 18px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 12px; }
.bp-card h2 { margin: 0; font-size: 1.3rem; }
.bp-idle { margin: 0; color: #aab3c8; text-align: center; }
.bp-offline { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(245, 196, 81, 0.15); color: #f5c451; text-align: center; font-size: 0.9rem; }
.bp-draw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bp-label { color: #aab3c8; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.bp-stage { font-size: 1.15rem; }
.bp-count { color: #aab3c8; font-size: 0.85rem; }
.bp-last { animation: bingo-pop 0.6s ease-out; }
.bp-recent { display: flex; gap: 6px; min-height: 40px; }
.bp-winners { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(250, 204, 21, 0.12); color: #fde68a; }
.bp-claim label { display: grid; gap: 6px; font-weight: 600; }
.bp-claim input {
  font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.07); color: inherit;
}
.bp-claim input.bp-locked { background: rgba(255, 255, 255, 0.03); border-style: dashed; color: #cfd6e6; cursor: not-allowed; }
.bp-link { background: none; border: none; padding: 0; font: inherit; color: #5cc8ff; text-decoration: underline; cursor: pointer; }
.bp-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem !important; letter-spacing: 0.18em; text-transform: uppercase; }
.bp-claim small, .bp-hint { color: #aab3c8; font-size: 0.85rem; font-weight: 400; }
.bp-hint { margin: 0; }
.bp-error { margin: 0; color: #ff8a95; }
.bp-btn {
  font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 12px; cursor: pointer; color: #e8ecf6;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
}
.bp-btn:disabled { opacity: 0.5; cursor: default; }
.bp-primary { background: linear-gradient(90deg, #1fa8ea, #7c5cf0); border: none; color: #fff; }
.bp-ghost { background: transparent; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-coupon-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bp-code-show { display: grid; text-align: right; }
.bp-code-show small { color: #aab3c8; }
.bp-code-show b { font-family: ui-monospace, Consolas, monospace; font-size: 1.2rem; letter-spacing: 0.1em; }
.bp-foot { text-align: center; color: #8d97b0; font-size: 0.8rem; }
.bp-foot a { color: #5cc8ff; }
@media print {
  body.bingo-public { background: #fff; color: #000; }
  .bp > :not(.coupon-print) { display: none !important; }
  .coupon-print { border: none; background: #fff; color: #000; }
  .coupon-print .bp-hint, .coupon-print .bp-label, .coupon-print small { color: #333; }
  .no-print { display: none !important; }
  .coupon-cell { border-color: #000; }
  .coupon-cell.marked::after { display: none; }
}

/* Automatic bingo (2026-09-30): sounds, Bingo! button, checking, sponsor ad image. */
.bp-sound-row { justify-self: center; max-width: 100%; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: center; }
/* The player's own volumes beside the sound button (user request 2026-10-03): small, not much room. */
.bp-volumes { display: flex; gap: 10px; align-items: center; }
.bp-volume { display: flex; gap: 4px; align-items: center; font-size: 0.95rem; cursor: pointer; }
.bp-volume input { width: 84px; accent-color: #22c55e; cursor: pointer; }
.bp-sound.on { background: rgba(34, 197, 94, 0.18); border-color: rgba(34, 197, 94, 0.5); }
.bp-claims { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(249, 115, 22, 0.16); color: #fed7aa; text-align: center; }
.bp-call { display: grid; gap: 8px; justify-items: center; }
.bp-bingo-btn {
  width: 100%; max-width: 420px; padding: 18px; border: none; border-radius: 18px; cursor: pointer;
  font: 900 2rem/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0.08em; color: #1a2233;
  background: linear-gradient(90deg, #facc15, #fde68a 50%, #f97316); box-shadow: 0 8px 24px rgba(250, 204, 21, 0.35);
}
.bp-bingo-btn:active { transform: scale(0.97); }
.bp-bingo-btn:disabled { opacity: 0.6; }
.bp-call-ok { margin: 0; color: #86efac; font-weight: 600; text-align: center; }
.bp-ad {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 18, 0.82); animation: bc-fade 0.4s ease-out;
}
.bp-ad img { max-width: min(100%, 640px); max-height: 80vh; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }

/* Several coupons side by side on a computer, below each other on a phone (2026-09-30). */
.bp.bp-wide { max-width: 1480px; }
.bp.bp-wide > .bp-draw, .bp.bp-wide > .bp-claim, .bp.bp-wide > .bp-sound-row { width: 100%; max-width: 720px; justify-self: center; }
.bp.bp-wide > .bp-sound-row { width: auto; }
.bp-coupons { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.bp-coupons .bp-coupon { padding: 14px; }
.bp-rules { text-align: center; }
.bp-page-actions { justify-content: center; }
.bp-call { position: sticky; top: 8px; z-index: 5; }
.bp-jackpot {
  padding: 10px 14px; border-radius: 12px; text-align: center; font-weight: 800;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(217, 70, 239, 0.25)); border: 1px solid rgba(147, 197, 253, 0.5); color: #e0f2fe;
}
.bp-jackpot.gone { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); color: #aab3c8; font-weight: 600; }
.bp-jackpot.won { background: linear-gradient(90deg, rgba(250, 204, 21, 0.3), rgba(217, 70, 239, 0.3)); color: #fde68a; }
@media print {
  .bp > .bp-coupons { display: block !important; }
  .bp-coupons .bp-coupon { break-inside: avoid; margin-bottom: 12mm; }
}

/* ---------- Broadcast view (OBS) ---------- */
body.bingo-broadcast { margin: 0; overflow: hidden; background: transparent; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; }
.bc-viewport[data-tausta="tumma"] { background: radial-gradient(circle at 25% 20%, #2a3f78 0%, #121b36 45%, #070b16 85%); }
.bc-viewport[data-tausta="lapinakyva"] { background: transparent; }
.bc-viewport[data-tausta="vihrea"] { background: #00b140; }
.bc-viewport { position: fixed; inset: 0; }
.bc-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: center; }
.bc-top { position: absolute; left: 40px; right: 40px; top: 24px; height: 100px; display: flex; align-items: center; gap: 36px; }
.bc-top .bingo-logo-word { font-size: 3rem; }
.bc-batch { font-size: 1.9rem; color: #cfd6e6; font-weight: 600; }
.bc-status { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bc-stage-pill {
  padding: 10px 28px; border-radius: 999px; font-size: 2.2rem; font-weight: 800;
  background: linear-gradient(90deg, #facc15, #fde68a); color: #1a2233; box-shadow: 0 8px 24px rgba(250, 204, 21, 0.35);
}
.bc-count { font-size: 1.6rem; color: #cfd6e6; }
.bc-count b { color: #fff; }
.bc-bowl-wrap { position: absolute; left: 40px; top: 170px; width: 780px; height: 860px; }
.bc-bowl { display: block; }
.bc-chute {
  position: absolute; left: 330px; top: 760px; width: 120px; height: 70px; border-radius: 0 0 40px 40px;
  background: linear-gradient(180deg, rgba(200, 220, 255, 0.35), rgba(200, 220, 255, 0.08)); border: 4px solid rgba(200, 220, 255, 0.45); border-top: none;
}
.bc-current { position: absolute; left: 900px; top: 150px; width: 980px; height: 470px; display: grid; justify-items: center; align-content: start; gap: 6px; }
.bc-current-caption { font-size: 1.8rem; color: #cfd6e6; text-transform: uppercase; letter-spacing: 0.12em; }
.bc-current-ball { animation: bc-land 0.5s ease-out; }
@keyframes bc-land { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.bc-current-label { font-size: 3.2rem; font-weight: 900; letter-spacing: 0.08em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
.bc-recent { position: absolute; left: 900px; top: 610px; width: 980px; height: 100px; display: flex; justify-content: center; gap: 22px; }
.bc-board { position: absolute; left: 900px; top: 730px; width: 980px; }
.bc-board .bingo-board-letter, .bc-board .bingo-board-cell { font-size: 1.55rem; border-radius: 10px; }
.bc-board .bingo-board-cell { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.35); }
.bc-idle { position: absolute; left: 900px; top: 360px; width: 980px; text-align: center; }
.bc-idle-title { font-size: 5rem; font-weight: 900; }
.bc-idle-sub { font-size: 2.2rem; color: #cfd6e6; margin-top: 12px; }
/* The drawn ball leaves the bowl through the chute and flies to the "current" spot. */
.bc-flying { position: absolute; left: 1225px; top: 205px; width: 330px; height: 330px; animation: bc-fly 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; z-index: 5; }
@keyframes bc-fly {
  0% { transform: translate(-960px, 595px) scale(0.2) rotate(-200deg); opacity: 0.9; }
  25% { transform: translate(-900px, 470px) scale(0.3) rotate(-120deg); opacity: 1; }
  70% { transform: translate(-60px, -40px) scale(1.12) rotate(10deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0); }
}
.bc-bingo {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; z-index: 10;
  background: radial-gradient(circle, rgba(10, 14, 30, 0.75), rgba(10, 14, 30, 0.9)); animation: bc-fade 0.4s ease-out;
}
.bc-viewport[data-tausta="lapinakyva"] .bc-bingo { background: rgba(10, 14, 30, 0.72); }
@keyframes bc-fade { from { opacity: 0; } }
.bc-confetti { position: absolute; inset: 0; pointer-events: none; }
.bc-bingo-word {
  font-size: 15rem; font-weight: 900; letter-spacing: 0.06em; line-height: 1;
  background: linear-gradient(90deg, #facc15, #fff 40%, #facc15 60%, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(250, 204, 21, 0.5)); animation: bc-bingo 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes bc-bingo { from { transform: scale(0.2) rotate(-8deg); opacity: 0; } }
.bc-bingo-stage { font-size: 3rem; color: #fde68a; font-weight: 800; position: relative; }
.bc-bingo-winner { font-size: 4rem; font-weight: 900; position: relative; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }
.bc-final {
  position: absolute; left: 900px; top: 150px; width: 980px; padding: 30px; border-radius: 28px; z-index: 6;
  background: rgba(10, 14, 30, 0.88); border: 2px solid rgba(250, 204, 21, 0.6); display: grid; gap: 10px; font-size: 2rem; text-align: center;
}
.bc-final-title { font-size: 3.6rem; font-weight: 900; color: #fde68a; }
.bc-claims {
  position: absolute; left: 900px; top: 150px; width: 980px; padding: 30px; border-radius: 28px; z-index: 7; text-align: center;
  background: rgba(10, 14, 30, 0.9); border: 3px solid rgba(249, 115, 22, 0.8); display: grid; gap: 8px; animation: bc-fade 0.3s ease-out;
}
.bc-claims-word { font-size: 8rem; font-weight: 900; line-height: 1; color: #fb923c; }
.bc-claims-sub { font-size: 2.6rem; color: #fed7aa; font-weight: 700; }
.bc-claims-card { font-size: 2.6rem; font-weight: 800; }
.bc-paused {
  position: absolute; left: 900px; top: 40px; width: 980px; text-align: center; z-index: 6; padding: 10px; border-radius: 999px;
  background: rgba(10, 14, 30, 0.85); font-size: 2rem; font-weight: 700; color: #fde68a;
}
.bc-ad { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(5, 8, 18, 0.8); animation: bc-fade 0.5s ease-out; }
.bc-ad img { max-width: 1500px; max-height: 860px; border-radius: 28px; box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7); }
.bc-hint {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 14px; z-index: 20;
}
@media (prefers-reduced-motion: reduce) {
  .bc-flying, .bc-bingo-word, .bc-current-ball, .bingo-board-cell.last, .bp-last { animation: none; }
}

/* ---------- Host view (Ylläpito → Bingo) ---------- */
.bingo-host { display: grid; gap: 14px; }
.bingo-host-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.bingo-host-head h2 { margin: 0; }
.bingo-host-stage { font-size: 1.2rem; font-weight: 700; color: #fde68a; }
.bingo-host-last { min-height: 120px; display: grid; place-items: center; }
.bingo-next { font-size: 1.3rem; padding: 14px; }
.bingo-host-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .bingo-host-grid { grid-template-columns: 1fr; } }
.bingo-panel { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 8px; align-content: start; }
.bingo-panel h3 { margin: 0; }
.bingo-panel.has-bingo { border-color: #facc15; background: rgba(250, 204, 21, 0.12); animation: bingo-flash 1.2s ease-in-out 3; }
@keyframes bingo-flash { 50% { box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.5); } }
.bingo-near { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.bingo-near li { display: flex; justify-content: space-between; gap: 8px; }
.bingo-near li.near-1 .badge { background: #f97316; color: #fff; }
.bingo-winners { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(250, 204, 21, 0.1); color: #fde68a; }
.bingo-finished { display: grid; gap: 6px; }
.bingo-host-board .bingo-board-cell, .bingo-host-board .bingo-board-letter { font-size: 0.85rem; }
.bingo-sponsor-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bingo-sponsor-preview { width: 90px; height: 90px; border-radius: 12px; }
/* Transparent and green backgrounds: dark panels keep the texts readable over any video. */
.bc-board .bingo-board-cell { transition: none; }
.bc-viewport:not([data-tausta="tumma"]) .bc-top { background: rgba(10, 14, 30, 0.62); border-radius: 26px; padding: 0 26px; }
.bc-viewport:not([data-tausta="tumma"]) .bc-board { background: rgba(10, 14, 30, 0.62); border-radius: 12px; box-shadow: 0 0 0 16px rgba(10, 14, 30, 0.62); }
.bc-viewport:not([data-tausta="tumma"]) .bc-current-caption,
.bc-viewport:not([data-tausta="tumma"]) .bc-current-label { background: rgba(10, 14, 30, 0.62); border-radius: 14px; padding: 2px 18px; }
.bc-viewport:not([data-tausta="tumma"]) .bc-idle { background: rgba(10, 14, 30, 0.62); border-radius: 26px; padding: 30px; }
.bingo-start-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tab-live { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #3ddc97; vertical-align: middle; animation: pulse 1.4s ease-in-out infinite; }
.bingo-running-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px;
  background: rgba(250, 204, 21, 0.14); border: 1px solid rgba(250, 204, 21, 0.5); color: #fde68a; font-weight: 600;
}
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Lobby card (user request 2026-09-30) ---------- */
.bingo-lobby {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.16), rgba(124, 92, 240, 0.16)); border-color: rgba(250, 204, 21, 0.45);
}
.bingo-lobby.live { border-color: #3ddc97; background: linear-gradient(90deg, rgba(61, 220, 151, 0.18), rgba(124, 92, 240, 0.16)); }
.bingo-lobby-icon { font-size: 2rem; line-height: 1; }
.bingo-lobby-text { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.bingo-lobby-text strong { font-size: 1.1rem; }
.bingo-lobby-text span { font-size: 0.9rem; }
.bp-idle { display: grid; gap: 4px; } .bp-next { font-size: 1.2rem; font-weight: 800; color: #fde68a; }

/* Automatic bingo and sponsor ads (Ylläpito → Bingo, 2026-09-30) */
.bingo-subtabs { flex-wrap: wrap; }
.bingo-ad-row { align-items: center; }
.bingo-ad-row audio { margin-top: 6px; max-width: 100%; }
.bingo-ad-thumb { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: rgba(255, 255, 255, 0.06); flex: none; }
.bc-jackpot {
  align-self: center; white-space: nowrap;
  padding: 6px 20px; border-radius: 999px; font-size: 1.5rem; font-weight: 800; color: #e0f2fe;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.35), rgba(217, 70, 239, 0.4)); border: 2px solid rgba(147, 197, 253, 0.6);
}

/* ---------- Celebrations (2026-10-01): full coupon fireworks, superjackpot show ---------- */
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-jackpot, .fx-fullhouse {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle, rgba(10, 14, 30, 0.72), rgba(5, 8, 18, 0.94)); animation: fx-in 0.5s ease-out;
}
.bc-stage .fx-jackpot, .bc-stage .fx-fullhouse { position: absolute; z-index: 15; cursor: default; }
.bc-viewport[data-tausta="lapinakyva"] .fx-jackpot, .bc-viewport[data-tausta="lapinakyva"] .fx-fullhouse { background: rgba(5, 8, 18, 0.55); }
@keyframes fx-in { from { opacity: 0; } }
.fx-fullhouse-content, .fx-jackpot-content { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0.4em; text-align: center; padding: 16px; }
.fx-fullhouse-title {
  font-size: clamp(4rem, 18vw, 14rem); font-weight: 900; line-height: 1; letter-spacing: 0.05em;
  background: linear-gradient(90deg, #facc15, #fff 40%, #facc15 60%, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(250, 204, 21, 0.5)); animation: bc-bingo 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.fx-fullhouse-sub { font-size: clamp(1.4rem, 4vw, 3rem); font-weight: 800; color: #fde68a; }
.fx-fullhouse-winner, .fx-jackpot-winner { font-size: clamp(1.3rem, 4.5vw, 3.6rem); font-weight: 900; color: #fff; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); }
/* Superjackpot: rotating gold rays, a pulsing diamond, shimmering letters popping in one by one. */
.fx-rays {
  position: absolute; left: 50%; top: 50%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(from 0deg, rgba(250, 204, 21, 0.22) 0deg 7deg, rgba(250, 204, 21, 0) 7deg 18deg);
  animation: fx-spin 24s linear infinite, fx-in 1.2s ease-out;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 42%); mask-image: radial-gradient(circle, #000 0%, transparent 42%);
}
.bc-stage .fx-rays { width: 4200px; height: 4200px; margin: -2100px 0 0 -2100px; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-diamond { width: clamp(90px, 22vw, 260px); filter: drop-shadow(0 0 40px rgba(92, 200, 255, 0.9)); animation: fx-dia-in 1s cubic-bezier(0.2, 1.5, 0.4, 1) both, fx-pulse 1.6s ease-in-out 1s infinite; }
@keyframes fx-dia-in { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
@keyframes fx-pulse { 50% { transform: scale(1.08); filter: drop-shadow(0 0 70px rgba(250, 204, 21, 1)); } }
.fx-jackpot-title { font-size: clamp(2.4rem, 11vw, 11rem); font-weight: 900; line-height: 1; letter-spacing: 0.04em; white-space: nowrap; }
.fx-jackpot-title span {
  display: inline-block; animation: fx-letter 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both, fx-shine 2.4s linear 1.4s infinite;
  background: linear-gradient(100deg, #b45309 0%, #facc15 25%, #fff7cc 45%, #facc15 60%, #f59e0b 100%); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(250, 204, 21, 0.7));
}
@keyframes fx-letter { from { transform: translateY(-1.2em) scale(0.2) rotate(-25deg); opacity: 0; } }
@keyframes fx-shine { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.fx-jackpot-sub { font-size: clamp(1.1rem, 3.5vw, 2.8rem); font-weight: 800; color: #e0f2fe; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.bc-stage .fx-fullhouse-title { font-size: 15rem; }
.bc-stage .fx-fullhouse-sub { font-size: 3.2rem; }
.bc-stage .fx-fullhouse-winner, .bc-stage .fx-jackpot-winner { font-size: 4rem; }
.bc-stage .fx-jackpot-title { font-size: 11rem; }
.bc-stage .fx-jackpot-sub { font-size: 2.8rem; }
.bc-stage .fx-diamond { width: 280px; }
@media (prefers-reduced-motion: reduce) {
  .fx-rays, .fx-jackpot-title span, .fx-diamond, .fx-fullhouse-title { animation: none; }
}
.bingo-player-limit { display: grid; gap: 4px; font-size: 0.85rem; } .bingo-player-limit input { width: 6em; }

/* Coupons near a bingo as pictures for the host (2026-10-01) */
.near-coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.near-coupon { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }
.near-coupon.near-0 { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35); }
.near-coupon.near-1 { border-color: #facc15; }
.near-coupon-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 0.8rem; }
.near-coupon-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.near-coupon-head .badge { flex: none; white-space: nowrap; font-size: 0.68rem; padding: 2px 7px; margin: 0; }
.near-coupon.near-0 .badge { background: #22c55e; color: #052e16; }
.near-coupon-needs { font-size: 0.8rem; color: #fde68a; }
.coupon-grid.mini { gap: 2px; max-width: 200px; }
.coupon-grid.mini .coupon-head { font-size: 0.75rem; padding: 2px 0; border-radius: 5px; }
.coupon-grid.mini .coupon-cell { font-size: 0.75rem; border-radius: 5px; border-width: 1px; }
.coupon-grid.mini .coupon-cell.free { font-size: 0.7rem; }
.coupon-grid.mini .coupon-cell.free small { display: none; }
.coupon-cell.needed { background: #fff3c4; border-color: #f59e0b; box-shadow: inset 0 0 0 2px #f59e0b; }
.bp-help summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; }
.bp-help ol { margin: 4px 0 0; padding-left: 1.3em; display: grid; gap: 6px; color: #cfd6e6; font-size: 0.92rem; line-height: 1.45; }
.bp.bp-wide > .bp-help { width: 100%; max-width: 720px; justify-self: center; }
.bingo-player-list { max-height: 440px; overflow-y: auto; padding-right: 4px; }

/* Ad carousel (2026-10-01) */
.carousel-row { align-items: flex-start; }
.carousel-row.outside { opacity: 0.75; }
.carousel-move { display: grid; justify-items: center; gap: 2px; font-size: 0.8rem; flex: none; }
.carousel-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.carousel-fields label { display: grid; gap: 2px; font-size: 0.8rem; }
.carousel-fields input, .carousel-fields select { font-size: 0.85rem; padding: 4px 6px; }
.carousel-stats { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.carousel-stats th, .carousel-stats td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

/* Bingo! presses of the hosted game for the host (2026-10-01) */
.bingo-calls {
  padding: 12px 14px; border-radius: 14px; background: rgba(249, 115, 22, 0.16); border: 2px solid #f97316;
  display: grid; gap: 4px; animation: bingo-call-pulse 1.2s ease-in-out 3;
}
.bingo-calls h3 { margin: 0 0 4px; color: #fdba74; }
@keyframes bingo-call-pulse { 50% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.35); } }
.badge.badge-call { background: #f97316; color: #1a0f05; margin-left: 6px; }

/* A Bingo! call on the broadcast (2026-10-01) */
.fx-call { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(60, 20, 5, 0.6), rgba(5, 8, 18, 0.9)); }
.bc-stage .fx-call { position: absolute; z-index: 14; }
.bc-viewport[data-tausta="lapinakyva"] .fx-call { background: rgba(30, 10, 2, 0.55); }
.fx-call-flash { position: absolute; inset: 0; background: #fff7cc; animation: fx-flash 0.7s ease-out both; pointer-events: none; }
@keyframes fx-flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.fx-call-rings { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.fx-call-rings span {
  position: absolute; left: -300px; top: -300px; width: 600px; height: 600px; border-radius: 50%;
  border: 14px solid rgba(249, 115, 22, 0.8); animation: fx-ring 1.6s ease-out infinite; opacity: 0;
}
.fx-call-rings span:nth-child(2) { animation-delay: 0.5s; border-color: rgba(250, 204, 21, 0.8); }
.fx-call-rings span:nth-child(3) { animation-delay: 1s; border-color: rgba(217, 70, 239, 0.7); }
@keyframes fx-ring { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.fx-call-content { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0.3em; text-align: center; padding: 16px; }
.fx-call-word {
  font-size: clamp(4rem, 20vw, 16rem); font-weight: 900; line-height: 1; letter-spacing: 0.05em; color: #fff;
  text-shadow: 0 0 30px #f97316, 0 0 60px #facc15, 0 10px 0 #b45309;
  animation: fx-call-pop 0.6s cubic-bezier(0.2, 1.8, 0.4, 1) both, fx-shake 0.5s ease-in-out 0.6s 4;
}
@keyframes fx-call-pop { from { transform: scale(0.1) rotate(-12deg); opacity: 0; } }
@keyframes fx-shake { 25% { transform: rotate(-3deg) scale(1.04); } 75% { transform: rotate(3deg) scale(1.04); } }
.fx-call-sub { font-size: clamp(1.3rem, 4vw, 3.2rem); font-weight: 800; color: #fed7aa; text-transform: uppercase; letter-spacing: 0.12em; }
.fx-call-card { font-size: clamp(1.3rem, 4.5vw, 3.8rem); font-weight: 900; color: #fff; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); animation: fx-call-pop 0.6s 0.4s both; }
.bc-stage .fx-call-word { font-size: 16rem; }
.bc-stage .fx-call-sub { font-size: 3.2rem; }
.bc-stage .fx-call-card { font-size: 3.8rem; }
@media (prefers-reduced-motion: reduce) { .fx-call-word, .fx-call-rings span, .fx-call-card { animation: none; } }

/* Sign-up for codes by text message (2026-10-01) */
.bp-signup-info { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(92, 200, 255, 0.12); color: #e0f2fe; font-weight: 600; }
.bp-claim label.bp-consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.9rem; color: #cfd6e6; }
.bp-claim label.bp-consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; padding: 0; }
.bp-consent a { color: #5cc8ff; }
.bp-turnstile { min-height: 65px; }
.bp-signup-link { text-align: center; margin: 4px 0 0; }
.bp-signup-link a { color: #5cc8ff; font-weight: 700; }

/* Codes by text message, the host's list (2026-10-01) */
.sms-table-wrap { overflow-x: auto; }
.sms-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sms-table th, .sms-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; }
.sms-error { color: #ff8a95; font-size: 0.8rem; max-width: 260px; }
.badge.sms-pending { background: #94a3b8; }
.badge.sms-sending, .badge.sms-sent { background: #5cc8ff; }
.badge.sms-delivered { background: #22c55e; }
.badge.sms-failed { background: #ef4444; color: #fff; }
.bp-channel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bp-channel .bp-btn { margin: 0; }
.bp-channel.bp-amount { grid-template-columns: repeat(3, 1fr); }
.bp-amount-choice { display: grid; gap: 6px; }

/* Coupon claiming closed: the form is dimmed under a notice (2026-10-01) */
.bp-claim { position: relative; }
.bp-claim-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: inherit; }
.bp-claim-closed .bp-claim-fields { opacity: 0.3; filter: grayscale(0.6); pointer-events: none; user-select: none; }
.bp-closed-box {
  position: absolute; inset: 50% 16px auto; transform: translateY(-50%); z-index: 2;
  display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 18px 16px; border-radius: 16px; background: rgba(15, 20, 36, 0.94);
  border: 2px solid rgba(255, 138, 149, 0.7); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.bp-closed-box b { font-size: 1.25rem; color: #ff8a95; letter-spacing: 0.02em; }
.bp-closed-box span { color: #cfd6e6; font-size: 0.95rem; }
.bp-closed-box .bp-btn { margin-top: 4px; }

/* OBS view: the coupons closest to a bingo, 7 × 3 on the 1920×1080 stage (2026-10-01) */
.bcn .bc-idle { left: 0; width: 1920px; }
.bcn-title { font-size: 2.6rem; font-weight: 900; letter-spacing: 0.02em; }
.bcn-last { margin-left: 8px; }
.bcn-grid {
  position: absolute; left: 40px; right: 40px; top: 150px; bottom: 56px;
  display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(3, 1fr); gap: 18px;
}
.bcn-card {
  display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 10px; min-width: 0; border-radius: 18px;
  background: rgba(10, 14, 30, 0.78); border: 3px solid rgba(255, 255, 255, 0.14);
}
.bcn-card.bcn-0 { border-color: #fbbf24; box-shadow: 0 0 24px rgba(251, 191, 36, 0.55); }
.bcn-card.bcn-1 { border-color: #f97316; }
.bcn-card.bcn-2 { border-color: #facc15; }
.bcn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1.15rem; min-width: 0; }
.bcn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bcn-name b { color: #5cc8ff; }
.bcn-missing { flex: none; font-weight: 800; color: #fde68a; }
.bcn-0 .bcn-missing { color: #fbbf24; }
.coupon-grid.bcn-coupon { max-width: 178px; align-self: center; width: 100%; }
.coupon-grid.bcn-coupon .coupon-cell { font-size: 1rem; }
.coupon-grid.bcn-coupon .coupon-head { font-size: 0.95rem; }
.bcn-needs { min-height: 1.4em; text-align: center; font-weight: 800; font-size: 1.05rem; color: #fbbf24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcn-more { position: absolute; right: 44px; bottom: 14px; font-size: 1.4rem; color: #cfd6e6; }
.bc-viewport:not([data-tausta="tumma"]) .bcn-more { background: rgba(10, 14, 30, 0.62); padding: 2px 14px; border-radius: 10px; }

/* Countdown to the first number of the automatic bingo (2026-10-01) */
.countdown { display: grid; justify-items: center; gap: 2px; }
.countdown-label:empty { display: none; }
.countdown-time { font-variant-numeric: tabular-nums; font-weight: 900; letter-spacing: 0.04em; }
.bp-countdown { margin: 6px 0; padding: 10px 14px; border-radius: 14px; background: rgba(92, 200, 255, 0.12); }
.bp-countdown .countdown-label { color: #aab3c8; font-size: 0.9rem; }
.bp-countdown .countdown-time { font-size: 2.6rem; color: #5cc8ff; }
.bc-countdown { margin-top: 28px; }
.bc-countdown .countdown-label { font-size: 2rem; color: #cfd6e6; }
.bc-countdown .countdown-time { font-size: 9rem; line-height: 1; color: #fde68a; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45); }
.bc-current .bc-countdown { margin-top: 60px; }
.bc-current .bc-countdown .countdown-time { font-size: 12rem; }

/* The waiting view between games (2026-10-01) */
.bp-wait-balls { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.bp-wait-balls span { display: inline-block; animation: bp-bounce 1.6s ease-in-out infinite; }
@keyframes bp-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .bp-wait-balls span { animation: none; } }
.bp-wait-title { font-size: 1.3rem; font-weight: 800; color: #e6ebf5; }
.bp-last-winners { margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 0.9rem; display: grid; gap: 2px; }
.bp-last-winners b { color: #fde68a; }

/* The admin's SMS tab (2026-10-01) */
.sms-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.sms-two-status { grid-template-columns: minmax(300px, 380px) 1fr; }
@media (max-width: 900px) { .sms-two-status { grid-template-columns: 1fr; } }
.sms-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sms-row select { flex: 1 1 200px; width: auto; }
.sms-row input[type="date"], .sms-row input[type="time"] { width: auto; }
.sms-schedule { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.35); }
.sms-schedule input[type="date"], .sms-schedule input[type="time"] { width: auto; }
.sms-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sms-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(167, 139, 250, 0.18); color: #ddd6fe; font-size: 0.85rem; }
.sms-chip button { border: 0; background: rgba(255, 255, 255, 0.1); color: inherit; border-radius: 999px; width: 22px; height: 22px; cursor: pointer; }
.sms-counter { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sms-preview { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); white-space: pre-wrap; font-size: 0.9rem; }
.sms-warn { color: #fbbf24; }
.sms-scroll { max-height: 420px; overflow: auto; }
.sms-file { position: relative; overflow: hidden; cursor: pointer; }
.sms-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sms-rejected { margin: 6px 0 0; padding-left: 18px; font-size: 0.85rem; color: #fca5a5; }
.sms-text { white-space: pre-wrap; word-break: break-word; }
.sms-members input { padding: 6px 8px; }
.sms-batches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 520px; overflow: auto; }
.sms-batches button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.03); color: inherit; cursor: pointer; }
.sms-batches button.active { background: rgba(92, 200, 255, 0.14); border-color: rgba(92, 200, 255, 0.45); }
.sms-batches small { display: block; color: #8c95ab; }
.sms-scheduled { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 6px; }
.sms-scheduled-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sms-when { color: #facc15; }
.badge.sms-scheduled { background: #facc15; color: #0d1220; }
.badge.sms-missed, .badge.sms-paused { background: #fb923c; color: #0d1220; }
.badge.sms-done { background: #22c55e; }
.badge.sms-cancelled { background: #64748b; }
.sms-scheduled-head .badge, .sms-batches .badge, .sms-table .badge { flex: none; white-space: nowrap; align-self: center; line-height: 1.6; }

/* "Lähellä bingoa" next to the draw (user request 2026-10-02): two coupons of other players, a little
   smaller than the own ones; below the draw on a narrow screen. */
.bp-draw-row { display: grid; gap: 16px; min-width: 0; }
.bp-draw-row > .bp-draw { min-width: 0; }
.bp.bp-wide > .bp-draw-row { width: 100%; max-width: 720px; justify-self: center; }
/* Three columns on a computer (user feedback 2026-10-02): winners · draw · close to a bingo. */
@media (min-width: 760px) {
  .bp-draw-row.with-side { grid-template-columns: 190px minmax(0, 1fr); align-items: start; }
  .bp-draw-row.with-side.with-near { grid-template-columns: 190px minmax(0, 1fr) 200px; }
  .bp:has(.bp-draw-row.with-side) { max-width: 1180px; }
  .bp.bp-wide > .bp-draw-row.with-side { max-width: 1180px; }
}
/* On a phone the coupons of others are left out (user feedback 2026-10-02) and the winners are a short list. */
@media (max-width: 759px) {
  .bp-draw-row .bp-near { display: none; }
  .bp-draw-row .bp-side-winners { order: 2; }
}
.bp-side-winners { gap: 8px; padding: 14px; align-content: start; }
.bp-side-winner { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: rgba(250, 204, 21, 0.1); font-size: 0.85rem; }
.bp-side-winner span { opacity: 0.8; font-size: 0.78rem; }
.bp-side-winner b { overflow-wrap: anywhere; }
.bp-near { gap: 10px; padding: 14px; align-content: start; }
.bp-near-title { font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; opacity: 0.85; }
.bp-near-empty { font-size: 0.85rem; opacity: 0.7; }
.bp-near-card { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.18); animation: bc-fade 0.5s ease-out; }
.bp-near-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.85rem; min-width: 0; }
.bp-near-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-near-missing { white-space: nowrap; opacity: 0.8; font-size: 0.78rem; }
/* A bingo not called or confirmed yet: grey until someone confirms one. */
.bp-near-bingo { white-space: nowrap; font-weight: 900; letter-spacing: 0.08em; color: #9aa3b5; background: rgba(154, 163, 181, 0.18); padding: 1px 8px; border-radius: 999px; }
.bp-near-coupon.coupon-grid.mini { max-width: 132px; justify-self: center; width: 100%; }


/* A confirmed winner's coupon jumps up big. */
.bp-winner-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 8, 20, 0.6); padding: 16px; animation: bc-fade 0.3s ease-out; }
.bp-winner-card { display: grid; gap: 10px; justify-items: center; padding: 22px; border-radius: 22px; background: #141a2e; border: 2px solid #facc15;
  box-shadow: 0 0 40px rgba(250, 204, 21, 0.45); width: min(420px, 100%); animation: bc-bingo 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.bp-winner-title { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; color: #facc15; text-align: center; }
.bp-winner-name { font-weight: 700; text-align: center; }
.bp-winner-coupon { width: 100%; }
.bp-winner-list { display: grid; gap: 14px; width: 100%; }
.bp-winner-one { display: grid; gap: 6px; justify-items: center; min-width: 0; }
/* Several winners at once (user feedback 2026-10-03): side by side, each a little smaller. */
.bp-winner-card.bp-winner-many { width: min(860px, 100%); max-height: 100%; overflow-y: auto; }
.bp-winner-many .bp-winner-list { grid-template-columns: repeat(auto-fit, minmax(min(240px, 42vw), 1fr)); gap: 12px; }
.bp-winner-many .bp-winner-coupon { max-width: 300px; }
@media (prefers-reduced-motion: reduce) { .bp-near-card, .bp-winner-pop, .bp-winner-card { animation: none; } }

/* The own coupons fit the screen height on a computer (user feedback 2026-10-02: the page did not fit
   vertically). Phones keep the full width; printing is not affected. */
@media screen and (min-width: 760px) {
  .bp-coupons .coupon-grid { max-width: min(340px, 30vh); gap: 3px; }
  .bp-coupons .coupon-head { font-size: clamp(0.95rem, 2.4vh, 1.5rem); padding: 3px 0; border-radius: 8px; }
  .bp-coupons .coupon-cell { font-size: clamp(0.95rem, 2.4vh, 1.45rem); border-radius: 9px; }
  .bp-coupons .coupon-cell.free { font-size: clamp(1rem, 2.6vh, 1.6rem); }
  .bp-coupons { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 300px)); justify-content: center; gap: 12px; }
  .bp-coupons .bp-coupon { padding: 10px; gap: 8px; }
  .bp-coupons .bp-coupon h2 { font-size: 1.05rem; margin: 0; }
}

/* The Bingo! button floats in the bottom corner (user feedback 2026-10-02: it took room); its answer
   above it goes away after 5 s. */
.bp-call { position: fixed; right: 16px; bottom: 16px; top: auto; z-index: 40; display: grid; justify-items: end; gap: 8px; pointer-events: none; }
.bp-call > * { pointer-events: auto; }
.bp-call .bp-bingo-btn { width: 112px; height: 112px; max-width: none; padding: 0; border-radius: 50%; font-size: 1.45rem; letter-spacing: 0.04em;
  box-shadow: 0 8px 28px rgba(250, 204, 21, 0.5), 0 0 0 4px rgba(20, 26, 46, 0.85); }
.bp-call-msg { max-width: min(320px, calc(100vw - 32px)); margin: 0; padding: 10px 14px; border-radius: 14px; background: #141a2e;
  border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); text-align: left; animation: bc-fade 0.3s ease-out; }
/* On a phone a wide bar at the bottom edge instead of a ball over the coupon numbers. */
@media (max-width: 759px) {
  .bp-call { left: 12px; right: 12px; bottom: 10px; justify-items: stretch; }
  .bp-call .bp-bingo-btn { width: 100%; height: 56px; border-radius: 16px; font-size: 1.4rem; }
  .bp:has(.bp-call) { padding-bottom: 90px; }
}
/* Room for the button at the end of the page. */
.bp:has(.bp-call) { padding-bottom: 140px; }

/* Full rows on the own coupons (user request 2026-10-02). */
.coupon-cell.row-full { background: #dcfce7; border-color: #22c55e; box-shadow: inset 0 0 0 2px #22c55e; }
.coupon-cell.row-full.free { background: #bbf7d0; }

/* Close to a bingo on the own coupon: a coloured ellipse and the numbers still needed (user request 2026-10-02). */
.bp-close { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.bp-close-badge { padding: 4px 14px; border-radius: 999px; font-weight: 900; font-size: 0.95rem; color: #1a2233; white-space: nowrap; }
.bp-close-2 .bp-close-badge { background: #fbbf24; }
.bp-close-1 .bp-close-badge { background: #fb923c; box-shadow: 0 0 14px rgba(251, 146, 60, 0.55); }
.bp-close-0 .bp-close-badge { background: #4ade80; box-shadow: 0 0 16px rgba(74, 222, 128, 0.6); animation: bingo-pulse 1s ease-in-out infinite alternate; }
.bp-close-needs { font-weight: 700; font-size: 0.9rem; color: #fde68a; }
@keyframes bingo-pulse { to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bp-close-0 .bp-close-badge, .bp-call-msg { animation: none; } }

/* The previous numbers in the head row of the draw (user feedback 2026-10-02: saves height). */
.bp-draw-head .bp-recent { flex: 1; justify-content: flex-end; flex-wrap: wrap; min-height: 0; }
@media (max-width: 759px) {
  .bp-draw-head { flex-wrap: wrap; }
  .bp-draw-head > :first-child { flex: 1; min-width: 0; }
  .bp-draw-head .bp-recent { order: 3; flex-basis: 100%; justify-content: flex-start; }
}

/* "Lähellä bingoa" side by side (user suggestion 2026-10-02): the two coupons next to each other, so the
   panel is no taller than the draw. */
@media (min-width: 760px) {
  .bp-draw-row.with-side.with-near { grid-template-columns: 170px minmax(0, 1fr) 330px; }
  .bp-near { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-near-title, .bp-near-empty { grid-column: 1 / -1; }
  .bp-near-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .bp-near-coupon.coupon-grid.mini { max-width: none; }
}
@media (min-width: 760px) {
  .bp-draw-row.with-side.with-near { grid-template-columns: 170px minmax(0, 1fr) 340px; }
  .bp-near-card { padding: 6px; min-width: 0; }
  .bp-near-coupon.coupon-grid.mini { gap: 1px; min-width: 0; }
  .bp-near-coupon.coupon-grid.mini .coupon-cell { font-size: 0.62rem; border-radius: 4px; min-width: 0; }
  .bp-near-coupon.coupon-grid.mini .coupon-head { font-size: 0.62rem; padding: 1px 0; border-radius: 4px; }
}

/* Small links in the top corner: "Näin pelaat" and "Kirjaudu ulos" (user request 2026-10-02). */
.bp-head { position: relative; }
.bp-top-links { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: 14px; }
.bp-top-link { background: none; border: none; padding: 4px 2px; color: #aab3c8; font: inherit; font-size: 0.82rem; font-weight: 400; cursor: pointer; }
.bp-top-link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 520px) {
  .bp-head { justify-content: flex-start; }
  .bp-top-links { gap: 10px; }
}
/* The coupon number and code only on paper. */
.print-only { display: none; }
@media print { .print-only { display: block; } .bp-code-show.print-only { display: grid; } }
/* Several numbers may give the bingo: the list wraps. */
.bp-close-needs { max-width: 100%; text-align: center; overflow-wrap: anywhere; }

/* Surprise animations while waiting for the draw (user request 2026-10-03). */
.bp-surprise { position: fixed; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
.bp-surprise-rain span { position: absolute; top: -70px; animation: bp-fall 3.2s cubic-bezier(0.35, 0, 0.75, 1) forwards; }
@keyframes bp-fall { to { transform: translateY(calc(100vh + 120px)) rotate(540deg); } }
.bp-roll { position: absolute; bottom: 24px; left: -260px; display: flex; align-items: center; gap: 14px; animation: bp-roll 6s linear forwards; }
.bp-roll > :first-child { animation: bp-spin 1.2s linear infinite; }
.bp-roll b { font-size: 1.6rem; font-weight: 900; color: #fde68a; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); white-space: nowrap; }
@keyframes bp-roll { to { transform: translateX(calc(100vw + 520px)); } }
@keyframes bp-spin { to { transform: rotate(360deg); } }
.bp-letters { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: flex; gap: 10px; }
.bp-letters i { font-style: normal; font-weight: 900; font-size: clamp(3rem, 12vw, 7rem); color: #fff; opacity: 0;
  text-shadow: 0 0 24px rgba(124, 92, 240, 0.9), 0 6px 0 #7c5cf0; animation: bp-jump 6s ease-in-out forwards; }
.bp-letters i:nth-child(1) { color: #60a5fa; } .bp-letters i:nth-child(2) { color: #f87171; } .bp-letters i:nth-child(3) { color: #f1f5f9; }
.bp-letters i:nth-child(4) { color: #4ade80; } .bp-letters i:nth-child(5) { color: #facc15; }
@keyframes bp-jump {
  0% { opacity: 0; transform: translateY(60px) scale(0.4); }
  12% { opacity: 1; transform: translateY(-30px) scale(1.15); }
  22%, 34%, 46%, 58% { transform: translateY(0) scale(1); }
  28%, 40%, 52% { transform: translateY(-22px) scale(1.05); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-40px) scale(0.9); }
}
.bp-burst { position: absolute; width: 0; height: 0; animation: bp-burst-show 1.6s ease-out both; }
.bp-burst em { position: absolute; left: 0; top: 0; width: 4px; height: 70px; margin-left: -2px; transform-origin: 2px 0; border-radius: 4px;
  background: linear-gradient(#fde68a, rgba(217, 70, 239, 0)); }
.bp-burst em:nth-child(3n) { background: linear-gradient(#5cc8ff, rgba(92, 200, 255, 0)); }
.bp-burst em:nth-child(3n + 1) { background: linear-gradient(#f472b6, rgba(244, 114, 182, 0)); }
@keyframes bp-burst-show { 0% { opacity: 0; transform: scale(0.1); } 15% { opacity: 1; } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .bp-surprise { display: none; } }

/* The draw view after the coupon claiming has closed, before the first number (2026-10-03). */
.bp-pregame-time { font-size: 1.05rem; }

/* The Bingo! button below "Lähellä bingoa" on a computer (user request 2026-10-07): a rounded rectangle in
   the right column, which never makes the row taller than the draw (the column is laid over the row's
   height; the coupons of others give room). The answer is shown over the panel, above the button. */
@media (min-width: 760px) {
  .bp-side-right { position: relative; align-self: stretch; min-width: 0; }
  .bp-side-right-inner { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; }
  .bp-side-right .bp-near { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .bp-side-right .bp-call { position: relative; inset: auto; z-index: 5; display: block; flex: none; pointer-events: auto; }
  .bp-side-right .bp-call .bp-bingo-btn { width: 100%; height: 60px; border-radius: 16px; font-size: 1.8rem; letter-spacing: 0.08em; }
  /* The coupons of others a little lower, so that both fit above the button. */
  .bp-side-right .bp-near { gap: 8px; padding: 12px; }
  .bp-side-right .bp-near-coupon.coupon-grid.mini .coupon-cell,
  .bp-side-right .bp-near-coupon.coupon-grid.mini .coupon-head { aspect-ratio: 1.5; }
  .bp-side-right .bp-call-msg { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); max-width: none; }
  .bp:has(.bp-call) { padding-bottom: 24px; }
}
/* On a phone the column is not there: the button stays a bar at the bottom edge. */
@media (max-width: 759px) {
  .bp-side-right, .bp-side-right-inner { display: contents; }
  .bp:has(.bp-call) { padding-bottom: 90px; }
}
