:root {
  /* Refined Venezuelan tropical-gaming palette:
     deep ocean/night blue base, warm gold, terracotta red, Caribbean teal */
  --ink: #14202e;
  --muted: #5b6b7a;
  --paper: #f7f1e3;
  --panel: #fffdf8;
  --line: #e4d9c2;
  --red: #c0392b;
  --red-dark: #8e2820;
  --gold: #e0a82e;
  --gold-soft: #ffe6ac;
  --teal: #117a6b;
  --teal-soft: #d6efe9;
  --green: #2f8b57;
  --navy: #0c2c4a;
  --navy-deep: #081d33;
  --ocean: #1c5a86;
  --shadow: 0 20px 48px rgba(8, 29, 51, 0.22);
  --shadow-soft: 0 8px 22px rgba(8, 29, 51, 0.1);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(circle at 14% 12%, rgba(224, 168, 46, 0.22), transparent 30rem),
    radial-gradient(circle at 88% 8%, rgba(17, 122, 107, 0.28), transparent 28rem),
    radial-gradient(circle at 50% 120%, rgba(192, 57, 43, 0.2), transparent 34rem),
    linear-gradient(160deg, #081d33 0%, #0c2c4a 46%, #123b5a 100%);
  background-attachment: fixed;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(247, 241, 227, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

body[data-view="display"] .app-shell {
  width: min(1920px, calc(100% - 32px));
}

body[data-view="display"] .screen {
  padding: 18px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, var(--navy) 0%, var(--ocean) 72%, var(--teal) 135%);
  color: #fff;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-bar .eyebrow {
  color: var(--gold-soft);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.5rem;
  line-height: 1.1;
  color: #fff;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-meta > div {
  min-width: 132px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.top-meta span {
  display: block;
  color: var(--gold-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
  color: #fff;
}

.stat span,
.mini-stat span,
.ticket-price span,
.prize-strip span,
.winner-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat strong,
.mini-stat strong,
.ticket-price strong,
.prize-strip strong,
.winner-card strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
}

.icon-button.dark {
  background: var(--ink);
}

.screen {
  padding: 24px;
}

.mode-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mode-button {
  min-height: 52px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-button:hover {
  border-color: var(--gold);
}

.mode-button.active {
  color: #fff;
  background: linear-gradient(180deg, var(--ocean), var(--navy));
  border-color: var(--navy);
  box-shadow: 0 8px 18px rgba(12, 44, 74, 0.28);
}

.guard-message {
  margin-bottom: 16px;
  padding: 14px 16px;
  color: #fff;
  background: #6a2018;
  border-radius: var(--radius);
  font-weight: 850;
}

.screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  min-height: 100%;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hall-hero {
  position: relative;
  min-height: 520px;
  padding: 34px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(8, 29, 51, 0.2), rgba(8, 29, 51, 0.78)),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--ocean) 55%, var(--teal) 120%);
}

.hero-skyline {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 62%;
  object-fit: cover;
  object-position: bottom;
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
}

.hall-hero > *:not(.hero-skyline) {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h2 {
  margin-bottom: 14px;
  font-size: 3.3rem;
  line-height: 1.02;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.hero-copy p {
  max-width: 600px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.2rem;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.countdown-tile {
  width: min(360px, 100%);
  padding: 20px 22px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  border-radius: var(--radius);
  border: 1px solid rgba(224, 168, 46, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.countdown-tile span {
  display: block;
  color: var(--red);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.countdown {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 900;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* Welcome side illustration card */
.welcome-art {
  padding: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(224, 168, 46, 0.16), transparent 70%),
    var(--panel);
}

.welcome-art img {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
}

.welcome-art p {
  margin: 10px 4px 2px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 54px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active {
  transform: translateY(0);
}

.primary-button {
  color: var(--navy-deep);
  background: linear-gradient(180deg, #f3c14e, var(--gold));
  box-shadow: 0 12px 24px rgba(224, 168, 46, 0.34);
}

.secondary-button {
  color: #fff;
  background: linear-gradient(180deg, #16927f, var(--teal));
  box-shadow: 0 10px 22px rgba(17, 122, 107, 0.26);
}

.ghost-button {
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
}

.danger-button {
  color: #fff;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 22px rgba(142, 40, 32, 0.24);
}

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.stat,
.mini-stat,
.ticket-price,
.prize-strip,
.winner-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hall-list {
  padding: 18px;
}

.hall-list h3,
.purchase-panel h2,
.preview-panel h2,
.waiting-panel h2,
.game-header h2,
.tickets-area h2,
.results-main h2 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.hall-list ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hall-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 750;
}

.hall-list li::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(47, 139, 87, 0.16);
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
}

.purchase-panel,
.preview-panel,
.waiting-panel,
.game-header,
.tickets-area,
.results-main {
  padding: 24px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.quantity-control button {
  height: 64px;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 900;
  cursor: pointer;
}

.quantity-readout {
  min-height: 92px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quantity-readout strong {
  font-size: 3.2rem;
  line-height: 1;
}

.purchase-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  background: #fff4df;
  border-radius: var(--radius);
  font-weight: 850;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ticket-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.ticket-picker.compact {
  margin-top: 10px;
}

.ticket-option {
  min-height: 62px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.35rem;
  font-weight: 950;
  cursor: pointer;
}

.ticket-option.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.purchase-note,
.recap-status {
  margin-bottom: 16px;
  padding: 14px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 750;
}

.badge-row,
.receipt-actions,
.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.badge-row {
  margin-top: 14px;
}

.status-badge,
.chip-button,
.print-status {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.status-badge.open,
.status-badge.paid {
  color: #fff;
  background: var(--green);
}

.status-badge.locked,
.status-badge.unpaid {
  color: #fff;
  background: var(--red);
}

.status-badge.drawing {
  color: var(--ink);
  background: var(--gold-soft);
}

.status-badge.idle {
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
}

.chip-button {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
}

.chip-button.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.control-row {
  margin: 14px 0;
}

.control-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}

.ticket {
  background: #fffefb;
  border: 2px solid #cdb68d;
  border-radius: var(--radius);
  overflow: hidden;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #fff;
  background: var(--red-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

.ticket-table {
  display: grid;
  grid-template-columns: repeat(9, minmax(30px, 1fr));
  gap: 3px;
  padding: 8px;
  background: #ead8bf;
}

.ticket-cell {
  min-height: 46px;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--ink);
  background: #fffaf1;
  border-radius: 4px;
  font-size: 1.18rem;
  font-weight: 900;
}

.ticket-cell.blank {
  background:
    linear-gradient(135deg, rgba(209, 184, 143, 0.45), rgba(255, 250, 241, 0.4)),
    #f5ead7;
}

.ticket-cell.marked {
  color: #fff;
  background: var(--teal);
}

.ticket-cell.just-drawn {
  color: var(--ink);
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 3px var(--gold);
}

.ticket-cell.marked::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
}

.waiting-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 20px;
}

.waiting-panel {
  min-height: 450px;
  display: grid;
  align-content: space-between;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(35, 14, 9, 0.08), rgba(35, 14, 9, 0.36)),
    linear-gradient(135deg, #116a67, #1a817d 45%, #c62830 45%, #c62830 100%);
}

.waiting-panel h2 {
  font-size: 2.8rem;
  line-height: 1;
}

.waiting-panel p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

.waiting-countdown {
  width: min(430px, 100%);
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.95);
  border-radius: var(--radius);
}

.waiting-countdown strong {
  display: block;
  font-size: 4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.social-feed {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.feed-item {
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
}

.game-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 16px;
  align-items: stretch;
}

.ball-stage {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 35% 25%, #fff1b9 0 6%, transparent 7%),
    linear-gradient(160deg, var(--red), var(--red-dark));
  border-radius: var(--radius);
}

.current-ball {
  width: 148px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 36% 28%, #fff 0 16%, transparent 17%),
    linear-gradient(135deg, #fff9df, var(--gold-soft));
  border: 8px solid var(--gold);
  border-radius: 50%;
  font-size: 4.2rem;
  font-weight: 950;
  box-shadow: inset 0 -12px 20px rgba(107, 56, 0, 0.2);
}

.draw-panel {
  display: grid;
  gap: 12px;
}

.drawn-history {
  min-height: 104px;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-ball {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 900;
}

.status-panel {
  display: grid;
  gap: 10px;
}

.status-pill {
  padding: 14px;
  color: #fff;
  background: var(--teal);
  border-radius: var(--radius);
  font-weight: 850;
}

.status-pill.line {
  background: var(--gold);
}

.status-pill.bingo {
  background: var(--red);
}

.game-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
}

.tickets-area {
  overflow: hidden;
}

.ticket-scroll {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.number-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 14px;
}

.board-number {
  min-height: 38px;
  display: grid;
  place-items: center;
  background: #f4ead8;
  border: 1px solid #dec59f;
  border-radius: 50%;
  color: var(--muted);
  font-weight: 850;
}

.board-number.drawn {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.announcement {
  padding: 18px;
  display: grid;
  gap: 12px;
  background: #fff4df;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
}

.announcement strong {
  font-size: 1.25rem;
}

.announcement.line {
  background: #fff6d8;
}

.announcement.bingo {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: var(--gold);
}

.announcement.bingo span {
  color: rgba(255, 255, 255, 0.9);
}

.ops-layout,
.admin-layout {
  display: grid;
  gap: 18px;
}

.ops-header,
.ops-card {
  padding: 22px;
}

.ops-header {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ops-header h2,
.ops-card h3 {
  margin-bottom: 0;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.detail-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.detail {
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail span,
.field-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.field-label {
  margin: 16px 0 8px;
}

.field-input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.validation-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.validation-result strong {
  font-size: 1.25rem;
}

.receipt-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.receipt-actions {
  margin-top: 16px;
}

.print-status {
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
}

.receipt {
  padding: 18px;
  background:
    linear-gradient(#fffdf8, #fffdf8) padding-box,
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0,0,0,0.02) 8px 9px);
  border: 1px dashed #b09a7d;
  border-radius: 6px;
  color: #1d1713;
  box-shadow: var(--shadow-soft);
  font-variant-numeric: tabular-nums;
}

.receipt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
}

.receipt-crest {
  width: 42px;
  height: 42px;
  flex: none;
}

.receipt-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.1;
}

.receipt-tagline {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.receipt small {
  display: block;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #c9b89c;
  color: #6f6258;
  text-align: center;
  font-weight: 700;
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #ded0bd;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 12px 0;
  color: #4a4036;
  font-size: 0.84rem;
  font-weight: 600;
}

.receipt-meta b {
  display: inline-block;
  min-width: 52px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.receipt-ticket {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  padding: 6px;
  background: #e8dccd;
}

.receipt-ticket div {
  min-height: 26px;
  display: grid;
  place-items: center;
  background: #fffaf1;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 850;
}

.receipt-ticket .blank {
  background: #eee2d2;
}

.barcode {
  margin-top: 10px;
  padding: 10px;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, #1d1713 0 3px, #fff 3px 7px, #1d1713 7px 8px, #fff 8px 12px);
  color: transparent;
  border: 1px solid #1d1713;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 900;
}

.transactions-card {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.display-screen {
  min-height: min(860px, calc(100vh - 160px));
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 18%, rgba(224, 168, 46, 0.22), transparent 26rem),
    radial-gradient(circle at 85% 90%, rgba(17, 122, 107, 0.3), transparent 24rem),
    linear-gradient(150deg, var(--navy-deep) 0%, #0f3a5e 55%, #0c4a44 100%);
  border-radius: var(--radius);
}

.display-screen:fullscreen {
  width: 100vw;
  min-height: 100vh;
  padding: 40px;
  border-radius: 0;
}

/* Branded top banner for the spectator screen */
.display-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 22px;
  background: linear-gradient(120deg, rgba(12, 44, 74, 0.9), rgba(17, 122, 107, 0.55));
  border: 1px solid rgba(224, 168, 46, 0.45);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.display-logo {
  width: 64px;
  height: 64px;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.display-banner-text {
  display: grid;
  gap: 2px;
}

.display-banner-text p {
  margin: 0;
  color: var(--gold-soft);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.display-banner-text strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
}

.display-banner .ghost-button {
  margin-left: auto;
  min-height: 46px;
  color: var(--navy-deep);
  background: var(--gold-soft);
  border-color: transparent;
}

.display-top,
.display-main,
.display-prizes {
  display: grid;
  gap: 18px;
}

.display-top {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
  align-items: start;
  margin-bottom: 22px;
}

.display-top p {
  margin-bottom: 6px;
  color: var(--gold-soft);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.display-top h2 {
  margin-bottom: 0;
  font-size: 3.4rem;
  line-height: 1;
}

.display-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  font-weight: 850;
}

.display-meta strong {
  color: var(--gold-soft);
  font-size: 1.4rem;
}

.display-main {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  align-items: stretch;
}

.display-ball-wrap {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 360px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
}

.display-ball-wrap span,
.display-ball-wrap strong {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
  text-transform: uppercase;
}

.display-ball {
  width: clamp(220px, 18vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 35% 28%, #fff 0 16%, transparent 17%),
    linear-gradient(135deg, #fff9df, var(--gold-soft));
  border: 12px solid var(--gold);
  border-radius: 50%;
  font-size: clamp(6rem, 8vw, 10rem);
  font-weight: 950;
  box-shadow: inset 0 -18px 30px rgba(107, 56, 0, 0.22);
}

.display-history {
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
}

.display-history h3 {
  margin-bottom: 14px;
  color: var(--gold-soft);
  font-size: 1.35rem;
}

.display-ball-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 9px;
}

.display-ball-grid .history-ball {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--gold-soft);
}

.display-prizes {
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0;
}

.display-stat {
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
}

.display-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  text-transform: uppercase;
}

.display-stat strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 1.8rem;
}

.display-winner,
.display-next {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius);
  text-align: center;
}

.display-winner strong {
  font-size: 4rem;
  line-height: 1;
}

.display-winner span,
.display-winner em {
  font-size: 1.45rem;
  font-style: normal;
  font-weight: 850;
}

.display-winner.line {
  color: var(--ink);
  background: var(--gold-soft);
}

.display-winner.bingo {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.display-winner.neutral {
  background: rgba(255, 255, 255, 0.1);
}

.display-next {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.display-next span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  text-transform: uppercase;
}

.display-next strong {
  font-size: 2.4rem;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.demo-controls {
  display: grid;
  gap: 8px;
}

.demo-script {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding-left: 22px;
}

.demo-script li {
  color: var(--muted);
  font-weight: 750;
}

.audit-item {
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.audit-item span,
.audit-item em {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.audit-item strong {
  display: block;
  margin: 4px 0;
}

.audit-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.audit-item small {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-weight: 850;
}

/* ---- Venezuelan theme accents ---- */
.ops-icon {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 4px;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/img/tropical-pattern.svg");
  background-size: 320px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  position: relative;
}

.top-bar,
.screen {
  position: relative;
  z-index: 1;
}

.prize-strip {
  position: relative;
  padding-left: 22px;
  border-left: 4px solid var(--gold);
  background:
    linear-gradient(90deg, rgba(224, 168, 46, 0.1), transparent 60%),
    var(--panel);
}

.prize-strip strong {
  color: var(--red-dark);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.winner-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 168, 46, 0.18), transparent 60%),
    #fffaf0;
  border-color: rgba(224, 168, 46, 0.5);
}

.winner-card strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
}

.recap-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--teal-soft);
  border: 1px solid rgba(17, 122, 107, 0.3);
  border-radius: var(--radius-sm);
  color: var(--teal);
  font-weight: 600;
}

.guard-message {
  background: linear-gradient(180deg, var(--red), var(--red-dark));
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  .receipt-list,
  .receipt-list * {
    visibility: visible;
  }

  .receipt-list {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    margin: 0;
    padding: 12px;
  }

  .receipt {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #222;
    box-shadow: none;
  }

  .no-print {
    display: none;
  }
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.winner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.winner-card {
  background: #fff4df;
}

.recap-list {
  display: grid;
  gap: 12px;
}

.recap-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 18, 15, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(520px, 100%);
  padding: 24px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.modal p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

@media (max-width: 880px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .top-bar,
  .hero-footer,
  .game-header,
  .game-body,
  .purchase-layout,
  .screen-grid,
  .waiting-stage,
  .results-layout,
  .ops-header,
  .ops-grid,
  .display-top,
  .display-main,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .top-bar,
  .hero-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .top-meta {
    flex-wrap: wrap;
  }

  .top-meta > div {
    flex: 1;
  }

  .screen {
    padding: 16px;
  }

  .hall-hero,
  .waiting-panel {
    min-height: 460px;
  }

  .hero-copy h2,
  .waiting-panel h2 {
    font-size: 2.45rem;
  }

  .winner-grid {
    grid-template-columns: 1fr;
  }

  .number-board {
    grid-template-columns: repeat(10, 1fr);
  }

  .mode-nav,
  .display-prizes {
    grid-template-columns: repeat(2, 1fr);
  }

  .display-meta {
    justify-items: start;
  }

  .display-top h2 {
    font-size: 2.5rem;
  }

  .demo-script {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    width: 54px;
  }

  h1 {
    font-size: 1.2rem;
  }

  .hero-copy h2,
  .waiting-panel h2 {
    font-size: 2rem;
  }

  .countdown,
  .waiting-countdown strong {
    font-size: 2.6rem;
  }

  .ticket-grid-list {
    grid-template-columns: 1fr;
  }

  .ticket-cell {
    min-height: 38px;
    font-size: 1rem;
  }

  .number-board {
    grid-template-columns: repeat(6, 1fr);
  }

  .mode-nav,
  .ticket-picker,
  .display-prizes {
    grid-template-columns: 1fr 1fr;
  }

  .display-screen {
    padding: 16px;
  }

  .display-ball {
    width: 170px;
    font-size: 4.8rem;
  }

  .display-winner strong {
    font-size: 2.8rem;
  }
}
