:root {
  --bg: #050c3a;
  --text: #0b1f3f;
  --muted: #4a5878;
  --navy: #0d1f8a;
  --navy-2: #1b3fd6;
  --accent: #ffd400;
  --accent-2: #fff27a;
  --red: #e0201b;
  --red-2: #ff4038;
  --win: #00b862;
  --danger: #e3402e;
  --header: #030832;
  --cyan: #7fd8ff;
  --board: #1418e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  background: radial-gradient(ellipse at 50% 0%, #2a3dd8 0%, #0f1a7a 40%, var(--bg) 100%) fixed;
  font-family: "Roboto", "Segoe UI", sans-serif;
  color: #fff;
  overflow: hidden;
  user-select: none;
}

#app { display: flex; flex-direction: column; height: 100%; max-width: 1280px; margin: 0 auto; position: relative; }

/* ---------- top bar ---------- */

.topbar {
  height: 64px; background: var(--header); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; flex-shrink: 0; position: relative; z-index: 100; border-bottom: 3px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.logo { height: 52px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.brand .sub { background: var(--navy-2); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 3px; letter-spacing: 1px; }
.top-right { display: flex; align-items: center; gap: 14px; font-weight: 700; position: relative; z-index: 110; }
.clock { font-size: 12px; opacity: .9; }
.balance { font-size: 14px; letter-spacing: .2px; color: var(--accent); }
.exit-btn {
  border: 0; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  padding: 8px 14px; border-radius: 2px; cursor: pointer; text-transform: uppercase;
}
.exit-btn:hover { background: var(--red-2); }
.help-btn {
  width: 34px; height: 34px; padding: 0; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
}
.help-btn img { width: 26px; height: 26px; display: block; filter: brightness(0) invert(1); opacity: .85; }
.help-btn:hover img { opacity: 1; }

.lang-switch { position: relative; z-index: 120; }
.lang-btn { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 0; border-radius: 6px; background: #121a5a; color: #fff; cursor: pointer; }
.lang-btn img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; }
.lang-btn #lang-code { font-size: 12px; font-weight: 700; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); max-height: 280px; overflow: auto; min-width: 180px;
  background: #0f1650; border: 1px solid #2a3590; border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.45); z-index: 130;
}
.lang-menu.hide { display: none; }
.lang-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; text-align: left; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 12px; }
.lang-item:hover, .lang-item.on { background: #1c2a80; }
.lang-item img { width: 22px; height: 16px; object-fit: cover; }

/* ---------- modals ---------- */

.help-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.7); padding: 16px; }
.help-modal.hide { display: none; }
.help-modal-card {
  width: min(760px, 100%); max-height: min(86vh, 780px); display: flex; flex-direction: column;
  background: #101a6a; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.55); overflow: hidden; color: #fff;
}
.help-modal-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 14px; border-bottom: 1px solid #2c3aa0; }
.help-modal-head h2 { margin: 0; font-size: 16px; }
.help-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 22px; width: 32px; height: 32px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.help-modal-body { padding: 14px 16px; overflow: auto; flex: 1; font-size: 14px; line-height: 1.45; color: #e8eef5; }
.help-modal-body p { margin: 0 0 12px; }
.pay-table { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.pt-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: rgba(0,0,0,.25); padding: 6px 8px; border-radius: 6px; }
.pt-row em { font-style: normal; font-weight: 800; color: var(--accent); min-width: 56px; }
.pt-row span { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 10px; }
.stats-footer { padding: 10px 16px; border-top: 1px solid #2c3aa0; }
.stats-clear { background: #22339a; border: 0; color: #fff; padding: 8px 12px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.stats-row { padding: 8px 0; border-bottom: 1px solid #2c3aa0; font-size: 13px; }
.stats-row .sub { opacity: .75; font-size: 12px; margin-top: 2px; }

/* ---------- balls ---------- */

.ball {
  --bs: 30px;
  width: var(--bs); height: var(--bs); border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  font: 900 calc(var(--bs) * .48)/1 "Roboto", sans-serif; text-shadow: 0 1px 2px rgba(0,0,0,.45);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.35);
}
.ball.c-green { background: radial-gradient(circle at 35% 28%, #8dff8a 0%, #1fbf2a 42%, #0b6a14 100%); }
.ball.c-yellow { background: radial-gradient(circle at 35% 28%, #fff7a8 0%, #e9c90c 45%, #8a7200 100%); color: #1b1b1b; text-shadow: none; }
.ball.c-blue { background: radial-gradient(circle at 35% 28%, #7fb4ff 0%, #1f5fc8 45%, #0a2a6e 100%); }
.ball.c-red { background: radial-gradient(circle at 35% 28%, #ff8e85 0%, #d8231a 45%, #7a0a06 100%); }
.ball.xs { --bs: 20px; }
.ball.sm { --bs: 26px; }
.ball.lg { --bs: clamp(38px, 6vw, 62px); }
.ball.bonus-hit { box-shadow: 0 0 0 2px #fff27a, 0 0 10px 2px rgba(255,214,0,.8), inset 0 -3px 6px rgba(0,0,0,.35); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; box-shadow: inset 0 -2px 3px rgba(0,0,0,.35); }
.dot.c-green { background: #1fbf2a; }
.dot.c-yellow { background: #e9c90c; }
.dot.c-blue { background: #1f5fc8; }
.dot.c-red { background: #d8231a; }

/* ---------- layout ---------- */

.layout {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-template-areas: "main slip";
  align-items: start; gap: 10px; min-height: 0; padding: 12px; overflow: auto;
}
.main-col { grid-area: main; display: flex; flex-direction: column; min-width: 0; background: rgba(0,0,0,.25); border-radius: 6px; overflow: hidden; }

.day-bar {
  height: 46px; background: #eef1ff; color: var(--text); display: flex; align-items: center; justify-content: center;
  gap: 16px; font-size: 17px; font-weight: 700; flex-shrink: 0; padding: 0 10px; text-align: center;
}
.day-bar .phase-hint { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .3px; }

/* ---------- stage ---------- */

.stage {
  position: relative; flex: 0 0 auto; aspect-ratio: 16 / 9; width: 100%; max-height: 52vh; max-width: calc(52vh * 16 / 9);
  margin: 0 auto; background: var(--board); overflow: hidden;
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: none; z-index: 2; }
.stage.playing video { display: block; }

.live-badge {
  position: absolute; bottom: 3%; right: 2%; z-index: 5; display: none;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 2px; animation: pulse 1.4s ease-in-out infinite;
}
.stage.playing .live-badge { display: block; }
@keyframes pulse { 50% { opacity: .55; } }

/* pre-draw board, modelled on the provider's studio screen */
.board {
  position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: 30% 1fr 20%; gap: 2%;
  padding: 2.4% 2.6%; background: radial-gradient(ellipse at 30% 40%, #2a33ff 0%, var(--board) 55%, #0b10b0 100%);
  font-size: clamp(9px, 1.35vw, 16px);
}
.stage.playing .board { display: none; }
.board-loading { grid-column: 1 / -1; align-self: center; text-align: center; font-size: 18px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hb-left { display: flex; flex-direction: column; align-items: center; gap: 6%; min-width: 0; }
.hb-logo { width: 92%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.hb-jackpot {
  width: 92%; background: linear-gradient(180deg, #fff35a, #ffd000); color: #111; border-radius: .4em; text-align: center;
  padding: .5em .4em; box-shadow: 0 0 0 .2em #fff8, 0 .4em 1em rgba(0,0,0,.4); display: flex; flex-direction: column;
}
.hb-jackpot small { font-weight: 800; font-size: .8em; }
.hb-jackpot b { font: 900 2em/1.05 "Roboto Condensed", sans-serif; }
.hb-jackpot em { font-style: normal; font-weight: 700; font-size: .58em; }
.hb-mid { display: flex; flex-direction: column; gap: 3%; min-width: 0; }
.hb-title {
  border: .15em solid rgba(255,255,255,.75); border-radius: .5em; background: rgba(0,0,40,.35); text-align: center;
  font-weight: 900; letter-spacing: .03em; padding: .45em .3em; text-shadow: 0 1px 2px #000;
}
.hb-rows { display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.hb-row { display: flex; align-items: center; gap: 3.2%; border-bottom: 1px solid rgba(255,255,255,.12); padding: .18em 0; }
.hb-row .no { width: 2.4em; font-size: .75em; opacity: .85; font-weight: 700; }
.hb-row .ball { --bs: 2.1em; }
.hb-right { display: flex; flex-direction: column; gap: 4%; min-width: 0; }
.hb-draw { display: flex; align-items: center; gap: .4em; }
.hb-draw small { font-size: .7em; font-weight: 800; line-height: 1.1; text-align: center; }
.hb-draw b { font: 900 2.1em/1 "Roboto Condensed", sans-serif; color: var(--accent); letter-spacing: .04em; }
.hb-draw b.urgent { color: #ff5a5a; animation: pulse 1s steps(1) infinite; }
.hb-sum { font: 900 1.6em/1 "Roboto Condensed", sans-serif; }
.hb-sum small { font-size: .45em; margin-right: .3em; vertical-align: middle; opacity: .85; }
.hb-tags { display: flex; gap: 3%; }
.hb-tags span {
  flex: 1; text-align: center; font-size: .62em; font-weight: 800; padding: .35em .1em; border-radius: .4em;
  border: 1px solid rgba(255,255,255,.6); line-height: 1.1;
}
.hb-tags span.on { background: var(--accent); color: #111; border-color: var(--accent); }
.hb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .25em .6em; font-size: .85em; }
.hb-col { display: flex; align-items: center; gap: .4em; }
.hb-col .dot { width: .9em; height: .9em; }
.hb-bonus { display: flex; align-items: center; gap: .5em; font-weight: 800; }
.hb-bonus small { font-size: .7em; }
.hb-bonus .ball { --bs: 2em; }

/* ---------- result overlay ---------- */

.fulltime {
  position: absolute; inset: 0; z-index: 8; display: none; flex-direction: column; align-items: center;
  justify-content: center; background: rgba(4,8,60,.82); backdrop-filter: blur(4px); gap: 10px; padding: 12px;
}
.fulltime.show { display: flex; }
.fulltime.won { background: radial-gradient(ellipse at center, rgba(150,110,10,.92), rgba(30,18,2,.94)); }
.fulltime h2 { color: #fff; font-size: 26px; font-weight: 900; letter-spacing: 3px; font-style: italic; text-shadow: 0 2px 0 #b38b00, 0 6px 14px rgba(255,212,0,.45); }
.ft-body { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(680px, 100%); }
.ft-no { font-size: 13px; font-weight: 800; opacity: .85; letter-spacing: 1px; }
.ft-balls { display: flex; align-items: center; gap: clamp(4px, 1vw, 12px); }
.ft-ball { animation: popIn .45s ease both; }
@keyframes popIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.ft-bonus { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-left: clamp(6px, 2vw, 24px); padding-left: clamp(6px, 2vw, 24px); border-left: 2px solid rgba(255,255,255,.3); }
.ft-bonus small { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--accent); }
.ft-lines { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 12px; }
.ft-lines span { background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 10px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.ft-bets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ft-bets .tag { font-size: 12px; padding: 3px 10px; border-radius: 10px; white-space: nowrap; font-weight: 700; }
.ft-bets .tag.won { background: var(--win); }
.ft-bets .tag.lost { background: var(--danger); }
.ft-total { font-size: 18px; font-weight: 900; padding: 4px 16px; border-radius: 4px; }
.ft-total.won { background: var(--win); }
.ft-total.lost { background: rgba(227,64,46,.85); }

/* ---------- bet board (numbers, colours, sum) ---------- */

.bet-board {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 12px; padding: 12px;
  background: radial-gradient(ellipse at 20% 0%, #1b2ad0 0%, #0c158a 55%, #060b4a 100%);
}
.pick-panel { background: rgba(10,20,140,.55); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.next-draw {
  display: inline-flex; align-items: center; gap: 8px; border: 2px solid #fff; background: var(--red); border-radius: 4px;
  padding: 2px 10px; font-size: 12px; font-weight: 800;
}
.next-draw b { color: var(--accent); font: 900 17px/1 "Roboto Condensed", sans-serif; letter-spacing: .5px; }
.next-draw.urgent b { animation: pulse 1s steps(1) infinite; }
.pick-info { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.num-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; background: rgba(0,0,60,.35); border-radius: 6px; padding: 10px; justify-items: center; }
.num { --bs: clamp(34px, 4vw, 50px); border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.num:not(:disabled):hover { transform: scale(1.08); }
.num.picked { box-shadow: 0 0 0 3px #fff, 0 0 14px 4px rgba(255,255,255,.75), inset 0 -3px 6px rgba(0,0,0,.35); transform: scale(1.06); }
.num:disabled { cursor: default; opacity: .8; }
.pp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(0,0,60,.45);
  border: 1px solid rgba(255,255,255,.18); border-radius: 22px; padding: 6px 14px; font-size: 14px;
}
.qp-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; border-right-color: transparent; background: transparent;
  color: #fff; font: 900 15px/1 "Roboto", sans-serif; cursor: pointer; transition: transform .3s ease;
}
.qp-btn:not(:disabled):hover { transform: rotate(-30deg); }
.clear-btn { border: 2px solid #fff; background: transparent; color: #fff; border-radius: 14px; padding: 4px 12px; font-weight: 800; font-size: 12px; cursor: pointer; }
.qp-btn:disabled, .clear-btn:disabled { opacity: .45; cursor: default; }
.pay-strip { display: none; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.pay-strip.show { display: flex; }
.pay-strip em { font-style: normal; font-weight: 800; color: var(--accent); }
.pay-strip span { background: rgba(255,255,255,.1); border-radius: 10px; padding: 2px 8px; }
.pay-strip b { color: var(--accent-2); }
.pay-strip .bn { background: var(--accent); color: #111; font-weight: 800; }

.side-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.colour-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 10px; }
.col-btn, .fc-btn {
  border: 2px solid transparent; border-radius: 4px; cursor: pointer; padding: 3px 4px 4px; display: flex; flex-direction: column;
  gap: 3px; color: #fff; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,.35); transition: transform .12s ease;
}
.col-btn.c-green, .fc-btn.c-green { background: #0fc61a; }
.col-btn.c-blue, .fc-btn.c-blue { background: #1a73e8; }
.col-btn.c-yellow, .fc-btn.c-yellow { background: #f5d90a; color: #222; }
.col-btn.c-red, .fc-btn.c-red { background: #ee2a1e; }
.col-btn .lv { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.col-btn .lv .dot, .fc-btn .dot { box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 -2px 3px rgba(0,0,0,.4); filter: brightness(.75); }
.col-btn .od, .fc-btn .od { background: #fff79a; color: #111; text-align: center; border-radius: 2px; font: 700 13px/1.5 "Roboto Condensed", sans-serif; border: 1px solid rgba(0,0,0,.25); }
.col-btn:not(:disabled):hover, .fc-btn:not(:disabled):hover { transform: translateY(-1px); }
.col-btn.selected, .fc-btn.selected, .sum-btn.selected { border-color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 12px 2px rgba(255,255,255,.7); }
.col-btn:disabled, .fc-btn:disabled, .sum-btn:disabled { cursor: default; }
.first-colour { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 8px; align-items: center; }
.fc-label { font-size: 11px; font-weight: 800; text-transform: uppercase; opacity: .9; }
.fc-btn { flex-direction: row; align-items: center; gap: 6px; padding: 3px 6px; }
.fc-btn .od { flex: 1; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.sum-btn {
  display: flex; align-items: stretch; border: 2px solid transparent; border-radius: 18px; background: #fff; overflow: hidden;
  cursor: pointer; color: #555; text-align: left; box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.sum-btn .lb { flex: 1; display: flex; flex-direction: column; padding: 2px 12px; font-size: 12px; font-weight: 500; line-height: 1.15; justify-content: center; }
.sum-btn .lb small { font-size: 9px; color: #888; }
.sum-btn .od { background: #fff36a; color: #111; font: 700 15px/1 "Roboto Condensed", sans-serif; display: flex; align-items: center; padding: 0 16px; border-radius: 18px; }

.panel-head {
  min-height: 44px; background: linear-gradient(90deg, var(--navy), var(--navy-2)); display: flex; align-items: center;
  padding: 0 14px; gap: 8px; font-size: 16px; font-weight: 500;
}
.panel-head .count {
  width: 21px; height: 21px; border-radius: 50%; background: var(--accent); color: #021526; font-size: 13px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.matchday-bets { margin-top: 8px; background: #fff; border-radius: 2px; overflow: hidden; }
.md-list { max-height: 140px; overflow: auto; color: var(--text); }
.md-item { padding: 10px 12px; border-top: 1px solid #dfe3ea; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.md-item .right { text-align: right; color: var(--navy-2); font-weight: 700; white-space: nowrap; }
.md-item.won .right { color: var(--win); }
.md-item.lost .right { color: var(--danger); }

/* ---------- order ticket ---------- */

.ticket {
  grid-area: slip; background: #0a1150; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  display: flex; flex-direction: column; align-self: start; overflow: hidden; color: #fff;
  transition: box-shadow .35s ease, border-color .35s ease;
}
.ticket.has-bets { border-color: rgba(255,212,0,.55); box-shadow: 0 0 0 1px rgba(255,212,0,.15); }
.ticket-toggle { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px; text-align: left; background: transparent; border: 0; cursor: pointer; color: inherit; }
.ticket-toggle:hover { background: rgba(255,255,255,.03); }
.ticket-toggle h2 { margin: 0; font-size: 14px; letter-spacing: .04em; flex: 1; font-weight: 700; }
.ticket-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #021526;
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.ticket-count.hide { display: none; }
.ticket-chevron { width: 10px; height: 10px; border-right: 2px solid #9ab; border-bottom: 2px solid #9ab; transform: rotate(45deg); transition: transform .35s ease; margin-top: -4px; flex-shrink: 0; }
.ticket:not(.is-collapsed) .ticket-chevron { transform: rotate(225deg); margin-top: 4px; }
.ticket-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.22,.61,.36,1); }
.ticket:not(.is-collapsed) .ticket-panel { grid-template-rows: 1fr; }
.ticket-panel-inner { overflow: hidden; min-height: 0; padding: 0 10px; opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .35s ease, padding .35s ease; }
.ticket:not(.is-collapsed) .ticket-panel-inner { padding: 0 10px 10px; opacity: 1; transform: translateY(0); }
.ticket-tools { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.linkish { background: none; border: 0; color: var(--cyan); font-size: 12px; cursor: pointer; padding: 0; }
.stake-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #a9b4e6; }
.stake-row input { width: 72px; text-align: center; background: #050a33; border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 4px; padding: 6px; }
.stake-row button { width: 28px; height: 28px; background: #1c2a8a; border: 0; border-radius: 4px; color: #fff; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips button { min-width: 44px; height: 32px; padding: 0 8px; background: #16207a; border: 1px solid transparent; border-radius: 999px; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.chips button.active { background: #1f2fa8; border-color: var(--accent); }
.slip-body { overflow: auto; min-height: 0; max-height: 0; transition: max-height .35s ease; position: relative; }
.ticket:not(.is-collapsed) .slip-body { max-height: 160px; min-height: 48px; }
.ticket.ticket--grow:not(.is-collapsed) .slip-body { max-height: 260px; }
.slip-empty { color: var(--cyan); font-size: 13px; padding: 12px 4px; }
.slip-item { background: #121c6a; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 8px; margin-bottom: 6px; font-size: 12px; position: relative; animation: slipIn .28s ease; }
@keyframes slipIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.slip-item .meta { font-size: 11px; color: #a9b4e6; margin-bottom: 4px; }
.slip-item .sel { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.slip-item .est { color: var(--accent-2); font-size: 11px; text-align: right; margin-top: 4px; }
.slip-item input { width: 78px; height: 32px; border: 1px solid rgba(255,255,255,.2); border-radius: 2px; text-align: right; padding: 0 6px; font-weight: 700; margin-top: 6px; background: #050a33; color: #fff; }
.slip-item .remove { float: right; border: 0; background: transparent; color: #a9b4e6; cursor: pointer; font-size: 16px; }
.ticket-totals { border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.ticket-totals strong { float: right; color: var(--accent-2); font-size: 15px; font-weight: 800; }
.submit-btn {
  width: 100%; margin-top: 10px; height: 48px; border: 0; border-radius: 6px;
  background: linear-gradient(180deg, #ffe44d, #f0b800); color: #111; font-size: 15px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.submit-btn:disabled { opacity: .5; cursor: default; }

.last-results { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.12); padding: 10px; }
.lr-head { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #a9b4e6; margin-bottom: 6px; }
.lr-empty { font-size: 12px; color: var(--cyan); }
.lr-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12px; }
.lr-no { color: var(--accent); font-weight: 800; min-width: 36px; }
.lr-balls { display: flex; gap: 3px; flex: 1; }
.lr-bonus { padding-left: 6px; border-left: 1px solid rgba(255,255,255,.2); }

.toast {
  position: fixed; top: 80px; right: 20px; background: rgba(255,255,255,.96); color: var(--text);
  padding: 12px 16px; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50;
  display: none; font-weight: 600; border-left: 4px solid var(--accent);
}
.toast.show { display: block; animation: slideIn .35s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .bet-board { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100%; }
  .layout { grid-template-columns: 1fr; grid-template-areas: "main" "slip"; overflow: visible; }
  .stage { max-height: none; max-width: none; }
}
@media (max-width: 720px) {
  .layout { padding: 6px; }
  .brand img.logo { height: 40px; }
  .brand .sub, .clock, .help-btn { display: none; }
  .day-bar { font-size: 14px; flex-direction: column; gap: 0; height: auto; padding: 6px; }
  .board { grid-template-columns: 26% 1fr 22%; padding: 2%; }
  .bet-board { padding: 6px; gap: 8px; }
  .num-grid { gap: 6px; padding: 6px; }
  .colour-grid { gap: 5px; }
  .col-btn .lv { font-size: 10px; }
  .col-btn .od, .fc-btn .od { font-size: 11px; }
  .first-colour { grid-template-columns: repeat(4, 1fr); }
  .fc-label { grid-column: 1 / -1; }
  .sum-grid { grid-template-columns: 1fr; }
  .fulltime h2 { font-size: 20px; }
}
