@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #e8eaf2;
  --surface: #ffffff;
  --text: #10142e;
  --dim: #59617f;
  --border: #d2d6e3;
  --accent: #9a6f00;
  --gold: #f5b301;
  --gold-deep: #c78f00;
  --ink: #0b1026;
  --ink-soft: #161c3d;
  --ink-text: #f7f5ef;
  --ink-dim: #9aa3c7;
  --danger: #c62f35;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #070a1c;
    --surface: #12172e;
    --text: #f7f5ef;
    --dim: #8b93b8;
    --border: #262e52;
    --accent: #f5b301;
    --danger: #ff6b6f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Barlow", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: "Barlow Condensed", "Barlow", sans-serif; text-transform: uppercase; letter-spacing: .02em; }
h2 { font-size: 24px; margin: 0 0 8px; }
h3 { font-size: 19px; margin: 14px 0 6px; }
a { color: var(--accent); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* Header */
.site-header { background: var(--ink); color: var(--ink-text); padding: 22px 0 18px; }
.brand-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brand { color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.site-header h1 { margin: 2px 0 0; font-size: 42px; line-height: 1; }
.tagline { margin: 6px 0 0; color: var(--ink-dim); font-size: 17px; }
.site-link { color: var(--gold); font-weight: 600; text-decoration: none; white-space: nowrap; padding-top: 6px; }
.honest-line { border: 1px solid #2c3560; background: var(--ink-soft); border-radius: var(--radius); padding: 10px 14px; font-size: 14.5px; }
.jackpot-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.jackpot-cell { background: var(--ink-soft); border: 1px solid #2c3560; border-radius: var(--radius); padding: 10px 12px; }
.jackpot-cell .gname { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-dim); }
.jackpot-cell .gamount { font-family: "Barlow Condensed", sans-serif; font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1.05; }
.jackpot-cell .gnext { font-size: 13px; color: var(--ink-text); }
.jackpot-cell .gcash { font-size: 13px; color: var(--ink-dim); }
.jackpot-asof { color: var(--ink-dim); font-size: 13px; margin: 8px 0 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.card label { display: block; margin: 10px 0; font-weight: 600; }
.card input[type="text"], .card input[type="email"], .card input[type="tel"] {
  display: block; width: 100%; margin-top: 4px; padding: 10px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
}
.card label.check { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; }
.card label.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }

/* Buttons */
.btn {
  min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: 600 15px "Barlow", sans-serif; cursor: pointer;
}
.btn.gold { background: var(--gold); border-color: var(--gold-deep); color: #161200; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.notice { min-height: 1.2em; font-weight: 600; }
.notice:empty { min-height: 0; }

/* Game tabs */
.game-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 0; }
.game-tab {
  padding: 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font: 700 17px "Barlow Condensed", sans-serif; text-transform: uppercase; cursor: pointer; min-height: 48px;
}
.game-tab.active { border-color: var(--gold-deep); background: var(--ink); color: var(--gold); }
.game-tab .tab-sub { display: block; font: 500 12.5px "Barlow", sans-serif; text-transform: none; letter-spacing: 0; opacity: .85; }

/* Board */
.board-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.count-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.count-box { flex: 1 1 220px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; text-align: center; }
.big-count { font-family: "Barlow Condensed", sans-serif; font-size: 44px; font-weight: 700; line-height: 1; }
.gold-text { color: var(--gold-deep); }
@media (prefers-color-scheme: dark) { .gold-text { color: var(--gold); } }
.count-label { color: var(--dim); font-size: 13.5px; margin-top: 4px; }
.progress { height: 10px; background: var(--border); border-radius: 6px; overflow: hidden; margin: 12px 0 4px; }
.progress > div { height: 100%; background: var(--gold); width: 0%; transition: width .5s ease; }
.prev-draw { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.prev-draw .balls { margin-top: 6px; }

/* Mode tabs */
.mode-tabs { display: flex; gap: 8px; margin: 16px 0 0; }
.mode-tab { flex: 1; padding: 10px; border-radius: 12px 12px 0 0; border: 1px solid var(--border); border-bottom: none; background: transparent; color: var(--dim); font: 700 16px "Barlow Condensed", sans-serif; text-transform: uppercase; cursor: pointer; min-height: 44px; }
.mode-tab.active { background: var(--surface); color: var(--text); border-color: var(--gold-deep); }

/* Balls */
.ball-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ball {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--surface); color: var(--text); font: 700 16px "Barlow", sans-serif; cursor: pointer; padding: 0;
}
.ball.selected { background: var(--ink); color: var(--gold); border-color: var(--gold-deep); }
.ball-grid.bonus .ball.selected { background: var(--danger); color: #fff; border-color: var(--danger); }
.balls { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; }
.ballface {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; font-weight: 700; font-size: 15px;
  background: var(--ink); color: var(--ink-text); border: 2px solid var(--gold-deep);
}
.ballface.bonus { background: var(--danger); border-color: var(--danger); color: #fff; }
.ballface.win { outline: 3px solid var(--gold); }
.pick-summary { font-weight: 600; font-size: 17px; }

/* Play-all checklist */
.mega-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin: 10px 0; }
.mega-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; font-weight: 600; cursor: pointer; }
.mega-item input { width: 19px; height: 19px; }
.mega-item .cnt { margin-left: auto; color: var(--dim); font-size: 12.5px; font-weight: 500; }
.mega-item.mine { border-color: var(--gold-deep); background: color-mix(in srgb, var(--gold) 14%, transparent); }

/* Lists */
.set-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-row .who { color: var(--dim); font-size: 13.5px; }
.set-row .spacer { flex: 1; }
.tier { font-weight: 700; color: var(--gold-deep); }
@media (prefers-color-scheme: dark) { .tier { color: var(--gold); } }

/* Ticket inputs */
.ticket-inputs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.ticket-inputs input {
  width: 56px; height: 56px; text-align: center; font: 700 22px "Barlow", sans-serif;
  border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
}
.ticket-inputs input#ticket-bonus { border-color: var(--danger); }

/* Reveal */
.reveal-balls { display: flex; gap: 8px; margin: 12px 0; min-height: 48px; }
.reveal-balls .ballface { width: 48px; height: 48px; font-size: 19px; opacity: 0; transform: scale(.5); transition: all .35s ease; }
.reveal-balls .ballface.shown { opacity: 1; transform: scale(1); }

/* Footer */
.site-footer { background: var(--ink); color: var(--ink-text); margin-top: 28px; padding: 22px 0 30px; font-size: 14.5px; }
.site-footer .dim { color: var(--ink-dim); }
.steps li { margin: 6px 0; }
