@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700;900&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;600;700&display=swap');

:root {
  --bg: #030712;
  --surface: #0d1117;
  --surface2: #161b22;
  --border: #21262d;
  --neon-gold: #d8b86a;
  --neon-red: #ff3e3e;
  --neon-blue: #00d4ff;
  --neon-green: #00ff88;
  --neon-purple: #00d4ff;
  --text: #e6edf3;
  --text-dim: #b8c0cc;
  --muted: #7d8590;
  --pb-red: #e8222e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Utility: hide element regardless of its display type or inline styles */
.lo-hidden { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,140,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(0,212,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 20% 70%, rgba(0,160,255,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,140,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,140,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.wrapper { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }

/* ── HEADER ── */
header {
  text-align: center;
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
  /* Layered gradient: deep purple well at top, warm gold glow at edges */
  background:
    radial-gradient(ellipse 110% 90% at 50% -10%, rgba(120,20,160,0.45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 10% 80%,  rgba(180,120,20,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 80%,  rgba(0,140,255,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 50% 110%, rgba(80,10,110,0.35) 0%, transparent 60%);
  border-bottom: 1px solid rgba(180,120,40,0.12);
}

/* ── Floating lottery ball decorations ── */
.hero-balls,
.ambient-balls {
  position: fixed;
  inset: -6vh -6vw;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hb {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: rgba(228, 236, 252, 0.08);
  opacity: 0.4;
  filter: saturate(0.8);
  animation: hb-float linear infinite;
}

/* Each ball: unique size, position, colour tint, timing */
.hb-1 {
  width: 96px; height: 96px;
  left: 4%; top: 8%;
  font-size: 1.7rem;
  background: radial-gradient(circle at 35% 32%, rgba(0,140,255,0.22), rgba(100,10,140,0.08) 70%);
  border: 1.5px solid rgba(0,140,255,0.12);
  box-shadow: 0 0 28px rgba(0,140,255,0.08) inset;
  animation-duration: 19s; animation-delay: -4s;
}
.hb-2 {
  width: 68px; height: 68px;
  right: 7%; top: 6%;
  font-size: 1.1rem;
  background: radial-gradient(circle at 35% 32%, rgba(255,200,30,0.20), rgba(140,90,0,0.06) 70%);
  border: 1.5px solid rgba(255,200,30,0.10);
  box-shadow: 0 0 20px rgba(255,200,30,0.07) inset;
  animation-duration: 23s; animation-delay: -9s;
}
.hb-3 {
  width: 52px; height: 52px;
  left: 16%; bottom: 12%;
  font-size: 0.9rem;
  background: radial-gradient(circle at 35% 32%, rgba(0,140,255,0.14), transparent 70%);
  border: 1.5px solid rgba(0,140,255,0.08);
  animation-duration: 15s; animation-delay: -2s;
}
.hb-4 {
  width: 82px; height: 82px;
  right: 18%; bottom: 8%;
  font-size: 1.4rem;
  background: radial-gradient(circle at 35% 32%, rgba(255,200,30,0.15), rgba(140,90,0,0.05) 70%);
  border: 1.5px solid rgba(255,200,30,0.08);
  animation-duration: 21s; animation-delay: -13s;
}
.hb-5 {
  width: 58px; height: 58px;
  left: 42%; top: 4%;
  font-size: 1rem;
  background: radial-gradient(circle at 35% 32%, rgba(0,212,255,0.10), transparent 70%);
  border: 1.5px solid rgba(0,212,255,0.07);
  animation-duration: 26s; animation-delay: -6s;
}
.hb-6 {
  width: 104px; height: 104px;
  right: 4%; bottom: 18%;
  font-size: 1.9rem;
  background: radial-gradient(circle at 35% 32%, rgba(0,140,255,0.10), transparent 70%);
  border: 1.5px solid rgba(0,140,255,0.07);
  animation-duration: 32s; animation-delay: -17s;
}
.hb-7 {
  width: 44px; height: 44px;
  left: 28%; top: 15%;
  font-size: 0.8rem;
  background: radial-gradient(circle at 35% 32%, rgba(255,200,30,0.12), transparent 70%);
  border: 1.5px solid rgba(255,200,30,0.07);
  animation-duration: 17s; animation-delay: -7s;
}
.hb-8 {
  width: 72px; height: 72px;
  right: 28%; top: 10%;
  font-size: 1.2rem;
  background: radial-gradient(circle at 35% 32%, rgba(180,100,255,0.15), rgba(80,10,140,0.06) 70%);
  border: 1.5px solid rgba(180,100,255,0.09);
  animation-duration: 28s; animation-delay: -20s;
}

@keyframes hb-float {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  25%  { transform: translate3d(0, -8px, 0) rotate(2deg) scale(1.01); }
  50%  { transform: translate3d(0, -3px, 0) rotate(4deg) scale(1.005); }
  75%  { transform: translate3d(0, 6px, 0) rotate(1deg) scale(0.995); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
}

.oracle-eye {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  position: relative;
  animation: pulse-eye 3s ease-in-out infinite;
}

.oracle-eye svg { width: 100%; height: 100%; }

@keyframes pulse-eye {
  0%, 100% { filter: drop-shadow(0 0 8px var(--neon-gold)); }
  50% { filter: drop-shadow(0 0 24px var(--neon-gold)) drop-shadow(0 0 48px rgba(0,212,255,0.35)); }
}

@keyframes gold-wave {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  background: linear-gradient(135deg,
    #0066CC  0%,
    #00B4FF 12%,
    #80DCFF 22%,
    #FFD080 30%,
    #FFC94D 34%,
    #FFD080 38%,
    #80DCFF 48%,
    #00B4FF 60%,
    #0066CC 72%,
    #e8222e 86%,
    #00B4FF 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow: none;
  animation: gold-wave 5s linear infinite;
}

.tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-top: 8px;
  text-transform: uppercase;
}

/* ── STATUS BAR ── */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 0 0 32px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.status-item { display: flex; align-items: center; gap: 8px; }
.status-label { color: var(--text-dim); letter-spacing: 0.1em; font-size: 0.65rem; }
.status-value { color: var(--neon-gold); font-weight: 700; letter-spacing: 0.06em; }

/* ── GAME CONTEXT ROW ── */
.game-context-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  overflow: visible;
  position: relative;
  z-index: 100;
}
.game-ctx-left, .game-ctx-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.game-ctx-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.game-ctx-select {
  background: var(--bg);
  border: 1px solid rgba(0,140,255,0.35);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
  outline: none;
}
.game-ctx-select:focus { border-color: var(--neon-purple); }

/* ── Data report button ── */
.data-report-btn {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255,180,0,0.3);
  color: rgba(255,180,0,0.7);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.data-report-btn:hover { border-color: rgba(255,180,0,0.7); color: rgba(255,180,0,1); }

/* ── Searchable state picker ── */
.state-picker-input {
  background: var(--bg);
  border: 1px solid rgba(0,140,255,0.35);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  width: 150px;
  outline: none;
  letter-spacing: 0.05em;
}
.state-picker-input:focus { border-color: var(--neon-purple); }
.state-picker-input::placeholder { color: var(--text-dim); }
.game-ctx-game {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--neon-gold);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.game-ctx-divider {
  color: var(--border);
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 300;
  align-self: center;
}

/* ── GRID LAYOUT ── */
.grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.grid-full { grid-column: 1 / -1; }

@media (max-width: 768px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-full { grid-column: 1; }
}

/* ── PANEL ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-gold), transparent);
}

.panel-accent-blue::before   { background: linear-gradient(90deg, transparent, var(--neon-blue), transparent); }
.panel-accent-purple::before { background: linear-gradient(90deg, transparent, var(--neon-purple), transparent); }
.panel-accent-green::before  { background: linear-gradient(90deg, transparent, var(--neon-green), transparent); }
.panel-accent-red::before    { background: linear-gradient(90deg, transparent, var(--neon-red), transparent); }

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── LOTTERY BALLS ── */
.balls-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ball {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.ball-white {
  background: radial-gradient(circle at 35% 35%, #ffffff, #c8d4e0);
  color: #1a1a2e;
  box-shadow: 0 0 16px rgba(200,212,224,0.4), inset 0 -4px 8px rgba(0,0,0,0.3);
}

.ball-red {
  background: radial-gradient(circle at 35% 35%, #ff6060, #c0000a);
  color: #fff;
  box-shadow: 0 0 16px rgba(232,34,46,0.6), inset 0 -4px 8px rgba(0,0,0,0.3);
}

.ball-gold {
  background: radial-gradient(circle at 35% 35%, #ffe066, #c8960a);
  color: #1a1a2e;
  box-shadow: 0 0 16px rgba(245,197,24,0.6), inset 0 -4px 8px rgba(0,0,0,0.3);
}

.ball-blue {
  background: radial-gradient(circle at 35% 35%, #60d8ff, #0090b8);
  color: #1a1a2e;
  box-shadow: 0 0 16px rgba(0,212,255,0.5), inset 0 -4px 8px rgba(0,0,0,0.3);
}

.ball-empty {
  background: var(--surface2);
  border: 2px dashed var(--border);
  color: var(--muted);
}

.ball:hover:not(.ball-empty) { transform: scale(1.1) translateY(-2px); }

.ball-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  white-space: nowrap;
}

.pb-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--pb-red);
  letter-spacing: 0.1em;
  margin-left: 4px;
  align-self: center;
}

/* ── BUTTONS ── */
.btn {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}

/* btn-primary kept for inline usages (upgrade bar etc.) */
.btn-primary {
  background: linear-gradient(135deg, #66c9df, #d8b86a);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  box-shadow: 0 0 18px rgba(0,212,255,0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,212,255,0.45);
}

.btn-primary:active { transform: translateY(0); }

/* ── Consult the Oracle — restrained ritual button ── */
.btn-oracle {
  background: linear-gradient(135deg, #120818, #1c0e28);
  color: #b7deef;
  border: 1px solid rgba(0, 212, 255, 0.35);
  letter-spacing: 0.18em;
  box-shadow: 0 0 0 rgba(0,212,255,0);
  text-shadow: none;
  transition: all 0.25s ease;
}

.btn-oracle:hover {
  background: linear-gradient(135deg, #11273a, #123146);
  border-color: rgba(0, 212, 255, 0.72);
  color: #def3ff;
  box-shadow: 0 0 18px rgba(0,212,255,0.28), 0 4px 14px rgba(0,0,0,0.45);
  transform: translateY(-1px);
}

.btn-oracle:active { transform: translateY(0); box-shadow: none; }

.btn-oracle:focus-visible {
  outline: 1px solid rgba(0,212,255,0.65);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0,212,255,0.2);
}

.btn-sm { padding: 8px 16px; font-size: 0.78rem; }

.btn-google {
  background: #fff;
  color: #1a1a2e;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
}

.btn-google:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}

/* ── NUMBER INPUT CONTROLS ── */
.gen-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.count-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-control label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.count-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  width: 64px;
  padding: 6px 10px;
  border-radius: 4px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.count-input:focus { border-color: var(--neon-gold); }

/* ── FREQUENCY CHART ── */
.freq-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.freq-row {
  display: grid;
  grid-template-columns: 40px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.freq-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: var(--text);
  text-align: center;
  background: var(--surface2);
  border-radius: 4px;
  padding: 3px 6px;
}

.freq-bar-wrap {
  background: var(--border);
  border-radius: 2px;
  height: 10px;
  overflow: hidden;
}

.freq-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}

.freq-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
}

/* ── PREDICTIONS LIST ── */
.predictions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── PREDICTION CARDS (mobile-first) ── */
.prediction-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: slide-in 0.4s ease both;
}

.prediction-item:hover {
  border-color: rgba(0,160,255,0.35);
  box-shadow: 0 0 16px rgba(0,160,255,0.12);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.pred-rank {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  min-width: 28px;
}

/* Prediction card structure */
.pred-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pred-balls { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

.pred-ball {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.pred-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Oracle Alignment Score block */
.align-score-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.align-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.align-num {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.align-pct {
  font-size: 0.85rem;
  font-weight: 600;
}

.align-label {
  font-family: 'Cinzel', serif;
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Score tier colors */
.align-num.exceptional,
.align-label.exceptional { color: #00d4ff; text-shadow: 0 0 10px rgba(0,212,255,0.38); }
.align-num.strong,
.align-label.strong       { color: #F5A3FF; }
.align-num.stable,
.align-label.stable       { color: #4bb8ff; }
.align-num.volatile,
.align-label.volatile     { color: var(--muted); }
.align-num.weak,
.align-label.weak         { color: rgba(140,140,160,0.55); }

.align-insights {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.align-insight {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.align-insight::before { content: '◈ '; color: var(--border); }

.align-verdict {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  flex: 1;
}
.align-num-secondary {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  opacity: 0.7;
  margin-left: 8px;
  flex-shrink: 0;
}
.align-insight-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  font-style: italic;
}

.align-score-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  color: rgba(145, 153, 171, 0.55);
  margin-top: 4px;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 4px;
}
.align-verdict.exceptional,
.align-num-secondary.exceptional { color: #00d4ff; text-shadow: 0 0 10px rgba(0,212,255,0.38); }
.align-verdict.strong,
.align-num-secondary.strong       { color: #F5A3FF; }
.align-verdict.stable,
.align-num-secondary.stable       { color: #4bb8ff; }
.align-verdict.volatile,
.align-num-secondary.volatile     { color: var(--muted); }
.align-verdict.weak,
.align-num-secondary.weak         { color: rgba(140,140,160,0.55); }

/* Prediction actions */
.pred-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
  flex-shrink: 0;
}

.save-btn { color: var(--neon-blue) !important; border-color: rgba(0,212,255,0.42) !important; }
.save-btn:hover { border-color: var(--neon-purple) !important; }
.analyze-btn { color: var(--neon-gold) !important; border-color: rgba(0,140,255,0.35) !important; }
.analyze-btn:hover { border-color: var(--neon-gold) !important; box-shadow: 0 0 8px rgba(0,212,255,0.26); }

/* Pick game straight/box line */
.pred-pick-line {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
}

/* Prediction card always stacks vertically — fits inside narrow dual-panel */
.pred-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pred-actions {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 6px !important;
}
.pred-actions .copy-btn { flex: 1; min-width: 60px; text-align: center; }
.pred-actions .save-notify-btn { flex-basis: 100%; flex-shrink: 0; text-align: center; order: -1; }

@media (max-width: 400px) {
  .pred-actions { flex-direction: column !important; }
  .pred-actions .copy-btn { flex: unset; width: 100%; }
  .pred-actions .save-notify-btn { flex-basis: unset; width: 100%; }
}

/* Small phone ball size */
@media (max-width: 375px) {
  .pred-ball { width: 30px; height: 30px; font-size: 0.75rem; }
  .align-num { font-size: 1.2rem; }
  .prediction-item { padding: 10px 11px; }
}

.pred-score {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--neon-green);
  text-align: right;
  min-width: 52px;
}

/* ── EXCLUSION GRIMOIRE ── */
.grimoire-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.grimoire-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(232,34,46,0.09);
  border: 1px solid rgba(232,34,46,0.32);
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--text);
}

.grimoire-numbers { display: flex; gap: 6px; flex-wrap: wrap; }

.g-num {
  padding: 2px 7px;
  background: var(--surface);
  border-radius: 3px;
  color: var(--text);
}

.g-pb {
  padding: 2px 7px;
  background: rgba(232,34,46,0.2);
  border-radius: 3px;
  color: var(--pb-red);
}

/* ── STATS CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 600px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  color: var(--neon-gold);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 20px currentColor;
}

.stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── TABS ── */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  background: var(--surface2);
  border-radius: 6px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: var(--surface);
  color: var(--neon-gold);
  box-shadow: 0 0 8px rgba(0,212,255,0.25);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── LOADER ── */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 16px;
}

.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--neon-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── RECENT DRAWS ── */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.recent-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.recent-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.mini-balls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.mini-ball {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
}

/* ── ERROR ── */
.error-box {
  padding: 20px;
  background: rgba(255,62,62,0.07);
  border: 1px solid rgba(255,62,62,0.3);
  border-radius: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: var(--neon-red);
  text-align: center;
}

/* ── DISCLAIMER ── */
.disclaimer {
  margin-top: 32px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.05em;
}

.disclaimer span { color: var(--neon-red); }

/* ── NOTE INPUT ── */
.note-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 6px 10px;
  border-radius: 4px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.note-input:focus { border-color: var(--neon-blue); }
.note-input::placeholder { color: var(--muted); }

/* ── TICKET NAME INPUT (top of card) ── */
.ticket-name-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--neon-gold);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 0 4px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  cursor: text;
}
.ticket-name-input:focus { border-bottom-color: var(--neon-gold); }
.ticket-name-input::placeholder { color: rgba(210,160,0,0.30); font-style: italic; font-weight: 400; }

/* ── TICKET COLLAPSIBLE HEADER ── */
.ticket-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
  user-select: none;
}
.ticket-card-header:hover .ticket-collapse-chevron { color: var(--text); }
.ticket-collapse-chevron {
  color: var(--muted);
  font-size: 0.65rem;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.ticket-collapse-chevron.open { transform: rotate(90deg); }
.ticket-header-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-gold);
  letter-spacing: 0.05em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ticket-header-balls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ticket-header-ball {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--border);
}

/* ── TICKET CARD BODY — animated collapse ── */
.ticket-card-body {
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease;
  max-height: 2000px; /* large enough for history results + action buttons */
  opacity: 1;
}
.ticket-card-body.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ── TICKET NAME SAVE MODAL ── */
.ticket-name-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,7,18,0.88);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in-fast 0.15s ease;
}
@keyframes fade-in-fast { from { opacity: 0; } to { opacity: 1; } }
.ticket-name-modal {
  background: var(--surface);
  border: 1px solid rgba(230,175,25,0.35);
  border-radius: 12px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 0 40px rgba(230,175,25,0.12), 0 8px 32px rgba(0,0,0,0.5);
}
.ticket-name-modal-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.95rem;
  color: var(--neon-gold);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.ticket-name-modal-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}
.ticket-name-modal input {
  background: var(--bg);
  border: 1px solid rgba(230,175,25,0.30);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 6px;
  width: 100%;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
  letter-spacing: 0.04em;
}
.ticket-name-modal input:focus { border-color: var(--neon-gold); }
.ticket-name-modal input::placeholder { color: var(--muted); font-style: italic; font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; }
.ticket-name-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── COPY BTN ── */
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.1em;
}

.copy-btn:hover { border-color: var(--neon-green); color: var(--neon-green); }

/* ── GAME TABS ── */
.game-tab {
  background: none;
  border: 1px solid rgba(100,100,120,0.5);
  color: #a0a8b8;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.08em;
}

.game-tab:hover  { border-color: var(--neon-gold); color: var(--neon-gold); }
.game-tab.active { color: var(--text); background: var(--surface2); border-width: 2px; }
.game-tab.locked { opacity: 0.5; cursor: default; }
.game-tab.locked:hover { border-color: rgba(100,100,120,0.5); color: #a0a8b8; }
.game-tab.coming-soon { opacity: 0.4; cursor: default; pointer-events: none; }
.coming-soon-badge { font-size: 0.55em; letter-spacing: 0.1em; color: var(--neon-gold); opacity: 0.8; vertical-align: middle; }

.hot-badge {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 2px;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
}

.hot  { background: rgba(255,62,62,0.2);   color: var(--neon-red); }
.cold { background: rgba(0,212,255,0.15);  color: var(--neon-blue); }
.due  { background: rgba(0,212,255,0.12); color: var(--neon-blue); }

/* ── AUTH MODAL ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,7,18,0.92);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.auth-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, transparent, var(--neon-gold), transparent);
}

.auth-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--neon-gold);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 28px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus { border-color: var(--neon-gold); }

.auth-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  background: var(--surface2);
  border-radius: 6px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 7px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--neon-gold);
}

.auth-error {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--neon-red);
  background: rgba(255,62,62,0.08);
  border: 1px solid rgba(255,62,62,0.2);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: none;
}

.auth-anon {
  text-align: center;
  margin-top: 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

.auth-anon button {
  background: none;
  border: none;
  color: var(--neon-purple);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  cursor: pointer;
  text-decoration: underline;
  letter-spacing: 0.05em;
}

.auth-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.auth-close:hover { color: var(--text); }

/* ── ORACLE ENERGY BANNER ──────────────────────────── */
.oracle-energy-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0,140,255,0.07), rgba(0,140,255,0.04));
  border: 1px solid rgba(0,140,255,0.35);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.oracle-energy-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0,140,255,0.06) 50%, transparent 100%);
  animation: energySweep 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes energySweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.energy-left, .energy-right { min-width: 120px; }
.energy-right { text-align: right; }
.energy-game-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.energy-jackpot-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.energy-jackpot-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}
.energy-jackpot-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.25rem;
  color: var(--neon-gold);
  text-shadow: 0 0 14px var(--neon-purple);
  letter-spacing: 0.04em;
}
.energy-center { flex: 1; text-align: center; }
.energy-level-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-gold);
  letter-spacing: 0.22em;
  text-shadow: 0 0 16px var(--neon-purple);
  margin-bottom: 5px;
}
.energy-msg {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.energy-countdown-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.energy-countdown {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.06em;
}
.pred-oracle-conf {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.pred-oracle-conf .conf-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pred-oracle-conf .conf-label {
  font-family: 'Cinzel', serif;
  font-size: 0.46rem;
  color: var(--muted);
  letter-spacing: 0.14em;
}
@media (max-width: 600px) {
  .oracle-energy-banner { flex-direction: column; text-align: center; gap: 10px; }
  .energy-left, .energy-right { min-width: unset; text-align: center; }
  .energy-jackpot-row { justify-content: center; }
}

/* Draw schedule + timing note */
.draw-schedule-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 5px;
  opacity: 0.8;
}

.energy-timing-note {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.5;
  margin-top: 4px;
  font-style: italic;
}

/* ── Jackpot ticker ── */
.jackpot-ticker {
  width: 100%;
  overflow: hidden;
  background: rgba(6, 6, 10, 0.7);
  border-top: 1px solid rgba(180, 120, 40, 0.1);
  border-bottom: 1px solid rgba(180, 120, 40, 0.1);
  padding: 5px 0;
  margin-bottom: 14px;
  position: relative;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 36s linear infinite;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-segment { display: inline-flex; align-items: center; gap: 0; }

.ticker-sep {
  font-size: 0.55rem;
  color: rgba(180, 120, 40, 0.4);
  padding: 0 18px;
}

.ticker-name {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  padding-right: 10px;
}

.ticker-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--neon-gold);
  padding-right: 10px;
}

.ticker-sched {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.65;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Oracle pulse shimmer — passes from left to right every 12s */
.jackpot-ticker::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(180,100,255,0.07) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-100%);
}
.jackpot-ticker.oracle-pulsing::after {
  animation: oracle-shimmer-pass 3.2s ease-in-out forwards;
}
@keyframes oracle-shimmer-pass {
  0%   { opacity: 0;   transform: translateX(-100%); }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0;   transform: translateX(110%); }
}

/* Rune flicker — ✧ appears briefly between items */
.ticker-rune-flicker {
  color: rgba(224, 64, 251, 0.65);
  font-size: 0.62rem;
  padding: 0 6px;
  animation: rune-appear 2.5s ease-out forwards;
}
@keyframes rune-appear {
  0%   { opacity: 0;   transform: scale(0.5); }
  15%  { opacity: 0.9; transform: scale(1.15); }
  60%  { opacity: 0.7; }
  100% { opacity: 0;   transform: scale(0.8); }
}

/* Hover panel — expands below ticker track on hover */
.ticker-hover-panel {
  display: flex;
  justify-content: center;
  gap: 48px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  border-top: 1px solid transparent;
}
.jackpot-ticker:hover .ticker-hover-panel {
  max-height: 80px;
  opacity: 1;
  border-top-color: rgba(180, 120, 40, 0.1);
}
.jackpot-ticker:hover .ticker-track {
  opacity: 0.45;
  transition: opacity 0.25s ease;
}
.ticker-hover-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
}
.ticker-hover-game {
  font-family: 'Cinzel', serif;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.ticker-hover-jackpot {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--neon-gold);
  font-weight: 700;
}
.ticker-hover-cash {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  color: var(--muted);
  opacity: 0.65;
}
.ticker-hover-sched {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.54rem;
  color: var(--muted);
  opacity: 0.5;
  letter-spacing: 0.07em;
}

/* Fortune surge overlay — shown once per session at jackpot milestones */
.fortune-surge-overlay {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: linear-gradient(135deg, rgba(13,4,20,0.97), rgba(30,5,45,0.97));
  border: 1px solid rgba(103,209,223,0.38);
  border-radius: 6px;
  padding: 14px 32px;
  text-align: center;
  box-shadow: 0 0 36px rgba(103,209,223,0.22);
  pointer-events: none;
  animation: surge-fadein 0.5s ease forwards, surge-fadeout 0.7s ease 5.5s forwards;
}
.fortune-surge-title {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--neon-blue);
  margin-bottom: 6px;
}
.fortune-surge-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: var(--neon-gold);
  letter-spacing: 0.06em;
}
@keyframes surge-fadein {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes surge-fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Oracle verse ── */
.oracle-verse {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  min-height: 1.4em;
  padding: 8px 0 2px;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.oracle-verse.verse-visible { opacity: 1; }

/* ══════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE LAYOUT
   Targets: 320px min / 375–390px primary / 414px / 768px tablet
   ══════════════════════════════════════════ */

/* Base mobile adjustments (≤414px) */
@media (max-width: 414px) {
  .wrapper { padding: 0 12px 40px; }

  /* Header */
  header { padding: 20px 0 14px; }
  .oracle-eye { width: 44px; height: 44px; }
  h1 { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .tagline { font-size: 0.52rem; letter-spacing: 0.12em; }

  /* Status bar */
  .status-bar { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .status-item { font-size: 0.6rem; }

  /* Game tabs — scrollable row */
  .game-tabs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .game-tabs { flex-wrap: nowrap; gap: 6px; }
  .game-tab { font-size: 0.58rem; padding: 5px 10px; white-space: nowrap; }

  /* Panels */
  .panel { padding: 14px 12px; }
  .panel-title { font-size: 0.58rem; letter-spacing: 0.18em; margin-bottom: 12px; }

  /* Conjure controls */
  .conjure-row { gap: 8px; flex-wrap: wrap; }
  .ticket-count-wrap { gap: 6px; }
  #ticketCount { width: 52px; font-size: 0.85rem; padding: 6px 8px; }
  .btn { font-size: 0.72rem; padding: 10px 16px; }

  /* Stats row */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 10px 8px; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.48rem; }

  /* Frequency balls */
  .freq-ball { width: 30px; height: 30px; font-size: 0.72rem; }

  /* Grimoire */
  .grimoire-item { font-size: 0.6rem; gap: 6px; }
  .grimoire-numbers { gap: 4px; }
  .g-ball { width: 22px; height: 22px; font-size: 0.6rem; }

  /* Nav labels */
  .nav-label { font-size: 0.45rem; }

  /* Upgrade bar */
  .upgrade-bar-inner { flex-direction: column; gap: 6px; text-align: center; }
}

/* Very small phones (≤320px) */
@media (max-width: 320px) {
  .wrapper { padding: 0 8px 32px; }
  h1 { font-size: 1.2rem; }
  .pred-ball { width: 28px; height: 28px; font-size: 0.7rem; }
  .pred-balls { gap: 4px; }
  .stats-row { grid-template-columns: 1fr; }
  .btn { font-size: 0.66rem; padding: 9px 12px; }
  .game-tab { font-size: 0.54rem; padding: 4px 8px; }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
  .grid-main { grid-template-columns: 1fr 1fr; }
  .pred-ball { width: 40px; height: 40px; font-size: 0.92rem; }
  .btn { font-size: 0.8rem; padding: 12px 24px; }
  .panel { padding: 20px; }
}

/* ══════════════════════════════════════════════════════
   CONJURE ANIMATION ENGINE
   ══════════════════════════════════════════════════════ */

/* ── Animated prediction ball ── */
.pred-ball-anim {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #2a2a3a, #14141e);
  border: 1.5px solid rgba(180,120,40,0.18);
  color: rgba(200,160,60,0.2);
  transition: transform 0.2s ease;
}

.pred-ball-anim .ball-shine {
  position: absolute;
  top: 10%; left: 18%;
  width: 28%; height: 16%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.18), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.pred-ball-anim .ball-num {
  position: relative;
  z-index: 2;
}

.pred-ball-anim .mist {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,120,40,0.45), rgba(100,60,10,0.2));
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* Spinning */
.pred-ball-anim.spinning {
  animation: cx-spin-flicker 0.09s linear infinite;
  color: rgba(200,160,60,0.12);
  border-color: rgba(180,120,40,0.08);
}

@keyframes cx-spin-flicker {
  0%   { transform: scale(1.0); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1.0); }
}

.pred-ball-anim.slowing { animation: cx-spin-slow 0.2s ease-out; }

@keyframes cx-spin-slow {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Mist on reveal */
.pred-ball-anim.misting .mist {
  animation: cx-mist-swirl 0.28s ease-out forwards;
}

@keyframes cx-mist-swirl {
  0%   { opacity: 1; transform: scale(1.3); filter: blur(2px); }
  100% { opacity: 0; transform: scale(0.85); filter: blur(0); }
}

/* ── Revealed heat states ── */
.pred-ball-anim.revealed.hot {
  background: radial-gradient(circle at 35% 35%, #3a1010, #1a0808);
  border: 1.5px solid #ff3030;
  color: #ff6060;
  box-shadow: 0 0 10px rgba(255,48,48,0.5), 0 0 20px rgba(255,48,48,0.22);
  animation: cx-pulse-hot 2s ease-in-out infinite;
}

@keyframes cx-pulse-hot {
  0%,100% { box-shadow: 0 0 10px rgba(255,48,48,0.5), 0 0 20px rgba(255,48,48,0.22); }
  50%      { box-shadow: 0 0 16px rgba(255,48,48,0.7), 0 0 30px rgba(255,48,48,0.32); }
}

.pred-ball-anim.revealed.warm {
  background: radial-gradient(circle at 35% 35%, #2a1a08, #160d04);
  border: 1.5px solid #e8a020;
  color: #ffcc44;
  box-shadow: 0 0 10px rgba(232,160,32,0.45), 0 0 20px rgba(232,160,32,0.18);
  animation: cx-pulse-warm 2.5s ease-in-out infinite;
}

@keyframes cx-pulse-warm {
  0%,100% { box-shadow: 0 0 10px rgba(232,160,32,0.45), 0 0 20px rgba(232,160,32,0.18); }
  50%      { box-shadow: 0 0 16px rgba(232,160,32,0.62), 0 0 28px rgba(232,160,32,0.28); }
}

.pred-ball-anim.revealed.cold {
  background: radial-gradient(circle at 35% 35%, #081828, #04101a);
  border: 1.5px solid #3a8fff;
  color: #66aaff;
  box-shadow: 0 0 10px rgba(58,143,255,0.5), 0 0 20px rgba(58,143,255,0.2);
  animation: cx-pulse-cold 3s ease-in-out infinite;
}

@keyframes cx-pulse-cold {
  0%,100% { box-shadow: 0 0 10px rgba(58,143,255,0.5), 0 0 20px rgba(58,143,255,0.2); }
  50%      { box-shadow: 0 0 16px rgba(58,143,255,0.65), 0 0 28px rgba(58,143,255,0.3); }
}

/* ── Bonus ball (Powerball / Mega Ball) ── */
.pred-ball-anim.revealed.pb-bonus {
  background: radial-gradient(circle at 35% 35%, #3a0808, #1a0404);
  border: 1.5px solid #cc2020;
  color: #ff5555;
  box-shadow: 0 0 14px rgba(200,30,30,0.7), 0 0 28px rgba(200,30,30,0.38);
  animation: cx-pulse-bonus 1.8s ease-in-out infinite;
}

@keyframes cx-pulse-bonus {
  0%,100% { box-shadow: 0 0 14px rgba(200,30,30,0.7), 0 0 28px rgba(200,30,30,0.38); transform: scale(1); }
  50%      { box-shadow: 0 0 22px rgba(200,30,30,0.88), 0 0 44px rgba(200,30,30,0.5); transform: scale(1.05); }
}

/* Snap-in */
.pred-ball-anim.pb-snap {
  animation: cx-snap-in 0.28s cubic-bezier(0.17, 0.89, 0.32, 1.49) forwards !important;
}

@keyframes cx-snap-in {
  0%   { transform: scale(0.4) rotate(-18deg); opacity: 0.2; }
  70%  { transform: scale(1.2) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Burst rings */
.pred-ball-anim.pb-burst::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(220,40,40,0.9);
  animation: cx-burst-1 0.5s ease-out forwards;
  z-index: 10;
  pointer-events: none;
}

.pred-ball-anim.pb-burst::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,120,60,0.6);
  animation: cx-burst-2 0.65s 0.07s ease-out forwards;
  z-index: 10;
  pointer-events: none;
}

@keyframes cx-burst-1 {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

@keyframes cx-burst-2 {
  0%   { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* ── FX Overlays ── */
#conjureFlash {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 998;
  background: radial-gradient(ellipse at 50% 50%, rgba(220,40,40,0.14), transparent 65%);
  opacity: 0;
}

#conjureFlash.cx-active { animation: cx-flash 0.45s ease-out forwards; }

@keyframes cx-flash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

#conjureShockwave {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}

#conjureShockwave.cx-active { animation: cx-sw-fade 0.65s ease-out forwards; }

#conjureShockwave .cx-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2.5px solid rgba(220,40,40,0.9);
  box-shadow: 0 0 16px rgba(220,40,40,0.5);
}

#conjureShockwave.cx-active .cx-ring { animation: cx-sw-ring 0.65s ease-out forwards; }

@keyframes cx-sw-ring {
  0%   { transform: scale(0.4); opacity: 1; border-width: 3px; }
  100% { transform: scale(9);   opacity: 0; border-width: 1px; }
}

@keyframes cx-sw-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* Local rune sigil — injected as a child of the bonus ball element */
.pb-local-sigil {
  position: absolute;
  inset: -14px;
  pointer-events: none;
  z-index: 20;
  animation: pb-local-sigil-aura 0.9s ease-out forwards;
}

.pb-local-sigil svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px rgba(220,40,40,0.7));
}

@keyframes pb-local-sigil-aura {
  0%   { opacity: 0;    transform: scale(0.55) rotate(-18deg); }
  20%  { opacity: 0.95; transform: scale(1.06) rotate(3deg); }
  55%  { opacity: 0.6;  transform: scale(1.02) rotate(0deg); }
  100% { opacity: 0;    transform: scale(1.18) rotate(6deg); }
}

/* Screen shake on conjure climax */
@keyframes conjure-shake {
  0%   { transform: translate(0,0); }
  15%  { transform: translate(-3px, 2px); }
  30%  { transform: translate(3px, -2px); }
  50%  { transform: translate(-2px, 1px); }
  70%  { transform: translate(2px, -1px); }
  100% { transform: translate(0,0); }
}

body.conjure-shake { animation: conjure-shake 0.32s ease-out; }

/* Responsive sizing */
@media (min-width: 768px) {
  .pred-ball-anim { width: 40px; height: 40px; font-size: 0.92rem; }
}

@media (max-width: 375px) {
  .pred-ball-anim { width: 30px; height: 30px; font-size: 0.75rem; }
}

@media (max-width: 320px) {
  .pred-ball-anim { width: 28px; height: 28px; font-size: 0.7rem; }
}

/* ══════════════════════════════════════════════════════
   PRIME TICKET ANALYSIS
══════════════════════════════════════════════════════ */
.analysis-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
}
.analysis-lock .lock-icon {
  font-size: 2rem;
  color: var(--muted);
  opacity: 0.4;
}
.analysis-lock .lock-msg {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-align: center;
}

.analysis-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  margin: 8px 0 16px;
  line-height: 1.5;
}

.analysis-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 8px;
}

.analysis-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analysis-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.analysis-digit-row {
  display: flex;
  gap: 6px;
}

.analysis-digit-input {
  width: 48px;
  height: 48px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  -moz-appearance: textfield;
}
.analysis-digit-input::-webkit-outer-spin-button,
.analysis-digit-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.analysis-digit-input:focus {
  outline: none;
  border-color: rgba(173, 31, 191, 0.6);
  box-shadow: 0 0 8px rgba(173, 31, 191, 0.2);
}

.analysis-error {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--neon-red);
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255,62,62,0.3);
  border-radius: 6px;
  background: rgba(255,62,62,0.05);
}

/* Results */
.analysis-results {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ana-score-banner {
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid transparent;
}
.ana-score-banner.score-exceptional { background: rgba(0,255,136,0.07); border-color: rgba(0,255,136,0.3); }
.ana-score-banner.score-strong      { background: rgba(0,212,255,0.07); border-color: rgba(0,212,255,0.3); }
.ana-score-banner.score-stable      { background: rgba(0,140,255,0.07); border-color: rgba(0,140,255,0.3); }
.ana-score-banner.score-volatile    { background: rgba(255,170,0,0.07); border-color: rgba(255,170,0,0.3); }
.ana-score-banner.score-weak        { background: rgba(255,62,62,0.07); border-color: rgba(255,62,62,0.3); }

.ana-score-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex-basis: 100%;
  margin-bottom: -8px;
}
.ana-score-value {
  font-family: 'Cinzel', serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
}
.score-exceptional .ana-score-value { color: var(--neon-green); }
.score-strong      .ana-score-value { color: var(--neon-blue); }
.score-stable      .ana-score-value { color: var(--neon-gold); }
.score-volatile    .ana-score-value { color: #ffaa00; }
.score-weak        .ana-score-value { color: var(--neon-red); }

.ana-score-class {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.ana-score-explainer {
  flex-basis: 100%;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.05em;
  margin-top: -4px;
}
.ana-score-insights {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.ana-score-insights span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
}

.ana-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .ana-cards { grid-template-columns: 1fr; }
}

.ana-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ana-card-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

/* Number heat grid */
.ana-num-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ana-num-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  min-width: 60px;
}
.heat-bg-hot  { background: rgba(255,62,62,0.07);  border-color: rgba(255,62,62,0.25); }
.heat-bg-warm { background: rgba(0,212,255,0.08); border-color: rgba(0,212,255,0.22); }
.heat-bg-cold { background: rgba(0,212,255,0.07);  border-color: rgba(0,212,255,0.2); }

.ana-num-ball, .ana-digit-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.heat-hot  { background: radial-gradient(circle at 35% 35%, #ff6b6b, #c0392b); color: #fff; }
.heat-warm { background: radial-gradient(circle at 35% 35%, #5fd9ff, #1a79b6); color: #fff; }
.heat-cold { background: radial-gradient(circle at 35% 35%, #00d4ff, #0288d1); color: #fff; }

.ana-num-heat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
}
.heat-label-hot  { color: #ff6b6b; }
.heat-label-warm { color: #67d1df; }
.heat-label-cold { color: #00d4ff; }

.ana-num-stat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: var(--muted);
  text-align: center;
}
.ana-num-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  color: var(--muted);
  opacity: 0.6;
}

/* Pair rows */
.ana-pair-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.ana-pair-row:last-child { border-bottom: none; }
.ana-pair-balls { color: var(--text); }
.ana-pair-balls b { color: var(--neon-gold); }
.ana-pair-count { color: var(--muted); font-size: 0.65rem; }

/* Stat rows */
.ana-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}
.ana-stat-row b { color: var(--text); }
.ana-muted { color: var(--muted); font-size: 0.62rem; }

/* Spread bar */
.ana-spread-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 4px;
  height: 10px;
  position: relative;
  overflow: visible;
}
.ana-spread-bar {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--neon-red), var(--neon-gold), var(--neon-green));
  transition: width 0.6s ease;
  min-width: 4px;
}
.ana-spread-score {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Digit rows for pick games */
.ana-digit-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.ana-digit-stat-row:last-child { border-bottom: none; }
.ana-digit-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
}
.ana-pos { color: var(--muted); font-size: 0.6rem; letter-spacing: 0.1em; min-width: 60px; }
.ana-heat { font-size: 0.65rem; letter-spacing: 0.1em; }
.ana-freq { color: var(--muted); font-size: 0.62rem; }
.ana-freq b { color: var(--text); }

.analysis-disclaimer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  opacity: 0.55;
  text-align: center;
  padding: 6px 0 2px;
  letter-spacing: 0.06em;
}

/* Fortune corner interpretation + save CTA */
.fortune-interpretation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(173, 31, 191, 0.06);
  border: 1px solid rgba(173, 31, 191, 0.2);
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #c890d8;
  line-height: 1.6;
  font-style: italic;
}
.fortune-eye {
  color: var(--neon-purple);
  font-style: normal;
  flex-shrink: 0;
  margin-top: 2px;
}
.fortune-save-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ── Premium Dashboard Refresh ─────────────────────────── */
:root {
  --bg: #070d19;
  --surface: #101a2a;
  --surface2: #172338;
  --border: #28405b;
  --neon-gold: #d8b86a;
  --neon-blue: #67d1df;
  --neon-purple: #67d1df;
  --text: #edf3ff;
  --text-dim: #b2c0d7;
  --muted: #8192af;
  --pb-red: #de5f66;
}

body {
  font-family: 'Rajdhani', sans-serif;
  background:
    radial-gradient(1200px 620px at 15% -10%, rgba(93, 152, 177, 0.20) 0%, transparent 58%),
    radial-gradient(950px 560px at 92% 0%, rgba(216, 184, 106, 0.12) 0%, transparent 52%),
    linear-gradient(180deg, #091324 0%, #060c18 100%);
}

body::before {
  background:
    radial-gradient(ellipse 85% 58% at 52% -18%, rgba(103, 209, 223, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse 62% 44% at 84% 88%, rgba(216, 184, 106, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 55% 36% at 12% 82%, rgba(92, 166, 198, 0.08) 0%, transparent 55%);
}

body::after {
  opacity: 0.33;
  background-image:
    linear-gradient(rgba(124, 165, 196, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 165, 196, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

.wrapper {
  max-width: 1240px;
  padding: 0 26px 64px;
}

.hero-section {
  margin-top: 20px;
  margin-bottom: 18px;
  padding: 72px 24px 48px;
  min-height: 0;
  border: 1px solid rgba(120, 180, 255, 0.14);
  border-radius: 16px;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  position: relative;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0) 18%,
    rgba(0, 0, 0, 0) 82%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.oracle-title-wrap {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.oracle-title-wrap::before {
  content: '';
  position: absolute;
  inset: -40px -80px;
  background: radial-gradient(
    circle,
    rgba(90, 170, 255, 0.16) 0%,
    rgba(90, 170, 255, 0.08) 35%,
    rgba(90, 170, 255, 0) 75%
  );
  filter: blur(24px);
  pointer-events: none;
  z-index: 0;
}

.oracle-title {
  position: relative;
  z-index: 1;
}

.hero-section .oracle-eye {
  filter: drop-shadow(0 0 12px rgba(103, 209, 223, 0.28));
}

h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 4vw, 2.95rem);
  display: block;
  min-height: 1.15em;
  color: #edf3ff;
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0.06em;
  animation-duration: 8s;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 {
    background: linear-gradient(120deg, #d9ecff 0%, #6fd3de 36%, #f3d49b 67%, #d7e6ff 100%);
    background-size: 170% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.tagline {
  color: #9bb0ce;
  font-size: 0.73rem;
  letter-spacing: 0.16em;
}

.hero-balls,
.ambient-balls { opacity: 0.28; }
.hb {
  color: rgba(220, 234, 250, 0.08);
  filter: blur(0.2px) saturate(0.75);
}

.hb-1 { animation-duration: 52s; }
.hb-2 { animation-duration: 62s; }
.hb-3 { animation-duration: 42s; }
.hb-4 { animation-duration: 58s; }
.hb-5 { animation-duration: 66s; }
.hb-6 { animation-duration: 74s; }
.hb-7 { animation-duration: 46s; }
.hb-8 { animation-duration: 68s; }

.jackpot-ticker,
.oracle-energy-banner,
.game-context-row,
.status-bar,
.panel,
.stat-card,
.disclaimer {
  border: 1px solid rgba(106, 140, 173, 0.35);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(18, 29, 45, 0.96) 0%, rgba(15, 24, 38, 0.985) 100%);
  box-shadow: 0 10px 26px rgba(3, 8, 16, 0.46);
}

.jackpot-ticker {
  padding: 8px 0;
  margin-bottom: 16px;
  border-color: rgba(110, 153, 191, 0.35);
}

.ticker-name { color: #97adcc; }
.ticker-val {
  color: #e4ca90;
  text-shadow: none;
}

.oracle-energy-banner {
  padding: 16px 22px;
  border-color: rgba(103, 209, 223, 0.36);
  background:
    linear-gradient(145deg, rgba(14, 30, 45, 0.94) 0%, rgba(14, 24, 36, 0.96) 100%),
    radial-gradient(circle at 50% 10%, rgba(103, 209, 223, 0.08), transparent 58%);
}

.oracle-energy-banner::before {
  background: linear-gradient(90deg, transparent 0%, rgba(103, 209, 223, 0.05) 50%, transparent 100%);
  animation-duration: 8.5s;
}

.energy-jackpot-val,
.energy-level-badge {
  color: #e4ca90;
  text-shadow: none;
}

.energy-countdown {
  color: #dbe9ff;
}

.status-bar,
.game-context-row {
  margin-bottom: 16px;
  padding: 12px 18px;
}

.status-value,
.game-ctx-game {
  color: #79d7e2;
}

.status-dot {
  background: #79d7e2;
  box-shadow: 0 0 0 2px rgba(121, 215, 226, 0.18);
}

.stats-row {
  margin-bottom: 24px;
  gap: 14px;
}

.stat-card {
  padding: 18px 16px;
  border-color: rgba(100, 144, 178, 0.38);
}

.stat-value {
  color: #e4ca90;
  text-shadow: none;
}

.panel {
  padding: 22px;
  margin-bottom: 22px;
  border-color: rgba(102, 136, 170, 0.34);
}

#mainContent > .panel:last-child,
#mainContent > .grid-main:last-child {
  margin-bottom: 0;
}

.panel::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 165, 198, 0.75), transparent);
}

.panel-title {
  font-size: 0.66rem;
  color: #9eb4d4;
  letter-spacing: 0.18em;
  margin-bottom: 18px;
}

.panel-title::after {
  background: linear-gradient(90deg, rgba(82, 114, 145, 0.6), rgba(82, 114, 145, 0.1));
}

.btn {
  border-radius: 9px;
  letter-spacing: 0.12em;
}

.btn-primary {
  background: linear-gradient(140deg, #8cc8d4 0%, #5a9dbc 48%, #d7b86f 100%);
  color: #08111f;
  box-shadow: 0 8px 20px rgba(10, 24, 39, 0.42), 0 0 16px rgba(103, 209, 223, 0.34);
  text-shadow: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(6, 17, 29, 0.5), 0 0 22px rgba(103, 209, 223, 0.45);
}

.btn-oracle {
  background: linear-gradient(140deg, rgba(23, 41, 61, 0.95), rgba(13, 25, 40, 0.95));
  color: #c6d7ee;
  border: 1px solid rgba(104, 151, 188, 0.45);
  box-shadow: none;
}

.btn-oracle:hover {
  border-color: rgba(141, 201, 210, 0.75);
  color: #f1f7ff;
  background: linear-gradient(140deg, rgba(28, 51, 75, 0.95), rgba(16, 31, 47, 0.95));
  box-shadow: 0 8px 18px rgba(6, 18, 31, 0.45);
}

.prediction-panel {
  border-color: rgba(119, 166, 196, 0.46);
}

.predictions-list,
.recent-list,
.grimoire-list,
.freq-chart {
  padding-right: 8px;
}

.prediction-item,
.recent-item,
.grimoire-item,
.ana-card,
.fortune-save-cta {
  border-radius: 10px;
  border-color: rgba(95, 126, 159, 0.4);
  background: linear-gradient(160deg, rgba(21, 33, 50, 0.96) 0%, rgba(16, 27, 43, 0.95) 100%);
  box-shadow: none;
}

.prediction-item:hover {
  border-color: rgba(121, 187, 199, 0.66);
  box-shadow: 0 10px 20px rgba(6, 16, 27, 0.38);
}

.align-num.exceptional,
.align-label.exceptional {
  color: #7fd4df;
  text-shadow: none;
}

.align-num.strong,
.align-label.strong {
  color: #dfc68e;
}

.tab-bar,
.auth-tabs {
  background: #111f30;
  border: 1px solid rgba(89, 119, 151, 0.4);
}

.tab.active,
.auth-tab.active {
  color: #e7ce97;
  box-shadow: none;
}

#upgradeBar {
  background: linear-gradient(145deg, rgba(18, 36, 54, 0.96), rgba(13, 27, 42, 0.95)) !important;
  border: 1px solid rgba(114, 177, 196, 0.5) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 24px rgba(5, 13, 22, 0.44);
}

#upgradeBar span {
  color: #d8ebff !important;
  letter-spacing: 0.05em;
}

.premium-panel {
  border-color: rgba(216, 184, 106, 0.42);
}

.how-panel {
  border-color: rgba(103, 209, 223, 0.43);
}

.manual-intro {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.92rem;
  color: #adc1df;
  line-height: 1.5;
  margin: -4px 0 18px;
  max-width: 74ch;
}

.fortune-interpretation {
  background: linear-gradient(145deg, rgba(17, 31, 46, 0.92), rgba(14, 24, 38, 0.94));
  border-color: rgba(94, 150, 180, 0.4);
  color: #d9e8fb;
  font-style: normal;
}

.disclaimer {
  margin-top: 36px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

#conjureFlash {
  background: radial-gradient(ellipse at 50% 50%, rgba(133, 212, 223, 0.08), transparent 68%);
}

#conjureShockwave .cx-ring {
  border-color: rgba(133, 212, 223, 0.7);
  box-shadow: 0 0 10px rgba(133, 212, 223, 0.32);
}

@media (max-width: 768px) {
  .wrapper { padding: 0 14px 46px; }

  .hero-balls,
  .ambient-balls { opacity: 0.2; }

  .hb { filter: blur(0.25px) saturate(0.68); }

  .hero-section {
    margin-top: 12px;
    padding: 56px 18px 36px;
    border-radius: 14px;
  }

  .status-bar,
  .game-context-row,
  .oracle-energy-banner,
  .panel,
  .stat-card,
  .disclaimer {
    border-radius: 12px;
  }

  .manual-intro {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .panel-title {
    font-size: 0.62rem;
  }
}

/* ── Global Ball Field Layer (grid < balls < content) ───────────── */
.oracle-ball-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Ensure all content layers above floating balls */
.wrapper,
.hero-section,
.panel,
.status-bar,
.stats-row,
.game-context-row,
.oracle-energy-banner,
.jackpot-ticker {
  position: relative;
  z-index: 2;
}


/* ════════════════════════════════════════════════
   MULTI-PAGE NAV + LAYOUT
════════════════════════════════════════════════ */

/* ── App pages ── */
.app-page { display: block; }

/* ── Nav bar: fixed TOP on desktop ── */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 600;
  display: flex;
  align-items: stretch;
  background: rgba(13,17,23,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
  height: 56px;
}

.nav-pages {
  display: flex;
  align-items: stretch;
  flex: 1;
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color 0.2s, background 0.2s;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover  { color: var(--text); background: rgba(0,140,255,0.06); }
.nav-btn.active { color: var(--neon-blue); border-bottom: 2px solid var(--neon-blue); background: rgba(0,180,255,0.06); }

.nav-icon  { font-size: 1rem; }
.nav-label { font-size: 0.58rem; letter-spacing: 0.14em; }

/* Auth slot on right side of nav */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  min-width: 150px;
  flex-shrink: 0;
}

/* Push all page content below the fixed nav */
body { padding-top: 56px; }

/* ── Mobile: fixed BOTTOM, hide auth slot ── */
@media (max-width: 700px) {
  body { padding-top: 0; padding-bottom: 68px; }

  .app-nav {
    top: auto;
    bottom: 0;
    height: auto;
    border-bottom: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.5);
  }
  .nav-btn {
    border-bottom: none;
    border-top: 2px solid transparent;
    padding: 10px 8px;
  }
  .nav-btn.active {
    border-bottom: none;
    border-top: 2px solid var(--neon-blue);
  }
  /* Auth stays in status bar on mobile */
  .nav-auth { display: none; }
  /* Show account button in bottom nav on mobile */
  #navAccountBtn { display: flex !important; }
}
/* Hide mobile account button on desktop — nav-auth handles it */
@media (min-width: 701px) {
  #navAccountBtn { display: none !important; }
}

/* ── Conjure teaser chips ── */
.conjure-chip-anchor {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  opacity: 0.75;
}

.conjure-chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.conjure-chip {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.conjure-chip-red  { color: var(--neon-red);  border-color: rgba(220,60,60,0.35);  background: rgba(220,60,60,0.07); }
.conjure-chip-blue { color: var(--neon-blue); border-color: rgba(0,140,255,0.3);   background: rgba(0,140,255,0.06); }
.conjure-chip-gold { color: var(--neon-gold); border-color: rgba(255,185,0,0.3);   background: rgba(255,185,0,0.06); }
.conjure-chip-pb   { color: var(--pb-c, #e8222e); border-color: color-mix(in srgb, var(--pb-c, #e8222e) 40%, transparent); background: color-mix(in srgb, var(--pb-c, #e8222e) 8%, transparent); }

/* ── Oracle dual panel (conjure + recent draws) ── */
.oracle-dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
  min-height: calc(100vh - 320px);
}

/* Left column — normal flex column; the list itself is capped so it scrolls
   rather than expanding the grid row indefinitely */
.prediction-panel {
  display: flex;
  flex-direction: column;
}

/* predictions container */
.prediction-panel #predictionsContainer {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* List scrolls after ~3 tickets; cap matches a typical right-column height */
.prediction-panel .predictions-list {
  max-height: calc(100vh - 460px);
  overflow-y: auto;
  min-height: 0;
}

/* Cards are natural height */
.prediction-panel .prediction-item,
.prediction-panel .pred-veil-wrap {
  flex: none;
}

/* Right column — flex column so reasoning panel stretches to fill */
.oracle-right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

#oracleReasoningPanel {
  flex: 1;
  min-height: 120px;
}

@media (max-width: 800px) {
  .oracle-dual-panel { grid-template-columns: 1fr; }
  .prediction-panel { display: block; }
  #oracleReasoningPanel { flex: none; min-height: unset; }
}

/* ── Feature wall veil ── */
.pred-veil-wrap {
  display: grid;
  border-radius: 8px;
}

.pred-veil-blur {
  grid-area: 1 / 1;
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.45;
}

.pred-veil-overlay {
  grid-area: 1 / 1;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(10, 10, 26, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(0, 140, 255, 0.25);
  backdrop-filter: blur(2px);
  padding: 24px 20px;
  text-align: center;
  min-height: 100%;
  box-sizing: border-box;
}

.pred-veil-eye {
  font-size: 1.4rem;
  color: var(--neon-blue);
  opacity: 0.8;
  animation: veilPulse 2.8s ease-in-out infinite;
}

@keyframes veilPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.pred-veil-saying {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--neon-gold);
  letter-spacing: 0.06em;
  font-style: italic;
  max-width: 260px;
  line-height: 1.5;
}

.pred-veil-btn {
  margin-top: 4px;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════
   BALL GROUPING — Powerball/MM white + bonus
════════════════════════════════════════════════ */

/* Conjured ticket balls */
.pred-balls-grouped {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pred-white-box {
  display: flex;
  gap: 5px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
}

.pred-pb-box {
  padding: 6px 10px;
  border: 1px solid;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

/* Recent draws + historical ball groups */
.mini-balls-grouped {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-white-box {
  display: flex;
  gap: 3px;
  padding: 3px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
}

.mini-pb-box {
  padding: 3px 6px;
  border: 1px solid;
  border-radius: 5px;
  display: flex;
  align-items: center;
}

/* Draw count in game context row */
.game-ctx-draws {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding-left: 4px;
}

/* Nav ticket counts sub-label */
.nav-ticket-counts {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  margin-top: 1px;
}

/* ══════════════════════════════════════════════════════
   PAGE IDENTITY HEADERS
   ══════════════════════════════════════════════════════ */
.page-identity {
  padding: 18px 20px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  border-left: 3px solid;
  position: relative;
  overflow: hidden;
}
.page-identity::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
}
.page-identity-tickets {
  border-color: var(--neon-purple);
  background: linear-gradient(135deg, rgba(138,43,226,0.07) 0%, rgba(0,0,0,0) 60%);
}
.page-identity-analyze {
  border-color: var(--neon-blue);
  background: linear-gradient(135deg, rgba(0,140,255,0.07) 0%, rgba(0,0,0,0) 60%);
}
.page-identity-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 4px;
}
.page-identity-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.page-identity-tickets .page-identity-title { color: #c084fc; }
.page-identity-analyze .page-identity-title { color: var(--neon-blue); }
.page-identity-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════
   RESULTS ARE IN BANNER
   ══════════════════════════════════════════════════════ */
.results-in-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,212,255,0.05));
  border: 1px solid rgba(0,255,136,0.25);
  animation: results-pulse 2.5s ease-in-out infinite;
}
@keyframes results-pulse {
  0%, 100% { border-color: rgba(0,255,136,0.25); box-shadow: none; }
  50%       { border-color: rgba(0,255,136,0.55); box-shadow: 0 0 12px rgba(0,255,136,0.15); }
}
.results-in-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.results-in-text { flex: 1; }
.results-in-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--neon-green);
  margin-bottom: 2px;
}
.results-in-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.57rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════
   TICKET MATCH RESULT BLOCK
   ══════════════════════════════════════════════════════ */
.ticket-match-block {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}
.ticket-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}
.ticket-match-header span:last-child {
  font-weight: 700;
  font-size: 0.6rem;
}
.ticket-match-compare {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ticket-match-col { display: flex; flex-direction: column; gap: 4px; }
.ticket-match-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.ticket-match-balls { display: flex; gap: 4px; flex-wrap: wrap; }
.ticket-match-vs {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding: 0 2px;
}

/* Individual match balls */
.match-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.match-ball.match-hit {
  border-color: transparent;
  transform: scale(1.08);
}
.match-ball.match-miss {
  opacity: 0.45;
}

/* ══════════════════════════════════════════════════════
   SAVE · NOTIFY CTA
   ══════════════════════════════════════════════════════ */
.save-notify-btn {
  color: var(--neon-green) !important;
  border-color: rgba(0,255,136,0.35) !important;
  white-space: nowrap;
}
.save-notify-btn:hover {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 10px rgba(0,255,136,0.2) !important;
}
.save-notify-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.54rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-align: right;
  opacity: 0.8;
}

/* ══════════════════════════════════════════════════════
   PICK BETTOR LABELS
   ══════════════════════════════════════════════════════ */
.bettor-row {
  grid-template-columns: 40px 1fr 100px;
}
.bettor-chip {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}
/* ══════════════════════════════════════════════════════
   TABLET / IPAD LAYOUT (768px – 1200px)
   Fills the screen on iPad mini, Air, Pro 11", Pro 13"
   ══════════════════════════════════════════════════════ */

/* Tickets page: 2-column card grid on iPad */
@media (min-width: 768px) {
  #savedTicketsList {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  /* Full-width items: banner, lock gate, section headers */
  #savedTicketsList .results-in-banner,
  #savedTicketsList .near-miss-upsell,
  #savedTicketsList > div[style*="border-bottom"],
  #savedTicketsList > div[style*="font-family"],
  #savedTicketsList > p {
    grid-column: 1 / -1;
  }

  /* Analyze page: stats row uses 4 columns */
  .stats-row { grid-template-columns: repeat(4, 1fr); }

  /* Page identity headers: side-by-side eyebrow + title */
  .page-identity { display: flex; align-items: center; gap: 20px; }
  .page-identity-eyebrow { margin-bottom: 0; white-space: nowrap; }
  .page-identity-sub { margin: 0; }
}

/* Wider iPad / iPad Pro landscape: more breathing room */
@media (min-width: 1024px) {
  .wrapper { padding: 0 40px 64px; }

  /* Oracle dual panel: give left column slightly more weight */
  .oracle-dual-panel { grid-template-columns: 1.1fr 0.9fr; gap: 28px; }

  /* Analyze page: freq chart + recent draws side by side */
  #pageAnalyze .panel { padding: 28px; }

  /* Ticket cards: 3 columns on very wide iPad Pro landscape */
  #savedTicketsList { grid-template-columns: repeat(3, 1fr); }

  /* Game context row: don't wrap, use full width */
  .game-context-row { flex-wrap: nowrap; }
}

/* ══════════════════════════════════════════════════════
   ORACLE PAGE HERO HEADER
   ══════════════════════════════════════════════════════ */
.oracle-page-hero {
  padding: 20px 20px 16px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(216,184,106,0.08) 0%, rgba(103,209,223,0.05) 50%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(216,184,106,0.18);
  position: relative;
  overflow: hidden;
}
.oracle-page-hero::before {
  content: '✦';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  color: rgba(216,184,106,0.07);
  pointer-events: none;
  font-family: 'Cinzel', serif;
}
.oracle-hero-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  color: var(--neon-gold);
  opacity: 0.7;
  margin-bottom: 5px;
}
.oracle-hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  line-height: 1.2;
}
.oracle-hero-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.57rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   GAME TAB — stronger active state
   ══════════════════════════════════════════════════════ */
.game-tab.active {
  color: var(--text) !important;
  background: var(--surface2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   MOBILE NAV — per-tab active colors + stronger highlight
   ══════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  #navOracle.active  { color: var(--neon-gold) !important; border-top-color: var(--neon-gold) !important; background: rgba(216,184,106,0.07) !important; }
  #navTickets.active { color: #c084fc !important; border-top-color: #c084fc !important; background: rgba(192,132,252,0.07) !important; }
  #navAnalyze.active { color: var(--neon-blue) !important; border-top-color: var(--neon-blue) !important; background: rgba(0,180,255,0.07) !important; }

  #navOracle.active  .nav-icon { transform: scale(1.2); display: inline-block; }
  #navTickets.active .nav-icon { transform: scale(1.2); display: inline-block; }
  #navAnalyze.active .nav-icon { transform: scale(1.2); display: inline-block; }

  .nav-icon { transition: transform 0.2s; }
}

/* ══════════════════════════════════════════════════════
   TICKETS EMPTY STATE CARD
   ══════════════════════════════════════════════════════ */
.tickets-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  text-align: center;
  border: 1px dashed rgba(192,132,252,0.25);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(138,43,226,0.04), rgba(0,0,0,0));
  margin: 8px 0;
}
.tickets-empty-icon {
  font-size: 2.2rem;
  opacity: 0.6;
}
.tickets-empty-title {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #c084fc;
  letter-spacing: 0.06em;
}
.tickets-empty-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 280px;
}
.tickets-empty-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: left;
}
.tickets-empty-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(192,132,252,0.4);
  color: #c084fc;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   ONBOARDING OVERLAY
   ══════════════════════════════════════════════════════ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,3,15,0.94);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.onboarding-card {
  background: var(--surface);
  border: 1px solid rgba(216,184,106,0.3);
  border-radius: 14px;
  max-width: 400px;
  width: 100%;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 0 60px rgba(216,184,106,0.08);
}
.onboarding-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--neon-gold);
  opacity: 0.7;
  margin-bottom: 8px;
}
.onboarding-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.onboarding-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  line-height: 1.6;
}
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  text-align: left;
}
.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.onboarding-step-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.onboarding-step-body { flex: 1; }
.onboarding-step-title {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.onboarding-step-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* Near-miss Prime upsell */
.near-miss-upsell {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(255,140,0,0.1), rgba(138,43,226,0.08));
  border: 1px solid rgba(255,140,0,0.25);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--neon-gold);
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.near-miss-btn {
  background: none;
  border: 1px solid rgba(255,140,0,0.5);
  color: var(--neon-gold);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 6px;
  white-space: nowrap;
}
.near-miss-btn:hover { background: rgba(255,140,0,0.15); }

.bettor-hot     { color: var(--neon-red); }
.bettor-active  { color: var(--neon-gold); }
.bettor-due     { color: #a78bfa; }
.bettor-cycling { color: var(--neon-blue); }
.bettor-cold    { color: #7dd3fc; }
.bettor-steady  { color: var(--muted); }


/* ══════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ══════════════════════════════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -120px;          /* off-screen initially */
  z-index: 9990;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  background: #0d1117;
  border-top: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.7), 0 -1px 0 rgba(103, 49, 210, 0.2);
  transition: bottom 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.pwa-install-banner.visible { bottom: 0; }

/* On mobile, float the banner above the fixed bottom nav */
@media (max-width: 700px) {
  .pwa-install-banner.visible { bottom: 58px; }
}

.pwa-install-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}
.pwa-install-text {
  flex: 1;
  min-width: 0;
}
.pwa-install-text strong {
  display: block;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.73rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.pwa-install-text span {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.pwa-install-btn {
  background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(103,49,210,0.18));
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: #67d1df;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.pwa-install-btn:hover {
  background: linear-gradient(135deg, rgba(0,212,255,0.22), rgba(103,49,210,0.3));
  border-color: rgba(0, 212, 255, 0.7);
}
.pwa-install-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.pwa-install-dismiss:hover { color: var(--text); }

/* iOS share icon inside install banner */
.pwa-share-svg {
  width: 13px;
  height: 16px;
  vertical-align: middle;
  color: #67d1df;
  display: inline-block;
  margin: 0 1px;
}
.pwa-install-text em {
  font-style: normal;
  color: #a0d4e8;
}

/* iOS install guide — vertical card layout */
.pwa-ios-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.pwa-ios-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwa-ios-header > div {
  flex: 1;
  min-width: 0;
}
.pwa-ios-header strong {
  display: block;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.73rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.pwa-ios-header span {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 2px;
}
.pwa-ios-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: ios-step;
}
.pwa-ios-steps li {
  counter-increment: ios-step;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: #c0ccd8;
  letter-spacing: 0.04em;
}
.pwa-ios-steps li::before {
  content: counter(ios-step);
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  color: #67d1df;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  flex-shrink: 0;
}
.pwa-ios-ok {
  align-self: flex-end;
  font-size: 0.6rem;
  padding: 6px 14px;
  opacity: 0.7;
}

/* iOS guide needs vertical layout — override the horizontal flex of the base banner */
.pwa-install-banner:has(.pwa-ios-guide) {
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
}
@media (max-width: 700px) {
  .pwa-install-banner:has(.pwa-ios-guide).visible { bottom: 58px; }
}
