:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #061b3d;
  --muted: #60708a;
  --line: #d7e2f0;
  --brand: #004a98;
  --brand-deep: #002d72;
  --gold: #ffcc00;
  --red: #ed1b2f;
  --ok: #107c41;
  --shadow: 0 18px 50px rgba(0, 45, 114, 0.12);
  --button-shadow: 0 10px 20px rgba(0, 45, 114, 0.14);
  --soft-blue: #eef5ff;
  --paper: #fbfdff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 204, 0, 0.12), transparent 28%, rgba(0, 74, 152, 0.08)),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffdc35, var(--gold));
  color: var(--brand-deep);
  font-weight: 700;
  min-height: 44px;
  padding: 11px 24px;
  cursor: pointer;
  box-shadow: var(--button-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button.secondary {
  background: #e9f2ff;
  color: var(--brand-deep);
  box-shadow: none;
  border: 1px solid #cbd9ea;
}

button:hover,
.scan-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 45, 114, 0.18);
}

button.secondary:hover {
  box-shadow: 0 10px 18px rgba(0, 45, 114, 0.08);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  padding: 18px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--red);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 12px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.85), transparent 22%),
    linear-gradient(145deg, #0e72c8, #003776 62%, #ed1b2f 63%);
  color: white;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 18px rgba(0, 45, 114, 0.22);
}

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

h1 {
  max-width: 620px;
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.latest-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 14px;
  border: 1px solid rgba(0, 74, 152, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(0, 45, 114, 0.08);
}

.latest-pill span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.latest-pill strong {
  color: var(--brand-deep);
  font-size: 15px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat {
  padding: 18px;
  border-top: 4px solid var(--gold);
}

.stat span,
.field span,
.panel p,
.dropzone small,
.import-line {
  color: var(--muted);
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}

.tab {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  min-width: 116px;
  box-shadow: none;
}

.tab.active {
  background: linear-gradient(180deg, #075cad, var(--brand-deep));
  color: white;
  border-color: var(--brand-deep);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.predict-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.control-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.control-panel span,
.refresh-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.control-panel strong {
  color: var(--brand-deep);
  font-size: 15px;
}

.control-panel .progress {
  grid-column: 1 / -1;
}

.refresh-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.refresh-control select {
  min-height: 38px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  color: var(--brand-deep);
  font-weight: 800;
}

.experience-panel {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 800;
}

.toggle-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.test-actions {
  margin-top: 0;
}

.test-actions button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.actions.compact {
  margin-top: 0;
  justify-content: flex-end;
}

.scan-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.scanner-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  place-items: center;
  min-height: 286px;
  padding: 30px;
  border: 1px solid rgba(0, 74, 152, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 4%, rgba(255, 204, 0, 0.2), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow);
  text-align: center;
}

.scanner-card::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px dashed rgba(0, 74, 152, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.scanner-card.is-processing::before {
  background: linear-gradient(180deg, transparent, rgba(243, 198, 0, 0.18), transparent);
  animation: scanLine 1.35s ease-in-out infinite;
}

.scanner-core {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 520px;
}

.scanner-core h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.scanner-core p {
  margin: 0;
  color: var(--muted);
}

.scanner-ring {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0050a4 0 9px, transparent 10px),
    radial-gradient(circle at center, #ffffff 0 18px, transparent 19px),
    conic-gradient(from -30deg, var(--gold) 0 32%, var(--red) 32% 58%, var(--brand-deep) 58% 100%);
  box-shadow: 0 10px 22px rgba(0, 45, 114, 0.16);
}

.scanner-ring::before,
.scanner-ring::after,
.scanner-ring span {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-top-color: rgba(255, 204, 0, 0.95);
  border-radius: 50%;
}

.scanner-ring::after {
  inset: 20px;
  border-color: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(237, 27, 47, 0.95);
}

.scanner-ring span {
  inset: 29px;
  background: var(--brand);
  border: 0;
}

.scanner-card.is-processing .scanner-ring::before,
.scanner-card.is-processing .scanner-ring span {
  animation: spin 1.2s linear infinite;
}

.scanner-card.is-processing .scanner-ring::after {
  animation: spin 1.8s linear infinite reverse;
}

.scan-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scanner-card.is-processing .scan-actions {
  display: none;
}

.scan-button {
  display: inline-grid;
  place-items: center;
  min-width: 142px;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 20px;
  background: #e9f2ff;
  color: var(--brand-deep);
  font-weight: 800;
  cursor: pointer;
  border: 1px solid #cbd9ea;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.scan-button.primary {
  background: linear-gradient(180deg, #ffdc35, var(--gold));
  color: var(--brand-deep);
  border-color: #f1bd00;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #bdcbe0;
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lines {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ticket-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr)) minmax(72px, 0.7fr) 36px;
  gap: 8px;
  align-items: center;
}

.ticket-line input {
  min-width: 0;
  text-align: center;
  border: 1px solid #bdcbe0;
  border-radius: 8px;
  padding: 10px 6px;
}

.ticket-line .super {
  border-color: var(--red);
}

.icon-btn {
  padding: 8px;
  background: #f3e5e9;
  color: #9f1239;
}

.result-box {
  margin-top: 18px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid var(--line);
  padding: 16px;
}

.result-shell {
  padding: 28px;
  text-align: center;
}

.result-box.winner {
  border-color: rgba(16, 124, 65, 0.5);
  background: #ecfdf3;
}

.result-box.pending {
  border-color: rgba(243, 198, 0, 0.65);
  background: #fff8d7;
}

.result-box.missing,
.result-box.loser {
  border-color: rgba(237, 27, 47, 0.2);
  background:
    linear-gradient(180deg, #fff, #fff9fa);
}

.result-box h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.result-summary {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.result-summary p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.result-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-box.pending .result-kicker,
.result-box.missing .result-kicker {
  display: none;
}

.game-results,
.official-results {
  display: grid;
  gap: 14px;
}

.result-comparison {
  display: grid;
  gap: 16px;
}

.ticket-summary,
.official-result,
.game-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  text-align: center;
}

.ticket-summary {
  background: linear-gradient(180deg, #fffef6, #ffffff);
  border-color: rgba(255, 204, 0, 0.45);
}

.ticket-summary > span,
.official-date {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ticket-summary > strong {
  display: block;
  margin-top: 5px;
  color: var(--brand-deep);
  font-size: 18px;
}

.official-results.two-results {
  grid-template-columns: 1fr 1fr;
}

.game-result.is-loser,
.official-result.is-loser {
  border-color: rgba(237, 27, 47, 0.18);
}

.game-result.is-winner,
.official-result.is-winner {
  border-color: rgba(16, 124, 65, 0.32);
  background: #f5fff8;
}

.game-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f8;
}

.game-result-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.game-result-head strong {
  color: var(--brand-deep);
  font-size: 18px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.compare-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
  text-align: center;
}

.compact-result .compare-card {
  min-height: 132px;
  display: grid;
  align-content: center;
}

.compare-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.card-date {
  display: block;
  color: var(--brand-deep);
  font-size: 15px;
}

.pending-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.pending-ticket-card {
  min-height: 160px;
  display: grid;
  align-content: center;
  justify-items: center;
  overflow: visible;
}

.pending-ticket-card .balls {
  gap: 12px;
  margin-top: 18px;
}

.pending-ticket-card .ball {
  flex: 0 0 auto;
}

.next-draw-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(255, 204, 0, 0.45);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 247, 213, 0.96), rgba(255, 255, 255, 0.92));
  text-align: left;
}

.next-draw-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff545e, var(--red));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(237, 27, 47, 0.2);
}

.next-draw-icon svg {
  width: 32px;
  height: 32px;
}

.next-draw-card span {
  display: block;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-draw-card strong {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 22px;
  line-height: 1.15;
}

.next-draw-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.match-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px auto 0;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f3f7fc;
  color: var(--brand-deep);
  font-style: normal;
}

.match-row span {
  font-weight: 800;
}

.match-row em {
  color: var(--muted);
  font-style: normal;
}

.scan-orbit {
  display: none;
}

.scan-orbit span {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--brand);
  border-radius: 50%;
}

.scan-orbit span:nth-child(2) {
  inset: 9px;
  border-top-color: var(--gold);
  animation-duration: 0.9s;
  animation-direction: reverse;
}

.scan-orbit span:nth-child(3) {
  inset: 18px;
  border-top-color: var(--red);
  animation-duration: 0.7s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scanLine {
  0% {
    transform: translateY(-36%);
    opacity: 0.2;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(36%);
    opacity: 0.2;
  }
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.win-celebration-banner {
  position: fixed;
  left: 50%;
  top: 28px;
  z-index: 10000;
  display: grid;
  gap: 4px;
  min-width: min(420px, calc(100vw - 32px));
  padding: 18px 28px;
  border: 2px solid rgba(255, 204, 0, 0.95);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.95), transparent 18%),
    linear-gradient(135deg, #003da6, #005fea 52%, #ed1b2f);
  color: white;
  text-align: center;
  box-shadow: 0 24px 54px rgba(0, 45, 114, 0.32);
  transform: translateX(-50%);
  animation: celebrationBanner 1.15s ease-in-out infinite alternate;
}

.win-celebration-banner strong {
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1;
}

.win-celebration-banner span {
  color: #ffec75;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.celebrating-win .shell {
  animation: winJoyShake 0.65s ease-in-out infinite;
}

.confetti-layer span {
  position: absolute;
  left: var(--x);
  width: 10px;
  height: 16px;
  border-radius: 3px;
  opacity: 0;
  animation-delay: var(--delay);
  animation-duration: var(--duration);
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.18, 0.74, 0.32, 1);
}

.win-confetti span {
  bottom: -24px;
  animation-name: confettiWin;
}

.lose-confetti span {
  top: -20px;
  width: 8px;
  height: 12px;
  filter: saturate(0.9);
  animation-name: confettiLose;
}

@keyframes confettiWin {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
  }
  12% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate3d(var(--drift), calc(var(--rise) * -1), 0) rotate(var(--rotation)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift) * 1.4), calc(var(--rise) * -0.55), 0) rotate(calc(var(--rotation) * 1.7)) scale(0.9);
  }
}

@keyframes confettiLose {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  18% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 70vh, 0) rotate(var(--rotation));
  }
}

@keyframes celebrationBanner {
  from {
    transform: translateX(-50%) scale(0.98);
  }
  to {
    transform: translateX(-50%) scale(1.035);
  }
}

@keyframes winJoyShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(1px, -1px, 0);
  }
  50% {
    transform: translate3d(-1px, 1px, 0);
  }
  75% {
    transform: translate3d(1px, 1px, 0);
  }
}

.retry-btn {
  position: relative;
  z-index: 1;
}

.engine-state {
  display: none;
}

.result-box.empty {
  color: var(--muted);
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 88px;
}

.result-box.empty strong {
  color: var(--brand-deep);
  font-size: 18px;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 6px;
}

.ball {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0 7px, transparent 8px),
    radial-gradient(circle at 62% 70%, rgba(176, 92, 0, 0.28), transparent 34%),
    linear-gradient(145deg, #ffe47a 0%, #ffca22 45%, #f09a08 100%);
  color: #080808;
  font-weight: 900;
  font-size: 17px;
  box-shadow:
    inset 0 -7px 10px rgba(120, 56, 0, 0.28),
    inset 0 4px 7px rgba(255, 255, 255, 0.55),
    0 7px 13px rgba(0, 45, 114, 0.18);
}

.ball::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.ball span {
  position: relative;
  z-index: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.ball.super {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.86) 0 7px, transparent 8px),
    radial-gradient(circle at 65% 72%, rgba(90, 0, 0, 0.32), transparent 36%),
    linear-gradient(145deg, #ff4a54 0%, #ed1b2f 50%, #b10718 100%);
  color: white;
}

.import-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e6edf7;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width 0.25s ease;
}

.search {
  max-width: 420px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f7fbff;
}

.super-text {
  color: var(--red);
  font-weight: 900;
}

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

a {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero,
  .predict-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: block;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .experience-panel {
    grid-template-columns: 1fr;
  }

  .test-actions {
    justify-content: flex-start;
  }

  .actions.compact {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 34px;
  }

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

  .ticket-line {
    grid-template-columns: repeat(3, minmax(44px, 1fr));
  }

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

  .match-row {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 8px;
  }

  .pending-layout {
    grid-template-columns: 1fr;
  }

  .next-draw-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

/* UI6: scanner layout inspired by the fourth mockup, recolored with Baloto blue/yellow/red. */
body {
  min-height: 100vh;
  padding: 12px;
  background:
    radial-gradient(circle at 6% 15%, rgba(255, 204, 0, 0.16), transparent 25%),
    radial-gradient(circle at 96% 82%, rgba(237, 27, 47, 0.12), transparent 22%),
    linear-gradient(125deg, #eef4fb 0%, #f9fbff 48%, #e8f0fa 100%);
}

.shell {
  position: relative;
  overflow: hidden;
  width: min(1370px, 100%);
  min-height: calc(100vh - 24px);
  margin: 0 auto;
  padding: 34px clamp(28px, 5vw, 58px) 34px;
  border: 1px solid rgba(0, 45, 114, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    #ffffff;
  box-shadow: 0 22px 60px rgba(0, 45, 114, 0.14);
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.shell::before {
  left: -112px;
  top: 228px;
  width: 260px;
  height: 430px;
  border-radius: 52% 48% 44% 56%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.55) 0 34px, transparent 36px),
    radial-gradient(circle at 50% 48%, rgba(0, 74, 152, 0.18) 0 84px, transparent 86px),
    linear-gradient(135deg, rgba(255, 204, 0, 0.9), rgba(255, 204, 0, 0.26));
  transform: rotate(-12deg);
}

.shell::after {
  right: -118px;
  top: 244px;
  width: 300px;
  height: 450px;
  border-radius: 50% 0 0 50%;
  background:
    radial-gradient(circle at 58% 33%, rgba(255, 204, 0, 0.4) 0 36px, transparent 38px),
    radial-gradient(circle at 40% 62%, rgba(0, 74, 152, 0.18) 0 70px, transparent 72px),
    linear-gradient(160deg, rgba(237, 27, 47, 0.9), rgba(237, 27, 47, 0.18));
}

.hero,
.tabs,
.view {
  position: relative;
  z-index: 1;
}

.hero {
  display: block;
  min-height: 176px;
  padding: 4px 0 18px;
}

.brand-mark {
  margin-bottom: 22px;
  font-size: 24px;
  color: var(--red);
}

.brand-symbol {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(145deg, #1d83d0 0%, #003a7f 56%, #ed1b2f 57% 100%);
  box-shadow: 0 10px 18px rgba(0, 45, 114, 0.25);
}

h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(38px, 4.2vw, 54px);
}

.lead {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.45;
}

.latest-pill {
  position: absolute;
  top: 100px;
  right: 0;
  min-width: 280px;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 14px 20px;
  border-color: rgba(255, 204, 0, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 251, 230, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 32px rgba(0, 45, 114, 0.1);
}

.latest-pill span {
  color: var(--brand);
  font-size: 12px;
}

.latest-pill strong {
  color: var(--brand-deep);
  font-size: 16px;
}

.tabs {
  position: absolute;
  top: 42px;
  right: clamp(28px, 5vw, 58px);
  width: min(430px, calc(100% - 56px));
  margin: 0;
  justify-content: flex-end;
  gap: 0;
  padding: 3px;
  border: 1px solid rgba(0, 74, 152, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(0, 45, 114, 0.08);
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 9px 18px;
  border: 0;
  background: transparent;
  color: var(--brand-deep);
  box-shadow: none;
  font-size: 14px;
}

.tab.active {
  background: linear-gradient(180deg, #085cac, var(--brand-deep));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 45, 114, 0.2);
}

.scanner-card {
  width: min(900px, 100%);
  min-height: 238px;
  margin: 24px auto 0;
  padding: 74px 28px 34px;
  border: 1px dashed rgba(0, 74, 152, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 204, 0, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.9));
  box-shadow: none;
}

.scanner-card::before {
  inset: 0;
  border: 0;
  background:
    linear-gradient(90deg, rgba(0, 74, 152, 0.04), transparent 28%, rgba(237, 27, 47, 0.03));
}

.scanner-core {
  gap: 16px;
}

.scanner-core h2 {
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.08;
}

.scanner-ring {
  position: absolute;
  top: -92px;
  left: 50%;
  width: 82px;
  height: 82px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at center, #0050a4 0 9px, transparent 10px),
    radial-gradient(circle at center, #ffffff 0 21px, transparent 22px),
    conic-gradient(from -35deg, var(--gold) 0 31%, var(--red) 31% 57%, #0a9b75 57% 72%, var(--brand-deep) 72% 100%);
  box-shadow:
    0 0 0 10px rgba(0, 74, 152, 0.08),
    0 18px 28px rgba(0, 45, 114, 0.18);
}

.scanner-ring::before {
  inset: 10px;
  border-color: rgba(0, 74, 152, 0.22);
  border-top-color: var(--gold);
}

.scanner-ring::after {
  inset: 22px;
  border-color: rgba(237, 27, 47, 0.22);
  border-bottom-color: var(--red);
}

.scanner-ring span {
  inset: 32px;
  background: var(--brand);
}

.scan-actions {
  margin-top: 2px;
  gap: 14px;
}

.scan-button,
button {
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
}

.scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  border-color: rgba(0, 74, 152, 0.18);
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: 0 10px 20px rgba(0, 45, 114, 0.08);
}

.scan-button.primary,
button:not(.secondary):not(.tab):not(.icon-btn) {
  border: 1px solid #f3bd00;
  background: linear-gradient(180deg, #ffe45a 0%, var(--gold) 100%);
  color: var(--brand-deep);
  box-shadow: 0 12px 22px rgba(255, 204, 0, 0.26);
}

.scan-button.primary::before,
.scan-button::before {
  display: inline-block;
  margin-right: 8px;
  font-weight: 900;
}

.scan-button.primary::before {
  content: "";
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px rgba(0, 45, 114, 0.08);
}

.scan-button:not(.primary)::before {
  content: "";
  width: 13px;
  height: 13px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

.retry-btn {
  margin-top: 6px;
}

.result-box.empty {
  min-height: 0;
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
}

.result-shell {
  width: min(960px, 100%);
  margin: 34px auto 0;
}

.steps-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 22px 34px;
  border: 1px solid rgba(0, 74, 152, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 255, 0.88));
  box-shadow: 0 16px 34px rgba(0, 45, 114, 0.08);
}

.step-item {
  display: grid;
  grid-template-columns: 34px 56px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
}

.step-number {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--brand);
  font-weight: 900;
}

.step-icon {
  position: relative;
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 12px 22px rgba(0, 45, 114, 0.14);
}

.step-item strong {
  color: var(--brand-deep);
  font-size: 15px;
}

.step-item small {
  color: var(--muted);
  font-weight: 600;
}

.upload-icon {
  background: linear-gradient(180deg, #075cad, var(--brand-deep));
}

.search-icon {
  background: linear-gradient(180deg, #ffe45a, var(--gold));
}

.result-icon {
  background: linear-gradient(180deg, #ff4a54, var(--red));
}

.upload-icon::before,
.search-icon::before,
.result-icon::before,
.result-icon::after {
  content: "";
  position: absolute;
}

.upload-icon::before {
  width: 17px;
  height: 20px;
  border: 3px solid #ffffff;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.upload-icon::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border-left: 3px solid #ffffff;
  border-top: 3px solid #ffffff;
  transform: translateY(-2px) rotate(45deg);
}

.search-icon::before {
  width: 19px;
  height: 19px;
  border: 4px solid var(--brand-deep);
  border-radius: 50%;
  transform: translate(-3px, -3px);
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 4px;
  border-radius: 99px;
  background: var(--brand-deep);
  transform: translate(12px, 12px) rotate(45deg);
}

.result-icon::before {
  width: 24px;
  height: 14px;
  border-left: 5px solid #ffffff;
  border-bottom: 5px solid #ffffff;
  transform: translateY(-2px) rotate(-45deg);
}

.ball {
  width: 58px;
  height: 58px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.98) 0 8px, transparent 9px),
    radial-gradient(circle at 58% 72%, rgba(116, 57, 0, 0.36), transparent 36%),
    linear-gradient(145deg, #fff170 0%, #ffca18 42%, #e58a05 100%);
  box-shadow:
    inset 0 -9px 12px rgba(100, 49, 0, 0.34),
    inset 0 5px 8px rgba(255, 255, 255, 0.62),
    0 9px 16px rgba(0, 45, 114, 0.24);
}

.ball.super {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9) 0 8px, transparent 9px),
    radial-gradient(circle at 62% 72%, rgba(72, 0, 0, 0.36), transparent 36%),
    linear-gradient(145deg, #ff5d63 0%, #ed1b2f 46%, #a90013 100%);
}

.main-ball:nth-child(even) {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.92) 0 8px, transparent 9px),
    radial-gradient(circle at 62% 72%, rgba(0, 28, 80, 0.32), transparent 36%),
    linear-gradient(145deg, #1f83d3 0%, #004a98 48%, #002d72 100%);
  color: #ffffff;
}

@media (max-width: 980px) {
  .tabs {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin: 10px 0 28px;
  }

  .latest-pill {
    position: static;
    margin-top: 18px;
  }

  .hero {
    min-height: 0;
    padding-bottom: 8px;
  }

  .shell::before,
  .shell::after {
    opacity: 0.45;
  }

  .steps-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    padding: 8px;
  }

  .shell {
    width: 100%;
    min-height: calc(100vh - 16px);
    padding: 24px 16px;
    border-radius: 12px;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    min-width: 112px;
  }

  .latest-pill {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .scanner-card {
    padding: 70px 18px 28px;
  }

  .scan-button {
    width: 100%;
  }

  .steps-panel {
    padding: 18px;
  }

  .step-item {
    grid-template-columns: 30px 50px 1fr;
  }
}

/* UI7: full-bleed composition over the provided Baloto background. */
html {
  min-height: 100%;
  background: #f6f8fc;
}

body {
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  background: #f6f8fc;
}

.shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(34px, 4vw, 54px) clamp(40px, 5vw, 76px) 56px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.72) 42%, rgba(255, 255, 255, 0.76) 100%),
    url("assets/baloto-stage-bg.png") center / cover no-repeat;
  box-shadow: none;
}

.shell::before,
.shell::after {
  display: none;
}

.hero {
  min-height: 238px;
  padding: 0;
}

.brand-mark {
  margin-bottom: 28px;
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 8px 24px rgba(255, 255, 255, 0.5);
}

.brand-symbol {
  width: 56px;
  height: 56px;
  font-size: 31px;
}

h1 {
  max-width: 650px;
  margin-bottom: 18px;
  color: #08216c;
  font-size: clamp(44px, 4.3vw, 64px);
  line-height: 0.98;
}

.lead {
  max-width: 560px;
  color: #092a78;
  font-size: clamp(18px, 1.35vw, 23px);
}

.tabs {
  top: clamp(40px, 4.2vw, 58px);
  right: clamp(40px, 5vw, 76px);
  width: min(474px, calc(100% - 80px));
  min-height: 58px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 36px rgba(0, 33, 105, 0.16);
  backdrop-filter: blur(16px);
}

.tab {
  min-height: 58px;
  font-size: 17px;
}

.tab.active {
  background: linear-gradient(180deg, #0b58d7 0%, #003da6 100%);
  box-shadow: 0 16px 28px rgba(0, 61, 166, 0.26);
}

.latest-pill {
  top: 146px;
  right: clamp(40px, 5vw, 76px);
  width: 405px;
  min-width: 0;
  min-height: 82px;
  justify-content: flex-start;
  padding: 18px 24px;
  border: 1px solid rgba(255, 204, 0, 0.5);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 249, 218, 0.94), rgba(255, 255, 255, 0.84));
  box-shadow: 0 20px 42px rgba(0, 33, 105, 0.12);
  backdrop-filter: blur(14px);
}

.latest-pill::before {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  background: var(--red);
  -webkit-mask:
    linear-gradient(#000 0 0) 7px 11px / 24px 20px no-repeat,
    linear-gradient(#000 0 0) 10px 6px / 4px 10px no-repeat,
    linear-gradient(#000 0 0) 24px 6px / 4px 10px no-repeat,
    linear-gradient(#000 0 0) 7px 15px / 24px 3px no-repeat;
  mask:
    linear-gradient(#000 0 0) 7px 11px / 24px 20px no-repeat,
    linear-gradient(#000 0 0) 10px 6px / 4px 10px no-repeat,
    linear-gradient(#000 0 0) 24px 6px / 4px 10px no-repeat,
    linear-gradient(#000 0 0) 7px 15px / 24px 3px no-repeat;
}

.latest-pill span {
  color: #003da6;
  font-size: 15px;
}

.latest-pill strong {
  margin-left: 2px;
  color: var(--red);
  font-size: 20px;
  white-space: nowrap;
}

#scanView.active {
  display: grid;
  justify-items: center;
}

.scanner-card {
  width: min(1065px, calc(100vw - 240px));
  min-height: 324px;
  margin: 0 auto;
  padding: 102px 42px 48px;
  overflow: visible;
  border: 2px dashed rgba(39, 104, 255, 0.6);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
  backdrop-filter: blur(7px);
}

.scanner-card::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.86), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
}

.scanner-core {
  position: static;
  max-width: 760px;
  gap: 24px;
}

.scanner-core > div:not(.scanner-ring) {
  position: relative;
  z-index: 1;
}

.scanner-core h2 {
  color: #08216c;
  font-size: clamp(38px, 3.4vw, 58px);
}

.scanner-core p {
  color: #092a78;
  font-size: clamp(17px, 1.45vw, 23px);
}

.scanner-ring {
  top: -78px;
  width: 132px;
  height: 132px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, #0b46c8 0 38px, transparent 39px),
    conic-gradient(from -35deg, #ffcc00 0 27%, #ff8f00 27% 34%, #ed1b2f 34% 58%, #003da6 58% 100%);
  box-shadow:
    0 0 0 14px rgba(255, 255, 255, 0.55),
    0 20px 38px rgba(0, 33, 105, 0.28);
}

.scanner-ring::before,
.scanner-ring::after,
.scanner-ring span {
  display: none;
}

.scanner-ring svg {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.12));
}

.scan-actions {
  gap: 24px;
  margin-top: 8px;
}

.scan-button {
  min-width: 250px;
  min-height: 70px;
  padding: 16px 30px;
  border: 2px solid rgba(0, 61, 166, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--red);
  font-size: 22px;
  box-shadow: 0 18px 34px rgba(0, 33, 105, 0.12);
}

.scan-button.primary,
button:not(.secondary):not(.tab):not(.icon-btn) {
  border-color: #084ed3;
  background: linear-gradient(180deg, #0f65ed 0%, #003da6 100%);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 61, 166, 0.24);
}

.scan-button::before,
.scan-button.primary::before {
  display: none;
}

.button-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  margin-right: 14px;
}

.button-icon svg {
  width: 100%;
  height: 100%;
}

.result-shell {
  width: min(1312px, calc(100vw - 224px));
  margin: 42px auto 0;
}

.steps-panel,
.trust-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border: 1px solid rgba(0, 61, 166, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 46px rgba(0, 33, 105, 0.12);
  backdrop-filter: blur(16px);
}

.steps-panel {
  min-height: 132px;
  gap: 0;
  padding: 24px 36px;
}

.trust-panel {
  width: min(1312px, calc(100vw - 224px));
  min-height: 110px;
  gap: 0;
  margin: 32px auto 0;
  padding: 20px 36px;
}

.step-item,
.trust-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 82px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 20px;
  min-width: 0;
  text-align: left;
}

.step-item:not(:last-child)::after,
.trust-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(0, 45, 114, 0.18);
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(180deg, #f2f7ff, #e4efff);
  color: #003da6;
  font-size: 21px;
}

.step-item:nth-child(2) .step-number {
  background: linear-gradient(180deg, #ffe45a, #ffbf00);
  color: #ffffff;
}

.step-item:nth-child(3) .step-number {
  background: linear-gradient(180deg, #ff545e, #ed1b2f);
  color: #ffffff;
}

.step-icon,
.trust-icon {
  width: 82px;
  height: 82px;
  color: #ffffff;
}

.step-icon svg,
.trust-icon svg {
  width: 42px;
  height: 42px;
}

.upload-icon {
  background: linear-gradient(180deg, #0f65ed 0%, #003da6 100%);
}

.search-icon {
  background: linear-gradient(180deg, #ffe45a 0%, #ffbf00 100%);
  color: #ffffff;
}

.result-icon {
  background:
    radial-gradient(circle at center, #ffcc00 0 23px, transparent 24px),
    linear-gradient(180deg, #ff545e 0%, #ed1b2f 100%);
}

.step-icon::before,
.step-icon::after {
  display: none;
}

.step-item strong,
.trust-item strong {
  color: #08216c;
  font-size: 22px;
}

.step-item small,
.trust-item small {
  color: #64739d;
  font-size: 18px;
}

.trust-item {
  grid-template-columns: 72px 1fr;
}

.trust-icon {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
}

.fast-icon {
  background: linear-gradient(180deg, #0f65ed, #003da6);
}

.shield-icon {
  background: linear-gradient(180deg, #ffe45a, #ffbf00);
  color: #ffffff;
}

.lock-icon {
  background: linear-gradient(180deg, #ff545e, #ed1b2f);
}

.trust-icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 1120px) {
  .scanner-card,
  .result-shell,
  .trust-panel {
    width: min(100%, calc(100vw - 64px));
  }

  .steps-panel,
  .trust-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .step-item:not(:last-child)::after,
  .trust-item:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 24px 18px 40px;
  }

  .tabs {
    right: 18px;
    width: calc(100% - 36px);
  }

  .hero {
    padding-top: 84px;
  }

  .latest-pill {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 20px;
  }

  .scanner-card,
  .result-shell,
  .trust-panel {
    width: 100%;
  }

  .scanner-card {
    margin-top: 32px;
    padding: 86px 18px 30px;
  }

  .scanner-ring {
    width: 104px;
    height: 104px;
    top: -62px;
  }

  .scanner-ring svg {
    width: 46px;
    height: 46px;
  }

  .scan-button {
    width: 100%;
    min-width: 0;
  }

  .step-item {
    grid-template-columns: 40px 66px 1fr;
    column-gap: 14px;
  }

  .step-icon {
    width: 66px;
    height: 66px;
  }
}

/* UI8 refinements: compact header, pure Baloto palette, round utility icons. */
.shell {
  padding-top: clamp(32px, 3.5vw, 48px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.78) 44%, rgba(255, 255, 255, 0.82) 100%),
    url("assets/baloto-stage-bg.png") center / cover no-repeat;
}

.hero {
  min-height: 214px;
}

h1 {
  max-width: 580px;
  margin-bottom: 14px;
  font-size: clamp(38px, 3.5vw, 54px);
}

.lead {
  max-width: 520px;
  font-size: clamp(16px, 1.18vw, 20px);
}

.latest-pill {
  top: 126px;
  right: clamp(24px, 3vw, 40px);
  width: 405px;
  min-height: 74px;
  padding: 14px 22px;
  border-radius: 16px;
}

.latest-pill::before {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
}

.latest-pill span {
  font-size: 14px;
}

.latest-pill strong {
  font-size: 19px;
}

.scanner-card {
  min-height: 224px;
  padding-top: 68px;
  padding-bottom: 24px;
}

.scanner-ring {
  width: 118px;
  height: 118px;
  top: -64px;
  background:
    radial-gradient(circle at center, #0b46c8 0 38px, transparent 39px),
    conic-gradient(from -35deg, #ffcc00 0 32%, #ed1b2f 32% 58%, #003da6 58% 100%);
}

.scanner-ring svg {
  width: 58px;
  height: 58px;
}

.scanner-core h2 {
  font-size: clamp(34px, 2.8vw, 48px);
}

.scanner-core p {
  font-size: clamp(16px, 1.22vw, 21px);
}

.result-shell {
  margin-top: 18px;
}

.steps-panel {
  min-height: 88px;
  padding: 12px 32px;
}

.trust-panel {
  min-height: 72px;
  margin-top: 8px;
  padding: 10px 36px;
  overflow: visible;
}

.trust-item {
  grid-template-columns: 72px 1fr;
  overflow: visible;
}

.trust-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.24),
    0 14px 26px rgba(0, 45, 114, 0.14);
}

.fast-icon {
  background: linear-gradient(180deg, #0f65ed 0%, #003da6 100%);
}

.shield-icon {
  background: linear-gradient(180deg, #ffe45a 0%, #ffbf00 100%);
  color: #ffffff;
}

.lock-icon {
  background: linear-gradient(180deg, #ff545e 0%, #ed1b2f 100%);
}

.trust-icon svg {
  width: 30px;
  height: 30px;
}

.step-icon {
  width: 70px;
  height: 70px;
}

.step-icon svg {
  width: 36px;
  height: 36px;
}

.step-item {
  grid-template-columns: 44px 70px 1fr;
}

.step-item strong {
  font-size: 20px;
}

.step-item small {
  font-size: 16px;
}

.trust-item strong {
  font-size: 19px;
}

.trust-item small {
  font-size: 15px;
  line-height: 1.2;
}

@media (max-width: 1120px) {
  .latest-pill {
    right: 32px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  h1 {
    font-size: 36px;
  }

  .latest-pill {
    top: auto;
    right: auto;
    min-height: 68px;
  }
}

/* UI9: lower and space the central modules like the reference composition. */
.hero {
  min-height: 252px;
}

.scanner-card {
  min-height: 276px;
  padding-top: 92px;
  padding-bottom: 36px;
}

.scanner-ring {
  top: -68px;
}

.scan-actions {
  margin-top: 22px;
}

.result-shell {
  margin-top: 34px;
}

.trust-panel {
  margin-top: 32px;
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .scanner-card {
    min-height: 260px;
    padding-top: 86px;
  }

  .result-shell,
  .trust-panel {
    margin-top: 24px;
  }
}

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

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 19, 58, 0.72);
  backdrop-filter: blur(12px);
}

.camera-dialog {
  width: min(920px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 204, 0, 0.5);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: 0 30px 90px rgba(0, 22, 70, 0.38);
}

.camera-head,
.camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}

.camera-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.camera-head strong {
  display: block;
  color: #061d5f;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.camera-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #003da6;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.camera-frame {
  position: relative;
  margin: 0 24px;
  overflow: hidden;
  border: 2px solid rgba(0, 74, 152, 0.22);
  border-radius: 22px;
  background: #03143f;
  aspect-ratio: 16 / 9;
}

.camera-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-guide {
  position: absolute;
  inset: 9%;
  border: 2px dashed rgba(255, 204, 0, 0.95);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.camera-actions {
  justify-content: center;
  flex-wrap: wrap;
}

button.scan-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 640px) {
  .camera-modal {
    padding: 12px;
  }

  .camera-head,
  .camera-actions {
    padding: 16px;
  }

  .camera-frame {
    margin: 0 16px;
    aspect-ratio: 3 / 4;
  }
}

/* Mobile scanner-first layout */
@media (max-width: 760px) {
  body {
    padding: 0;
    background-position: center top;
  }

  .shell {
    width: 100%;
    min-height: 100vh;
    padding: 14px 12px 28px;
    overflow: hidden;
    border-radius: 0;
  }

  .hero {
    min-height: 0;
    padding: 0;
  }

  .brand-mark {
    gap: 8px;
    font-size: 19px;
  }

  .brand-symbol {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .hero h1 {
    max-width: 240px;
    margin-top: 16px;
    font-size: clamp(34px, 12vw, 46px);
    line-height: 0.96;
  }

  .lead {
    display: none;
  }

  .tabs {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 48px;
    margin: 16px 0 10px;
    padding: 4px;
    gap: 4px;
    overflow: visible;
    border-radius: 999px;
  }

  .tab {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 6px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .latest-pill {
    position: absolute;
    top: 14px;
    right: 12px;
    width: auto;
    min-width: 0;
    min-height: 34px;
    max-width: 148px;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
  }

  .latest-pill::before {
    display: none;
  }

  .latest-pill span {
    display: none;
  }

  .latest-pill strong {
    margin: 0;
    color: var(--red);
    font-size: 11px;
    line-height: 1.12;
    text-align: right;
  }

  .view.active {
    margin-top: 0;
  }

  .scanner-card {
    width: 100%;
    min-height: 220px;
    margin: 10px auto 0;
    padding: 66px 14px 22px;
    border-radius: 22px;
  }

  .scanner-ring {
    top: -52px;
    width: 104px;
    height: 104px;
  }

  .scanner-ring svg {
    width: 46px;
    height: 46px;
  }

  .scanner-core {
    gap: 12px;
  }

  .scanner-core h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .scanner-core p {
    max-width: 280px;
    margin-inline: auto;
    font-size: 14px;
    line-height: 1.28;
  }

  .scan-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: min(270px, 100%);
    margin: 14px auto 0;
  }

  .scan-button {
    min-height: 48px;
    padding: 10px 16px;
    justify-content: center;
    border-radius: 999px;
    font-size: 15px;
  }

  .result-shell {
    width: 100%;
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .steps-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .step-item {
    min-height: 62px;
    justify-content: flex-start;
    text-align: left;
  }

  .trust-panel {
    display: none;
  }

  .camera-dialog {
    border-radius: 20px;
  }

  .camera-head {
    align-items: flex-start;
    padding: 14px;
  }

  .camera-head strong {
    font-size: 22px;
  }

  .camera-head span {
    font-size: 11px;
  }

  .camera-frame {
    margin: 0 12px;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
  }

  .camera-guide {
    inset: 7% 6%;
    border-radius: 14px;
  }

  .camera-actions {
    padding: 14px;
  }
}

@media (max-width: 760px) {
  .hero {
    height: 46px;
  }

  .hero h1 {
    display: none;
  }

  .latest-pill {
    display: none;
  }

  .latest-pill strong {
    font-size: 10px;
  }

  .tabs {
    height: 44px;
    margin: 10px 0 8px;
  }

  .tab {
    min-height: 36px;
    font-size: 12px;
  }

  .scanner-card {
    margin-top: 4px;
    min-height: 214px;
    padding-top: 58px;
  }

  .scanner-ring {
    top: -46px;
    width: 92px;
    height: 92px;
  }

  .scanner-core h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .scanner-core p {
    font-size: 13px;
  }

  .scan-actions {
    margin-top: 10px;
  }
}

/* UI22: clean mobile/tablet scanner spacing and compact instruction panel. */
@media (max-width: 900px) {
  .view.active {
    margin-top: 0;
  }

  .tabs {
    position: relative;
    z-index: 5;
  }

  .scanner-card {
    overflow: visible;
    margin-top: clamp(38px, 8vw, 72px);
  }

  .scanner-ring {
    top: clamp(-38px, -7vw, -24px);
    z-index: 1;
  }

  .result-shell {
    margin-top: clamp(18px, 5vw, 34px);
  }

  .steps-panel {
    width: min(100%, 560px);
    min-height: 0;
    margin-inline: auto;
    padding: clamp(14px, 4vw, 22px);
    gap: 12px;
    border-radius: 20px;
  }

  .step-number {
    display: none;
  }

  .step-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 52px;
    column-gap: 12px;
    align-items: center;
    justify-content: stretch;
    text-align: left;
  }

  .step-icon {
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
  }

  .step-icon svg {
    width: 22px;
    height: 22px;
  }

  .step-item strong {
    font-size: clamp(15px, 3.8vw, 18px);
    line-height: 1.12;
  }

  .step-item small {
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.2;
  }
}

@media (max-width: 760px) {
  .tabs {
    height: 46px;
    margin: 10px 0 0;
  }

  .scanner-card {
    margin-top: 48px;
    min-height: 300px;
    padding-top: 70px;
    overflow: visible;
  }

  .scanner-ring {
    top: -46px;
    width: 94px;
    height: 94px;
  }

  .scan-actions {
    width: min(280px, 100%);
  }

  .result-shell {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .steps-panel {
    width: min(100%, 420px);
    padding: 16px;
    background: rgba(255, 255, 255, 0.92);
  }
}

@media (max-width: 480px) {
  .scanner-card {
    margin-top: 50px;
  }

  .steps-panel {
    width: min(100%, 330px);
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .shell {
    padding: 22px 28px 40px;
  }

  .hero {
    min-height: 76px;
    padding: 0;
  }

  .hero h1,
  .lead,
  .latest-pill {
    display: none;
  }

  .tabs {
    position: relative;
    top: auto;
    right: auto;
    width: min(560px, 100%);
    margin: 18px auto 0;
  }

  .scanner-card {
    width: min(100%, 720px);
    margin-top: 58px;
  }

  .result-shell {
    width: min(100%, 720px);
  }
}
