@font-face { font-family: "GoodTimes"; src: url("/casino/virt-kironkeno/assets/goodtime.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #2a0204;
  --text: #2b0b0b;
  --muted: #6b4a4a;
  --wine: #6e0508;
  --wine-2: #b50d12;
  --accent: #ffd400;
  --accent-2: #fff27a;
  --orange: #ff9a00;
  --red: #e0201b;
  --red-2: #ff4038;
  --win: #18a32a;
  --danger: #e3402e;
  --header: #1c0103;
  --cyan: #ffd88a;
  --stage: #c80008;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  background: radial-gradient(ellipse at 50% 0%, #a30a10 0%, #5a0306 42%, 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: 34px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.brand .sub { background: var(--wine-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: #4a0306; 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: #3a0205; border: 1px solid #7a1015; 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: #6e0508; }
.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: #4a0306; 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 #8a1a1f; }
.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: #f5e8e8; }
.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: 64px; }
.pt-row span { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 10px; }
.stats-footer { padding: 10px 16px; border-top: 1px solid #8a1a1f; }
.stats-clear { background: #8a0a10; border: 0; color: #fff; padding: 8px 12px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.stats-row { padding: 8px 0; border-bottom: 1px solid #8a1a1f; 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: #111;
  font: 900 calc(var(--bs) * .44)/1 "Roboto Condensed", sans-serif;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.35);
}
.ball.b-top { background: radial-gradient(circle at 35% 28%, #fffbb0 0%, #f2e020 45%, #a89a00 100%); }
.ball.b-bot { background: radial-gradient(circle at 35% 28%, #ffe0a0 0%, #ffa21a 45%, #a85a00 100%); }
.ball.hit { box-shadow: 0 0 0 3px #29d13c, 0 0 10px 2px rgba(41,209,60,.8), inset 0 -3px 6px rgba(0,0,0,.3); }

/* ---------- 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: #fff1ef; 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: the provider's keno studio ---------- */

.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(--stage); overflow: hidden; font-size: clamp(8px, 1.3vw, 15px);
}
.scene {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, #8f0006 0%, #d1000a 30%, #e9000c 60%, #c40008 100%);
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; z-index: 4; }
.stage.shuffling video { display: block; }

.kb { position: absolute; left: 2.5%; top: 3%; bottom: 3%; width: 56%; display: flex; flex-direction: column; gap: 2%; }
.kb-head, .kb-foot { display: flex; align-items: center; justify-content: space-between; }
.kb-draw { font: 700 1.05em/1 "GoodTimes", "Roboto Condensed", sans-serif; letter-spacing: .06em; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.kb-draw b { color: var(--accent); font-weight: 700; }
.kb-tag {
  font: 700 .78em/1 "GoodTimes", "Roboto Condensed", sans-serif; letter-spacing: .06em; padding: .45em .8em; border-radius: .25em;
  background: rgba(0,0,0,.18); color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.15);
}
.kb-tag.h.on { background: linear-gradient(180deg, #fff86a, #f2d500); color: #3a2200; border-color: #fff8; box-shadow: 0 0 .8em rgba(255,230,0,.7); }
.kb-tag.t.on { background: linear-gradient(180deg, #ffc04a, #ff8a00); color: #3a1600; border-color: #fff8; box-shadow: 0 0 .8em rgba(255,150,0,.7); }
.kb-grid { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); grid-auto-rows: 1fr; gap: 1.6% 1.4%; min-height: 0; }
.kb-line { grid-column: 1 / -1; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,210,0,.7), transparent); align-self: center; margin: -.2em 0; }
.kc {
  display: flex; align-items: center; justify-content: center; border-radius: .3em;
  background: rgba(120,0,4,.35); color: rgba(60,0,0,.55); font: 700 1em/1 "GoodTimes", "Roboto Condensed", sans-serif;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: background .25s ease, transform .25s ease;
}
.kc.on { color: #111; box-shadow: 0 .25em .5em rgba(0,0,0,.45); }
.kc.on.top { background: linear-gradient(180deg, #fffa8a, #f5df00); }
.kc.on.bot { background: linear-gradient(180deg, #ffd060, #ff9800); }
.kc.pk { box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); color: #fff; }
.kc.on.pk { box-shadow: 0 0 0 2px #fff, 0 .25em .5em rgba(0,0,0,.45); color: #111; }
.kc.hit { background: linear-gradient(180deg, #7dff8a, #1fc435) !important; box-shadow: 0 0 0 2px #fff, 0 0 1em rgba(60,255,90,.8); }
.kc.last { animation: cellIn .5s ease; }
@keyframes cellIn { from { transform: scale(1.6); } to { transform: scale(1); } }
.kb-foot img { height: 2.2em; filter: drop-shadow(0 .2em .3em rgba(0,0,0,.45)); }

.capsule-wrap { position: absolute; right: -2%; top: 9%; height: 92%; aspect-ratio: 604 / 768; display: none; }
.capsule-wrap .capsule { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.cap-ball { position: absolute; left: 25%; top: 30%; width: 50%; aspect-ratio: 1; z-index: 1; }
.cap-ball img { width: 100%; height: 100%; display: block; }
.cap-ball img.drop { animation: ballDrop .7s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes ballDrop { from { transform: translateY(-160%) rotate(-40deg); } to { transform: translateY(0) rotate(0); } }
.draw-count { position: absolute; right: 2%; top: 3%; z-index: 3; font: 700 1.1em/1 "GoodTimes", "Roboto Condensed", sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.draw-count b { color: var(--accent); font-size: 1.4em; }

.pre-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 36%; display: flex; flex-direction: column; align-items: center; gap: 3%;
  padding: 3% 3%; background: linear-gradient(180deg, #8a0005, #4a0003); box-shadow: -.4em 0 1.2em rgba(0,0,0,.35);
}
.scene.live .pre-panel { display: none; }
.scene.live .capsule-wrap { display: block; }
.pp-msg { margin: auto; text-align: center; font-weight: 700; font-size: 1.1em; }
.pp-draw { font: 700 1.1em/1 "GoodTimes", "Roboto Condensed", sans-serif; letter-spacing: .06em; }
.pp-draw b { color: var(--accent); }
.pp-timer { font: 700 3.4em/1 "GoodTimes", "Roboto Condensed", sans-serif; color: var(--accent); text-shadow: 0 .06em 0 #a06a00; }
.pp-timer.urgent { color: #ffdf6a; animation: pulse 1s steps(1) infinite; }
.pp-pick { font: 700 1.9em/1 "GoodTimes", "Roboto Condensed", sans-serif; letter-spacing: .04em; margin-top: 2%; }
.pp-pick b { color: var(--accent); margin-left: .25em; }
.pp-pay { width: 80%; border-collapse: collapse; font: 700 .85em/1.35 "Roboto Condensed", sans-serif; }
.pp-pay th { color: var(--accent); text-align: left; font-size: .9em; padding-bottom: .2em; }
.pp-pay th:last-child, .pp-pay td:last-child { text-align: right; }

.sound-btn {
  position: absolute; right: 2%; bottom: 3%; z-index: 6; width: 2.4em; height: 2.4em; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: .4em;
}
.sound-btn svg { width: 100%; height: 100%; fill: var(--accent); }
.live-badge {
  position: absolute; top: 4%; left: 50%; transform: translateX(-50%); z-index: 5; display: none;
  background: var(--accent); color: #300; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 2px; animation: pulse 1.4s ease-in-out infinite;
}
.stage.shuffling .live-badge { display: block; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- result overlay ---------- */

.fulltime {
  position: absolute; inset: 0; z-index: 8; display: none; flex-direction: column; align-items: center;
  justify-content: center; background: rgba(40,0,2,.86); 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(700px, 100%); }
.ft-no { font-size: 13px; font-weight: 800; opacity: .85; letter-spacing: 1px; }
.ft-balls { display: grid; grid-template-columns: repeat(10, auto); gap: clamp(3px, .8vw, 8px); }
.ft-balls .ball { --bs: clamp(24px, 3.4vw, 40px); }
.ft-ball { animation: popIn .45s ease both; }
@keyframes popIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.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; }
.ft-lines span.on { background: var(--accent); color: #300; }
.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, heads / tails, pay table) ---------- */

.bet-board {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; padding: 12px;
  background: #fff8f6; color: var(--text);
}
.pick-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.next-draw {
  display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff; border-radius: 2px;
  padding: 4px 10px; font-size: 13px; font-weight: 700;
}
.next-draw b { color: var(--accent); font: 900 16px/1 "Roboto Condensed", sans-serif; letter-spacing: .5px; }
.next-draw.urgent b { animation: pulse 1s steps(1) infinite; }
.qp { display: inline-flex; align-items: center; gap: 6px; background: var(--win); color: #fff; border-radius: 2px; padding: 3px 8px; font-size: 13px; font-weight: 700; }
.qp select { height: 24px; border: 0; border-radius: 2px; padding: 0 2px; font-weight: 700; }
.qp-btn { border: 0; background: transparent; color: #fff; font-size: 18px; font-weight: 900; cursor: pointer; line-height: 1; padding: 0 2px; }
.pick-info { font-size: 12px; font-weight: 700; color: var(--muted); flex: 1; }
.clear-btn { border: 0; background: #f08a84; color: #fff; border-radius: 2px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.qp-btn:disabled, .clear-btn:disabled, .qp select:disabled { opacity: .5; cursor: default; }
.num-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px 6px; justify-items: center; }
.num {
  width: clamp(28px, 3.4vw, 42px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #d65a1e, #a83a08 70%); color: #fff;
  font: 700 clamp(11px, 1.3vw, 15px)/1 "Roboto", sans-serif; box-shadow: 0 2px 3px rgba(0,0,0,.25);
  transition: transform .12s ease, background .15s ease;
}
.num:nth-child(n+41) { background: radial-gradient(circle at 35% 30%, #c44a12, #8f2c04 70%); }
.num:not(:disabled):hover { transform: scale(1.08); }
.num.picked, .num.picked:nth-child(n+41) { background: radial-gradient(circle at 35% 30%, #2bc43a, #0b7a18 70%); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #18a32a; }
.num:disabled { cursor: default; }

.side-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ht-grid { display: flex; flex-direction: column; gap: 6px; }
.ht-btn {
  display: flex; align-items: center; justify-content: space-between; border: 2px solid transparent; border-radius: 3px;
  padding: 4px 4px 4px 10px; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 2px 3px rgba(0,0,0,.2);
}
.ht-btn.ht-h { background: #b83c08; }
.ht-btn.ht-e { background: #f07a74; }
.ht-btn.ht-t { background: #d9600e; }
.ht-btn .od { background: #fff79a; color: #111; min-width: 54px; text-align: center; border-radius: 2px; font: 700 15px/1.6 "Roboto Condensed", sans-serif; border: 1px solid #c9b800; }
.ht-btn.selected { border-color: #111; box-shadow: 0 0 0 2px var(--accent); }
.ht-btn:disabled { cursor: default; }
.pay-box { background: #e9f7ea; border-radius: 3px; overflow: hidden; }
.pb-head { background: var(--win); color: #fff; font-size: 13px; font-weight: 700; padding: 7px 10px; }
.pb-hint { font-size: 12px; color: var(--muted); padding: 8px 10px; }
.pb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pb-table th { text-align: left; padding: 5px 10px; color: var(--muted); font-size: 11px; }
.pb-table td { padding: 4px 10px; border-top: 1px solid #cfe8d1; font-weight: 700; }
.pb-table th:last-child, .pb-table td:last-child { text-align: right; }

.panel-head {
  min-height: 44px; background: linear-gradient(90deg, var(--wine), var(--wine-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: #2a0000; 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 #eadcdc; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.md-item .right { text-align: right; color: var(--wine-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: #3a0205; 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: #2a0000;
  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 #dbb; border-bottom: 2px solid #dbb; 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: #e6b9b9; }
.stake-row input { width: 72px; text-align: center; background: #1f0102; border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 4px; padding: 6px; }
.stake-row button { width: 28px; height: 28px; background: #7a0a10; 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: #5a0408; border: 1px solid transparent; border-radius: 999px; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.chips button.active { background: #8a0a10; 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: #520307; 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: #e6b9b9; 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: #1f0102; color: #fff; }
.slip-item .remove { float: right; border: 0; background: transparent; color: #e6b9b9; 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: #e6b9b9; margin-bottom: 6px; }
.lr-empty { font-size: 12px; color: var(--cyan); }
.lr-row { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12px; }
.lr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.lr-no { color: var(--accent); font-weight: 800; }
.lr-ht { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.12); }
.lr-ht.ht-h { background: #f2d500; color: #3a2200; }
.lr-ht.ht-t { background: #ff8a00; color: #3a1600; }
.lr-nums { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.lr-nums span { text-align: center; border-radius: 3px; font: 700 10px/16px "Roboto Condensed", sans-serif; color: #111; }
.lr-nums .b-top { background: #f5df00; }
.lr-nums .b-bot { background: #ff9a1a; }

.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; }
  .ht-grid { flex-direction: row; }
  .ht-btn { flex: 1; }
}
@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: 28px; }
  .brand .sub, .clock, .help-btn { display: none; }
  .day-bar { font-size: 14px; flex-direction: column; gap: 0; height: auto; padding: 6px; }
  .bet-board { padding: 6px; gap: 8px; }
  .num-grid { gap: 5px 3px; }
  .ht-grid { flex-direction: column; }
  .fulltime h2 { font-size: 20px; }
}
