:root {
  --bg: #f4f7fb;
  --fg: #1e293b;
  --muted: #64748b;
  --primary: #0f62fe;
  --card: #ffffff;
  --border: #dbe4ef;
  --danger: #b42318;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
body.public-home-page {
  background:
    radial-gradient(circle at 16% 12%, rgba(132,197,27,.18) 0 2px, transparent 5px),
    radial-gradient(circle at 86% 22%, rgba(244,196,0,.14) 0 2px, transparent 5px),
    linear-gradient(135deg, #02070d 0%, #061a12 45%, #071b46 100%);
  min-height:100vh;
}
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.topbar { background: #0b1220; color: white; }
.bar-content { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.brand, .topbar a { color: white; text-decoration:none; margin-right: 1rem; }
.brand-logo {
  display:inline-flex;
  align-items:center;
  margin-right:1rem;
}
.logo-mark {
  display:block;
  width:190px;
  max-width:52vw;
  height:auto;
  color:#22c55e;
}
.logo-wordmark {
  display:inline-flex;
  align-items:baseline;
  gap:.34em;
  color:inherit;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:900;
  line-height:.92;
  letter-spacing:0;
  text-transform:uppercase;
  white-space:nowrap;
}
.logo-wordmark-main {
  font-size:1.15em;
}
.logo-wordmark-accent {
  color:#22c55e;
  font-size:1em;
}
.logo-ball {
  display:inline-grid;
  place-items:center;
  width:.92em;
  height:.92em;
  margin:0 .02em;
  border:.08em solid currentColor;
  border-radius:50%;
  background:#facc15;
  color:#0b1220;
  font-size:.82em;
  font-weight:900;
  line-height:1;
  transform:translateY(-.03em);
}
.topbar .logo-wordmark {
  font-size:1.24rem;
}
.topbar .logo-mark {
  width:185px;
}
.inline { display:inline; }
.link-button {
  background:none; border:none; color:white; cursor:pointer; padding:0; font:inherit;
}
.hero { padding: 1rem 0; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 1rem;
  margin: 1rem 0;
}
.card.narrow { max-width: 420px; }
.card.small { max-width: 620px; }
.grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
}
.stats {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:1rem;
}
.stat .label { color: var(--muted); font-size:.9rem; }
.stat .value { font-size:1.4rem; font-weight:700; margin-top:.35rem; }
.stat { border-left:6px solid #dbe4ef; }
.stat-neutral { border-left-color:#64748b; }
.stat-good { border-left-color:#16a34a; background:#f0fdf4; }
.stat-danger { border-left-color:#dc2626; background:#fef2f2; }
.stat-warning { border-left-color:#f59e0b; background:#fffbeb; }
.stat-money { border-left-color:#0f62fe; background:#eff6ff; }
label { display:block; font-weight:600; margin:.3rem 0; }
input, select, button, .button {
  width:100%;
  padding:.75rem .9rem;
  border-radius:10px;
  border:1px solid var(--border);
  font:inherit;
}
button, .button {
  background: var(--primary);
  color:white;
  border:none;
  text-align:center;
  text-decoration:none;
  display:inline-block;
  width:auto;
  min-width:150px;
  cursor:pointer;
}
.button.secondary { background:#334155; }
.danger { background: var(--danger); }
.validation { color: var(--danger); margin:.5rem 0; }
.notice {
  background:#ecfdf3; border:1px solid #abefc6; color:#067647;
  padding:.75rem 1rem; border-radius:10px; margin-top:1rem;
}
table { width:100%; border-collapse: collapse; }
th, td { padding:.65rem; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.report-table {
  table-layout: fixed;
}
.report-table th,
.report-table td {
  overflow-wrap: normal;
  word-break: normal;
}
.selected-draws-table th:nth-child(1) { width: 11%; }
.selected-draws-table th:nth-child(2) { width: 10%; }
.selected-draws-table th:nth-child(3) { width: 36%; }
.selected-draws-table th:nth-child(n+4) { width: 7%; }
.selected-draws-table.compact-selected-draws { min-width:900px; }
.selected-draws-table.compact-selected-draws th,
.selected-draws-table.compact-selected-draws td { padding:.55rem .45rem; }
.selected-draws-table.compact-selected-draws th:nth-child(1) { width: 10%; }
.selected-draws-table.compact-selected-draws th:nth-child(2) { width: 30%; }
.selected-draws-table.compact-selected-draws th:nth-child(3),
.selected-draws-table.compact-selected-draws th:nth-child(4),
.selected-draws-table.compact-selected-draws th:nth-child(5) { width: 6%; }
.selected-draws-table.compact-selected-draws th:nth-child(6),
.selected-draws-table.compact-selected-draws th:nth-child(7),
.selected-draws-table.compact-selected-draws th:nth-child(8),
.selected-draws-table.compact-selected-draws th:nth-child(9),
.selected-draws-table.compact-selected-draws th:nth-child(10) { width: 8.4%; }
.draw-number-cell {
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  overflow-wrap: anywhere !important;
}
.money-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.table-scroll { overflow-x:auto; }
.probability-matrix { min-width:980px; }
.probability-matrix th { white-space:nowrap; }
.probability-matrix input { min-width:82px; padding:.55rem .6rem; }
.kv { display:grid; grid-template-columns: 180px 1fr; gap:.5rem 1rem; }
.actions { display:flex; gap:.75rem; flex-wrap:wrap; margin-top:1rem; }
.ticket-create-actions { align-items:center; }
.ticket-create-actions button { font-weight:800; }
.ticket-create-actions-top { margin:.75rem 0 1rem; }
.ticket-created-card h1 { margin-bottom:.75rem; }
.ticket-created-actions { margin:.25rem 0 1rem; }
.ticket-created-actions form { display:inline-flex; }
.ticket-created-actions button,
.ticket-created-actions .button { min-width:150px; }
.checks { display:flex; gap:1rem; flex-wrap:wrap; margin: 1rem 0; }
.inline-form { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.inline-form input { width:auto; flex:1; min-width:220px; }
.input-action-row {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:.6rem;
  align-items:center;
}
.input-action-row button { min-width:140px; }
.customer-details-panel {
  border:1px solid var(--border);
  border-radius:12px;
  padding:1rem;
  margin:1rem 0;
  background:#f8fafc;
}
.muted { color:var(--muted); }
.status {
  display:inline-flex;
  align-items:center;
  font-weight:800;
  border-radius:999px;
  padding:.18rem .55rem;
  line-height:1.2;
}
.status-won { color:#067647; background:#ecfdf3; border:1px solid #abefc6; }
.status-lost { color:#b42318; background:#fef3f2; border:1px solid #fecdca; }
.status-open { color:#854d0e; background:#fffbeb; border:1px solid #fde68a; }
.status-cancelled { color:#475467; background:#f2f4f7; border:1px solid #d0d5dd; }
.amount-positive { color:#067647; font-weight:800; }
.amount-negative { color:#b42318; font-weight:800; }
.text-success { color:#067647 !important; font-weight:800; }
.text-danger { color:#b42318 !important; font-weight:800; }
.total-row td { border-top:2px solid var(--text); font-weight:800; background:#f8fafc; }
.report-filter-form {
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.filter-header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.draw-choice-list {
  display:flex;
  flex-direction:column;
  max-height:360px;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}
.draw-choice {
  display:grid;
  grid-template-columns:2rem minmax(220px, 1fr) minmax(160px, 42%);
  gap:.65rem;
  align-items:center;
  min-height:48px;
  padding:.55rem .75rem;
  border:0;
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:#fff;
  cursor:pointer;
}
.draw-choice:last-child { border-bottom:0; }
.draw-choice:hover { background:#f8fafc; }
.draw-choice.selected {
  background:#fff8dd;
  box-shadow:inset 4px 0 0 #f5a400;
}
.draw-choice input {
  width:1.1rem;
  height:1.1rem;
  padding:0;
}
.draw-choice-main {
  font-weight:700;
  min-width:0;
}
.draw-choice-number {
  font-size:.95rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
  text-align:right;
}
.report-search-row {
  display:grid;
  grid-template-columns:repeat(3, minmax(180px, 1fr)) auto;
  gap:1rem;
  align-items:end;
}
.selected-draws-table {
  min-width:1040px;
}
.selected-draws-table th {
  white-space:normal;
  line-height:1.15;
  text-align:center;
  vertical-align:bottom;
  overflow-wrap:normal;
}
.selected-draws-table td {
  white-space:nowrap;
  vertical-align:top;
}
.selected-draws-table .draw-number-cell {
  min-width:260px;
  max-width:360px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.selected-draws-table .money-cell {
  min-width:104px;
  text-align:right;
}
.selected-draws-table.compact-selected-draws .money-cell {
  min-width:88px;
  font-size:.95rem;
}
.public-home {
  background:
    radial-gradient(circle at 12% 16%, rgba(132,197,27,.18) 0 2px, transparent 5px),
    radial-gradient(circle at 82% 25%, rgba(244,196,0,.16) 0 2px, transparent 5px),
    linear-gradient(135deg, #02070d 0%, #061a12 45%, #071b46 100%);
  color:#fff;
  border-radius:14px;
  border:1px solid rgba(132,197,27,.45);
  padding:1.5rem;
  margin:1rem 0;
  box-shadow:0 14px 34px rgba(0,0,0,.25), inset 0 0 22px rgba(132,197,27,.16);
}
.public-home h1 { margin:.1rem 0 .35rem; font-size:3.6rem; line-height:1; }
.public-home .home-logo .logo-wordmark {
  color:#fff;
  font-size:1em;
}
.public-home .home-logo .logo-wordmark-accent {
  color:#22c55e;
}
.public-home .home-logo .logo-mark {
  width:min(720px, 100%);
  color:#22c55e;
}
.public-home p { margin:.35rem 0; font-size:1.15rem; font-weight:650; }
.public-home .button {
  background:linear-gradient(180deg, #20d962 0%, #07a83d 100%);
  color:#06120a;
  border:1px solid rgba(185,255,0,.5);
  box-shadow:0 0 16px rgba(32,217,98,.24);
  font-weight:900;
}
.public-draw-section {
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}
.public-draw-section .muted { color:#d1d5db; }
.draw-result-list { display:grid; grid-template-columns:1fr; gap:.9rem; }
.draw-result-card {
  position:relative;
  overflow:hidden;
  border:1px solid rgba(132,197,27,.75);
  border-left:6px solid #f4c400;
  border-radius:16px;
  padding:1rem;
  background:
    radial-gradient(circle at 12% 16%, rgba(132,197,27,.24) 0 2px, transparent 4px),
    radial-gradient(circle at 88% 20%, rgba(244,196,0,.20) 0 2px, transparent 5px),
    radial-gradient(circle at 70% 78%, rgba(132,197,27,.16) 0 2px, transparent 5px),
    linear-gradient(135deg, #02070d 0%, #061a12 45%, #071b46 100%);
  box-shadow:0 12px 30px rgba(7,27,70,.16), inset 0 0 22px rgba(132,197,27,.18);
}
.draw-result-card::before {
  content:"";
  position:absolute;
  inset:10px;
  border:1px solid rgba(132,197,27,.28);
  border-radius:12px;
  pointer-events:none;
}
.draw-result-header {
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  gap:.8rem;
  max-width:100%;
  margin-bottom:.85rem;
  padding:.45rem .7rem;
  border:1px solid rgba(132,197,27,.85);
  border-radius:10px;
  color:#fff;
  background:rgba(0,0,0,.42);
  box-shadow:0 0 16px rgba(132,197,27,.28);
}
.draw-result-header span {
  color:#b7f03b;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.draw-result-header strong {
  color:#fff;
  font-size:1.05rem;
  font-weight:900;
}
.draw-number-grid {
  position:relative;
  display:grid;
  grid-template-columns:repeat(2, minmax(10.5rem, 1fr));
  gap:.65rem 1.3rem;
  max-width:50rem;
}
.draw-number-item {
  display:grid;
  grid-template-columns:minmax(8rem, 1fr) minmax(8rem, 1fr);
  align-items:center;
  column-gap:.45rem;
  min-width:0;
}
.draw-number-label {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:2.15rem;
  border-radius:9px;
  color:#08120a;
  background:linear-gradient(180deg, #b7f03b 0%, #70bf11 100%);
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.18), 0 0 10px rgba(132,197,27,.25);
  font-size:1rem;
  font-weight:900;
  white-space:nowrap;
  text-transform:uppercase;
}
.draw-number-value {
  display:block;
  min-height:2.15rem;
  padding:.25rem .65rem;
  border-radius:9px;
  color:#071b46;
  background:#fff;
  border:1px solid rgba(132,197,27,.45);
  box-shadow:0 0 10px rgba(132,197,27,.16);
  font-size:1.1rem;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  letter-spacing:.06em;
  white-space:nowrap;
  text-align:center;
}
.home-info-panel {
  margin:1rem 0 1.5rem;
  padding:1rem;
  color:#fff;
  border:1px solid rgba(132,197,27,.72);
  border-radius:16px;
  background:
    radial-gradient(circle at 8% 14%, rgba(132,197,27,.22) 0 2px, transparent 5px),
    radial-gradient(circle at 95% 18%, rgba(244,196,0,.15) 0 2px, transparent 5px),
    linear-gradient(135deg, #02070d 0%, #061a12 45%, #071b46 100%);
  box-shadow:0 14px 34px rgba(0,0,0,.28), inset 0 0 22px rgba(132,197,27,.18);
}
.home-info-rules {
  display:grid;
  grid-template-columns:4.5rem 1fr 4.5rem;
  align-items:center;
  gap:.85rem;
  padding:.75rem;
  border:1px solid rgba(132,197,27,.65);
  border-radius:14px;
  background:rgba(0,0,0,.34);
}
.home-info-icon {
  display:grid;
  place-items:center;
  min-height:3.9rem;
  color:#a8f000;
  border:2px solid rgba(132,197,27,.65);
  border-radius:12px;
  font-size:2rem;
  font-weight:900;
  box-shadow:0 0 14px rgba(132,197,27,.2);
}
.home-info-text p {
  margin:.25rem 0;
  font-size:1.05rem;
  font-weight:800;
  text-transform:uppercase;
}
.home-info-text strong,
.home-info-cta strong:nth-of-type(2),
.home-info-features p::first-line {
  color:#a8f000;
}
.home-info-cta {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:.5rem;
  margin:.9rem 0;
  font-size:clamp(1.55rem, 4vw, 2.55rem);
  font-weight:950;
  text-transform:uppercase;
  font-style:italic;
  letter-spacing:.02em;
}
.home-info-cta span {
  color:#a8f000;
}
.four-leaf-clover {
  display:inline-block;
  width:2.7rem;
  height:2.7rem;
  flex:0 0 auto;
  filter:drop-shadow(0 0 4px rgba(141,240,0,.55));
  overflow:visible;
}
.home-info-features {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.75rem;
  border-top:1px solid rgba(132,197,27,.32);
  padding-top:.85rem;
}
.home-info-features > div {
  display:grid;
  grid-template-columns:2.5rem 1fr;
  gap:.6rem;
  align-items:center;
  min-width:0;
}
.feature-icon {
  display:grid;
  place-items:center;
  width:2.4rem;
  height:2.4rem;
  color:#a8f000;
  border:2px solid rgba(132,197,27,.75);
  border-radius:10px;
  font-weight:900;
}
.home-info-features p {
  margin:0;
  font-size:.92rem;
  font-weight:850;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}
.customer-lookup-result {
  margin-top:.45rem;
  padding:.55rem .7rem;
  border:1px solid #bbf7d0;
  border-left:4px solid #16a34a;
  border-radius:8px;
  background:#f0fdf4;
  color:#065f46;
  font-weight:800;
}
.customer-lookup-result span + span {
  margin-left:.35rem;
}
.verify-result {
  margin-top:1rem;
  border-radius:12px;
  padding:1rem;
  font-size:1.35rem;
  font-weight:900;
}
.verify-won { color:#067647; background:#ecfdf3; border:1px solid #abefc6; }
.verify-lost { color:#b42318; background:#fef3f2; border:1px solid #fecdca; }
@media (max-width:700px) {
  .kv { grid-template-columns: 1fr; }
  .bar-content { flex-direction:column; align-items:flex-start; }
  .container { padding:.6rem; }
  .card { border-radius:10px; margin:.65rem 0; padding:.75rem; }
  h1 { margin:.35rem 0 .65rem; font-size:1.85rem; line-height:1.08; }
  .public-home h1 { font-size:2.15rem; }
  .topbar .logo-wordmark { font-size:1.12rem; }
  .topbar .logo-mark { width:165px; }
  h2 { margin:.8rem 0 .55rem; font-size:1.35rem; line-height:1.15; }
  input, select, button, .button { padding:.85rem .9rem; border-radius:9px; }
  button, .button { width:100%; min-width:0; }
  .actions { gap:.55rem; margin-top:.75rem; }
  .actions > *,
  .actions form,
  .actions button,
  .actions .button { width:100%; }
  .report-search-row { grid-template-columns:1fr; }
  .input-action-row { grid-template-columns:1fr; }
  .stats { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.55rem; }
  .stat { padding:.65rem; border-radius:10px; }
  .stat .label { font-size:.78rem; }
  .stat .value { font-size:1.05rem; }
  .selected-draws-table { min-width:1180px; }
  .tickets-table { min-width:980px; }
  .main-nav {
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.45rem;
  }
  .main-nav > a,
  .main-nav > form,
  .main-nav > .nav-dropdown {
    width:100%;
    margin:0;
  }
  .main-nav a,
  .nav-group,
  .link-button {
    display:block;
    width:100%;
    min-height:44px;
    padding:.7rem .75rem;
    border-radius:9px;
    background:rgba(255,255,255,.08);
    text-align:center;
  }
  .nav-dropdown-content {
    position:static;
    min-width:0;
    margin-top:.35rem;
    border-radius:9px;
  }
  .nav-dropdown-content a {
    white-space:normal;
    text-align:left;
  }
  .draw-choice-list { max-height:420px; }
  .draw-choice {
    grid-template-columns:1.8rem 1fr;
    grid-template-areas:
      "check main"
      "check number";
    align-items:start;
  }
  .draw-choice input { grid-area:check; margin-top:.15rem; }
  .draw-choice-main { grid-area:main; }
  .draw-choice-number {
    grid-area:number;
    text-align:left;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .draw-number-grid {
    grid-template-columns:1fr;
    max-width:none;
    gap:.38rem;
  }
  .draw-number-item {
    grid-template-columns:minmax(7rem, 1fr) minmax(7rem, 1fr);
  }
  .home-info-panel { padding:.75rem; }
  .home-info-rules {
    grid-template-columns:1fr;
    gap:.55rem;
    text-align:center;
  }
  .home-info-icon {
    min-height:3rem;
    font-size:1.65rem;
  }
  .home-info-text p {
    font-size:.9rem;
  }
  .home-info-features {
    grid-template-columns:1fr;
  }
  .home-info-features > div {
    grid-template-columns:2.3rem 1fr;
  }
  .ticket-created-card .kv { gap:.25rem; font-size:.95rem; }
  .ticket-created-card .kv dt { color:var(--muted); font-size:.82rem; font-weight:700; }
  .ticket-created-card .kv dd { margin:0 0 .35rem; overflow-wrap:anywhere; }
  .ticket-created-card h2 { margin-top:.75rem; }
  .ticket-created-card table th,
  .ticket-created-card table td { padding:.45rem .35rem; }
}

.main-nav { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.nav-dropdown { position:relative; display:inline-block; }
.nav-group { color:white; cursor:pointer; padding:.25rem .4rem; }
.nav-dropdown-content {
  display:none;
  position:absolute;
  top:100%;
  left:0;
  background:#0b1220;
  min-width:220px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;
  padding:.5rem;
  z-index:1000;
}
.nav-dropdown-content a { display:block; margin:0; padding:.55rem .75rem; white-space:nowrap; }
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content { display:block; }
.notice-error { background:#fef3f2; border-color:#fecdca; color:#b42318; }
.list { list-style:none; padding-left:0; }
.list li { padding:.45rem 0; border-bottom:1px solid var(--border); }

.ticket-hero {
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap:1.25rem;
  align-items:stretch;
  background:linear-gradient(135deg, #ffffff 0%, #eef5ff 62%, #fff8d7 100%);
  border:1px solid var(--border);
  border-radius:14px;
  padding:1.25rem;
  margin:1rem 0;
  overflow:hidden;
}
.ticket-hero-content { display:flex; gap:1rem; align-items:flex-start; }
.ticket-hero h1 { margin:.1rem 0 .25rem; font-size:clamp(2rem, 5vw, 3.5rem); line-height:1; color:#071b46; }
.ticket-tagline { color:#b39a05; font-weight:800; font-size:1.2rem; margin:.2rem 0 1rem; }
.ticket-hero-image { width:100%; height:100%; max-height:360px; object-fit:cover; border-radius:10px; border:1px solid rgba(7,27,70,.12); }
.payment-strip { display:grid; grid-template-columns:repeat(3, 1fr); gap:1rem; margin:1rem 0; }
.payment-item {
  background:#071b46; color:#fff; border-radius:12px; padding:1rem;
  display:block;
  box-shadow:0 8px 18px rgba(7,27,70,.12);
}
.payment-item strong { color:#f4c400; font-size:1.35rem; line-height:1.25; display:block; }
.win-chance-strip { grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); }
.win-chance-item { padding:.85rem; background:#102a56; }
.win-chance-item strong { font-size:1rem; margin-bottom:.35rem; }
.win-chance-item span { display:block; font-size:1.15rem; font-weight:800; }
.ticket-entry-card { border-top:5px solid #f4c400; }
.ticket-line {
  border:1px solid var(--border); border-radius:12px; padding:1rem; margin:.75rem 0;
  display:grid; grid-template-columns: minmax(160px, 1fr) minmax(130px, .55fr) minmax(130px, .55fr);
  gap:1rem; align-items:end; background:#fbfdff;
}
.ticket-line[data-derived="true"] { background:#f8fafc; }
.highlight { font-size:1.25rem; font-weight:900; color:#071b46; padding:.75rem .9rem; background:#fff8d7; border-radius:10px; border:1px solid #f4c400; }
.rules-panel {
  background:#071b46; color:#fff; border-radius:14px; padding:1.25rem; margin:1rem 0;
  border:1px solid rgba(255,255,255,.08);
}
.rules-panel h2 { margin-top:0; letter-spacing:.04em; }
.rules-list { list-style:none; padding:0; margin:0; display:grid; gap:.75rem; }
.rules-list li { position:relative; padding-left:2rem; font-weight:650; }
.rules-list li::before { content:"✓"; position:absolute; left:0; top:-.05rem; color:#f4c400; font-weight:900; }
@media (max-width:800px) {
  .ticket-hero { grid-template-columns:1fr; padding:.8rem; margin:.65rem 0; border-radius:10px; }
  .ticket-hero h1 { font-size:2.15rem; }
  .ticket-tagline { margin:.1rem 0 .55rem; font-size:1.05rem; }
  .ticket-hero p { margin:.45rem 0; }
  .ticket-hero-image { max-height:180px; }
  .payment-strip { grid-template-columns:1fr; }
  .ticket-line { grid-template-columns:1fr; }
  .win-chance-strip { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.55rem; }
  .win-chance-item { border-radius:10px; padding:.7rem; }
  .win-chance-item strong { font-size:1.1rem; }
  .win-chance-item span { font-size:1rem; }
  .highlight { font-size:1.4rem; }
  .rules-panel { margin:.65rem 0; padding:.9rem; border-radius:10px; }
}

.scan-card { max-width:780px; margin-inline:auto; }
.scan-preview {
  position:relative;
  background:#071b46;
  border:2px solid #102a56;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:4 / 3;
  margin:1rem 0;
}
.scan-preview video {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.scan-preview::after {
  content:"";
  position:absolute;
  inset:18%;
  border:3px solid #f4c400;
  border-radius:12px;
  box-shadow:0 0 0 999px rgba(0,0,0,.28);
  pointer-events:none;
}
#scanOverlay {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:.7rem 1rem;
  color:#fff;
  background:rgba(7,27,70,.85);
  font-weight:800;
  text-align:center;
}
.scan-upload-form {
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid #d9e2ef;
}
.scan-upload-form label {
  display:block;
  font-weight:800;
  margin-bottom:.4rem;
}
.scan-upload-form input[type="file"] {
  flex:1;
  min-width:220px;
}
@media (max-width:800px) {
  .scan-preview { aspect-ratio:3 / 4; border-radius:10px; }
}
