:root {
  --g: #20b1c2; /* current game's Lotterywest colour, overridden per screen */
  --abyss: #020a16;
  --deep: #061a30;
  --glass: rgba(120, 220, 255, 0.06);
  --glass-strong: rgba(120, 220, 255, 0.11);
  --edge: rgba(140, 230, 255, 0.16);
  --ink: #e4f8ff;
  --ink-2: #a9cbdc;
  --ink-3: #6f93a8;
  --cyan: #5cf2ff;
  --teal: #46ffc8;
  --violet: #b892ff;
  --pink: #ff7fd6;
  --gold: #ffd479;
  --danger: #ff8a8a;
  --radius: 18px;
  --tab-h: 64px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Manrope', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% -10%, #0b2b4a 0%, var(--deep) 35%, var(--abyss) 80%);
  background-color: var(--abyss);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#ocean { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
#app {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
}
.view { animation: rise .55s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(44px, 13vw, 64px); line-height: 1; }
h1 em, h2 em { font-style: italic; color: var(--cyan); text-shadow: 0 0 24px rgba(92, 242, 255, .55); }
.hero { text-align: center; padding: 18px 0 26px; }
.hero.small h1 { font-size: 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 11px; color: var(--ink-3); margin: 0 0 10px; }
.lede { color: var(--ink-2); margin: 12px auto 0; max-width: 32ch; }
.section-title { font-size: 22px; margin: 34px 0 14px; }
.hint { color: var(--ink-2); font-size: 14px; margin: 4px 0 16px; }
.muted { color: var(--ink-3); }

/* ---------- cast button ---------- */
.cast {
  display: grid; place-items: center; gap: 4px;
  width: 100%; padding: 34px 20px 28px; margin: 4px 0 10px;
  border-radius: 28px; border: 1px solid var(--edge);
  background: radial-gradient(80% 120% at 50% 0%, rgba(92,242,255,.16), rgba(92,242,255,.03) 60%), var(--glass);
  color: var(--ink); font: inherit; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .2s, box-shadow .3s;
  box-shadow: 0 0 0 0 rgba(92,242,255,0), inset 0 1px 0 rgba(255,255,255,.06);
}
.cast:active { transform: scale(.98); }
.cast:hover { box-shadow: 0 0 40px -6px rgba(92,242,255,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.cast-orb {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 10px;
  background: radial-gradient(circle at 40% 35%, #eaffff 0%, var(--cyan) 22%, rgba(70,255,200,.35) 55%, transparent 72%);
  box-shadow: 0 0 40px rgba(92,242,255,.6), 0 0 90px rgba(70,255,200,.25);
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(92,242,255,.85), 0 0 120px rgba(70,255,200,.35); } }
.cast-label { font-family: var(--font-display); font-size: 24px; }
.cast-sub { color: var(--ink-3); font-size: 13px; }

/* ---------- buttons & inputs ---------- */
button { font: inherit; }
.link-btn { display: block; margin: 6px auto; background: none; border: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 10px; min-height: 44px; }
.primary {
  width: 100%; margin-top: 18px; padding: 16px; min-height: 52px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #2bd6ff, var(--teal)); color: #022; font-weight: 700; font-size: 17px;
  box-shadow: 0 0 30px -4px rgba(70,255,200,.55);
}
.primary.small { width: auto; margin: 0; padding: 10px 22px; min-height: 44px; font-size: 15px; }
.primary:disabled { opacity: .5; }
.ghost { background: var(--glass); border: 1px solid var(--edge); color: var(--ink); border-radius: 999px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 12px; }
select, input {
  font: inherit; color: var(--ink); background: rgba(2, 16, 32, .7); border: 1px solid var(--edge);
  border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%;
}
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; }

/* ---------- cards ---------- */
.card {
  position: relative; padding: 18px; border-radius: var(--radius); border: 1px solid var(--edge);
  background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-bottom: 14px;
}
.draw-cards { display: grid; gap: 12px; }
.draw-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; cursor: pointer; }
.draw-card .jelly {
  --h: 190;
  width: 44px; height: 44px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 35%, hsla(var(--h), 100%, 85%, .95), hsla(var(--h), 100%, 60%, .35) 55%, transparent 72%);
  box-shadow: 0 0 22px hsla(var(--h), 100%, 65%, .55);
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-4px) scale(1.04, .97); } }
.draw-card h3 { font-size: 19px; }
.draw-card .meta { font-size: 13px; color: var(--ink-3); }
.draw-card .jackpot { font-family: var(--font-display); font-size: 20px; text-align: right; color: var(--gold); text-shadow: 0 0 16px rgba(255, 212, 121, .4); }
.draw-card .last { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); }
.skeleton { height: 86px; border-radius: var(--radius); background: linear-gradient(90deg, var(--glass), var(--glass-strong), var(--glass)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton.tall { height: 320px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- number balls ----------
   Lotterywest style: plain white ball, black Poppins numerals; supps and the
   Powerball are white too. --g is the game's Lotterywest colour (set per element). */
.balls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ball {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-family: 'Poppins', var(--font-ui); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: all .5s cubic-bezier(.2,.8,.2,1);
}
.ball.sm { width: 26px; height: 26px; font-size: 11px; }
/* drawn numbers: the white Lotterywest ball */
.ball.win, .ball.supp, .ball.pb {
  background: #fff; color: #000; font-weight: 400; border-color: transparent;
  box-shadow: 0 0 14px rgba(255, 255, 255, .25);
}
.ball.supp, .ball.pb { box-shadow: 0 0 0 2px var(--g), 0 0 14px rgba(255, 255, 255, .2); }
/* your numbers that matched: white ball lit by the game's colour */
.ball.lit, .ball.lit-supp, .ball.lit-pb {
  background: #fff; color: #000; font-weight: 500; border-color: transparent;
  box-shadow: 0 0 0 2px var(--g), 0 0 20px var(--g), 0 0 46px color-mix(in srgb, var(--g) 45%, transparent);
  animation: ignite .9s cubic-bezier(.2,.9,.3,1.4);
}
.ball.lit-supp, .ball.lit-pb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--g), 0 0 22px var(--g); }
@keyframes ignite { 0% { transform: scale(.6); filter: brightness(2.2); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.ball.rising { opacity: 0; transform: translateY(40px) scale(.5); }
.plus { color: var(--ink-3); font-size: 13px; margin: 0 2px; }

/* ---------- scan ---------- */
.scan-stage { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--edge); max-height: 58vh; display: grid; place-items: center; background: #000; }
.scan-stage img { width: 100%; max-height: 58vh; object-fit: contain; opacity: .75; filter: saturate(.6) brightness(.9); }
.sonar { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(92,242,255,.0) 40%, rgba(92,242,255,.45) 50%, rgba(92,242,255,0) 60%, transparent 100%); background-size: 100% 220%; animation: sweep 2.2s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes sweep { from { background-position: 0 120%; } to { background-position: 0 -120%; } }
.scan-status { text-align: center; font-family: var(--font-display); font-size: 21px; margin: 20px 0 10px; min-height: 1.4em; }
.progress { height: 4px; border-radius: 4px; background: var(--glass-strong); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--teal)); box-shadow: 0 0 12px var(--cyan); transition: width .3s; }

.reframe { display: block; margin: -4px auto 12px; font-size: 13px; }

/* ---------- several photos ---------- */
.more-ways { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; }
.batchbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 12; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 10px; border-radius: 14px; border: 1px solid var(--edge); background: var(--glass-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; }
.batchbar > span:first-child { margin-right: auto; }
.batch-dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 40%; }
.batch-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--edge); }
.batch-dots i.done { background: var(--teal); }
.batch-dots i.skip { background: var(--ink-3); }
.batch-dots i.now { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ghost.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.batch-summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--edge); font-size: 14px; }
.batch-summary .row:last-child { border-bottom: 0; }

/* ---------- frame (crop) ---------- */
.frame-wrap { display: grid; place-items: center; margin: 6px 0 4px; }
.frame-stage { position: relative; display: inline-block; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 18px; overflow: hidden; border: 1px solid var(--edge); }
.frame-stage img { display: block; max-width: 100%; max-height: 62vh; pointer-events: none; }
.net { position: absolute; border: 2px solid var(--cyan); border-radius: 10px; cursor: move;
  box-shadow: 0 0 0 9999px rgba(2, 10, 22, .58), 0 0 26px rgba(92, 242, 255, .7), inset 0 0 26px rgba(92, 242, 255, .25);
  background-image: linear-gradient(rgba(92,242,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(92,242,255,.08) 1px, transparent 1px);
  background-size: 22px 22px; animation: netglow 2.4s ease-in-out infinite; }
@keyframes netglow { 50% { box-shadow: 0 0 0 9999px rgba(2, 10, 22, .58), 0 0 40px rgba(92, 242, 255, .95), inset 0 0 34px rgba(92, 242, 255, .35); } }
.net .h { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, #eaffff 0 30%, rgba(92,242,255,.6) 31% 55%, transparent 56%); }
.net .h[data-h="tl"] { left: -15px; top: -15px; cursor: nwse-resize; }
.net .h[data-h="tr"] { right: -15px; top: -15px; cursor: nesw-resize; }
.net .h[data-h="bl"] { left: -15px; bottom: -15px; cursor: nesw-resize; }
.net .h[data-h="br"] { right: -15px; bottom: -15px; cursor: nwse-resize; }
.strip { max-height: 30vh; object-fit: contain; background: #000; position: sticky; top: 8px; z-index: 5; display: block; width: 100%; border-radius: 12px; border: 1px solid var(--edge); margin: 0 0 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.lines-edit li.unsure { border-color: rgba(255, 212, 121, .5); background: rgba(255, 212, 121, .06); }

/* ---------- review ---------- */
.sub-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sub-head h2 { font-size: 24px; }
.back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass); color: var(--ink); cursor: pointer; font-size: 18px; flex: none; }
.lines-edit { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; counter-reset: ln; }
.lines-edit li { display: grid; grid-template-columns: 18px 1fr 28px; gap: 6px; align-items: center; padding: 6px; border-radius: 14px; border: 1px solid transparent; background: var(--glass); counter-increment: ln; }
.lines-edit li::before { content: counter(ln) "."; color: var(--ink-3); font-size: 13px; text-align: right; }
.lines-edit li.bad { border-color: rgba(255,138,138,.55); background: rgba(255,138,138,.06); }
.lines-edit .nums { display: flex; flex-wrap: wrap; gap: 3px; }
.lines-edit input.n { width: 31px; min-height: 36px; padding: 4px 0; font-size: 14px; text-align: center; border-radius: 50%; font-weight: 700; font-variant-numeric: tabular-nums; }
.lines-edit input.n.pbn { border-color: rgba(255,127,214,.6); color: var(--pink); }
.lines-edit input.n.low { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,212,121,.35); color: var(--gold); }
.lines-edit .err { grid-column: 2 / -1; color: var(--danger); font-size: 12px; }
.lines-edit .del { width: 28px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; }

/* ---------- reveal ---------- */
.draw-orbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 26px 0 10px; }
.draw-orbs .ball { width: 46px; height: 46px; font-size: 18px; }
.draw-meta { text-align: center; color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.result-lines { display: grid; gap: 6px; }
.result-line { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 14px; opacity: 0; transform: translateY(10px); transition: all .5s; }
.result-line.show { opacity: 1; transform: none; }
.result-line .idx { color: var(--ink-3); font-size: 12px; text-align: right; }
.result-line.won { background: rgba(70,255,200,.08); border: 1px solid rgba(70,255,200,.35); }
.result-line .prize { grid-column: 2; font-size: 13px; color: var(--teal); font-weight: 600; }
.verdict { text-align: center; padding: 26px 10px 10px; }
.verdict .big { font-family: var(--font-display); font-size: clamp(34px, 10vw, 48px); line-height: 1.05; }
.verdict .big.win { color: var(--gold); text-shadow: 0 0 30px rgba(255,212,121,.6); }
.verdict p { color: var(--ink-2); margin: 10px auto 0; max-width: 34ch; }
.pending { text-align: center; padding: 40px 10px; }
.pending .count { font-family: var(--font-display); font-size: 40px; color: var(--cyan); text-shadow: 0 0 24px rgba(92,242,255,.5); font-variant-numeric: tabular-nums; }
.draw-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.draw-tabs button { flex: none; }
.draw-tabs button.on { background: var(--glass-strong); border-color: var(--cyan); }

/* ---------- tickets ---------- */
.ticket-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; cursor: pointer; }
.ticket-row h3 { font-size: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--edge); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.won { color: var(--gold); border-color: rgba(255,212,121,.5); }
.badge.lost { color: var(--ink-3); }
.badge.wait { color: var(--cyan); border-color: rgba(92,242,255,.45); }
.ticket-row .when { font-size: 13px; color: var(--ink-3); grid-column: 1 / -1; }
.ticket-group { margin: 0 0 22px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 600;
  letter-spacing: .02em; margin: 0 0 10px; padding: 0 4px; color: var(--ink-2); }
.group-head .count { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.ticket-group.win .group-head { color: var(--gold); font-size: 17px; }
details.ticket-group > summary { cursor: pointer; list-style: none; }
details.ticket-group > summary::-webkit-details-marker { display: none; }
details.ticket-group > summary > span:first-child::before { content: "▸ "; display: inline-block; transition: transform .2s; }
details.ticket-group[open] > summary > span:first-child::before { transform: rotate(90deg); }
.group-note { margin: -4px 4px 10px; font-size: 13px; }
.ticket-row.win { border-color: rgba(255,212,121,.45); box-shadow: 0 0 22px rgba(255,212,121,.12); }
.ticket-row.claimed, .ticket-row.lost { opacity: .8; }
.ticket-row.leaving { transition: opacity .35s, transform .35s; opacity: 0; transform: translateX(40px); }
.claim-btn { grid-column: 1 / -1; justify-self: start; margin-top: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: #1a1300; background: var(--gold); border: 0; }
.ticket-row .unclaim { grid-column: 1 / -1; justify-self: start; font-size: 13px; padding: 4px 0; }
.badge.claimed { color: var(--teal); border-color: var(--edge); }
.empty { text-align: center; color: var(--ink-3); padding: 40px 0; }

/* ---------- oracle ---------- */
.game-pick { margin-bottom: 16px; }
.oracle h3 { font-size: 21px; margin-bottom: 4px; }
.oracle .sub { color: var(--ink-3); font-size: 13px; margin: 0 0 14px; }
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { padding: 14px; border-radius: 14px; background: rgba(2, 16, 32, .55); border: 1px solid var(--edge); }
.tile .k { font-size: 12px; color: var(--ink-3); }
.tile .v { font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .v.small { font-size: 20px; }
.tile .d { font-size: 12px; color: var(--ink-2); }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; }
.heat .cell { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; cursor: default; }
.legend-ramp { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.legend-ramp .bar { flex: 1; height: 8px; border-radius: 4px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-2); font-family: var(--font-ui); font-size: 12px; }
.chart .grid { stroke: rgba(140,230,255,.12); stroke-width: 1; }
.chart .ref { stroke: var(--gold); stroke-width: 2; }
.chart .bar { fill: var(--cyan); }
.chart .bar:hover { fill: #a6f8ff; }
.tip { position: fixed; z-index: 50; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: rgba(2,14,28,.95); border: 1px solid var(--edge); color: var(--ink); font-size: 13px; max-width: 240px; opacity: 0; transition: opacity .15s; }
.tip.on { opacity: 1; }
.picks { display: grid; gap: 8px; margin-top: 12px; }
.pick-line { display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: rgba(2,16,32,.55); border: 1px solid var(--edge); }
.pick-line .why { font-size: 12px; color: var(--ink-3); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.truth { border-color: rgba(255,212,121,.35); }
.truth p { color: var(--ink-2); margin: 6px 0; font-size: 14px; }
.table-toggle { font-size: 13px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.data th, table.data td { text-align: left; padding: 6px 4px; border-bottom: 1px solid rgba(140,230,255,.1); font-variant-numeric: tabular-nums; }
table.data th { color: var(--ink-3); font-weight: 600; }

/* ---------- chrome ---------- */
.tabbar {
  position: fixed; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(3, 18, 34, .78); border: 1px solid var(--edge);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.tabbar button { display: flex; align-items: center; gap: 6px; padding: 10px 16px; min-height: 44px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); cursor: pointer; font-weight: 600; font-size: 14px; }
.tabbar button span { font-size: 16px; }
.tabbar button.active { color: var(--ink); background: var(--glass-strong); box-shadow: inset 0 0 0 1px rgba(92,242,255,.35), 0 0 20px -6px rgba(92,242,255,.6); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + 30px); transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 14px; background: rgba(3,20,36,.95); border: 1px solid var(--edge); max-width: calc(100vw - 32px); transition: all .3s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
dialog { background: #04182c; color: var(--ink); border: 1px solid var(--edge); border-radius: 20px; padding: 20px; max-width: min(380px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog p { color: var(--ink-2); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row label:first-child { grid-column: 1 / -1; }
  .ball { width: 34px; height: 34px; font-size: 14px; }
}

@media (min-width: 420px) { .lines-edit input.n { width: 36px; min-height: 40px; font-size: 15px; } .lines-edit .nums { gap: 4px; } }

/* ---------- top bar & menu ---------- */
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; max-width: 560px; margin: 0 auto;
  background: linear-gradient(180deg, rgba(2,10,22,.92), rgba(2,10,22,.6) 70%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#app { padding-top: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass); color: var(--ink); cursor: pointer; font-size: 18px; display: grid; place-items: center; flex: none; }
.burger { display: grid; gap: 4px; }
.burger i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.brand { font-family: var(--font-display); font-size: 22px; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0 4px; }
.brand em { font-style: italic; color: var(--cyan); }
.crumb { flex: 1; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.drawer {
  position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 20px);
  background: linear-gradient(180deg, #06223c, #030f1f); border-right: 1px solid var(--edge);
  transform: translateX(-105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); box-shadow: 20px 0 60px rgba(0,0,0,.5);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-label { text-transform: uppercase; letter-spacing: .18em; font-size: 11px; color: var(--ink-3); margin: 18px 8px 6px; }
.drawer-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; text-decoration: none; }
.drawer-item:hover, .drawer-item.current { background: var(--glass-strong); }
.drawer-item.current { box-shadow: inset 3px 0 0 var(--cyan); }
.drawer-item span { width: 22px; text-align: center; color: var(--cyan); }
.drawer-item .count { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.drawer-games { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 8px; }
.drawer-games button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 40px; border-radius: 10px; border: 1px solid var(--edge); background: rgba(2,16,32,.5); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.drawer-games i { width: 10px; height: 10px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); flex: none; }
.drawer-foot { color: var(--ink-3); font-size: 12px; margin: 22px 8px 0; }
.tabbar button { padding: 10px 12px; }

/* ---------- results ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips button { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.chips button i { width: 9px; height: 9px; border-radius: 50%; background: var(--g); }
.chips button.on { color: var(--ink); border-color: var(--g); box-shadow: 0 0 16px -4px var(--g); }
.result-card h3 { font-size: 19px; }
.result-card .meta { color: var(--ink-3); font-size: 13px; margin: 2px 0 10px; }
.prize-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.prize-table td, .prize-table th { padding: 5px 4px; border-bottom: 1px solid rgba(140,230,255,.08); text-align: left; font-variant-numeric: tabular-nums; }
.prize-table th { color: var(--ink-3); font-weight: 600; }
.prize-table td:last-child, .prize-table th:last-child { text-align: right; }

/* ---------- settings / about ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(140,230,255,.08); }
.set-row:last-child { border-bottom: 0; }
.set-row h3 { font-size: 17px; }
.set-row p { margin: 2px 0 0; font-size: 13px; }
.about h3 { font-size: 19px; margin: 14px 0 4px; }
.about h3:first-child { margin-top: 0; }
.about p { color: var(--ink-2); margin: 0 0 8px; }
.about a { color: var(--cyan); }

/* ---------- oracle report card ---------- */
.report .strat { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.report .strat .bar { height: 10px; border-radius: 5px; background: rgba(140,230,255,.08); position: relative; overflow: hidden; }
.report .strat .bar span { position: absolute; inset: 0 auto 0 0; background: var(--g); border-radius: 5px; }
.report .strat .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.report .frozen { font-size: 12px; color: var(--ink-3); }

/* ---------- sign-in gate ---------- */
body.gated .topbar, body.gated .tabbar, body.gated #app, body.gated .drawer, body.gated .scrim { display: none !important; }
.gate { position: relative; z-index: 20; min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 16px 40px; }
.gate-card { width: 100%; max-width: 440px; padding: 26px 22px; position: relative; }
.gate-brand { font-family: Fraunces, serif; font-size: 26px; letter-spacing: .3px; margin-bottom: 14px; }
.gate-brand em { color: var(--cyan); }
.gate-title { font-family: Fraunces, serif; font-weight: 400; font-size: 27px; line-height: 1.15; margin: 0 0 10px; }
.gate-title em { color: var(--cyan); }
.gate-back { position: absolute; top: 8px; right: 10px; margin: 0; font-size: 14px; }
.gate-points { margin: 6px 0 18px; padding-left: 20px; color: var(--ink-2); line-height: 1.7; }
.gate-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.gate-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.gate-form input:not([type=checkbox]), .gate-form select { font: inherit; font-size: 17px; color: var(--ink); background: var(--glass);
  border: 1px solid var(--edge); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.gate-form input:focus, .gate-form select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.gate-form .check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink); line-height: 1.4; }
label.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--cyan); flex: none; }
.code-input { letter-spacing: 8px; font-size: 24px !important; text-align: center; font-variant-numeric: tabular-nums; }
.gate-error { color: #ff9a9a; font-size: 14px; margin: 0; }
.small-print { font-size: 13px; margin: 0; }
.link-btn.inline { display: inline; padding: 0; min-height: 0; margin: 0; font-size: inherit; }
.gate-legal { font-size: 12px; color: var(--ink-3); margin: 22px 0 0; text-align: center; }
.gate-legal a, .gate-form a { color: var(--ink-2); }
.gate-steps { color: var(--ink-2); padding-left: 20px; line-height: 1.6; }
.qr { background: #fff; border-radius: 14px; padding: 10px; width: 210px; margin: 6px auto 10px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { display: block; margin-top: 8px; font-size: 15px; letter-spacing: 1px; word-break: break-all; color: var(--ink); }
.recovery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.recovery code { font-size: 16px; letter-spacing: 1px; text-align: center; padding: 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--edge); }
.profile-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-form fieldset { border: 0; padding: 0; margin: 0; }
.profile-form legend { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--edge); font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chip input:checked + span { background: var(--glass-strong); color: var(--ink); border-color: var(--cyan); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); }
.set-row.sub { padding-left: 10px; }
.signin-manage { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.signin-manage .ghost.small { align-self: flex-start; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.link-btn.danger { color: #ff9a9a; margin: 0 0 0 auto; }
.legal-dialog { max-width: 620px; width: calc(100% - 32px); max-height: 85dvh; border-radius: 18px; border: 1px solid var(--edge);
  background: var(--deep); color: var(--ink); padding: 22px; }
.legal-dialog::backdrop { background: rgba(0,0,0,.6); }
.legal h2 { font-family: Fraunces, serif; font-weight: 400; margin: 0 0 6px; }
.legal h3 { margin: 18px 0 6px; font-size: 16px; }
.legal ul { padding-left: 20px; line-height: 1.55; color: var(--ink-2); }
.legal a { color: var(--cyan); }

/* ---------- admin ---------- */
.admin-only { display: none !important; }
body.is-admin .admin-only { display: flex !important; }
body.is-admin p.admin-only { display: block !important; }
[data-view="admin"] { max-width: 1100px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 4px; }
.admin-tabs button { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink-2); font: inherit; cursor: pointer; }
.admin-tabs button.on, .admin-range .on { background: var(--glass-strong); color: var(--ink); border-color: var(--cyan); }
.admin-range { margin-bottom: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.tile span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.tile b { font-size: 22px; font-weight: 600; }
.tile small { font-size: 12px; color: var(--ink-2); }
.chart { width: 100%; height: auto; display: block; margin: 8px 0; }
.chart text { font-size: 3px; fill: var(--ink-3); }
.hbars { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hbar .k { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 8px; border-radius: 4px; background: var(--glass-strong); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--cyan); border-radius: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--edge); }
.admin-table tr.off td { opacity: .5; }
.members tbody tr { cursor: pointer; }
.members tbody tr:hover { background: var(--glass); }
.table-wrap { overflow-x: auto; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.card h4 { margin: 14px 0 6px; font-size: 14px; color: var(--ink-2); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.inline-form input { font: inherit; color: var(--ink); background: var(--glass); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; min-height: 40px; flex: 1; min-width: 160px; }
.member-actions { flex-wrap: wrap; gap: 8px; }
.member-actions select { font: inherit; color: var(--ink); background: var(--glass); border: 1px solid var(--edge); border-radius: 999px; padding: 8px 12px; }
.timeline { font-size: 13px; color: var(--ink-2); padding-left: 18px; max-height: 260px; overflow: auto; }
body:has([data-view="admin"]:not([hidden])) #app { max-width: 1100px; }
.admin-range { justify-content: flex-start; gap: 8px; }

/* ---------- promotions, ideas, feedback ---------- */
.promo-slot:empty { display: none; }
.promo-slot { margin: 18px 0; }
.promo { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-style: dashed; }
.promo img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; }
.promo b { font-size: 17px; }
.promo-tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.promo-body { color: var(--ink-2); font-size: 14px; }
.promo-cta { color: var(--cyan); font-weight: 600; font-size: 14px; }
.gate-form textarea, .card textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--glass); border: 1px solid var(--edge); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); margin-right: 8px; vertical-align: middle; }
.thread h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.msgs { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 14px; background: var(--glass-strong); white-space: pre-wrap; }
.msg small { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.msg.me { align-self: flex-end; background: var(--glass); border: 1px solid var(--edge); }
.msg.them { align-self: flex-start; }
.wkfb-fab { display: none !important; }
:root { --wkfb-accent: #0e8fa3; }
.brief { white-space: pre-wrap; font-size: 13px; background: var(--glass); border: 1px solid var(--edge); border-radius: 12px; padding: 12px; max-height: 340px; overflow: auto; }
.promo-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.promo-form .chips { margin-bottom: 4px; }
.audience { font-size: 14px; color: var(--ink-2); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.plan { display: flex; flex-direction: column; gap: 8px; }
.plan.current { border-color: var(--cyan); box-shadow: 0 0 24px -8px var(--cyan); }
.plan .price b { font-size: 30px; font-weight: 600; }
.plan .per { color: var(--ink-3); margin-left: 4px; }
.plan ul { padding-left: 18px; color: var(--ink-2); line-height: 1.6; margin: 0 0 6px; flex: 1; }
.plan .primary.small { align-self: flex-start; }
.consent .row-btns { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }

/* Native dropdown lists follow the theme (dark themes were drawing light text on a light list) */
:root { color-scheme: dark; }
select option, select optgroup { background-color: var(--deep); color: var(--ink); }

/* Lifelike jellyfish (ocean theme): black-background clip; screen blending drops the black */
.swimmer { position: fixed; left: 0; top: 0; width: auto; display: none; pointer-events: none;
  mix-blend-mode: screen; transform-origin: 50% 16%; will-change: transform; z-index: 0; }
:root:not([data-theme="ocean"]):not(:not([data-theme])) .swimmer { display: none !important; }

/* ---------- decluttered home ---------- */
.home-title { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin: 6px 0 14px; }
.cast { padding: 22px 18px; gap: 6px; }
.cast .cast-orb { width: 56px; height: 56px; }
.cast-label { font-size: 21px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.add-row .ghost { width: 100%; }
.draw-list { padding: 4px 0; }
.draw-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 13px 16px;
  background: none; border: 0; border-bottom: 1px solid var(--edge); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.draw-row:last-child { border-bottom: 0; }
.draw-row:hover { background: var(--glass); }
.draw-row i { width: 10px; height: 10px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); }
.draw-row .name { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.draw-row .name small { font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.draw-row .jackpot { font-size: 16px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.section-title { font-size: 19px; margin: 26px 0 10px; }
.add-row .ghost { min-height: 44px; padding: 10px 12px; white-space: nowrap; }

/* ---------- declutter: every tab ---------- */
.hero.small { text-align: left; padding: 6px 0 12px; }
.hero.small h1 { font-size: 28px; font-weight: 400; }
.hero.small h1 em { font-style: normal; color: inherit; text-shadow: none; }
.hero.small .lede { display: none; }
[data-view="plans"] .hero.small .lede, [data-view="ideas"] .hero.small .lede { display: block; margin: 4px 0 0; max-width: none; font-size: 14px; }
/* Tickets: slimmer rows, smaller claim button */
.ticket-row { padding: 14px 16px; }
.ticket-row h3 { font-size: 17px; }
.claim-btn { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.group-note { font-size: 12px; }
/* Results: one scrolling row of games; drop the wordy "Needs" column on phones */
#resultChips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
#resultChips::-webkit-scrollbar { display: none; }
#resultChips button { flex: none; }
@media (max-width: 560px) {
  .prize-table th:nth-child(2), .prize-table td:nth-child(2) { display: none; }
}
/* Oracle: maths folded away */
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; padding: 16px 18px; font-family: var(--font-display); font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; color: var(--ink-3); font-size: 20px; }
details.fold[open] > summary::after { content: "–"; }
details.fold > :not(summary) { margin-left: 18px; margin-right: 18px; }
details.fold[open] { padding-bottom: 16px; }
details.fold .report > h3 { display: none; }

/* ---------- ways to play: systems, Powerpik, Cash 3 ---------- */
.line-opts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.line-opts select { font: inherit; font-size: 13px; color: var(--ink); background: var(--glass); border: 1px solid var(--edge); border-radius: 999px; padding: 5px 10px; }
.sys-ctl { display: inline-flex; align-items: center; gap: 6px; }
.mini { min-width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass); color: var(--ink); font: inherit; cursor: pointer; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; }
.mini-check input { accent-color: var(--cyan); width: 18px; height: 18px; }
.pb-all { font-size: 12px; color: var(--pink); margin-left: 6px; align-self: center; }
.entry-kind { display: block; font-size: 12px; color: var(--ink-3); margin: 2px 0 0 26px; }

/* Jellyfish only where you're browsing, never over a ticket you're checking */
body:is([data-view="frame"], [data-view="scan"], [data-view="review"], [data-view="reveal"], [data-view="admin"], [data-view="settings"]) .swimmer { display: none !important; }

/* Working screens (photo -> read -> review -> result): no tab bar in the way, more room to scroll */
body:is([data-view="frame"], [data-view="scan"], [data-view="review"], [data-view="reveal"]) .tabbar { display: none; }
body:is([data-view="frame"], [data-view="scan"], [data-view="review"], [data-view="reveal"]) #app { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
/* The pinned ticket photo stays small while you scroll; tap it to see it bigger */
.strip { max-height: 18vh; cursor: zoom-in; transition: max-height .25s ease; }
.strip.big { max-height: 55vh; cursor: zoom-out; }

/* Result screen: a whole line fits on one row on a phone (7 numbers + Powerball) */
.result-line .balls { gap: 5px; }
.result-line .ball { --b: clamp(26px, calc((min(100vw, 560px) - 130px) / 8.4), 38px); width: var(--b); height: var(--b); font-size: calc(var(--b) * .42); }
.result-line .plus { font-size: 11px; }
.draw-orbs { gap: 6px; padding: 18px 0 8px; }
.draw-orbs .ball { --b: clamp(26px, calc((min(100vw, 560px) - 90px) / 10.5), 46px); width: var(--b); height: var(--b); font-size: calc(var(--b) * .4); }
/* Oracle picks and report lines: one row per line, same sizing as results */
.pick-line .balls { gap: 5px; flex-wrap: nowrap; }
.pick-line .ball { --b: clamp(24px, calc((min(100vw, 560px) - 130px) / 8.6), 38px); width: var(--b); height: var(--b); font-size: calc(var(--b) * .42); flex: none; }
.pick-line .plus { font-size: 11px; }


/* ---------- local ads: small card + in-app advertiser card ---------- */
button.promo.local { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.promo-row { display: flex; gap: 12px; align-items: center; }
.promo-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.ad-dialog { max-width: 480px; }
.ad-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.ad-head h2 { margin: 2px 0 0; font-size: 22px; }
.ad-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.ad-hero { width: 100%; border-radius: 14px; margin: 4px 0 12px; max-height: 240px; object-fit: cover; }
.ad-headline { font-size: 20px; margin: 6px 0; }
.ad-offer { font-size: 16px; color: var(--ink); }
.ad-code { width: 100%; margin: 10px 0; padding: 16px; border-radius: 14px; border: 1.5px dashed var(--teal); background: rgba(92,242,255,.06);
  color: var(--ink); font: inherit; display: grid; gap: 4px; justify-items: center; cursor: pointer; }
.ad-code b { font-size: 26px; letter-spacing: .12em; color: var(--teal); }
.ad-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; }
.ad-facts dt { color: var(--ink-3); }
.ad-facts dd { margin: 0; }
.ad-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.ad-actions a { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- admin: advertising ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-grid .stat { display: grid; gap: 4px; padding: 14px; }
.stat-grid .stat b { font-size: 18px; }
.stat-grid .stat small { color: var(--ink-3); }
.stat .track { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.stat .track i { display: block; height: 100%; background: var(--teal); }
.approval { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 14px; align-items: start; margin-bottom: 12px; }
@media (max-width: 560px) { .approval { grid-template-columns: 1fr; } }
.promo-preview .promo { margin: 0; pointer-events: none; }
.admin-table.diff td { font-size: 13px; }
.admin-table.rate input[type=number] { width: 70px; }
.admin-table.rate input[name=name] { width: 100px; }
.admin-table.rate .check { display: block; font-size: 12px; white-space: nowrap; }
.prime-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.prime-row input[type=number] { width: 60px; }
.prime-row input[name=label] { width: 160px; }

/* ---------- Plus: alerts and family sharing ---------- */
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.fam-list { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 6px; }
.fam-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 12px; }
#familyCard h4 { margin: 16px 0 6px; }
.ticket-group.shared .group-head span:first-child { color: var(--teal); }

.pay-due { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; }
small.warn { color: #ffb347; }
/* Ways-to-play controls (system size, Powerpik, Cash 3 bet/stake) sit under the numbers, not in the line-number column */
.lines-edit .line-opts { grid-column: 2 / -1; margin-top: 2px; }
.lines-edit .line-opts select { width: auto; min-width: 0; min-height: 34px; padding: 4px 30px 4px 12px; }
