/* Pick Room — centered, calm layout. One column, everything in the middle of the screen. */
:root {
  --bg: #F4F1EA; --surface: #FFFFFF; --ink: #15181E; --muted: #5F6470; --line: #E2DDD2;
  --gen: #B5541C; --gen-soft: #F6E4D6; --off-bg: #15181E; --off-ink: #FFFFFF;
  --accent: #15181E; --accent-ink: #FFFFFF; --danger: #B42318; --ok: #1E8A55;
  --bonus: #D7263D; --bonus-ink: #FFFFFF;
  --radius: 22px;
  --digit-font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1015; --surface: #161A21; --ink: #ECEDEF; --muted: #9AA0AB; --line: #262B34;
    --gen: #F09A5C; --gen-soft: #2A1E16; --off-bg: #ECEDEF; --off-ink: #0D1015;
    --accent: #F09A5C; --accent-ink: #1A0F08; --danger: #FF8A80; --ok: #34C27A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1015; --surface: #161A21; --ink: #ECEDEF; --muted: #9AA0AB; --line: #262B34;
  --gen: #F09A5C; --gen-soft: #2A1E16; --off-bg: #ECEDEF; --off-ink: #0D1015;
  --accent: #F09A5C; --accent-ink: #1A0F08; --danger: #FF8A80; --ok: #34C27A;
  color-scheme: dark;
}
body[data-game="powerball"] { --bonus: #D7263D; --bonus-ink: #FFFFFF; }
body[data-game="megamillions"] { --bonus: #E3A008; --bonus-ink: #1A1200; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gen); outline-offset: 2px; }

/* Page: one centered column with comfortable space on every side */
.page {
  max-width: 720px; margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
@media (min-width: 700px) { .page { padding-top: 40px; padding-bottom: 80px; } }

/* Header: brand, games, sections — all centered */
.top { display: grid; justify-items: center; gap: 16px; text-align: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.mark { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--gen); }
.seg { display: inline-flex; background: var(--line); border-radius: 999px; padding: 4px; }
.seg button, .seg label { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button[aria-selected="true"], .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg.games { width: 100%; max-width: 560px; }
.seg.games button { flex: 1 1 auto; padding: 9px 8px; font-size: clamp(13px, 3.6vw, 15px); }
.tabs { display: flex; gap: 8px; justify-content: center; width: 100%; max-width: 560px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: 0; padding: 10px 8px 12px; font-size: 16px; font-weight: 650; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gen); }

main { margin-top: 28px; }
.view { display: grid; gap: 20px; }

/* Headings centered */
.heading { text-align: center; display: grid; justify-items: center; gap: 4px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(26px, 6.5vw, 34px); line-height: 1.15; letter-spacing: -.02em; }
.link { background: none; border: 0; padding: 6px 0; color: var(--gen); font-weight: 600; font-size: 15px; }
.fine { color: var(--muted); font-size: 14px; margin: 0; }

.card { background: var(--surface); border-radius: var(--radius); padding: clamp(20px, 5vw, 32px); }

/* Hero */
.hero { display: grid; justify-items: center; gap: 16px; text-align: center; }
.label { margin: 0; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tag.gen { color: var(--gen); background: var(--gen-soft); }
.why { margin: 0; max-width: 520px; color: var(--muted); font-size: 15px; }
.why strong { color: var(--ink); }

/* Digits (Pick 3 / 4) */
.digits { display: flex; gap: 10px; justify-content: center; font-family: var(--digit-font); font-variant-numeric: tabular-nums; }
.digits span { display: grid; place-items: center; border-radius: 50%; font-weight: 700; }
.digits.gen span { border: 3px solid var(--gen); color: var(--ink); }
.digits.off span { background: var(--off-bg); color: var(--off-ink); }
.digits.big span { width: clamp(64px, 18vw, 88px); aspect-ratio: 1; font-size: clamp(30px, 8.5vw, 42px); }
.digits.small span { width: 34px; height: 34px; font-size: 16px; border-width: 2px; }
.fb-line { margin: 0; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.fb { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-family: var(--digit-font); font-weight: 700; }
.fb.gen { border: 2px solid var(--gen); }
.fb.off { background: var(--off-bg); color: var(--off-ink); }

/* Balls (Powerball / Mega Millions) */
.balls { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; font-family: var(--digit-font); font-variant-numeric: tabular-nums; }
.balls span { display: grid; place-items: center; border-radius: 50%; font-weight: 700; flex: none; }
.balls.gen span { border: 2.5px solid var(--gen); color: var(--ink); }
.balls.gen span.bonus { border-color: var(--bonus); }
.balls.off span { background: var(--off-bg); color: var(--off-ink); }
.balls.off span.bonus { background: var(--bonus); color: var(--bonus-ink); }
.balls span.bonus { margin-left: 8px; }
.balls.large { gap: clamp(5px, 1.5vw, 12px); }
.balls.large span { width: clamp(38px, 10.6vw, 64px); height: clamp(38px, 10.6vw, 64px); font-size: clamp(16px, 4.4vw, 26px); border-width: 3px; }
.balls.medium { gap: clamp(5px, 1.4vw, 8px); }
.balls.medium span { width: clamp(34px, 9.4vw, 44px); height: clamp(34px, 9.4vw, 44px); font-size: clamp(14px, 4vw, 18px); }
.balls.small { gap: 4px; }
.balls.small span { width: clamp(28px, 7.8vw, 34px); height: clamp(28px, 7.8vw, 34px); font-size: clamp(12px, 3.4vw, 14px); }
.balls.small span.bonus { margin-left: 5px; }
.balls.tiny { display: inline-flex; vertical-align: -6px; }
.balls.tiny span { width: 22px; height: 22px; font-size: 11px; }

/* Matches: winning numbers you matched get a thick green ring; your matched numbers are solid green */
.balls.off span.hit, .digits.off span.hit { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--ok); }
.balls.gen span.hit, .digits.gen span.hit { background: var(--ok); border-color: var(--ok) !important; color: #fff; }

/* Lines list: best line first and large, others below */
.lines { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 0; }
.lines li { display: grid; justify-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.lines li.best { border-top: 0; padding: 4px 0 18px; gap: 12px; }
.lines li.others-title { padding: 14px 0 0; color: var(--muted); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--line); }
.lines li.others-title + li { border-top: 0; }
.line-label { font-size: 14px; font-weight: 650; color: var(--muted); }
.best .line-label { font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.best-tag { background: var(--ok); color: #fff; }

/* Three quick facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts > div { background: var(--surface); border-radius: 16px; padding: 14px 10px; text-align: center; display: grid; gap: 2px; }
.facts strong { font-size: clamp(17px, 4.6vw, 22px); }
.facts span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.facts:empty { display: none; }

/* Details sections */
details.more { background: var(--surface); border-radius: 16px; padding: 0 18px; }
details.more summary { list-style: none; padding: 16px 0; font-weight: 650; display: flex; justify-content: space-between; cursor: pointer; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
details.more[open] summary::after { content: "–"; }
details.more > dl, details.more .about { padding-bottom: 18px; }
details.more dl { margin: 0; display: grid; gap: 12px; }
details.more dl div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.more dt { color: var(--muted); font-weight: 600; }
details.more dd { margin: 0; }
.about p { margin: 0 0 14px; }
.about-lines div { display: grid !important; gap: 2px; }
details.more .about-lines dt { color: var(--ink); font-weight: 650; }
.about-lines dd { color: var(--muted); font-size: 15px; }
.about p.fine { margin: 16px 0 0; }
.prizes { width: 100%; border-collapse: collapse; margin: 0 0 6px; font-size: 15px; }
.prizes th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; border-bottom: 1px solid var(--line); }
.prizes td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.prizes th:nth-child(2), .prizes th:last-child, .prizes td:nth-child(2), .prizes td:last-child { text-align: right; }
.prizes td:last-child { font-weight: 650; font-variant-numeric: tabular-nums; }
.prizes td.odds-cell { color: var(--muted); font-size: 13.5px; padding-right: 12px; }
#about-prizes { margin-bottom: 16px; }

.last-draw { display: grid; gap: 10px; justify-items: center; padding-top: 4px; }

/* Buttons */
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 14px; padding: 12px 20px; font-weight: 650; margin-top: 8px; }
.primary.wide { width: 100%; padding: 15px; font-size: 17px; margin: 0; }
.primary:disabled { opacity: .5; }
.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; font-weight: 650; }
.secondary.wide { width: 100%; }
.danger { background: none; border: 0; color: var(--danger); font-weight: 600; padding: 6px 0; }

/* Past results */
.summary { display: grid; gap: 14px; text-align: center; }
.sum-title { font-weight: 650; }
.sum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 620px) { .sum-grid { grid-template-columns: repeat(4, 1fr); } }
.sum-grid span { display: grid; color: var(--muted); font-size: 13.5px; line-height: 1.3; }
.sum-grid strong { color: var(--ink); font-size: 22px; }
.legend { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0; line-height: 2; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.results li { background: var(--surface); border-radius: 18px; }
.ball-row, .results li > button { width: 100%; background: none; border: 0; padding: 16px clamp(14px, 4vw, 22px); display: grid; gap: 12px; justify-items: center; text-align: center; }
.when { font-weight: 650; }
.when small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.row-line { display: grid; gap: 6px; justify-items: center; }
.row-label { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.res-right { display: flex; align-items: center; gap: 8px; }
.res-right .fb { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.outcome { color: var(--muted); font-size: 14.5px; }
.won { color: var(--ok); }
.detail { padding: 0 16px 14px; color: var(--muted); font-size: 14px; display: flex; justify-content: center; align-items: center; gap: 16px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; background: none !important; }

/* Add-result sheet */
dialog { border: 0; padding: 0; width: 100%; max-width: 560px; background: var(--surface); color: var(--ink); border-radius: 24px; }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog form { padding: 22px; display: grid; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.field.two { grid-template-columns: 1fr auto; align-items: end; }
.field label { display: grid; gap: 6px; }
.field-label { display: flex; gap: 8px; align-items: baseline; }
.opt { color: var(--muted); font-weight: 500; }
input[type="date"], .digit-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 48px; }
.digit-input { font-family: var(--digit-font); font-size: 26px; letter-spacing: .4em; font-weight: 700; }
.fb-input { width: 80px; text-align: center; letter-spacing: 0; }
.error { color: var(--danger); margin: 0; }
.ok { color: var(--ok); margin: 0; font-weight: 600; }
.error:empty, .ok:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .lines li.best .balls span, .digits.big span { animation: pop .35s cubic-bezier(.2, .8, .3, 1.2) both; }
  @keyframes pop { from { transform: scale(.75); opacity: 0; } }
}

.card, .facts, details.more, .summary { width: 100%; min-width: 0; }
.view > * { min-width: 0; }

/* ---------- Side-by-side layout on computers and tablets (no endless scrolling) ---------- */
.split { display: grid; gap: 20px; }
.col-main, .col-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.why.card { padding: 18px 20px; text-align: left; max-width: none; }
.last-draw.card { padding: 18px; }
@media (min-width: 900px) {
  .page { max-width: 1180px; padding-left: 32px; padding-right: 32px; }
  .top { grid-template-columns: auto 1fr auto; justify-items: stretch; align-items: center; text-align: left; gap: 24px; }
  .top .brand { justify-self: start; }
  .top .seg.games { justify-self: center; }
  .top .tabs { width: auto; min-width: 320px; border-bottom: 0; }
  .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .results-split { grid-template-columns: 340px minmax(0, 1fr); }
  .col-side { position: sticky; top: 24px; }
  .results-split .col-side { max-height: calc(100vh - 48px); overflow: auto; }
  .results-split .heading { text-align: left; justify-items: start; }
  .results-split .legend { text-align: left; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results .empty { grid-column: 1 / -1; }
  main { margin-top: 32px; }
}
@media (min-width: 1300px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } .page { max-width: 1320px; } .results-split { grid-template-columns: 360px minmax(0, 1fr); } }
/* Shorter result cards everywhere */
.ball-row, .results li > button { gap: 8px; padding: 14px 12px; }
.row-line { gap: 4px; }
.balls.small span { width: clamp(26px, 7.4vw, 32px); height: clamp(26px, 7.4vw, 32px); }
@media (min-width: 900px) { .results-split .sum-grid { grid-template-columns: repeat(2, 1fr); } }

/* Plain, stepwise reading order */
.step { margin: 0; font-weight: 700; font-size: 17px; color: var(--ink); }
.side-step { text-align: center; margin-bottom: -8px; }
@media (min-width: 900px) { .side-step { text-align: left; } }
.sub { margin: 0; color: var(--muted); font-size: 15px; }
.lines li.others-title { text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 700; color: var(--ink); padding-top: 18px; }
.line-label small, details.more dt small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
#clerk { text-align: left; background: var(--bg); border-radius: 14px; padding: 14px 16px; max-width: 520px; }
.hero .why#crowd-note, .hero #crowd-note { margin-top: -4px; }
.prizes td:first-child { padding-right: 10px; }

.lines li.why-item { display: block; border-top: 0; padding: 0 0 16px; color: var(--muted); font-size: 15px; max-width: 520px; justify-self: center; text-align: center; }
.lines li.why-item strong { color: var(--ink); }
.lines li.why-item + li.others-title { border-top: 1px solid var(--line); }
.fb-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ===================== Simple layout: left = what to play, right = how it went ===================== */
.top { margin-bottom: 4px; }
.board { display: grid; gap: 22px; margin-top: 24px; }
.play { display: grid; gap: 16px; align-content: start; min-width: 0; }
.history { min-width: 0; }
@media (min-width: 980px) {
  .page { max-width: 1280px; }
  .top { grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
  .top .seg.games { justify-self: end; max-width: 600px; }
  .board { grid-template-columns: 430px minmax(0, 1fr); gap: 32px; align-items: start; }
  .play { position: sticky; top: 24px; }
}

.kicker { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.play h1 { font-size: clamp(22px, 5.5vw, 28px); margin: 4px 0 0; }
.play .sub { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.play .card { padding: clamp(18px, 4vw, 26px); }
.session { margin-top: 12px; }
.session button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* Ticket: numbered lines */
.ticket { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.ticket li { display: grid; grid-template-columns: 26px auto 1fr; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ticket li.top { border-top: 0; padding: 4px 0 14px; grid-template-columns: 26px auto; grid-template-rows: auto auto; }
.ticket li.top .star { grid-column: 2; justify-self: start; }
.ticket .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg); }
.ticket li.top .num { background: var(--ok); color: #fff; }
.ticket .balls, .ticket .digits { justify-content: flex-start; }
.star { color: var(--ok); font-weight: 700; font-size: 13.5px; }
.digits.large span { width: clamp(52px, 14vw, 64px); height: clamp(52px, 14vw, 64px); font-size: clamp(26px, 7vw, 32px); }
.digits.medium span { width: 40px; height: 40px; font-size: 19px; border-width: 2.5px; }
.balls.large span { width: clamp(38px, 10.2vw, 52px); height: clamp(38px, 10.2vw, 52px); font-size: clamp(16px, 4.3vw, 21px); }
.balls.medium span { width: clamp(30px, 8.4vw, 40px); height: clamp(30px, 8.4vw, 40px); font-size: clamp(13px, 3.6vw, 16px); }
.note { margin: 14px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.note strong { color: var(--ink); }

/* Last drawing */
.last { display: grid; gap: 8px; }
.last-date { margin: 0; font-weight: 650; }
.pair { display: grid; grid-template-columns: 70px auto; align-items: center; gap: 10px; margin-top: 6px; }
.pair .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.pair .balls, .pair .digits { justify-content: flex-start; }

/* History table */
.hist-head { display: grid; gap: 6px; margin-bottom: 14px; }
.hist-head h2 { margin: 0; font-size: clamp(20px, 5vw, 24px); }
.totals { margin: 0; color: var(--muted); font-size: 15px; }
.totals strong { color: var(--ink); }
.down { color: var(--danger) !important; }
.won { color: var(--ok) !important; font-weight: 700; }
.hist { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 18px; overflow: hidden; }
.hist th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.hist td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hist tr:last-child td { border-bottom: 0; }
.hist td.d strong { display: block; font-size: 14.5px; white-space: nowrap; }
.hist td.d small, .hist td.r small { display: block; color: var(--muted); font-size: 12.5px; }
.hist .balls, .hist .digits { justify-content: flex-start; }
.hist .balls.small span { width: 28px; height: 28px; font-size: 12px; }
.hist .digits.small span { width: 30px; height: 30px; font-size: 14px; }
.hist .meh { color: var(--ink); font-size: 14px; }
.hist .none { color: var(--muted); font-size: 14px; }
.hist .empty { text-align: center; color: var(--muted); padding: 28px; }
.fb-tag { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 650; }
.history .digits { display: inline-flex; }
#more-results { margin-top: 14px; }
.key { margin-top: 12px; text-align: center; }
/* Phones: each table row becomes a compact block */
@media (max-width: 760px) {
  .hist thead { display: none; }
  .hist, .hist tbody, .hist tr, .hist td { display: block; width: 100%; }
  .hist tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .hist td { padding: 0; border: 0; }
  .hist td.d { grid-column: 1; }
  .hist td.r { grid-column: 2; grid-row: 1; text-align: right; }
  .hist td:nth-child(2), .hist td:nth-child(3) { grid-column: 1 / -1; }
  .hist td:nth-child(2)::before { content: "Winning"; display: inline-block; width: 64px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .hist td:nth-child(3)::before { content: "Yours"; display: inline-block; width: 64px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .hist td:nth-child(2) > span:first-of-type, .hist td:nth-child(3) > span { display: inline-flex; vertical-align: middle; }
}

/* Footer: secondary info */
.more-info { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 980px) { .more-info { grid-template-columns: 1fr 1fr; align-items: start; } }
.watch-list { margin: 10px 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; color: var(--muted); }
.watch-list strong { color: var(--ink); }
@media (min-width: 980px) {
  .ticket .balls.large span { width: 44px; height: 44px; font-size: 18px; }
  .ticket .balls.large { gap: 6px; }
  .ticket .balls.medium span { width: 36px; height: 36px; font-size: 14.5px; }
  .ticket .balls.medium { gap: 5px; }
}
.ticket li { min-width: 0; }

/* Play types (Pick 3 / Pick 4) */
.plays-title { margin-top: 18px; }
table.plays { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
table.plays th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.plays td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plays td small { display: block; color: var(--muted); font-size: 12px; }
.play-totals { display: grid; gap: 6px; margin-top: 8px; }
.play-totals span { display: block; }
.play-totals strong { display: inline-block; min-width: 108px; color: var(--ink); }
.hist-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hist-actions .primary { margin-top: 0; }
#paste-text { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); padding: 10px 12px; font: 14px/1.4 ui-monospace, monospace; color: var(--ink); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); font-size: 14.5px; }
.steps strong { color: var(--ink); }
.steps a { color: var(--gen); }

.fb-note { margin-top: 10px; }
.hypo { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.play-totals small { color: var(--muted); }
.hist td.r small.won { font-weight: 600; }

table.ptotals { width: 100%; border-collapse: collapse; margin: 8px 0 6px; font-size: 14px; }
table.ptotals th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.ptotals td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
table.ptotals td.muted { color: var(--muted); }
table.ptotals td.won, table.ptotals td.down { font-weight: 700; }
@media (max-width: 520px) { table.ptotals th:nth-child(6), table.ptotals td:nth-child(6) { display: none; } }
.credit a { color: var(--gen); }
.live-status { margin: 2px 0 4px; }

/* V3/V4 comparison: clearly labeled and readable at phone sizes. */
.formula-panel { margin: 14px 0; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.formula-heading { font-size: 13px; font-weight: 700; margin: 0 0 9px; }
.formula-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.formula-grid > div { display: grid; gap: 6px; padding: 10px; border: 2px solid var(--line); border-radius: 10px; min-width: 0; }
.formula-grid strong, .formula-history-cell strong { font-size: 11px; letter-spacing: .03em; }
.formula-v3 { border-style: dashed !important; }
.formula-v4 { border-style: solid !important; border-color: var(--ok) !important; }
.formula-number { font-family: var(--digit-font); font-size: clamp(20px, 4vw, 28px); font-weight: 800; font-variant-numeric: tabular-nums; }
.formula-panel .fine { margin: 9px 0 0; }
.formula-history-cell > div { display: grid; gap: 3px; margin: 3px 0 9px; padding-left: 7px; border-left: 3px dashed var(--muted); }
.formula-history-cell > div:nth-child(2) { border-left: 3px solid var(--ok); }
.formula-history-cell span { font-variant-numeric: tabular-nums; font-weight: 750; }
.formula-history-cell small { color: var(--muted); }
@media (max-width: 430px) { .formula-grid { grid-template-columns: 1fr; } }

/* Ball-game formula comparison: six numbers need a full row, not half a sidebar. */
.formula-panel .ball-formula-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}
.formula-panel .ball-formula-grid > div {
  min-width: 0;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  padding: 12px;
}
.formula-panel .ball-formula-grid strong {
  display: block;
  min-width: 0;
  line-height: 1.35;
  white-space: normal;
}
.formula-panel .ball-formula-grid .balls {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(4px, 1.2vw, 8px);
}
.formula-panel .ball-formula-grid .balls.small span {
  width: clamp(25px, 7vw, 34px);
  height: clamp(25px, 7vw, 34px);
  font-size: clamp(11px, 3vw, 14px);
  flex: 0 0 auto;
}
.formula-panel .ball-formula-grid .balls span.bonus { margin-left: clamp(2px, 1vw, 8px); }
@media (max-width: 380px) {
  .formula-panel .ball-formula-grid > div { padding: 9px; }
  .formula-panel .ball-formula-grid .balls { gap: 3px; }
  .formula-panel .ball-formula-grid .balls.small span { width: 25px; height: 25px; font-size: 11px; }
}

/* Pick 3/4: separate midday and evening comparisons, same Pick Room styling. */
.formula-session-score { padding: 12px 0; border-top: 1px solid var(--line); }
.formula-session-score:first-of-type { border-top: 0; }
.formula-session-score .formula-heading { margin: 0 0 10px; }
.session { display: flex; width: 100%; max-width: 100%; }
.session[hidden] { display: none; }
.session button { flex: 1 1 0; min-width: 0; font-size: 12px; white-space: normal; text-align: center; }
