/* ========================================================
   MI LOTERÍA WEB - MODERN PWA STYLESHEET
   Mobile-First, High-Performance, Lottery Emerald & Gold
   ======================================================== */

:root {
  color-scheme: dark;
  --bg-main: #090e17;
  --bg-card: #131c2e;
  --bg-card-hover: #1a263d;
  --bg-secondary: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-400: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --gold-500: #eab308;
  --gold-400: #facc15;
  --gold-600: #ca8a04;
  --gold-glow: rgba(234, 179, 8, 0.25);

  --danger-500: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  touch-action: pan-x pan-y pinch-zoom;
  height: 100%;
}

body {
  touch-action: pan-x pan-y pinch-zoom;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   HEADER & SUMMARY BANNER
   ======================================================== */
.app-header {
  flex: 0 0 auto;
  position: relative;
  z-index: 40;
  background: rgba(9, 14, 23, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-bottom: 8px;
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto !important; /* Nunca se aplasta ni encoge */
}

.brand-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px var(--emerald-glow);
  flex-shrink: 0 !important;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.brand-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.3);
  margin-left: 4px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-header-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: var(--gold-400);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-header-qr:active {
  transform: scale(0.92);
  background: rgba(234, 179, 8, 0.25);
}

.btn-header-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--emerald-glow);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-header-add:active {
  transform: scale(0.94);
}

.btn-text-short {
  display: none;
}

@media (max-width: 400px) {
  .brand-badge {
    display: none !important;
  }
  .brand-title {
    font-size: 0.98rem;
  }
  .header-top {
    gap: 6px;
  }
  .header-actions {
    gap: 4px;
  }
  .btn-senior-mode,
  body.senior-mode .btn-senior-mode {
    padding: 5px 7px !important;
    font-size: 0.72rem !important;
    gap: 3px;
  }
  .btn-header-add,
  body.senior-mode .btn-header-add {
    padding: 5px 7px !important;
    font-size: 0.72rem !important;
  }
  .btn-header-gear,
  body.senior-mode .btn-header-gear {
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 0.82rem !important;
  }
}

@media (max-width: 360px) {
  .brand-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }
  .brand-title {
    font-size: 0.88rem !important;
  }
  .btn-text-full {
    display: none !important;
  }
  .btn-text-short {
    display: inline !important;
  }
}

.header-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.locale-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.locale-pill {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px 8px;
}

.locale-pill-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.locale-select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: transparent;
  color: #f8fafc;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  padding: 2px 0;
  text-overflow: ellipsis;
}

.locale-select option {
  background: #0f172a;
  color: #f8fafc;
}

body.senior-mode .locale-pill {
  border-color: rgba(250, 204, 21, 0.55);
  padding: 6px 10px;
}

body.senior-mode .locale-select {
  font-size: 0.92rem;
  color: #fde047;
}

@media (max-width: 380px) {
  .locale-pill-lbl {
    display: none;
  }
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
}

.stat-box.highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.2));
  border-color: rgba(16, 185, 129, 0.3);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-value.gold {
  color: var(--gold-400);
}

.stat-value.green {
  color: var(--emerald-400);
}

/* ========================================================
   MAIN CONTENT & TABS
   ======================================================== */
.container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 calc(66px + env(safe-area-inset-bottom, 0px)) 0;
  overflow: hidden;
  position: relative;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   WALLET VIEW (CARTERA)
   ======================================================== */
/* ========================================================
   FILTROS DESPLEGABLES DE CARTERA (ESTADO Y JUEGO)
   ======================================================== */
.wallet-dropdowns-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.wallet-dropdown-wrapper {
  position: relative;
}

.dropdown-header-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.wallet-dropdown-trigger {
  width: 100%;
  height: 42px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.2s ease;
  user-select: none;
}

.wallet-dropdown-trigger:hover,
.wallet-dropdown-trigger:focus,
.wallet-dropdown-wrapper.open .wallet-dropdown-trigger {
  border-color: var(--gold-400);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.dropdown-trigger-content {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.dropdown-trigger-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.dropdown-trigger-text {
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.dropdown-trigger-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.dropdown-trigger-badge {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-400);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.dropdown-trigger-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.wallet-dropdown-wrapper.open .dropdown-trigger-arrow {
  transform: rotate(180deg);
}

.wallet-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 190px;
  max-height: 310px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0b1325 0%, #080c17 100%);
  border: 1.5px solid #334155;
  border-top: 4px solid #10b981;
  border-radius: 16px;
  box-shadow: 0 18px 38px -4px rgba(0, 0, 0, 0.85);
  padding: 8px;
  z-index: 120;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.wallet-dropdown-wrapper.open .wallet-dropdown-menu {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  background: #131c31;
  border: 1px solid #1e293b;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.dropdown-item:hover,
.dropdown-item:active,
.dropdown-item.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: #10b981;
  color: #ffffff;
  font-weight: 800;
}

.dropdown-item.active {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.dropdown-item .item-content {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.dropdown-item .item-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.dropdown-item .item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item .item-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.dropdown-item.active .item-count {
  background: var(--gold-400);
  color: #0f172a;
  font-weight: 800;
}

/* Acordeón de Grupos de Juego */
.game-group-section {
  margin-bottom: 0;
}

.game-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  min-height: 50px;
  box-sizing: border-box;
  padding: 0 14px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.5) 100%);
  border-left: 3px solid var(--gold-400);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.game-group-header:active {
  transform: scale(0.99);
}

.game-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-group-title span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-group-toggle-arrow {
  font-size: 0.75rem;
  color: var(--gold-400);
  transition: transform 0.25s ease;
  display: inline-block;
  flex-shrink: 0;
}

.game-group-section.collapsed .game-group-toggle-arrow {
  transform: rotate(-90deg);
}

.game-group-section.collapsed .game-group-content {
  display: none !important;
}

.game-group-meta {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.game-group-total {
  color: var(--gold-400);
  font-weight: 800;
}

/* TICKET CARD STYLING */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.ticket-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.ticket-card:active {
  transform: scale(0.99);
}

.ticket-card.status-premiado {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.ticket-card.status-caducando {
  border-color: rgba(239, 68, 68, 0.4);
}

.ticket-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.ticket-game-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticket-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-papeleta {
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.tag-decimo {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ticket-body {
  padding: 14px;
}

.ticket-club-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.ticket-number-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  gap: 8px 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* DÉCIMOS Y CUPONES 5 CIFRAS */
.ticket-number-5cifras {
  font-size: clamp(1.35rem, 6.2vw, 1.65rem);
  font-weight: 800;
  font-family: monospace;
  letter-spacing: 2px;
  color: #ffffff;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.ticket-number {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  font-family: monospace;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
}

/* FORMATO JUEGOS DE BOLAS Y COMBINACIONES (Euromillones, Primitiva, Bonoloto, etc.) */
.lotto-game-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.lotto-balls-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lotto-balls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1.5px solid #94a3b8;
  color: #ffffff;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.lotto-ball.mini {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
  border-width: 1px;
}

.lotto-stars-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  width: 100%;
}

.lotto-stars-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stars-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
  margin-right: 2px;
}

.lotto-star-ball {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.35));
  border: 1.5px solid #eab308;
  color: #fef08a;
  border-radius: 9999px;
  padding: 3px 8px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: monospace;
}

.lotto-star-ball.mini {
  padding: 2px 6px;
  font-size: 0.75rem;
}

.lotto-millon-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #a7f3d0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.lotto-reintegro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.2);
  border: 1.5px solid #3b82f6;
  color: #93c5fd;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.lotto-complementario-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.2);
  border: 1.5px solid #10b981;
  color: #6ee7b7;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.lotto-joker-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168, 85, 247, 0.2);
  border: 1.5px solid #a855f7;
  color: #d8b4fe;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

/* FORMATO LA QUINIELA / QUINIGOL */
.quiniela-game-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.quiniela-picks-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  width: 100%;
}

.quiniela-pick-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 0;
}

.pick-match-idx {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.pick-val {
  font-size: 0.95rem;
  font-weight: 800;
  font-family: monospace;
}
.pick-val.val-1 { color: #60a5fa; }
.pick-val.val-x { color: #fbbf24; }
.pick-val.val-2 { color: #f87171; }

.quiniela-pleno-row {
  font-size: 0.82rem;
  color: #fde047;
  background: rgba(234, 179, 8, 0.15);
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

/* MULTIBLOQUE */
.multiblock-game-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 10px 12px !important;
}

.multiblock-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.multiblock-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold-400);
  width: 24px;
}

.multiblock-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.multiblock-overflow {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* INSIGNIAS EXTRAS */
.extra-badge-gold {
  display: block;
  color: #fbbf24;
  font-size: 0.75rem;
  margin-top: 2px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.extra-badge-part {
  display: block;
  color: var(--gold-400);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 2px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.extra-badge-emerald {
  display: block;
  color: #34d399;
  font-size: 0.75rem;
  margin-top: 2px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ticket-series-fraction {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.78rem;
  color: #cbd5e1;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.ticket-sf-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 8px;
  border-radius: 6px;
}

.ticket-series-fraction .extra-badge-gold,
.ticket-series-fraction .extra-badge-part,
.ticket-series-fraction .extra-badge-emerald {
  flex-basis: 100%;
}

.ticket-breakdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breakdown-item strong {
  color: var(--text-main);
}

.ticket-donation-badge {
  font-size: 0.7rem;
  color: #fbbf24;
  background: rgba(234, 179, 8, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Status banner inside card */
.ticket-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill-pendiente {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

.status-pill-premiado {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill-nopremio {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-dim);
}

.status-pill-hist {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.prize-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--emerald-400);
}

.ticket-countdown-alert {
  margin-top: 8px;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-warning {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ticket-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .ticket-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}

.btn-ticket-action {
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  text-align: center;
  line-height: 1;
  width: 100%;
}

.btn-ticket-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ticket-action:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.2);
}

.btn-ticket-action .btn-action-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-ticket-action .btn-action-text {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.btn-ticket-action.btn-action-photo {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
}

.btn-ticket-action.btn-action-photo:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.btn-ticket-action.btn-action-share {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.32);
  color: #4ade80;
}

.btn-ticket-action.btn-action-share:hover {
  background: rgba(37, 211, 102, 0.18);
  border-color: #25d366;
}

.btn-ticket-action.btn-action-check {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.38);
  color: #34d399;
}

.btn-ticket-action.btn-action-check:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.btn-ticket-action.btn-action-delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.32);
  color: #f87171;
}

.btn-ticket-action.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger-500);
}

body.senior-mode .ticket-actions {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  padding-top: 12px !important;
}

body.senior-mode .btn-ticket-action {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 10px !important;
}

body.senior-mode .btn-ticket-action .btn-action-icon {
  font-size: 1.15rem !important;
}

body.senior-mode .btn-ticket-action .btn-action-text {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
}

/* ========================================================
   SCANNER VIEW (FOTO EN ALTA RESOLUCIÓN + IA)
   ======================================================== */
.photo-scan-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.3));
  border: 2px dashed rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.photo-scan-hero:hover {
  border-color: var(--emerald-400);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 78, 59, 0.4));
}

.photo-scan-icon {
  font-size: 3.2rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 16px var(--emerald-glow));
}

.photo-scan-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.photo-scan-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto 16px auto;
  line-height: 1.4;
}

.photo-preview-area {
  display: none;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.photo-scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #10b981, #34d399, #a7f3d0, #10b981, transparent);
  box-shadow: 0 0 16px #10b981, 0 0 28px rgba(16, 185, 129, 0.9);
  animation: scanLaserMove 2s ease-in-out infinite alternate;
  z-index: 5;
  pointer-events: none;
}

@keyframes scanLaserMove {
  0% {
    top: 4%;
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 92%;
    opacity: 0.9;
  }
}

.photo-preview-area.active {
  display: block;
}

.photo-preview-img-active {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
  background: #0b1120;
}

.photo-preview-status {
  padding: 12px 14px;
  background: rgba(9, 14, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
}

.scanner-viewport {
  position: relative;
  width: 100%;
  height: 52vh;
  min-height: 360px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  border: 2px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.scanner-frame {
  width: 90%;
  height: 60%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  position: relative;
}

.scanner-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--emerald-400);
  box-shadow: 0 0 10px var(--emerald-400);
  animation: scanLine 2s infinite ease-in-out;
}

@keyframes scanLine {
  0% { top: 5%; }
  50% { top: 95%; }
  100% { top: 5%; }
}

.scanner-hint {
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #fff;
  z-index: 2;
}

.scanner-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--emerald-glow);
  transition: all 0.2s;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.scanner-ai-card {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
}

/* ========================================================
   BOTTOM NAVIGATION
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  background: rgba(9, 14, 23, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 6px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: calc(8px + env(safe-area-inset-left, 0px));
  padding-right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 50;
  max-width: 600px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  flex: 1;
}

.nav-item.active {
  color: var(--emerald-400);
}

.nav-icon {
  font-size: 1.3rem;
}

.nav-scan-cta {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  border-radius: var(--radius-full);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-top: -24px;
  box-shadow: 0 4px 16px var(--emerald-glow);
  border: 3px solid var(--bg-main);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-scan-cta.active {
  box-shadow: 0 0 0 3px var(--bg-main), 0 0 24px var(--emerald-glow);
  transform: translateY(-2px) scale(1.05);
}

/* ========================================================
   MODALS & BOTTOM SHEETS
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  overflow: hidden;
  max-width: 100vw;
  width: 100%;
  touch-action: pan-x pan-y pinch-zoom;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 94dvh;
  min-height: 60vh;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border-color);
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}

/* En teléfonos móviles los modales cubren toda la pantalla verticalmente sin cortes ni desbordes */
@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .bottom-sheet {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 18px 18px 0 0;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px)) 14px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
  }
  #ticketDetailModal .bottom-sheet,
  #ticketModal .bottom-sheet,
  #menuAjustesModal .bottom-sheet,
  #legalModal .bottom-sheet,
  #restoreBackupModal .bottom-sheet {
    height: 100% !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
  }
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.28);
  border: 1.5px solid rgba(248, 113, 113, 0.75);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-close:active {
  transform: scale(0.94);
  background: rgba(239, 68, 68, 0.45);
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-input, .form-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  background-color: #131c31;
  border: 1.5px solid #1e293b;
  border-radius: var(--radius-md);
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 700;
  outline: none;
  box-sizing: border-box;
  color-scheme: dark;
}

select,
.form-select,
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: #131c31;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 34px !important;
  border: 1.5px solid rgba(52, 211, 153, 0.32);
  color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:hover,
.form-select:hover,
select.form-input:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.18);
}

select option,
select optgroup {
  background-color: #0b1325 !important;
  color: #f8fafc !important;
  font-weight: 700;
  padding: 10px;
}

.form-input:focus, .form-select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Submenú Ejecutivo Personalizado (Reemplaza los desplegables blancos del sistema) */
.exec-select-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.84);
  backdrop-filter: blur(6px);
  z-index: 9990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.exec-select-overlay.open {
  display: flex;
}

.exec-select-card {
  width: 100%;
  max-width: 480px;
  max-height: 96vh;
  max-height: 96dvh;
  background: linear-gradient(180deg, #0b1325 0%, #080c17 100%);
  border: 2px solid #334155;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: execSelectIn 0.16s ease-out;
}

@keyframes execSelectIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.exec-select-topbar {
  height: 6px;
  background: linear-gradient(90deg, #10b981, #059669, #fbbf24);
  flex-shrink: 0;
}

.exec-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}

.exec-select-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1px;
}

.exec-select-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
}

.exec-select-list {
  padding: 10px 12px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: #131c31;
  border: 1.5px solid #1e293b;
  border-radius: 11px;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exec-select-option:hover,
.exec-select-option:active {
  background: #1a2642;
  border-color: #fbbf24;
  color: #ffffff;
}

.exec-select-option.selected {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.18);
}

.exec-select-opt-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.exec-select-option.selected .exec-select-opt-badge {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#ticketForm {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: 24px;
  box-sizing: border-box;
}

/* Photo Preview Modal */
.photo-preview-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  max-height: 60vh;
  object-fit: contain;
  background: #000;
  box-sizing: border-box;
}

/* Share Peña Box */
.peña-share-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 12px 0;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: #e2e8f0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  word-break: break-word;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.8;
}

/* ========================================================
   DETALLE COMPLETO DEL BOLETO (WIDGET MODAL)
   ======================================================== */
.ticket-tap-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--gold-400);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  opacity: 0.9;
  letter-spacing: 0.2px;
}

.detail-header-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.detail-number-hero {
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  text-align: center;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.detail-number-main {
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  font-weight: 900;
  font-family: monospace;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.detail-number-main .lotto-balls-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.detail-number-main .lotto-ball {
  width: 36px;
  height: 36px;
  font-size: 1.15rem;
}

.detail-number-extra {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--gold-400);
  font-weight: 600;
  max-width: 100%;
  word-break: break-word;
}

.detail-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.detail-value-large {
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 800;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
}

.detail-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.detail-grid-2 .detail-section {
  min-width: 0;
  overflow: hidden;
}

.detail-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.detail-money-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.detail-money-card .money-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-money-card .money-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-400);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-photo-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  margin-bottom: 6px;
  transition: opacity 0.15s, transform 0.15s;
  box-sizing: border-box;
}

.detail-photo-preview:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

.detail-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.detail-actions-grid button {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   REGALOS, NOTIFICACIONES Y AUTOMATIZACIÓN
   ======================================================== */
.ticket-gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(234, 179, 8, 0.18));
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fecdd3;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.15);
}

.ticket-gift-badge strong {
  color: #ffffff;
}

.notification-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 78, 59, 0.35));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-banner.alert-prize {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(16, 185, 129, 0.25));
  border-color: var(--gold-400);
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

.btn-mini {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.whatsapp-box-card {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.2));
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
}

/* ========================================================
   MODAL DE ESCRUTINIO OFICIAL SELAE & WIDGET
   ======================================================== */
.escrutinio-bottom-sheet {
  max-width: 540px;
  background: linear-gradient(180deg, #131c2d 0%, #0a111c 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(234, 179, 8, 0.15);
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom, 0px));
}

.escrutinio-summary-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.3fr;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-bottom: 12px;
}

.escrutinio-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.escrutinio-col-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.escrutinio-col-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.escrutinio-stat-col.gold .escrutinio-col-val {
  color: var(--gold-400);
}

.escrutinio-col-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.escrutinio-message-box {
  background: rgba(30, 41, 59, 0.65);
  border-left: 3px solid var(--emerald-400);
  border-radius: 8px;
  padding: 11px 13px;
}

.escrutinio-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.escrutinio-ticket-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.escrutinio-ticket-title {
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.escrutinio-ticket-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.escrutinio-ticket-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.escrutinio-ticket-badge.pendiente {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.escrutinio-ticket-badge.no_premiado {
  background: rgba(71, 85, 105, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.4);
}

.escrutinio-ticket-badge.premiado {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

/* ========================================================
   MODAL DE COMPROBACIÓN VISUAL (LECTURA IA)
   ======================================================== */
.visual-check-bottom-sheet {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131c2d 0%, #0a111c 100%);
  border: 1px solid rgba(234, 179, 8, 0.4);
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(234, 179, 8, 0.15);
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}

.visual-check-header {
  margin-bottom: 8px !important;
  flex-shrink: 0;
}

.visual-check-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  flex-shrink: 0;
}

.visual-check-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.visual-check-top-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
}

.visual-check-badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 4px;
}

.visual-check-numbers-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 420px) {
  .visual-check-card {
    gap: 8px;
    padding: 9px;
  }
  .visual-check-top-row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 9px;
  }
}

.visual-check-photo-box {
  position: relative;
  width: 100%;
  height: 78px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-check-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-check-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  padding: 2px 4px;
  border-radius: 4px;
  text-align: center;
}

.visual-check-info-box {
  min-width: 0;
}

.visual-check-game-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.visual-check-conf-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fbbf24;
}

.visual-check-number-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.visual-check-number-val {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.visual-check-number-val .ticket-number-box {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  flex-wrap: wrap !important;
}

.visual-check-number-val .decimo-box {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
}

.visual-check-number-val .ticket-series-fraction {
  text-align: left !important;
  width: 100% !important;
}

.visual-check-extra-details {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.visual-check-meta-row {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.visual-check-meta-lbl {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
}

.visual-check-meta-val {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
}

.visual-check-warning-box {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-left: 4px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  flex-shrink: 0;
}

.visual-check-dest-section {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.visual-check-dest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.visual-check-dest-lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.visual-check-dest-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
  max-width: 240px;
}

.visual-dest-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.visual-dest-pill.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #6ee7b7;
}

#btnDestPena.visual-dest-pill.active {
  background: rgba(59, 130, 246, 0.24);
  border-color: #60a5fa;
  color: #93c5fd;
}

/* ========================================================
   ESTADÍSTICAS Y BALANCE DE TU SUERTE (PUNTO 2)
   ======================================================== */
.suerte-card {
  background: linear-gradient(135deg, rgba(19, 28, 46, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.suerte-card-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.suerte-card-header:active {
  background: rgba(255, 255, 255, 0.03);
}

.suerte-neto-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.suerte-neto-badge.positive {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.suerte-neto-badge.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.suerte-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.suerte-card.open .suerte-arrow {
  transform: rotate(180deg);
}

.suerte-card-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.suerte-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.suerte-metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.suerte-metric-box.highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.2));
  border-color: rgba(16, 185, 129, 0.3);
}

.suerte-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.suerte-metric-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}

.suerte-metric-hint {
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* ========================================================
   CALCULADORA DE PAPELETAS (PUNTO 3)
   ======================================================== */
.calculadora-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-pill-calc {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill-calc:active, .btn-pill-calc.active {
  background: var(--emerald-500);
  color: #ffffff;
  border-color: var(--emerald-400);
  font-weight: 700;
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(16, 185, 129, 0.12));
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.15);
}

.calc-result-badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold-400);
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.calc-result-val {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--gold-400);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(234, 179, 8, 0.3);
}

.calc-result-detail {
  font-size: 0.74rem;
  color: #cbd5e1;
  margin-top: 4px;
  line-height: 1.35;
}

.badge-link {
  font-size: 0.72rem;
  color: var(--gold-400);
  border: 1px solid rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
}

/* ========================================================
   MODAL DETECTOR DE DUPLICADOS (PUNTO 1)
   ======================================================== */
.duplicate-bottom-sheet {
  overflow-y: auto;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.45) !important;
}

.duplicate-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(185, 28, 28, 0.38)) !important;
  border: 2px solid #ef4444 !important;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.25);
}

.duplicate-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 360px) {
  .duplicate-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.duplicate-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.duplicate-card.new {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.duplicate-card-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.duplicate-card-tag.new-tag {
  color: var(--emerald-400);
}

.dup-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dup-num {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--gold-400);
  margin: 3px 0;
  font-family: monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.dup-detail {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========================================================
   COPIA DE SEGURIDAD SIMPLIFICADA (PUNTO 4)
   ======================================================== */
.backup-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.backup-status-badge.warning {
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-400);
  border-color: rgba(234, 179, 8, 0.3);
}

/* ========================================================
   MODO VISIÓN FÁCIL / SENIOR Y SIMPLIFICACIÓN
   ======================================================== */
.btn-senior-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-senior-mode.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(16, 185, 129, 0.22));
  border-color: var(--gold-400);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.btn-header-gear {
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22) 0%, rgba(202, 138, 4, 0.32) 100%);
  border: 1.5px solid rgba(234, 179, 8, 0.65);
  color: #fef08a;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.25);
  transition: all 0.2s ease;
}

.btn-header-gear:hover,
.btn-header-gear:active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(202, 138, 4, 0.48) 100%);
  border-color: #facc15;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.4);
}

.btn-header-gear .gear-icon {
  font-size: 1.15rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-header-gear:hover .gear-icon {
  transform: rotate(45deg);
}

/* Botón Heroico Gigante de Cámara en Cartera */
.hero-senior-camera-box {
  margin-bottom: 14px;
}

.btn-senior-big-camera {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #34d399;
  border-radius: 14px;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32);
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-senior-big-camera::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  animation: heroBtnShimmer 4.5s infinite;
  pointer-events: none;
}

.btn-senior-big-camera:active {
  transform: scale(0.98);
}

.big-camera-anim {
  position: relative;
  width: 78px;
  height: 48px;
  flex-shrink: 0;
  perspective: 300px;
}

.mini-ticket {
  position: absolute;
  inset: 1px 18px 4px 0;
  border-radius: 5px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.75);
  opacity: 0;
  animation: ticketCycleReal 22s infinite;
}

.mini-ticket .mt-band {
  display: block;
  width: 100%;
  text-align: center;
  font-style: normal;
  font-size: 0.42rem;
  font-weight: 900;
  letter-spacing: 0.35px;
  padding: 2px 2px;
  color: #ffffff;
}

.mini-ticket b {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mini-ticket .mt-bar {
  display: block;
  width: 78%;
  height: 4px;
  margin-bottom: 2px;
  text-decoration: none;
  background: repeating-linear-gradient(90deg, #1e293b 0 1.5px, transparent 1.5px 3px);
  opacity: 0.7;
}

.mini-ticket.t-rifa     { background: #fef9c3; color: #422006; border-style: dashed; border-color: #ca8a04; animation-delay: 0s; }
.mini-ticket.t-rifa .mt-band { background: #ca8a04; }

.mini-ticket.t-navidad  { background: #fffbeb; color: #1e3a8a; animation-delay: 2s; }
.mini-ticket.t-navidad .mt-band { background: #b45309; }

.mini-ticket.t-nacional { background: #f0f9ff; color: #0c4a6e; animation-delay: 4s; }
.mini-ticket.t-nacional .mt-band { background: #0284c7; }

.mini-ticket.t-nino     { background: #fdf2f8; color: #831843; animation-delay: 6s; }
.mini-ticket.t-nino .mt-band { background: #db2777; }

.mini-ticket.t-euro     { background: #eff6ff; color: #1e3a8a; animation-delay: 8s; }
.mini-ticket.t-euro .mt-band { background: #1d4ed8; color: #fde047; }

.mini-ticket.t-jackpot  { background: #18181b; color: #fde047; border-color: #eab308; animation-delay: 10s; }
.mini-ticket.t-jackpot .mt-band { background: #eab308; color: #18181b; }
.mini-ticket.t-jackpot .mt-bar { background: repeating-linear-gradient(90deg, #fde047 0 1.5px, transparent 1.5px 3px); }

.mini-ticket.t-prim     { background: #f0fdf4; color: #14532d; animation-delay: 12s; }
.mini-ticket.t-prim .mt-band { background: #15803d; }

.mini-ticket.t-bono     { background: #ecfccb; color: #365314; animation-delay: 14s; }
.mini-ticket.t-bono .mt-band { background: #65a30d; }

.mini-ticket.t-gordo    { background: #fef2f2; color: #7f1d1d; animation-delay: 16s; }
.mini-ticket.t-gordo .mt-band { background: #dc2626; }

.mini-ticket.t-quiniela { background: #fff1f2; color: #881337; animation-delay: 18s; }
.mini-ticket.t-quiniela .mt-band { background: #be123c; }

.mini-ticket.t-once     { background: #ecfdf5; color: #064e3b; animation-delay: 20s; }
.mini-ticket.t-once .mt-band { background: #059669; }

.mini-scan-beam {
  position: absolute;
  left: 0;
  right: 18px;
  top: 2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #34d399, #ffffff, #34d399, transparent);
  box-shadow: 0 0 6px #34d399;
  opacity: 0;
  pointer-events: none;
  animation: scanBeamSweep 2s infinite;
}

.mini-ticket-flash {
  position: absolute;
  inset: 1px 18px 4px 0;
  border-radius: 5px;
  background: radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.95) 0%, rgba(254, 240, 138, 0.65) 45%, rgba(255, 255, 255, 0) 85%);
  opacity: 0;
  pointer-events: none;
  animation: ticketFlashOverlay 2s infinite;
}

.mini-cam-flash {
  position: absolute;
  right: -2px;
  bottom: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #fef08a 35%, rgba(255, 255, 255, 0) 72%);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  animation: camFlashBurst 2s infinite;
}

.mini-cam-svg {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 32px;
  height: 25px;
  z-index: 3;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  animation: camSnapReal 2s infinite;
}

.cam-flash-bulb {
  animation: flashBulbGlow 2s infinite;
}

@keyframes ticketCycleReal {
  0%, 1% { opacity: 0; transform: translateY(6px) rotateX(15deg) scale(0.92); }
  3%, 8% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); }
  10%, 100% { opacity: 0; transform: translateY(-6px) rotateX(-12deg) scale(0.92); }
}

@keyframes scanBeamSweep {
  0%, 18% { top: 4px; opacity: 0; }
  28% { opacity: 0.95; }
  62% { top: 38px; opacity: 0.95; }
  70%, 100% { top: 40px; opacity: 0; }
}

@keyframes ticketFlashOverlay {
  0%, 71%, 100% { opacity: 0; }
  76% { opacity: 0.92; }
  88% { opacity: 0; }
}

@keyframes camFlashBurst {
  0%, 71%, 100% { opacity: 0; transform: scale(0.4); }
  76% { opacity: 1; transform: scale(2.8); }
  89% { opacity: 0; transform: scale(0.9); }
}

@keyframes flashBulbGlow {
  0%, 71%, 100% { fill: #fde047; }
  76% { fill: #ffffff; }
  88% { fill: #fde047; }
}

@keyframes camSnapReal {
  0%, 68%, 100% { transform: scale(1) rotate(0deg); }
  76% { transform: scale(1.16) rotate(-5deg); }
  88% { transform: scale(1) rotate(0deg); }
}

@keyframes heroBtnShimmer {
  0%, 60% { left: -80%; }
  100% { left: 130%; }
}

.big-camera-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.big-camera-text strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #ffffff;
}

.big-camera-text span {
  display: block;
  font-size: 0.72rem;
  color: #d1fae5;
  margin-top: 1px;
}

/* Modificaciones de estilo en Modo Senior / Vista Grande */
body.senior-mode {
  font-size: 18px !important;
}

/* El encabezado de la app conserva su escala compacta y proporciones perfectas */
body.senior-mode .app-header {
  font-size: 14px !important;
}

body.senior-mode .btn-senior-mode {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
  border-color: #fef08a !important;
  color: #0b1120 !important;
  font-weight: 800 !important;
  font-size: 0.76rem !important;
  padding: 5px 9px !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.7) !important;
}

body.senior-mode .btn-header-add {
  font-size: 0.76rem !important;
  padding: 5px 9px !important;
}

body.senior-mode .btn-header-gear {
  height: 40px !important;
  font-size: 0.88rem !important;
}

body.senior-mode .container {
  padding: 0 0 calc(66px + env(safe-area-inset-bottom, 0px)) 0 !important;
  max-width: 680px !important;
}

body.senior-mode .ticket-card {
  padding: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.22) !important;
  background: #111a2c !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 14px !important;
  overflow: hidden !important;
}

body.senior-mode .ticket-body {
  padding: 10px 8px !important;
}

body.senior-mode .ticket-number-box {
  padding: 10px 6px !important;
  background: rgba(0, 0, 0, 0.85) !important;
  border: 2.5px solid var(--gold-400) !important;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.45) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 8px 0 !important;
}

body.senior-mode .lotto-horizontal-box {
  padding: 10px 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.senior-mode .lotto-balls-horizontal {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: space-around !important;
  gap: clamp(3px, 1.8vw, 8px) !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
}

body.senior-mode .lotto-ball {
  width: clamp(36px, 9.8vw, 44px) !important;
  height: clamp(36px, 9.8vw, 44px) !important;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem) !important;
  font-weight: 900 !important;
  border: 2px solid #eab308 !important;
  color: #fef08a !important;
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0b1120 100%) !important;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.35) !important;
  flex-shrink: 0 !important;
}

body.senior-mode .ticket-number-5cifras {
  font-size: clamp(1.7rem, 7.5vw, 2.5rem) !important;
  letter-spacing: clamp(1.5px, 1.2vw, 3px) !important;
  color: #facc15 !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 0 16px rgba(250, 204, 21, 0.5) !important;
}

body.senior-mode .ticket-number {
  font-size: clamp(1.4rem, 6vw, 2rem) !important;
  letter-spacing: 1.5px !important;
  color: #facc15 !important;
  font-weight: 900 !important;
}

body.senior-mode .lotto-ball {
  width: 40px !important;
  height: 40px !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  border: 2px solid #eab308 !important;
  background: #0f172a !important;
  color: #ffffff !important;
}

body.senior-mode .lotto-star-ball {
  padding: 5px 12px !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  border: 2px solid #facc15 !important;
}

body.senior-mode .stars-label {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

body.senior-mode .lotto-reintegro-pill,
body.senior-mode .lotto-complementario-pill,
body.senior-mode .lotto-joker-pill,
body.senior-mode .lotto-millon-pill {
  padding: 5px 10px !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
}

body.senior-mode .pick-val {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
}

body.senior-mode .ticket-series-fraction {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  text-align: left !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  flex-shrink: 1 !important;
}

body.senior-mode .ticket-club-title {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin-bottom: 8px !important;
}

body.senior-mode .ticket-game-name {
  font-size: 1rem !important;
  font-weight: 800 !important;
}

body.senior-mode .ticket-tag {
  font-size: 0.85rem !important;
  padding: 4px 10px !important;
}

body.senior-mode .ticket-breakdown {
  font-size: 1.05rem !important;
  padding: 10px 0 !important;
}

body.senior-mode .breakdown-item strong {
  font-size: 1.15rem !important;
  color: #ffffff !important;
}

body.senior-mode .ticket-status-pill {
  font-size: 1.05rem !important;
  padding: 10px 14px !important;
  font-weight: 800 !important;
}

body.senior-mode .ticket-status-pill.status-pill-premiado {
  background: rgba(16, 185, 129, 0.25) !important;
  border: 2px solid #10b981 !important;
}

body.senior-mode .ticket-status-pill .prize-amount {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
}

body.senior-mode .hero-senior-camera-box .btn-senior-big-camera {
  padding: 18px 20px !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5) !important;
}

body.senior-mode .big-camera-text strong {
  font-size: 1.25rem !important;
}

body.senior-mode .big-camera-text span {
  font-size: 0.88rem !important;
}

body.senior-mode .stat-value {
  font-size: 1.4rem !important;
}

body.senior-mode .stat-label {
  font-size: 0.82rem !important;
}

body.senior-mode .bottom-nav.nav-3-items .nav-item {
  font-size: 0.95rem !important;
}

body.senior-mode .bottom-nav.nav-3-items .nav-item .nav-icon {
  font-size: 1.75rem !important;
}

/* Barra inferior simplificada en 3 elementos principales */
.bottom-nav.nav-3-items {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 6px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  height: auto;
  min-height: 64px;
}

.bottom-nav.nav-3-items .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bottom-nav.nav-3-items .nav-item .nav-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.bottom-nav.nav-3-items .nav-item.active {
  color: var(--emerald-400);
}

.bottom-nav.nav-3-items .nav-scan-cta {
  width: auto;
  min-width: 82px;
  height: 50px;
  padding: 0 14px;
  border-radius: 9999px; /* Botón ovalado / cápsula */
  background: linear-gradient(135deg, #facc15 0%, #eab308 50%, #ca8a04 100%);
  color: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(11, 17, 32, 0.95);
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.45);
  cursor: pointer;
  margin-top: -16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.bottom-nav.nav-3-items .nav-scan-cta:active {
  transform: scale(0.94);
}

.bottom-nav.nav-3-items .nav-scan-cta.active {
  box-shadow: 0 0 0 3px rgba(11, 17, 32, 0.95), 0 0 22px rgba(234, 179, 8, 0.65);
  transform: translateY(-2px) scale(1.03);
}

.cta-icons-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  pointer-events: none;
}

.cta-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.cta-divider {
  font-size: 1.05rem;
  font-weight: 800;
  opacity: 0.4;
  color: #0b1120;
  line-height: 1;
  margin: 0 1px;
}

body.senior-mode .bottom-nav.nav-3-items .nav-scan-cta {
  min-width: 96px !important;
  height: 54px !important;
  padding: 0 16px !important;
  margin-top: -18px !important;
}

body.senior-mode .cta-icons-wrap {
  gap: 7px !important;
}

body.senior-mode .cta-icon {
  font-size: 1.55rem !important;
}


/* ========================================================
   VISOR DE FOTO A PANTALLA COMPLETA CON ZOOM Y GESTOS TÁCTILES
   ======================================================== */
.photo-fullscreen-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.photo-fullscreen-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.photo-fullscreen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 80%, transparent 100%);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  gap: 10px;
}

.photo-topbar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #ffffff;
}

.photo-topbar-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.photo-topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f1f5f9;
}

.photo-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-photo-ctrl {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-photo-ctrl:active {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0.92);
}

.btn-photo-reset {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-family: monospace;
  font-weight: 800;
  color: var(--gold-400);
  border-color: rgba(234, 179, 8, 0.4);
}

.btn-photo-close {
  background: rgba(239, 68, 68, 0.35);
  border: 1.5px solid rgba(248, 113, 113, 0.8);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.btn-photo-close:active {
  background: rgba(239, 68, 68, 0.5);
}

.photo-fullscreen-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.photo-fullscreen-viewport.is-dragging {
  cursor: grabbing;
}

.photo-transform-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  will-change: transform;
  transform-origin: center center;
}

.photo-transform-container.animate-reset {
  transition: transform 0.25s ease-out;
}

.photo-fullscreen-img {
  max-width: 96vw;
  max-height: 86vh;
  max-height: 86dvh;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  border-radius: 8px;
  pointer-events: none;
}

.photo-gesture-hint {
  position: absolute;
  bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.5s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.photo-fullscreen-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)) 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
  text-align: center;
  color: #94a3b8;
  font-size: 0.72rem;
  pointer-events: none;
}

/* ESTILOS MULTIBLOQUE EN TARJETAS DE CARTERA */
.lotto-multiblock-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.lotto-multiblock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.lotto-multiblock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.lotto-multiblock-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lotto-multiblock-more {
  font-size: 0.78rem;
  color: var(--gold-400);
  font-weight: 700;
  text-align: center;
  padding: 4px;
  cursor: pointer;
}

/* ESTILOS MULTIBLOQUE EN COMPROBACIÓN VISUAL TRAS ESCANEO */
.visual-check-multiblock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 6px 0;
}

.visual-check-apuesta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 8px;
}

.visual-check-apuesta-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.visual-check-apuesta-nums {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.visual-check-apuesta-stars {
  font-size: 0.82rem;
  color: #fbbf24;
  font-weight: 700;
  margin-left: auto;
}

/* ========================================================
   DISEÑO HORIZONTAL PROFESIONAL Y COMPACTO PARA LOTERÍAS (PRIMITIVA, BONOLOTO, EUROMILLONES)
   ======================================================== */
.lotto-horizontal-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 8px 12px !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-sizing: border-box !important;
}

.lotto-horizontal-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.lotto-horizontal-main::-webkit-scrollbar {
  display: none;
}

.lotto-balls-horizontal {
  display: flex;
  align-items: center;
  gap: clamp(3px, 1.2vw, 6px);
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 7.2vw, 34px);
  height: clamp(28px, 7.2vw, 34px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #334155 0%, #0f172a 100%);
  border: 1.5px solid #94a3b8;
  color: #ffffff;
  font-family: monospace;
  font-size: clamp(0.82rem, 2.8vw, 1.02rem);
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  flex-shrink: 0 !important;
  line-height: 1;
}

body.senior-mode .lotto-balls-horizontal {
  gap: clamp(3px, 1.8vw, 8px) !important;
  justify-content: space-around !important;
}

body.senior-mode .lotto-ball {
  width: clamp(36px, 9.8vw, 44px) !important;
  height: clamp(36px, 9.8vw, 44px) !important;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem) !important;
  font-weight: 900 !important;
  border: 2px solid #eab308 !important;
  color: #fef08a !important;
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0b1120 100%) !important;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.35) !important;
  flex-shrink: 0 !important;
}

.lotto-horizontal-extras {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.lotto-horizontal-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.lotto-star-ball {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.28));
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fbbf24;
  font-family: monospace;
  font-size: clamp(0.78rem, 2.5vw, 0.9rem);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.lotto-reintegro-pill,
.lotto-complementario-pill {
  font-size: clamp(0.72rem, 2.4vw, 0.8rem);
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lotto-reintegro-pill {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.lotto-complementario-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.lotto-horizontal-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  width: 100%;
}

/* ESTILOS DE APUESTA ENCIMA DE LOS NÚMEROS Y AJUSTE PERFECTO EN HORIZONTAL */
.lotto-horizontal-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 8px 10px !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.lotto-apuesta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 2px;
}

.lotto-apuesta-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.lotto-header-extras {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lotto-balls-horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 1.6vw, 7px);
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap !important;
  box-sizing: border-box;
}

.lotto-multiblock-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
  box-sizing: border-box;
}

.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 8vw, 35px);
  height: clamp(28px, 8vw, 35px);
  max-width: 35px;
  max-height: 35px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #334155 0%, #0f172a 100%);
  border: 1.5px solid #94a3b8;
  color: #ffffff;
  font-family: monospace;
  font-size: clamp(0.82rem, 2.8vw, 1.05rem);
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  flex-shrink: 1 !important;
  line-height: 1;
}

/* Consistente con el cuadro amarillo ampliado en Modo Senior */
body.senior-mode .lotto-ball {
  width: clamp(36px, 9.8vw, 44px) !important;
  height: clamp(36px, 9.8vw, 44px) !important;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem) !important;
  font-weight: 900 !important;
  border: 2px solid #eab308 !important;
  color: #fef08a !important;
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #0b1120 100%) !important;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.35) !important;
  flex-shrink: 0 !important;
}

.lotto-star-ball {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.28));
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fbbf24;
  font-family: monospace;
  font-size: clamp(0.75rem, 2.4vw, 0.88rem);
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 1 !important;
}


/* ========================================================
   WIDGET DIARIO DE RESULTADOS (PREMIADO O SIN PREMIO)
   ======================================================== */
.daily-results-widget {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  border: 2px solid rgba(234, 179, 8, 0.55);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(234, 179, 8, 0.15);
  animation: fadeIn 0.25s ease-out;
}

.daily-results-widget.has-prize {
  border-color: #10b981;
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.95));
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.28);
}

.daily-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.daily-widget-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.daily-widget-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.daily-widget-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
}

.daily-widget-subtitle {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
}

.daily-widget-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.daily-widget-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.daily-widget-row:active {
  background: rgba(255, 255, 255, 0.1);
}

.daily-widget-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.daily-widget-row-game {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-widget-row-num {
  font-size: 0.76rem;
  font-family: monospace;
  color: #facc15;
  font-weight: 700;
}

.daily-widget-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.daily-widget-badge.badge-win {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid #10b981;
  color: #34d399;
}

.daily-widget-badge.badge-loss {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

body.senior-mode .daily-results-widget {
  padding: 14px 12px !important;
}

body.senior-mode .daily-widget-title {
  font-size: 1.08rem !important;
}

body.senior-mode .daily-widget-row-game {
  font-size: 0.96rem !important;
}

body.senior-mode .daily-widget-row-num {
  font-size: 0.92rem !important;
}

body.senior-mode .daily-widget-badge {
  font-size: 0.88rem !important;
  padding: 5px 12px !important;
}



/* ========================================================
   MANUAL DE INSTRUCCIONES PARA PERSONAS MAYORES
   ======================================================== */
.manual-bottom-sheet {
  background: linear-gradient(180deg, #10192b 0%, #090e17 100%);
  display: flex;
  flex-direction: column;
}

.manual-font-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.manual-font-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-400);
}

.manual-font-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 6px;
}

.manual-size-btn {
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

.manual-size-btn.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #6ee7b7;
}

.manual-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  font-size: 0.94rem;
}

.manual-body.manual-size-normal {
  font-size: 0.92rem;
}

.manual-body.manual-size-lg,
body.senior-mode .manual-body {
  font-size: 1.08rem;
  line-height: 1.65;
}

.manual-body.manual-size-xl {
  font-size: 1.24rem;
  line-height: 1.7;
}

.manual-welcome-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 78, 59, 0.22));
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  border-radius: 14px;
  padding: 14px;
}

.manual-welcome-card strong {
  color: #6ee7b7;
  display: block;
  margin-bottom: 6px;
  font-size: 1.08em;
}

.manual-toc-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 14px;
  padding: 12px;
}

.manual-toc-title {
  font-weight: 800;
  color: var(--gold-400);
  margin-bottom: 10px;
  font-size: 1em;
}

.manual-toc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.manual-toc-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.95em;
  cursor: pointer;
  line-height: 1.3;
}

.manual-toc-btn:active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
}

.manual-section {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  scroll-margin-top: 12px;
}

.manual-sec-title {
  color: var(--gold-400);
  font-size: 1.12em;
  font-weight: 900;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  line-height: 1.3;
}

.manual-step-list {
  padding-left: 20px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-sublist {
  padding-left: 18px;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manual-subbox {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}

.manual-tip {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-left: 4px solid #34d399;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.manual-note {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-left: 4px solid var(--gold-400);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.manual-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.9em;
}

.manual-qa {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}

.manual-qa strong {
  color: #93c5fd;
  display: block;
  margin-bottom: 4px;
}

.manual-qa p {
  margin: 0;
}

.manual-back-top {
  margin-top: 12px;
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-400);
  font-weight: 800;
  font-size: 0.88em;
  cursor: pointer;
}

/* ========================================================
   SUBMENÚS A PANTALLA COMPLETA Y ZOOM EN TODA LA APP
   ======================================================== */
html, body, main, .app-header, .bottom-nav, .modal-overlay, .bottom-sheet {
  touch-action: pan-x pan-y pinch-zoom;
}

@media (max-width: 768px) {
  .modal-overlay {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }
  .modal-overlay .bottom-sheet,
  .modal-overlay .bottom-sheet.escrutinio-bottom-sheet,
  .modal-overlay .bottom-sheet.visual-check-bottom-sheet,
  .modal-overlay .bottom-sheet.duplicate-bottom-sheet,
  .modal-overlay .bottom-sheet.archived-bottom-sheet,
  .modal-overlay .bottom-sheet.manual-bottom-sheet {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .modal-overlay .bottom-sheet.visual-check-bottom-sheet {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px)) 14px !important;
  }
}

/* ========================================================
   BOOK PAGER - CAROUSEL TIPO LIBRO CON SWIPE HORIZONTAL
   ======================================================== */
.book-pager-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.book-pager-viewport {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin: 0;
  padding: 0;
}

.book-pager-viewport::-webkit-scrollbar {
  display: none;
}

.book-pager-page {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 8px 14px 20px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

@media (min-width: 768px) {
  .book-pager-wrapper {
    max-width: 680px;
    margin: 0 auto;
  }
}

/* Indicador de Puntos Inferior */
.bottom-pager-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 58px;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 8px calc(5px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .bottom-pager-nav {
    max-width: 680px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.pager-dot-btn {
  background: transparent;
  border: none;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  position: relative;
  flex: 1;
  max-width: 74px;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pager-dot-btn .dot-icon {
  font-size: 1.25rem;
  line-height: 1.1;
  transition: transform 0.22s ease;
}

.pager-dot-btn .dot-indicator {
  width: 6px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pager-dot-btn .dot-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

/* Estado activo del punto */
.pager-dot-btn.active {
  color: #ffffff;
}

.pager-dot-btn.active .dot-icon {
  transform: translateY(-2px) scale(1.12);
}

.pager-dot-btn.active .dot-indicator {
  width: 22px;
  background: linear-gradient(90deg, var(--gold-400), #f59e0b);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
}

.pager-dot-btn.active .dot-label {
  color: var(--gold-400);
  opacity: 1;
}

/* Footer limpio integrado por página */
.app-page-footer {
  margin: 24px auto 10px;
  padding: 14px 10px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
}

.app-page-footer a {
  color: var(--gold-400);
  text-decoration: underline;
}

/* Pager navigation helper pills on top */
.pager-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ========================================================
   PAGER HELPER
   ======================================================== */
.pager-guide-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.pager-guide-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pager-guide-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Forzar que las páginas dentro del viewport se muestren en bloque para flex horizontal */
.book-pager-viewport > .book-pager-page {
  display: block !important;
}

/* ========================================================
   SELECTOR DE DÍAS DE ABONADO (JUEGOS REPETITIVOS)
   ======================================================== */
.abonado-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.btn-abonado-day {
  position: relative;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.78);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-abonado-day.official-day::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.65);
}

.btn-abonado-day.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #6ee7b7;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.btn-abonado-day.active::after {
  background: #ffffff;
}

/* ========================================================
   AVISO LLAMATIVO Y GRANDE: BOLETO ATRASADO (YA JUGADO) Y COMPROBACIÓN
   ======================================================== */
.past-draw-banner {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  animation: pastDrawGlow 2.5s infinite alternate ease-in-out;
}

@keyframes pastDrawGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.006); filter: brightness(1.06); }
}

.past-draw-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.past-draw-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.past-draw-big-icon {
  font-size: 2.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.past-draw-tag-played {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-block;
  line-height: 1.25;
}

.past-draw-date-title {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.past-draw-date-title strong {
  color: #ffffff;
  font-weight: 800;
}

.past-draw-result-card {
  border-radius: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.past-draw-status-badge {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.25;
}

.past-draw-official-num {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  margin: 7px 0 8px 0;
}

.past-draw-lbl-small {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.past-draw-num-hl {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 1px;
}

.past-draw-serie-hl {
  font-size: 0.88rem;
  font-weight: 800;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.past-draw-comb-hl {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fde047;
}

.past-draw-status-detail {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #e2e8f0;
  font-weight: 500;
}

/* Variante: NO PREMIADO (Rojo intenso y llamativo con resplandor) */
.past-draw-banner.past-draw-no-premio {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(185, 28, 28, 0.38)) !important;
  border: 2.5px solid #ef4444 !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.45) !important;
}
.past-draw-banner.past-draw-no-premio .past-draw-stripe {
  background: linear-gradient(90deg, #ef4444, #f87171, #ef4444);
}
.past-draw-banner.past-draw-no-premio .past-draw-tag-played {
  color: #fca5a5;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.past-draw-banner.past-draw-no-premio .past-draw-result-card {
  background: rgba(239, 68, 68, 0.24);
  border: 1.5px solid rgba(239, 68, 68, 0.65);
}
.past-draw-banner.past-draw-no-premio .past-draw-status-badge {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(239, 68, 68, 0.7);
}

/* Variante: PREMIADO (Verde esmeralda y oro con resplandor) */
.past-draw-banner.past-draw-premiado {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.4)) !important;
  border: 2.5px solid #10b981 !important;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.55) !important;
}
.past-draw-banner.past-draw-premiado .past-draw-stripe {
  background: linear-gradient(90deg, #10b981, #34d399, #fbbf24);
}
.past-draw-banner.past-draw-premiado .past-draw-tag-played {
  color: #6ee7b7;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}
.past-draw-banner.past-draw-premiado .past-draw-result-card {
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid rgba(16, 185, 129, 0.7);
}
.past-draw-banner.past-draw-premiado .past-draw-status-badge {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.7);
}

/* Variante: CADUCADO (Ámbar) */
.past-draw-banner.past-draw-caducado {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(180, 83, 9, 0.38)) !important;
  border: 2.5px solid #f59e0b !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4) !important;
}
.past-draw-banner.past-draw-caducado .past-draw-stripe {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
}
.past-draw-banner.past-draw-caducado .past-draw-tag-played {
  color: #fde68a;
}
.past-draw-banner.past-draw-caducado .past-draw-result-card {
  background: rgba(217, 119, 6, 0.22);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
}
.past-draw-banner.past-draw-caducado .past-draw-status-badge {
  color: #fde047;
}

/* Variante: VERIFICANDO / EN CONSULTA (Azul) */
.past-draw-banner.past-draw-verificando {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(30, 64, 175, 0.32)) !important;
  border: 2.5px solid #3b82f6 !important;
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.4) !important;
}
.past-draw-banner.past-draw-verificando .past-draw-stripe {
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}
.past-draw-banner.past-draw-verificando .past-draw-tag-played {
  color: #93c5fd;
}
.past-draw-banner.past-draw-verificando .past-draw-result-card {
  background: rgba(59, 130, 246, 0.2);
  border: 1.5px solid rgba(59, 130, 246, 0.5);
}
.past-draw-banner.past-draw-verificando .past-draw-status-badge {
  color: #bfdbfe;
}
