/* Espaço Online · Television Broadcast Display & Prize Podium Specialization */
[hidden] {
  display: none !important;
}

/* ==========================================================================
   ANIMATED EFFECTS FOR TV PRIZES & PODIUMS
   ========================================================================== */
@keyframes prize-pulse-bingo {
  0%, 100% {
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.75),
      0 0 28px rgba(245, 213, 124, 0.45),
      inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border-color: #ffd768;
    transform: scale(1);
  }
  50% {
    box-shadow: 
      0 14px 45px rgba(0, 0, 0, 0.85),
      0 0 55px rgba(245, 213, 124, 0.85),
      inset 0 1px 4px rgba(255, 255, 255, 0.8);
    border-color: #fff6d3;
    transform: scale(1.025);
  }
}

@keyframes prize-pulse-acumulado {
  0%, 100% {
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.75),
      0 0 26px rgba(255, 120, 30, 0.4),
      inset 0 1px 2px rgba(255, 200, 150, 0.35);
    border-color: #ff9938;
    transform: scale(1);
  }
  50% {
    box-shadow: 
      0 14px 45px rgba(0, 0, 0, 0.85),
      0 0 50px rgba(255, 120, 30, 0.8),
      inset 0 1px 4px rgba(255, 220, 180, 0.7);
    border-color: #ffc278;
    transform: scale(1.025);
  }
}

@keyframes prize-active-pulse {
  0%, 100% {
    border-color: rgba(255, 235, 151, 0.92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 221, 93, 0.34), 0 0 24px rgba(255, 214, 86, 0.62), 0 0 52px rgba(255, 186, 44, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.24);
  }
  50% {
    border-color: #fff8cf;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.62), 0 0 0 4px rgba(255, 224, 102, 0.58), 0 0 54px rgba(255, 211, 73, 1), 0 0 88px rgba(255, 184, 38, 0.5), inset 0 1px 4px rgba(255, 255, 255, 0.64);
  }
}

@keyframes prize-shimmer {
  0% { transform: translateX(-180%) skewX(-25deg); opacity: 0; }
  12% { opacity: 1; }
  35% { opacity: 1; }
  50%, 100% { transform: translateX(280%) skewX(-25deg); opacity: 0; }
}

@keyframes prize-icon-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.15); }
}

/* ==========================================================================
   PRIZE CARDS CONTAINER & CARDS
   ========================================================================== */
.prizes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.prize {
  position: relative;
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  padding: 11px 13px;
  background: linear-gradient(155deg, #1c212d 0%, #0e1118 100%);
  border: 1.5px solid rgba(220, 185, 95, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.prize-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prize-icon-wrap {
  font-size: 26px;
  line-height: 1;
  display: inline-block;
  animation: prize-icon-bob 3.2s infinite ease-in-out;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.prize-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prize .prize-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #eed695;
  display: block;
}

.prize .prize-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: #a59b8b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

.prize strong, .prize .prize-amount {
  font-family: var(--font-display);
  /* Scale against each card so long amounts never run into the next card. */
  font-size: clamp(20px, 15cqw, 54px);
  font-weight: 900;
  color: #ffffff;
  display: block;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 14px rgba(245, 213, 124, 0.45);
  line-height: 1.05;
  white-space: nowrap;
}

/* ==========================================================================
   SPECIFIC LUXURY CARD TIERS
   ========================================================================== */
.prize.prize-quadra {
  border-color: rgba(190, 140, 60, 0.45);
  background: linear-gradient(155deg, #24221a 0%, #12120e 100%);
}
.prize.prize-quadra strong, .prize.prize-quadra .prize-amount {
  color: #f7e6b5;
}

.prize.prize-quina {
  border-color: rgba(220, 175, 75, 0.55);
  background: linear-gradient(155deg, #2b2518 0%, #16140f 100%);
}
.prize.prize-quina strong, .prize.prize-quina .prize-amount {
  color: #fff0be;
}

.prize.prize-bingo {
  background: linear-gradient(150deg, #44300f 0%, #201605 100%);
  border: 2px solid #ffd768;
  animation: none;
}

.prize.prize-bingo strong, .prize.prize-bingo .prize-amount {
  color: #fffbdf;
  text-shadow: 0 0 20px rgba(255, 222, 100, 0.85), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.prize.prize-bingo .prize-label {
  color: #ffe685;
}

.prize.prize-acumulado {
  background: linear-gradient(150deg, #462007 0%, #200d02 100%);
  border: 2px solid #ff9d42;
  animation: none;
}

/* Only the prize currently being drawn receives the attention pulse. */
.prize.prize-active {
  animation: prize-active-pulse 1.05s ease-in-out infinite;
  z-index: 2;
}

.prize.prize-active::before {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: 0;
  border: 1px solid rgba(255, 246, 190, 0.62);
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(255, 226, 119, 0.24);
  pointer-events: none;
}

.prize.prize-active > * { position: relative; z-index: 1; }
.prize.prize-active .prize-shine {
  width: 72%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 224, 0.48), transparent);
  animation-duration: 2.15s;
}
.prize.prize-active .prize-icon-wrap,
.prize.prize-active .prize-amount {
  text-shadow: 0 0 18px rgba(255, 236, 140, 0.88), 0 2px 8px rgba(0, 0, 0, 0.88);
}

.prize.prize-acumulado strong, .prize.prize-acumulado .prize-amount {
  color: #fff0d6;
  text-shadow: 0 0 20px rgba(255, 140, 50, 0.8), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.prize.prize-acumulado .prize-label {
  color: #ffaa5b;
}

/* Specular Shimmer Ray */
.prize-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  animation: prize-shimmer 5.5s infinite ease-in-out;
  pointer-events: none;
}

.prize.prize-bingo .prize-shine {
  background: linear-gradient(90deg, transparent, rgba(255, 245, 180, 0.3), transparent);
  animation-duration: 4.2s;
}

.prize.prize-acumulado .prize-shine {
  background: linear-gradient(90deg, transparent, rgba(255, 210, 160, 0.28), transparent);
  animation-duration: 4.8s;
}

/* Keep the official call history readable over the broadcast background. A
   dark glass panel preserves the TV atmosphere while separating the balls and
   labels from the bright sky artwork underneath. */
body.tv-broadcast-body #live-strip.live-strip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 45%, rgba(27, 102, 179, 0.28), transparent 42%),
    linear-gradient(135deg, rgba(5, 20, 43, 0.96), rgba(7, 13, 27, 0.94) 55%, rgba(19, 31, 52, 0.96));
  border: 1px solid rgba(137, 191, 255, 0.68);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -24px 44px rgba(0, 0, 0, 0.24);
}

body.tv-broadcast-body #live-strip.live-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 72%, rgba(79, 160, 255, 0.08));
  pointer-events: none;
}

body.tv-broadcast-body #live-strip .eyebrow,
body.tv-broadcast-body #live-strip .recent-label,
body.tv-broadcast-body #live-strip .called-meter {
  color: #d9eaff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

body.tv-broadcast-body #live-strip .phase-row strong,
body.tv-broadcast-body #live-strip #called-count {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
   STANDARD TV & DESKTOP RESOLUTIONS (16:9 VIEWPORT LOCK)
   ========================================================================== */
@media (min-width: 950px) {
  body.tv-broadcast-body, body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    height: 70px;
    padding: 10px 2.5vw;
    flex-shrink: 0;
  }

  main {
    flex: 1;
    min-height: 0;
    padding: 14px 2.5vw;
    gap: 20px;
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(320px, 1fr);
  }

  .board {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 20px;
  }

  .heading, .prizes, .live-strip {
    flex-shrink: 0;
  }

  .heading h1 {
    margin: 2px 0 6px;
  }

  .waiting-screen {
    flex: 1;
    min-height: 0;
    margin: 10px 0 4px;
    padding: 16px 20px;
  }

  .number-board {
    flex: 1;
    min-height: 0;
    grid-template-rows: repeat(6, minmax(0, 1fr));
  }

  .number {
    aspect-ratio: auto;
    min-height: 0;
  }

  aside {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 14px;
  }

  .join {
    flex-shrink: 0;
    padding: 14px 16px;
  }

  .tickets {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
  }

  .participants {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(135, 192, 255, .45) transparent;
  }

  .ticket {
    margin: 0 0 8px;
    padding: 8px 12px;
  }

  .tickets-title {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .winners {
    max-height: 48px;
    overflow: auto;
    flex-shrink: 0;
    margin-top: 8px;
  }

  .bottom {
    height: 38px;
    padding: 4px 2.5vw 8px;
    flex-shrink: 0;
  }
}

/* Tight vertical space (e.g. 720p or small laptop) */
@media (min-width: 950px) and (max-height: 820px) {
  .topbar {
    height: 62px;
    padding: 6px 2vw;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  .brand-title {
    font-size: 18px;
  }
  .board {
    padding: 12px 16px;
  }
  .live-strip {
    margin: 8px 0;
    padding: 10px 14px;
    gap: 18px;
  }
  .last-ball {
    width: 90px;
    height: 90px;
    font-size: 50px;
    border-width: 4px;
  }
  .phase-row strong, .live-info>strong {
    font-size: 28px;
  }
  .recent {
    gap: 6px;
  }
  .recent span {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .prizes {
    gap: 8px;
    margin-bottom: 8px;
  }
  .prize {
    padding: 8px 10px;
  }
  .prize strong, .prize .prize-amount {
    font-size: clamp(20px, 15cqw, 42px);
    margin-top: 3px;
    letter-spacing: -0.5px;
  }
  .prize-icon-wrap {
    font-size: 20px;
  }
  .prize .prize-label {
    font-size: 11px;
  }
  .prize .prize-sub {
    font-size: 8px;
  }
  h1 {
    font-size: 24px;
  }
  .big-countdown span {
    padding: 8px 12px;
    font-size: clamp(40px, 7vw, 95px);
  }
  .big-countdown b, .countdown-sep {
    font-size: 55px;
    margin-top: -16px;
  }
  .join {
    padding: 10px 14px;
  }
  .join h2 {
    font-size: 17px;
  }
  #qr {
    width: 96px;
    height: 96px;
  }
  .join p {
    font-size: 10px;
    margin: 4px 0 8px;
  }
  .tickets h2 {
    font-size: 16px;
  }
  .total {
    font-size: 18px;
    padding: 3px 10px;
  }
}

/* Give each prize room to breathe on medium TV/browser widths. */
@media (min-width: 950px) and (max-width: 1250px) {
  .prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .prize {
    padding: 10px 12px;
  }
  .prize strong, .prize .prize-amount {
    font-size: clamp(28px, 3.3vw, 46px);
    letter-spacing: -0.8px;
  }
}

/* Large 4K / Ultra-wide displays */
@media (min-width: 1920px) {
  .topbar {
    height: 84px;
    padding: 14px 3vw;
  }
  .brand-mark {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }
  .brand-title {
    font-size: 24px;
  }
  .brand-badge {
    font-size: 11px;
  }
  .board {
    padding: 26px 28px;
  }
  h1 {
    font-size: 42px;
  }
  .prizes {
    gap: 12px;
    margin-bottom: 14px;
  }
  .prize {
    padding: 14px 16px;
  }
  .prize strong, .prize .prize-amount {
    font-size: 56px;
    letter-spacing: -1px;
  }
  .prize-icon-wrap {
    font-size: 32px;
  }
  .prize .prize-label {
    font-size: 15px;
  }
  .big-countdown span {
    font-size: 140px;
    padding: 16px 22px;
  }
  .big-countdown b, .countdown-sep {
    font-size: 100px;
  }
  #ticket-price {
    font-size: 28px;
    padding: 10px 34px;
  }
  .last-ball {
    width: 180px;
    height: 180px;
    font-size: 100px;
  }
  .number {
    font-size: 24px;
  }
  #qr {
    width: 140px;
    height: 140px;
  }
  .join h2 {
    font-size: 24px;
  }
  .join p {
    font-size: 14px;
  }
  .ticket strong {
    font-size: 16px;
  }
  .mini-grid span {
    font-size: 14px;
    padding: 6px 0;
  }
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE FALLBACKS
   ========================================================================== */
@media (max-width: 949px) {
  main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .topbar-center {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .join {
    flex-direction: column;
    text-align: center;
  }
  .join-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 580px) {
  aside {
    display: block;
  }
  .join {
    flex-direction: row;
    text-align: left;
    margin-bottom: 16px;
  }
  .join-content {
    align-items: flex-start;
  }
  .board {
    padding: 16px;
  }
  .prizes {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .prize strong, .prize .prize-amount {
    font-size: clamp(20px, 15cqw, 42px);
  }
  .number-board {
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
  }
  .big-countdown span {
    font-size: 50px;
    padding: 8px 10px;
  }
  .waiting-screen {
    min-height: 260px;
  }
  #qr {
    width: 95px;
    height: 95px;
  }
}

/* ========================================================================== 
   TV WINNER ANNOUNCEMENT, NEAREST CARDS & NEXT ROUND
   ========================================================================== */
.winners.has-winners {
  display: block;
  max-height: 230px;
  overflow: auto;
  margin-top: 12px;
  padding: 14px 16px;
  border: 2px solid #ffd768;
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 219, 98, 0.3), transparent 38%),
    linear-gradient(135deg, rgba(83, 47, 5, 0.98), rgba(28, 18, 6, 0.98));
  box-shadow: 0 0 30px rgba(245, 211, 114, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: winner-announcement 1.8s ease-in-out infinite alternate;
}

@keyframes winner-announcement {
  from { box-shadow: 0 0 22px rgba(245, 211, 114, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
  to { box-shadow: 0 0 42px rgba(245, 211, 114, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

.winner-alert-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffe89b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.winner-alert-heading strong {
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0;
}

.winner-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

/* Full-screen celebration shown briefly when a new prize is confirmed. */
.winner-gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(3, 10, 24, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

.winner-gift-overlay.is-visible { opacity: 1; }

.winner-spotlight-card {
  position: relative;
  width: min(760px, 100%);
  max-width: 100%;
  max-height: min(88vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(126, 190, 255, 0.75);
  border-top: 5px solid #f5cf63;
  border-radius: 24px;
  color: #f5f8ff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(66, 151, 236, 0.24), transparent 48%),
    linear-gradient(150deg, #102f59 0%, #0b1c38 54%, #071326 100%);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.72), 0 0 46px rgba(74, 161, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: winner-spotlight-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes winner-spotlight-in {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.winner-spotlight-card::before,
.winner-spotlight-card::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(245, 207, 99, 0.28);
  border-radius: 50%;
  opacity: .7;
}

.winner-spotlight-card::before { top: -45px; left: -45px; }
.winner-spotlight-card::after { right: -45px; bottom: -45px; }

.winner-spotlight-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 10px 17px;
  border: 1px solid rgba(143, 205, 255, 0.52);
  border-radius: 999px;
  color: #f9df88;
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(20, 64, 111, 0.9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.winner-spotlight-ribbon small, .winner-spotlight-ribbon b { font-size: 12px; font-weight: 900; letter-spacing: 1.1px; line-height: 1.25; }
.winner-spotlight-ribbon b { color: #fff0b0; }

.winner-spotlight-heading {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  text-align: left;
}

.winner-spotlight-heading div { display: grid; gap: 3px; min-width: 0; }
.winner-spotlight-heading span { color: #8ecbff; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.winner-spotlight-heading strong { overflow-wrap: anywhere; color: #ffffff; font-family: var(--font-display); font-size: clamp(24px, 3vw, 40px); line-height: 1; }
.winner-spotlight-heading > b { margin-left: auto; padding: 6px 10px; border: 1px solid rgba(245, 207, 99, .45); border-radius: 999px; color: #ffe49a; font-size: 13px; line-height: 1.2; white-space: nowrap; }

.winner-spotlight-winner-hero {
  display: grid;
  justify-items: center;
  gap: 3px;
  max-width: 100%;
  margin: 0 auto 12px;
}
.winner-spotlight-winner-hero small { color: #8ecbff; font-size: 11px; font-weight: 900; letter-spacing: 1.5px; line-height: 1.2; }
.winner-spotlight-winner-hero strong { max-width: 100%; overflow-wrap: anywhere; color: #ffffff; font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 42px); font-weight: 900; line-height: 1.05; text-transform: uppercase; text-shadow: 0 3px 16px rgba(0, 0, 0, .32); }

.winner-spotlight-prize-hero {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0 auto 18px;
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(255, 225, 126, .3);
  border-bottom: 1px solid rgba(255, 225, 126, .3);
}
.winner-spotlight-prize-hero small { color: #ffe8a0; font-size: 11px; font-weight: 900; letter-spacing: 1.5px; line-height: 1.2; }
.winner-spotlight-prize-hero strong { color: #fff1a9; font-family: var(--font-display); font-size: clamp(50px, 10vw, 88px); font-weight: 900; letter-spacing: -.045em; line-height: .98; text-shadow: 0 4px 20px rgba(0, 0, 0, .35); white-space: nowrap; }

.winner-spotlight-message { margin: 0 0 20px; color: #d5eaff; font-size: clamp(15px, 1.6vw, 19px); font-weight: 700; line-height: 1.35; }
.winner-spotlight-message strong { color: #ffe18a; }

.winner-spotlight-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  text-align: left;
}

.winner-spotlight-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(127, 190, 255, 0.42);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(31, 66, 106, 0.92), rgba(10, 27, 52, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.25);
}

.winner-spotlight-item div { display: grid; min-width: 0; gap: 3px; text-align: center; }
.winner-spotlight-item small { color: #8ecbff; font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.winner-spotlight-item strong { overflow-wrap: anywhere; color: #ffffff; font-family: var(--font-display); font-size: clamp(18px, 1.8vw, 26px); line-height: 1.08; text-transform: uppercase; }
.winner-spotlight-item span { overflow-wrap: anywhere; color: #b9d4ef; font-size: 10px; line-height: 1.3; white-space: normal; }
.winner-spotlight-item > b { color: #ffe28a; font-family: var(--font-display); font-size: clamp(28px, 6vw, 54px); font-weight: 900; line-height: .98; letter-spacing: -.035em; text-align: right; white-space: nowrap; text-shadow: 0 0 18px rgba(255, 222, 105, 0.48); }

.winner-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(12, 12, 14, 0.54);
  border: 1px solid rgba(255, 230, 145, 0.32);
}

.winner-trophy {
  font-size: 28px;
  filter: drop-shadow(0 0 7px rgba(255, 220, 100, 0.75));
}

.winner-item div {
  display: grid;
  min-width: 0;
}

.winner-item small {
  color: #ffd768;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.winner-item strong {
  overflow: hidden;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 27px);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-item span:not(.winner-trophy) {
  color: #e9dcae;
  font-size: 10px;
}

.winner-item > b {
  color: #fff4c6;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 216, 100, 0.68);
}

/* The waiting sidebar is a results board until the next draw goes live. */
.recent-winners {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 215, 104, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 215, 104, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(25, 28, 41, 0.98), rgba(8, 12, 22, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 28px rgba(0, 0, 0, 0.2);
}
.recent-winners-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #ffdd77;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.recent-winners-heading strong { color: #9ff2c1; font-size: 10px; letter-spacing: 0.4px; text-transform: none; }
.recent-winners-list { display: grid; gap: 8px; }
.recent-winner-codes { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.recent-winner-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 221, 119, 0.22);
  border-radius: 11px;
  background: rgba(4, 9, 19, 0.54);
}
.recent-winner-trophy { font-size: 24px; filter: drop-shadow(0 0 8px rgba(255, 211, 85, 0.72)); }
.recent-winner-item div { display: grid; min-width: 0; }
.recent-winner-item small { color: #ffdc73; font-size: 9px; font-weight: 900; letter-spacing: 0.8px; }
.recent-winner-item strong { overflow: hidden; color: #fff; font-family: var(--font-display); font-size: clamp(14px, 1.4vw, 20px); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.recent-winner-item span { overflow-wrap: anywhere; color: #aebbd2; font-size: 10px; line-height: 1.3; white-space: normal; }
.recent-winner-item > b { color: #ffe9a5; font-family: var(--font-display); font-size: clamp(19px, 2.2vw, 30px); line-height: 1; white-space: nowrap; }
.recent-winners-empty { display: flex; align-items: center; gap: 12px; min-height: 100px; color: #d9e2f4; }
.recent-winners-empty > span { font-size: 32px; }
.recent-winners-empty div { display: grid; gap: 5px; }
.recent-winners-empty strong { color: #fff; font-size: 17px; }
.recent-winners-empty small { color: #aebbd2; line-height: 1.4; }

/* Winner results are announced by the full-screen golden gift overlay. Keep
   the legacy inline panel out of the broadcast layout so it cannot compete
   with the board or duplicate the announcement below it. */
.tv-broadcast-body #winners { display: none !important; }

/* Optional banners configured in Admin alternate with the waiting countdown.
   The right column remains the single source for the recent winner history. */
.waiting-banner {
  width: min(100%, 700px);
  margin: 12px auto 4px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 104, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 205, 92, 0.16);
}
.waiting-banner-configured {
  min-height: 120px;
  background: rgba(4, 10, 20, 0.78);
}
.waiting-banner-configured figure { display: flex; align-items: center; justify-content: center; min-height: 120px; max-height: 260px; margin: 0; }
.waiting-banner-configured img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.waiting-banner-fallback {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 18px;
  text-align: left;
  background: linear-gradient(120deg, rgba(18, 54, 109, 0.96), rgba(12, 24, 54, 0.98));
  border-color: rgba(123, 183, 255, 0.5);
}
.waiting-banner-fallback-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; font-size: 25px; background: linear-gradient(145deg, #ffd968, #d88d14); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35); }
.waiting-banner-fallback div { display: grid; gap: 2px; min-width: 0; }
.waiting-banner-fallback small { color: #9fc7ff; font-size: 9px; font-weight: 900; letter-spacing: 1.3px; }
.waiting-banner-fallback strong { color: #fff; font-family: var(--font-display); font-size: clamp(16px, 2vw, 24px); font-weight: 900; line-height: 1.1; }
.waiting-banner-fallback div > span { overflow: hidden; color: #dceaff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.waiting-countdown-content { display: flex; width: 100%; flex-direction: column; align-items: center; }
.waiting-screen.is-banner-mode { padding: 0; }
.waiting-screen.is-banner-mode .waiting-badge,
.waiting-screen.is-banner-mode .waiting-countdown-content { display: none; }
.waiting-screen.is-banner-mode .waiting-banner {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}
.waiting-screen.is-banner-mode .waiting-banner-configured { min-height: 0; background: #071644; }
.waiting-screen.is-banner-mode .waiting-banner-configured figure { width: 100%; height: 100%; min-height: 0; max-height: none; }
.waiting-screen.is-banner-mode .waiting-banner-configured img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.waiting-screen.is-banner-mode .waiting-banner-fallback { height: 100%; justify-content: center; border: 0; border-radius: inherit; text-align: center; }
.waiting-screen.is-banner-mode .waiting-banner-fallback div { justify-items: center; }
.waiting-screen.is-banner-mode .waiting-banner-fallback strong { font-size: clamp(24px, 4vw, 52px); }
.waiting-screen.is-banner-mode .waiting-banner-fallback div > span { max-width: 80%; }

.schedule-countdown {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 221, 117, 0.45);
  border-radius: 999px;
  color: #fff3b0;
  background: rgba(8, 17, 37, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .3px;
  white-space: nowrap;
}

.recent-draw-group { padding: 8px 0 10px; border-bottom: 1px solid rgba(255, 221, 119, 0.18); }
.recent-draw-group:last-child { border-bottom: 0; padding-bottom: 0; }
.recent-draw-group > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.recent-draw-group > header strong { color: #fff0b0; font-size: 12px; }
.recent-draw-group > header span { color: #8de3b1; font-size: 9px; font-weight: 800; }
.recent-winner-list { display: grid; gap: 7px; }

.next-round {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(150px, 0.8fr) auto minmax(0, 1.7fr);
  align-items: center;
  gap: 14px;
  min-height: 66px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(120, 179, 255, 0.55);
  border-top: 1px solid rgba(120, 179, 255, 0.55);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(7, 36, 92, 0.96), rgba(14, 83, 168, 0.94) 52%, rgba(7, 28, 72, 0.96));
  box-shadow: 0 10px 24px rgba(0, 10, 32, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.next-round::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 45%, rgba(255, 255, 255, 0.09) 52%, transparent 62%);
}

.next-round > * { position: relative; z-index: 1; }
.next-round-kicker { color: #bcd9ff; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; line-height: 1.2; }
.next-round-copy { display: grid; min-width: 0; }
.next-round-copy strong { overflow: hidden; color: #ffffff; font-family: var(--font-display); font-size: 18px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.next-round-copy small { color: #dbeaff; font-size: 11px; font-weight: 700; }
.next-round > strong { color: #fff2b0; background: rgba(4, 17, 47, 0.78); border: 1px solid rgba(255, 224, 112, 0.56); border-radius: 10px; padding: 7px 11px; font-size: 24px; line-height: 1; box-shadow: 0 0 16px rgba(255, 215, 104, 0.2); }
.next-round-prizes { min-width: 0; overflow: hidden; color: #d9e9ff; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.ticket-nearest {
  padding: 8px 10px 9px;
  margin-bottom: 8px;
  border-color: rgba(135, 192, 255, 0.32);
  background: linear-gradient(155deg, rgba(18, 42, 76, 0.92), rgba(10, 18, 32, 0.98));
}

/* The public panel uses the larger legacy ticket layout. The compact sample
   rules remain available for narrow fallback layouts. */
.ticket-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
}

.ticket-sample-compact {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 6px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, rgba(247, 250, 255, .98), rgba(218, 231, 247, .96));
  border: 1px solid rgba(132, 159, 193, .82);
}
.ticket-sample-index {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 5px;
  color: #142844;
  background: #ffffff;
  border: 1px solid rgba(74, 105, 145, .46);
  font-size: 9px;
  font-weight: 900;
}
.ticket-sample-person, .ticket-sample-missing { display: grid; min-width: 0; gap: 1px; }
.ticket-sample-person { padding-inline: 5px; text-align: center; }
.ticket-sample-person { grid-column: 2; grid-row: 1; }
.ticket-sample-person strong { overflow: hidden; color: #142844; font-size: 8.75px; letter-spacing: -.3px; line-height: 1.05; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.ticket-sample-compact .ticket-sample-person small,
.ticket-sample-compact .ticket-sample-missing > small { overflow: hidden; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; text-overflow: ellipsis; white-space: nowrap; }
.ticket-sample-person small { color: #58718f; font-size: 6px; }
.ticket-sample-missing { grid-column: 2; grid-row: 2; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.ticket-sample-missing > small { color: #3e5878; font-size: 7px; font-weight: 900; letter-spacing: .25px; }
.ticket-missing-chip-list { display: flex; min-width: 0; justify-content: flex-end; gap: 3px; overflow: hidden; }
.ticket-missing-chip-list span { display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding-inline: 2px; border-radius: 4px; color: #ffffff; background: #2c3d55; font-size: 7px; font-weight: 900; }
.ticket-missing-chip-list span.is-ready { color: #072114; background: #5de09b; }

@media (min-width: 950px) {
  .ticket-sample-grid {
    height: 100%;
    grid-template-rows: repeat(10, minmax(0, 1fr));
  }
  .ticket-sample-compact { min-height: 42px; overflow: hidden; }
}

.ticket-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ticket-rank { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; color: #ffffff; background: linear-gradient(145deg, #6d85ff, #4054c9); font-size: 12px; }
.ticket-heading > div { display: grid; min-width: 0; }
.ticket-heading strong { font-size: 12px; }
.ticket-heading small { width: max-content; max-width: 100%; margin-top: 2px; }
.ticket-stage-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 10px; color: #ffffff; background: #4f5be4; font-size: 9px; font-weight: 900; letter-spacing: 0.6px; text-transform: uppercase; }
.ticket-grid-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 2px 0 3px; color: #b8cae9; font-size: 8px; font-weight: 900; letter-spacing: 1px; text-align: center; }
.mini-grid.ticket-grid { grid-template-columns: repeat(5, 1fr); gap: 3px; }
.ticket-grid-labels.ticket-grid-labels-90 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.mini-grid.ticket-grid.ticket-grid-90 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.mini-grid.ticket-grid span { min-height: 21px; padding: 3px 0; border-radius: 4px; color: #b4bfd3; background: rgba(13, 23, 38, 0.9); font-size: 10px; }
.mini-grid.ticket-grid .hit { color: #08250f; background: linear-gradient(145deg, #5de09b, #16a866); border-color: #82f0b7; box-shadow: 0 0 6px rgba(45, 219, 130, 0.38); }
.mini-grid.ticket-grid .free { color: #ffe27c; background: rgba(83, 63, 24, 0.78); }
.ticket-progress { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; margin-top: 6px; font-size: 9px; }
.ticket-progress > span { color: #8ca9ff; font-weight: 900; text-transform: uppercase; }
.ticket-progress strong { overflow: hidden; color: #ffe276; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-progress small { color: #8e9ab0; white-space: nowrap; }

@media (min-width: 950px) {
  .participants .ticket-nearest {
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .participants .ticket-heading strong { font-size: 14px; }
  .participants .ticket-grid-labels { font-size: 9px; }
  .participants .mini-grid.ticket-grid span { min-height: 24px; font-size: 11px; }
  .participants .ticket-progress { margin-top: 7px; }
}

@media (max-width: 1250px) and (min-width: 950px) {
  .next-round { grid-template-columns: auto minmax(120px, 0.75fr) auto minmax(0, 1fr); gap: 9px; padding-inline: 11px; }
  .next-round-prizes { font-size: 10px; }
  .winner-item > b { font-size: 20px; }
}

@media (max-width: 700px) {
  .next-round { grid-template-columns: 1fr auto; }
  .next-round-kicker { grid-column: 1 / -1; }
  .next-round-prizes { grid-column: 1 / -1; }
  .winner-list { grid-template-columns: 1fr; }
  .ticket-sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .winner-gift-overlay { padding: 12px; }
  .winner-spotlight-card { width: 100%; max-height: calc(100vh - 24px); padding: 22px 14px; border-radius: 20px; }
  .winner-spotlight-heading { align-items: start; flex-direction: column; gap: 4px; }
  .winner-spotlight-heading > b { margin-left: 0; }
  .winner-spotlight-winner-hero strong { font-size: clamp(22px, 6vw, 34px); }
  .winner-spotlight-prize-hero strong { font-size: clamp(44px, 14vw, 70px); }
  .winner-spotlight-list { grid-template-columns: 1fr; }
  .waiting-banner { margin-top: 10px; }
  .waiting-banner-configured figure { max-height: 160px; min-height: 84px; }
  .waiting-banner-configured img { max-height: 160px; }
  .waiting-banner-fallback { padding: 10px 13px; }
  .waiting-banner-fallback-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 21px; }
}

@media (min-width: 701px) and (max-height: 800px) {
  .winner-spotlight-card { max-height: calc(100vh - 20px); padding: 20px 30px; }
  .winner-spotlight-prize-hero { margin-bottom: 10px; padding: 6px 18px 8px; }
  .winner-spotlight-prize-hero strong { font-size: clamp(46px, 7vw, 70px); }
  .winner-spotlight-message { margin-bottom: 10px; font-size: 14px; }
  .winner-spotlight-item { padding: 9px 14px; }
  .winner-spotlight-item > b { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  body.tv-broadcast-body *,
  body.tv-broadcast-body *::before,
  body.tv-broadcast-body *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body.tv-broadcast-body .prize-shine {
    display: none !important;
  }
}
