:root {
  --bg: #0b1530; --panel: #152347; --panel2: #1d2f5e; --line: #2b3f75;
  --text: #eef3ff; --muted: #9bb0dc; --go: #23c26b; --gold: #ffb52e; --danger: #e5484d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }   /* manipulation: no double-tap zoom */
/* A game, not a document: taps must not select text or open the copy / look-up menu. Typing still works in fields. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; }
input, textarea, select { -webkit-user-select: text; user-select: text; font-size: max(16px, 1em); }   /* 16px+: iOS zooms into smaller fields */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: #060c1f; color: var(--text); overscroll-behavior: none;
  font: 15px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h2, h3, h4, p, ul { margin: 0; }
h2 { font-size: 18px; margin: 18px 0 10px; }
h2 small { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 6px; }

#app {
  max-width: 560px; height: 100dvh; margin: 0 auto; background: var(--bg);
  display: flex; flex-direction: column;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; letter-spacing: .5px; font-style: italic; }
.brand span { color: var(--gold); }
.wallet { display: flex; gap: 6px; }
.pill { background: #0a1228; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 14px 18px; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; scroll-padding-bottom: 18px; }
#app { position: relative; }
/* pull-to-refresh: a spinner that follows the finger down from under the top bar */
.ptr { position: absolute; left: 0; right: 0; top: var(--top, 52px); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none;
  transform: translateY(calc(var(--d, 0px) - 48px)); opacity: min(1, calc(var(--d, 0px) / 50px)); transition: transform .2s, opacity .2s; }
.ptr i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); background: var(--panel); box-shadow: 0 3px 10px #0008; transform: rotate(calc(var(--d, 0px) * 4deg)); }
.ptr span { font-size: 12px; font-weight: 700; color: var(--muted); text-shadow: 0 1px 3px #000; }
.ptr.ready i { border-color: var(--go); border-top-color: var(--gold); }
.ptr.busy i { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.screen { display: none; }
.screen.active { display: block; }

.tabs { display: flex; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button {
  flex: 1; background: none; border: 0; color: var(--muted); font-size: 20px; padding: 8px 0 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabs button span { font-size: 11px; font-weight: 700; }
.tabs button.on { color: var(--text); box-shadow: inset 0 3px 0 var(--gold); }

.btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.go { background: var(--go); border-color: #1a9a53; color: #04240f; }
.btn.gold { background: var(--gold); border-color: #c98a13; color: #2e1d00; }
.btn.danger { background: var(--danger); border-color: #b32f34; }
.btn.on { background: #2f6bff; border-color: #6b97ff; color: #fff; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.wide { display: block; width: 100%; margin-top: 8px; padding: 11px 12px; white-space: normal; text-align: left; }
.btn.wide b { display: block; font-size: 15px; }
.btn.wide span { font-weight: 600; font-size: 12px; }
.btn.wide[data-close] { text-align: center; }

.grow { flex: 1; min-width: 0; }
.lead { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.form input { flex: 1; min-width: 0; background: #0a1228; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 16px; }
.pair { display: flex; gap: 8px; align-items: center; }
.pair.col { flex-direction: column; align-items: stretch; text-align: center; }
.pair .btn { flex: none; }
.form .pair .btn { flex: 1; padding: 11px; }
.form .pair input + .btn { flex: none; }
.msg { color: #ff8a8f; font-size: 13px; min-height: 18px; }
.form select { background: #0a1228; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 8px; font: inherit; font-size: 15px; }
.bracket { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.bracket b { color: var(--gold); }
.dot { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 900; text-align: center; }
.pid { font-family: ui-monospace, monospace; letter-spacing: 3px; color: var(--gold); }
.badge { background: var(--gold); color: #2e1d00; font-weight: 900; font-size: 11px; padding: 5px 9px; border-radius: 999px; }
a.btn { text-decoration: none; display: inline-block; }
.prog { height: 6px; margin: 5px 0; background: #0a1228; border-radius: 3px; overflow: hidden; }
.prog b { display: block; height: 100%; background: var(--gold); }

.hero {
  display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 14px;
  background: linear-gradient(135deg, #1c3a8a, #152347); border: 1px solid var(--line); border-radius: 14px;
}
.hero .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.hero .v { font-size: 20px; font-weight: 900; }

.stadium, .item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
}
.stadium { background: linear-gradient(120deg, color-mix(in srgb, var(--a) 55%, #0b1530), color-mix(in srgb, var(--b) 55%, #0b1530)); }
.stadium.cup { background: linear-gradient(120deg, #4a3608, #152347); border-color: #8a6a1c; }
.stadium h3, .item h3 { font-size: 16px; }
.stadium p, .item p { color: #d6e2ff; font-size: 12.5px; margin-top: 3px; }
.item p { color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 15px; margin-left: 4px; }

.row { display: flex; justify-content: space-between; align-items: center; }
.note { font-size: 12.5px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.note.ok { color: #8ff0b8; border-color: #1a9a53; border-style: solid; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pcard {
  background: var(--panel); border: 2px solid var(--r); border-radius: 14px; padding: 10px;
  display: flex; flex-direction: column; gap: 5px; text-align: center;
}
.pcard.locked .avatar, .pcard.locked .bar { opacity: .45; }
.p-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: var(--r); }
.avatar { width: 62px; height: 62px; margin: 2px auto; border-radius: 50%; border: 2px solid var(--r); overflow: hidden; }
.face { display: block; width: 100%; height: 100%; }
.kits { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.kits > * { scroll-snap-align: start; }
.kit {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 10px; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; font-size: 11.5px; font-weight: 700;
}
.kit.on { border-color: var(--gold); background: var(--panel2); }
/* a little shirt: body in the kit colour with a trim collar */
.kit i { width: 34px; height: 30px; background: var(--s); border-radius: 9px 9px 4px 4px; border-top: 6px solid var(--t); box-shadow: -7px 2px 0 -3px var(--s), 7px 2px 0 -3px var(--s); }
.pcard h4 { font-size: 14px; }
.role { color: var(--muted); font-size: 11.5px; }
.bar { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.bar span { width: 32px; text-align: left; }
.bar i { flex: 1; height: 6px; background: #0a1228; border-radius: 3px; overflow: hidden; }
.bar b { display: block; height: 100%; background: var(--r); }
.bar em { width: 18px; font-style: normal; color: var(--text); }
.skill { flex: 1; font-size: 11.5px; font-weight: 800; color: var(--gold); min-height: 44px; }
.skill small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
.pcard .btn { font-size: 11.5px; padding: 7px 6px; white-space: normal; }

#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #000c; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 13px; max-width: 90vw;
  transition: .2s; z-index: 50; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- modal: format picker and pack reveal ---------- */
.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; padding: 16px; z-index: 40; overscroll-behavior: contain; touch-action: pan-y; }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(400px, 100%); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet h2 { margin: 0 0 6px; font-size: 20px; }
.sheet p { color: var(--muted); font-size: 13px; }
.goals { list-style: none; padding: 0; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.goals li.done { color: var(--gold); }
.reveal { display: flex; gap: 10px; margin: 14px 0 6px; }
.flip { flex: 1; aspect-ratio: 2 / 3; position: relative; background: none; border: 0; padding: 0; cursor: pointer; perspective: 600px; font: inherit; color: var(--text); }
.flip span { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; transition: transform .45s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.flip .back { background: linear-gradient(135deg, #2f6bff, #152347); border: 2px solid #6b97ff; font-size: 36px; font-weight: 900; }
.flip .front { background: color-mix(in srgb, var(--r) 22%, #0b1530); border: 2px solid var(--r); transform: rotateY(180deg); padding: 4px; }
.flip.open .back { transform: rotateY(180deg); }
.flip.open .front { transform: rotateY(360deg); box-shadow: 0 0 18px color-mix(in srgb, var(--r) 60%, transparent); }
.flip em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--r); }
.flip .face { width: 46px; height: 46px; border-radius: 50%; }
.flip i { font-style: normal; font-size: 11.5px; font-weight: 700; text-align: center; }
.flip strong { font-size: 16px; color: var(--gold); }
.flip u { text-decoration: none; font-size: 10.5px; font-weight: 900; background: var(--go); color: #04240f; border-radius: 6px; padding: 1px 6px; }

/* ---------- match ---------- */
#match { position: fixed; inset: 0; background: #000; user-select: none; -webkit-user-select: none; }
#gl, #cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#cv { touch-action: none; }   /* transparent overlay: 2D effects and all touch input */
.state-tag { position: absolute; right: 8px; top: 240px; font: 700 10px ui-monospace, monospace; color: #fff; background: #000a; padding: 2px 7px; border-radius: 6px; pointer-events: none; z-index: 2; }
#quit { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; background: #000a; z-index: 2; }
.hud-top {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 50px; right: 50px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
}
.sb-row { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
.sb { background: #000a; border-radius: 12px; padding: 6px 14px; text-align: center; min-width: 170px; }
.portrait { flex: none; width: 58px; text-align: center; font-size: 10px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 2px #000; }
.portrait .face { width: 46px; height: 46px; margin: 0 auto 2px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 8px #0008; }
.portrait:empty { display: none; }
#sb-title { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--gold); }
#sb-score { font-size: 28px; font-weight: 900; line-height: 1.1; }
#sb-sub { font-size: 12px; color: #d6e2ff; }
#sb-pair { font-size: 11.5px; color: #b9c9ee; text-transform: capitalize; }
#sb-pair:empty { display: none; }
.overlog { display: flex; justify-content: center; gap: 5px; min-height: 26px; }
.prac-bar { display: flex; gap: 5px; pointer-events: auto; }
.prac-bar .btn { background: #000a; padding: 6px 9px; font-size: 11.5px; }
.prac-bar .btn.on { background: #2f6bff; }
.chip { min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; display: grid; place-items: center; background: #000a; font-weight: 800; font-size: 12px; }
.chip.c4 { background: #2f6bff; }
.chip.c6 { background: var(--gold); color: #2e1d00; }
.chip.cW { background: var(--danger); }
.chip.cWD, .chip.cNB { background: #6b7a8c; }

.callout { position: absolute; top: 36%; left: 0; right: 0; text-align: center; pointer-events: none; opacity: 0; animation: pop 1.5s forwards; text-shadow: 0 3px 0 #0008; }
.callout b { display: block; font-size: 46px; font-weight: 900; font-style: italic; }
.callout span { font-size: 16px; font-weight: 700; }
.callout.boundary b { color: var(--gold); }
.callout.out b { color: #ff6b6f; }
@keyframes pop {
  0% { opacity: 0; transform: scale(.6); }
  12% { opacity: 1; transform: scale(1.12); }
  22%, 80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
}
/* timing timeline: a slim vertical bar on the left edge so it never covers the ball.
   One colour code is shared by the bar, its legend, the result label and the per-ball history. */
.timing { position: absolute; left: 8px; top: 30%; width: 84px; pointer-events: none; --miss: #ff4d57; --early: #4aa3ff; --good: #ffd23f; --perfect: #2ee88a; --late: #ff8a3d; --c: #fff; }
.timing.miss { --c: var(--miss); } .timing.early { --c: var(--early); } .timing.good { --c: var(--good); }
.timing.perfect { --c: var(--perfect); } .timing.late { --c: var(--late); }
.t-label { min-height: 30px; font-size: 12px; line-height: 1.15; font-weight: 900; font-style: italic; color: var(--c); text-shadow: 0 0 10px var(--c), 0 1px 0 #000, 0 0 3px #000; margin-bottom: 5px; animation: pop-in .25s; }
.t-body { display: flex; gap: 5px; height: 200px; }
.t-track { position: relative; display: flex; flex-direction: column; width: 14px; border-radius: 999px; border: 2px solid #ffffffe6; box-shadow: 0 0 0 2px #0009, 0 4px 12px #000a; }
.t-legend { display: flex; flex-direction: column; font-size: 8px; font-weight: 900; letter-spacing: .3px; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.t-track i, .t-legend span { flex: 1.2; }
.t-track .miss, .t-legend .miss { flex: 1; }
.t-track .perfect, .t-legend .perfect { flex: 2; }
.t-legend span { display: flex; align-items: center; }
.t-track i { box-shadow: inset 3px 0 3px #fff5, inset -3px 0 4px #0004; }
.t-track i:first-child { border-radius: 999px 999px 0 0; } .t-track i:nth-child(7) { border-radius: 0 0 999px 999px; }
.t-track .miss { background: var(--miss); } .t-track .early { background: var(--early); } .t-track .good { background: var(--good); }
.t-track .perfect { background: var(--perfect); } .t-track .late { background: var(--late); }
.t-legend .miss { color: var(--miss); } .t-legend .early { color: var(--early); } .t-legend .good { color: var(--good); }
.t-legend .perfect { color: var(--perfect); } .t-legend .late { color: var(--late); }
/* the cursor slides down as the ball comes in; the diamond marks where you played the shot */
#timing-cursor { position: absolute; left: -6px; right: -6px; height: 4px; margin-top: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px 2px #fff, 0 0 0 1px #000; }
#timing-dot {
  position: absolute; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #fff; border: 3px solid var(--c);
  border-radius: 4px; transform: rotate(45deg); box-shadow: 0 0 12px 3px var(--c), 0 2px 4px #000; animation: drop .28s cubic-bezier(.2, 1.6, .4, 1);
}
.t-history { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 7px; }
.t-history i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 900; color: #06121f; border: 1.5px solid #000a; }
.t-history .miss { background: var(--miss); } .t-history .early { background: var(--early); } .t-history .good { background: var(--good); }
.t-history .perfect { background: var(--perfect); } .t-history .late { background: var(--late); }
@keyframes drop { from { transform: translateX(-22px) rotate(45deg) scale(2); opacity: 0; } }
@keyframes pop-in { from { transform: scale(1.5); opacity: 0; } }
.hint { font-size: 12px; background: #0008; padding: 3px 10px; border-radius: 999px; text-align: center; margin: 0 10px; }
.hint:empty { display: none; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: auto; width: min(350px, 94vw); }
.seg { display: flex; gap: 5px; width: 100%; }
.seg .btn { flex: 1; background: #000a; padding: 7px 4px; }
.seg .btn.on { background: #2f6bff; }
.meter { position: relative; width: 100%; height: 16px; border-radius: 8px; border: 2px solid #fff; background: linear-gradient(90deg, #e5484d, #ffb52e 35%, #ffb52e 65%, #e5484d); }
#meter-zone { position: absolute; top: 0; bottom: 0; background: var(--go); }
#meter-dot { position: absolute; top: -5px; width: 6px; height: 22px; margin-left: -3px; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px #000; }
#meter-label { position: absolute; right: 4px; top: -17px; font-size: 10.5px; font-weight: 900; color: var(--gold); text-shadow: 0 1px 0 #000; }
/* bar that moves the batter; the red tick is the ball's line */
.move { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 9.5px; font-weight: 900; letter-spacing: .4px; text-shadow: 0 1px 2px #000; --k: #ff5a5f; }
.move.ok { --k: #2ee88a; }
.move-track { position: relative; flex: 1; height: 44px; display: flex; align-items: center; }
.move-track::before { content: ''; position: absolute; left: 0; right: 0; height: 14px; border-radius: 999px; background: #000a; border: 2px solid #ffffffd9; }
#bat-line { position: absolute; top: 6px; bottom: 6px; width: 5px; margin-left: -2.5px; border-radius: 3px; background: #ff3b47; box-shadow: 0 0 8px 2px #ff3b47, 0 0 0 1px #000; pointer-events: none; z-index: 1; }
#bat-slider { position: relative; z-index: 2; width: 100%; height: 44px; margin: 0; background: none; -webkit-appearance: none; appearance: none; touch-action: none; cursor: grab; }
#bat-slider::-webkit-slider-runnable-track { height: 44px; background: none; }
#bat-slider::-moz-range-track { height: 44px; background: none; }
#bat-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 54px; height: 34px; margin-top: 5px; border-radius: 10px; border: 3px solid #fff; background: var(--k); box-shadow: 0 0 12px 2px var(--k), 0 3px 6px #000a; }
#bat-slider::-moz-range-thumb { width: 48px; height: 28px; border-radius: 10px; border: 3px solid #fff; background: var(--k); box-shadow: 0 0 12px 2px var(--k); }
#loft, #shot-mode { background: #000a; padding: 11px 6px; font-size: 12.5px; }
#loft.on { background: var(--gold); border-color: #c98a13; color: #2e1d00; }

.overlay { position: absolute; inset: 0; background: #000a; display: grid; place-items: center; padding: 20px; z-index: 3; }
.overlay .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-align: center; width: min(380px, 100%); max-height: 92dvh; overflow-y: auto; }
.overlay h2 { margin: 0 0 8px; font-size: 24px; }
.overlay .body { color: #d6e2ff; line-height: 1.6; }
.overlay .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.tips { text-align: left; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.tips li { margin-bottom: 8px; }
.tips b { color: var(--gold); }

/* ================= in-match HUD ================= */
.state-tag { right: auto; left: 8px; top: auto; bottom: 4px; }
.hud-quit { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 6px; z-index: 2; width: 26px; height: 24px; padding: 0; border-radius: 6px; border: 1px solid #fff5; background: #0009; color: #fff; font-weight: 900; font-size: 12px; cursor: pointer; }
.hud-top { top: calc(6px + env(safe-area-inset-top)); left: 0; right: 0; gap: 3px; }
.banner { display: flex; width: 214px; padding: 4px 20px 5px; color: #fff; background: linear-gradient(#2a7df0, #0f469f); clip-path: polygon(0 0, 100% 0, 93% 100%, 7% 100%); }
.banner div { flex: 1; text-align: center; }
.banner div + div { border-left: 1px solid #fff4; }
.banner span { display: block; font-size: 8.5px; font-weight: 800; letter-spacing: .6px; }
.banner b { display: block; font-size: 25px; font-weight: 900; line-height: 1.05; text-shadow: 0 2px 0 #0005; }
.names { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 2px; }
.who { position: relative; flex: 1; min-width: 0; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0 8px; color: #fff; font-weight: 800; font-size: 12.5px; background: linear-gradient(#2f86f5, #1257c9); box-shadow: 0 2px 0 #0004; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.left { border-radius: 0 7px 7px 0; }
.who.right { border-radius: 7px 0 0 7px; }
.who .portrait { position: absolute; top: -52px; width: 46px; height: auto; }
.who.left .portrait { left: 38px; }
.who.right .portrait { right: 12px; }
.portrait .face { width: 46px; height: 46px; margin: 0; border: 2px solid #fff; box-shadow: 0 2px 8px #0008; }
.overlog { flex: none; gap: 3px; min-height: 0; }
.chip { min-width: 21px; height: 21px; padding: 0 3px; border-radius: 11px; font-size: 11px; border: 1.5px solid #ffffffb3; background: #0006; }
.chip.empty { background: #0003; }
.caption { font-size: 10px; font-weight: 900; letter-spacing: .5px; color: var(--gold); background: #0009; padding: 2px 9px; border-radius: 999px; text-transform: none; }
.caption.plain { color: #fff; background: none; padding: 0 10px; font-weight: 700; font-size: 10.5px; text-align: center; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.caption:empty { display: none; }

/* symbol tiles down the right edge */
.side { position: absolute; right: 8px; top: 31%; display: flex; flex-direction: column; gap: 7px; pointer-events: auto; }
.side button, .side .tile { width: 46px; height: 46px; padding: 9px; border-radius: 11px; border: 2px solid #9cc4ff80; background: linear-gradient(#2f86f5, #1257c9); color: #fff; box-shadow: 0 3px 0 #0005; cursor: pointer; }
.side svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.side svg .solid { fill: currentColor; stroke: none; }
.side button.on { border-color: #b9ffd9; background: linear-gradient(#35d47f, #128a4b); box-shadow: 0 0 12px 2px #2ee88a99, 0 3px 0 #0005; }
.side .gap { height: 6px; }
.side.info { top: 24%; pointer-events: none; }
.side.info .speed { width: 40px; text-align: center; font: 900 15px system-ui, sans-serif; color: #fff; line-height: 1; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.side.info .speed small { display: block; font-size: 8px; font-weight: 800; letter-spacing: .3px; }
.side.info .tile { width: 40px; height: 40px; padding: 8px; background: #000a; border-color: #fff6; }

/* bowling */
#bowl-ctl { position: absolute; inset: 0; pointer-events: none; }
.vmeter { position: absolute; left: 12px; top: 36%; width: 18px; height: 210px; border-radius: 9px; border: 2px solid #fff; background: linear-gradient(#b3202a, #ffb52e 30%, #ffb52e 70%, #b3202a); box-shadow: 0 0 0 2px #0007; pointer-events: none; }
#meter-zone { position: absolute; left: 0; right: 0; top: auto; bottom: auto; background: var(--go); }
#meter-dot { position: absolute; left: -7px; right: -7px; top: 50%; width: auto; height: 5px; margin: -2.5px 0 0; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px #000; }
#meter-label { position: absolute; left: 26px; right: auto; top: -2px; white-space: nowrap; font-size: 10.5px; font-weight: 900; color: var(--gold); text-shadow: 0 1px 0 #000; }
.bowl { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 176px; padding: 12px 0; font: 900 23px system-ui, sans-serif; letter-spacing: 1px; color: #fff; background: linear-gradient(#2f86f5, #1257c9); border: 2px solid #9cc4ff; border-radius: 9px; box-shadow: 0 4px 0 #0a2f73, 0 6px 14px #0008; cursor: pointer; pointer-events: auto; }
.bowl:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 2px 0 #0a2f73; }

/* batting: a slim slider to walk the batter across the crease */
#bat-ctl { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(240px, 62vw); }
.move { gap: 6px; font-size: 11px; color: #fffc; }
.move-track { height: 40px; }
.move-track::before { height: 9px; background: #0008; border: 1.5px solid #ffffffb3; }
#bat-slider, #bat-slider::-webkit-slider-runnable-track, #bat-slider::-moz-range-track { height: 40px; }
#bat-slider::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: 3px; border-radius: 50%; border: 3px solid #fff; }
#bat-slider::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; }
#bat-line { top: 8px; bottom: 8px; }

.timing { top: 40%; }
.hint { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; white-space: nowrap; }
.seg-pick { display: flex; gap: 6px; margin-top: 8px; }
.seg-pick .btn { flex: 1; padding: 10px 4px; font-size: 12px; white-space: normal; }

/* the timing meter and the quality word appear once a shot has been played, as in a broadcast replay */
.timing { opacity: 0; transition: opacity .15s; width: 64px; }
.timing.perfect, .timing.good, .timing.early, .timing.late, .timing.miss { opacity: 1; }
.t-legend { justify-content: space-between; font-size: 8.5px; color: #fff; }
.t-legend span { flex: none; }
.t-label { font-size: 10.5px; min-height: 26px; }
.t-history { display: none; }
.quality { position: absolute; left: 0; right: 0; top: 46%; text-align: center; pointer-events: none; opacity: 0; animation: pop 1.1s forwards;
  font: italic 900 34px system-ui, sans-serif; letter-spacing: 1px; color: #ffe14a; text-shadow: 0 0 14px #ffb52e, 0 3px 0 #0009; }
.quality.perfect { color: #6dffb2; text-shadow: 0 0 16px #2ee88a, 0 3px 0 #0009; }
.quality.miss { color: #fff; font-size: 24px; text-shadow: 0 2px 0 #000a; }
.quality:empty { display: none; }
.callout { top: 30%; }

/* ================= the timing bar (same look for batting and bowling) ================= */
.tbar { position: relative; display: block; width: 24px; height: 250px; border-radius: 9px; border: 3px solid #2d5a1e; box-shadow: 0 0 0 1px #0006, 0 4px 12px #0008, inset 0 0 0 1px #ffffff26; background: #a82a2a; overflow: visible; }
.tbar b { position: absolute; left: -9px; right: -9px; width: auto; height: 5px; margin: -2.5px 0 0; border: 0; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px #0009, 0 0 8px #fff; transform: none; animation: none; }
.t-track.tbar { flex: none; }
.t-body { height: auto; align-items: stretch; }
.t-legend { flex-direction: column; justify-content: space-between; }
.bowl-meter { position: absolute; left: 14px; top: 34%; pointer-events: none; }
.bowl-meter #meter-label { position: absolute; left: 36px; top: -2px; white-space: nowrap; font-size: 10.5px; font-weight: 900; color: var(--gold); text-shadow: 0 1px 0 #000; }
.move.plain { --k: #3da5ff; }
/* the marker on either bar is a plain white line, as in the reference */
#timing-dot, #timing-cursor, #meter-dot { left: -9px; right: -9px; top: 50%; width: auto; height: 5px; margin: -2.5px 0 0; border: 0; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px #0009, 0 0 8px #fff; transform: none; }
#timing-dot { animation: none; }

/* a player's badge with supplied portrait artwork laid over it */
.face.photo { position: relative; display: block; border-radius: 50%; overflow: hidden; }
.face.photo svg { display: block; width: 100%; height: 100%; }
.face.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* create-a-player sheet */
.cp-top { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.avatar.big { width: 92px; height: 92px; margin: 0; flex: none; border-color: var(--gold); }
.cp-h { font-size: 14px; margin: 12px 0 6px; }
.cp-file { text-align: center; cursor: pointer; }

.overlay .acts .btn { white-space: normal; }
#bowl-ctl [data-type][hidden] { display: none; }

/* the ball in use, bottom right of the bowling screen; tap to switch */
.ball-btn { position: absolute; right: 8px; bottom: calc(96px + env(safe-area-inset-bottom)); width: 62px; padding: 6px 2px 4px; border-radius: 11px; border: 2px solid #9cc4ff80; background: linear-gradient(#2f86f5, #1257c9); color: #fff; font: 800 9.5px system-ui, sans-serif; text-align: center; box-shadow: 0 3px 0 #0005; cursor: pointer; pointer-events: auto; }
.ball-dot { display: block; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 34% 26%, #fffa 0, #fff0 36%), radial-gradient(circle at 42% 36%, #0000 52%, #0007 100%), var(--c); box-shadow: 0 3px 4px #0006; }
.ball-dot svg { display: block; width: 100%; height: 100%; }
.ball-btn .ball-dot { width: 36px; height: 36px; margin: 0 auto 4px; }
.ball-btn span { display: block; }
.ball-btn b { position: absolute; top: -8px; right: -5px; background: var(--go); color: #04240f; border-radius: 999px; padding: 1px 6px; font-size: 10.5px; }
.side { top: 27%; }

.fps { position: absolute; left: 6px; bottom: 4px; font: 700 10px ui-monospace, monospace; color: #fff; background: #0008; padding: 1px 6px; border-radius: 5px; pointer-events: none; z-index: 2; }
.fps:empty { display: none; }

/* darkened corners, drawn once by the browser instead of every frame */
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, #0000 45%, #00000057 100%); }

/* slimmer timing bars: a hairline frame and a hairline marker */
.tbar { width: 20px; border: 1px solid #ffffffcc; border-radius: 7px; box-shadow: 0 0 0 1px #0007, 0 4px 14px #0008, inset 0 0 6px #0003; overflow: visible; }
#timing-dot, #timing-cursor, #meter-dot { left: -7px; right: -7px; height: 2px; margin: -1px 0 0; border-radius: 1px; background: #fff; box-shadow: 0 0 6px 1px #fff, 0 0 0 .5px #0009; }
/* where the bar was stopped: the marker stays, coloured by the result, with the result and the ball's speed beside it */
.bowl-meter.locked #meter-dot, .timing.perfect #timing-dot, .timing.good #timing-dot, .timing.late #timing-dot, .timing.miss #timing-dot { height: 3px; margin-top: -1.5px; background: var(--c, #fff); box-shadow: 0 0 10px 2px var(--c, #fff), 0 0 0 .5px #000; }
.bowl-meter { --c: #fff; }
.bowl-meter.perfect { --c: #7ff5ea; } .bowl-meter.good { --c: #6dd13c; } .bowl-meter.late { --c: #f0bd3f; } .bowl-meter.miss { --c: #ff4d57; }
.bowl-meter.locked #meter-dot::after, .timing #timing-dot::after { content: ''; position: absolute; right: -9px; top: -4px; border: 5px solid transparent; border-right-color: var(--c, #fff); }
.m-speed { position: absolute; left: 34px; top: 42%; white-space: nowrap; font: 900 15px system-ui, sans-serif; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.m-speed b { display: block; font-size: 12px; font-style: italic; color: var(--c); letter-spacing: .4px; }
.m-speed:empty { display: none; }

/* ======================================================================================================
   Match HUD, laid out from the reference screenshots (gameplay_assets/, 1179 x 2556 px).
   1 --u is one pixel of those screenshots: the HUD is the same shape on every phone, and on a wide screen
   it keeps to a phone-shaped column. Positions from the top or bottom edge are the screenshots' own.
   ====================================================================================================== */
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-latin.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; }
#match {
  --u: calc(min(100vw, 46.13dvh) / 1179);
  --blue-hi: #2a8ff2; --blue: #0f67d5; --blue-lo: #0a55bb; --navy: #0a3d8a;
  font-family: 'Nunito', system-ui, sans-serif;
}
#match .vignette, #match .fps { display: none; }
.hud-top { position: absolute; inset: 0 0 auto 0; height: 0; display: block; pointer-events: none; }
.hud-top > * { position: absolute; }

/* the score tab: TOTAL RUNS | TARGET, fading in from the top; the numbers sit under it on the scene, split by a hairline */
.hud-top .banner {
  left: calc(50% - 297 * var(--u)); top: calc(120 * var(--u)); width: calc(614 * var(--u)); height: calc(128 * var(--u)); padding: 0;
  background: linear-gradient(#2a7de800, #2a80e866 38%, #1a6fd6 64%, #0c55b8); clip-path: polygon(0 0, 100% 0, 95.3% 100%, 4.7% 100%);
  border-radius: 0 0 calc(18 * var(--u)) calc(18 * var(--u));
}
.hud-top .banner span {
  position: absolute; top: calc(84 * var(--u)); width: 50%; text-align: center; color: #fff;
  font-size: calc(31 * var(--u)); font-weight: 900; letter-spacing: calc(.6 * var(--u)); line-height: 1;
}
.hud-top .banner span:first-child { left: 4%; } .hud-top .banner span + span { right: 4%; }
.hud-top .scores { left: calc(50% - 297 * var(--u)); top: calc(248 * var(--u)); width: calc(614 * var(--u)); height: calc(134 * var(--u)); }
.hud-top .scores::after { content: ''; position: absolute; left: calc(50% - 1.5 * var(--u)); top: 0; bottom: 0; width: calc(3 * var(--u)); background: linear-gradient(#ffffffd0, #ffffff10); }
.hud-top .scores b {
  position: absolute; top: calc(18 * var(--u)); width: 44%; text-align: center; color: #fff;
  font-size: calc(92 * var(--u)); font-weight: 900; line-height: 1; letter-spacing: calc(-1 * var(--u)); text-shadow: 0 calc(3 * var(--u)) calc(6 * var(--u)) #0007;
}
.hud-top .scores b:first-child { left: 3%; } .hud-top .scores b + b { right: 3%; }

/* the menu: three bars on a dark rounded square, over the left portrait */
#quit.hud-menu {
  position: absolute; left: calc(45 * var(--u)); top: calc(195 * var(--u)); z-index: 3; width: calc(67 * var(--u)); height: calc(67 * var(--u)); padding: 0;
  border: 0; border-radius: calc(14 * var(--u)); background: #161616e6; cursor: pointer;
}
.hud-menu i, .hud-menu::before, .hud-menu::after {
  content: ''; position: absolute; left: calc(12 * var(--u)); right: calc(12 * var(--u)); height: calc(9 * var(--u)); border-radius: calc(5 * var(--u)); background: #fff;
}
.hud-menu::before { top: calc(15 * var(--u)); } .hud-menu i { top: calc(29 * var(--u)); } .hud-menu::after { top: calc(43 * var(--u)); }

/* portraits: a photo in a white rim; the side whose turn it is wears a green ring */
.hud-top .portrait { top: calc(222 * var(--u)); width: calc(160 * var(--u)); height: calc(160 * var(--u)); padding: calc(8 * var(--u)); border-radius: 50%; font-size: 0; }
.hud-top .portrait.left { left: calc(108 * var(--u)); } .hud-top .portrait.right { right: calc(116 * var(--u)); }   /* each from its own edge, so a wider screen does not pull them apart */
.hud-top .portrait .face { display: block; width: 100%; height: 100%; margin: 0; border-radius: 50%; border: calc(4 * var(--u)) solid #fff; box-shadow: 0 calc(3 * var(--u)) calc(8 * var(--u)) #0006; overflow: hidden; }
.hud-top .portrait.turn { --p: 360deg; padding: calc(18 * var(--u)); background: conic-gradient(#41c91c 0 var(--p), #0c0c0c var(--p)); }
.hud-top .portrait.turn::before { content: ''; position: absolute; inset: calc(11 * var(--u)); border-radius: 50%; background: #000; }
.hud-top .portrait.turn .face { position: relative; border-width: calc(3 * var(--u)); box-shadow: none; }
/* wickets under the fielding side's portrait: red for each one that has fallen */
.hud-top .portrait .wk { position: absolute; left: 0; right: 0; bottom: calc(-6 * var(--u)); display: flex; justify-content: center; gap: calc(14 * var(--u)); }
.hud-top .portrait .wk i { width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%; background: #111; border: calc(3 * var(--u)) solid #000; }
.hud-top .portrait .wk i.out { background: #e3181b; }

/* name bars, out to the screen edges, with the inner end slanted */
.hud-top .who {
  top: calc(404 * var(--u)); width: calc(50% - 201.5 * var(--u)); height: calc(72 * var(--u));   /* from the screen edge to the over's rings, however wide the screen (388 at the reference's shape) */ padding: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(var(--blue-hi), var(--blue) 70%, var(--blue-lo)); box-shadow: 0 calc(5 * var(--u)) 0 var(--navy); color: #fff; font-size: calc(40 * var(--u)); font-weight: 800; line-height: 1;
}
.hud-top .who span { max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-top .who.left { left: calc(-20 * var(--u)); padding-left: calc(20 * var(--u)); border-radius: 0 calc(16 * var(--u)) calc(16 * var(--u)) 0; transform: skewX(-7deg); transform-origin: bottom left; }
.hud-top .who.right { right: calc(-20 * var(--u)); padding-right: calc(20 * var(--u)); border-radius: calc(16 * var(--u)) 0 0 calc(16 * var(--u)); transform: skewX(7deg); transform-origin: bottom right; }
.hud-top .who.left span { transform: skewX(7deg); } .hud-top .who.right span { transform: skewX(-7deg); }

/* this over: six rings that fill in ball by ball */
.hud-top .overlog { left: 50%; top: calc(413 * var(--u)); transform: translateX(-50%); display: flex; gap: calc(10 * var(--u)); }
.hud-top .chip {
  width: calc(58 * var(--u)); min-width: 0; height: calc(58 * var(--u)); padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: calc(4 * var(--u)) solid #fff; background: #0000003d; color: #fff; font-size: calc(36 * var(--u)); font-weight: 900; line-height: 1;
}
.hud-top .chip.empty { background: #00000030; }
.hud-top .chip.c0 { color: #ee1c24; font-size: calc(34 * var(--u)); }
.hud-top .chip.c4 { background: #0000003d; }
.hud-top .chip.c6 { background: #fff; color: #111; }
.hud-top .chip.cW { background: #e3181b; color: #fff; }
.hud-top .chip.cWD, .hud-top .chip.cNB { background: #ffffff40; font-size: calc(22 * var(--u)); }

/* lines of text that only practice and match status use: small, centred under the over */
/* (practice only, so kept low on the screen, clear of the radar and the bowler) */
.hud-top .captions { position: fixed; left: 50%; top: auto; bottom: calc(300 * var(--u)); width: calc(900 * var(--u)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); }
.hud-top .caption { font-size: calc(26 * var(--u)); padding: calc(3 * var(--u)) calc(16 * var(--u)); }
.hud-top .caption.plain { font-size: calc(26 * var(--u)); padding: 0; }
.hud-top .prac-bar { pointer-events: auto; gap: calc(10 * var(--u)); }
.hud-top .prac-bar .btn { font-size: calc(26 * var(--u)); padding: calc(10 * var(--u)) calc(16 * var(--u)); border-radius: calc(16 * var(--u)); }
#match:not(.practice) #sb-title, #match:not(.practice) #sb-pair { display: none; }

/* batting, top right: the bowler's portrait in a blue ring, his form, his name and his kind */
.bowler-badge { position: absolute; right: calc(29 * var(--u)); top: calc(507 * var(--u)); width: calc(320 * var(--u)); text-align: center; pointer-events: none; color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) #000c; }
.bowler-badge .face { display: block; width: calc(116 * var(--u)); height: calc(116 * var(--u)); margin: 0 auto calc(42 * var(--u)); border-radius: 50%; border: calc(8 * var(--u)) solid #1e8ff5; box-shadow: inset 0 0 0 calc(3 * var(--u)) #fff, 0 calc(2 * var(--u)) calc(6 * var(--u)) #0007; overflow: hidden; background: #fff; }
.bowler-badge .form { position: absolute; left: calc(262 * var(--u)); top: calc(30 * var(--u)); width: calc(40 * var(--u)); height: calc(44 * var(--u)); }
.bowler-badge b { display: block; font-size: calc(37 * var(--u)); font-weight: 800; line-height: calc(54 * var(--u)); }
.bowler-badge span { display: block; font-size: calc(36 * var(--u)); font-weight: 700; line-height: calc(54 * var(--u)); white-space: nowrap; }
.bowler-badge .tile, .bowler-badge .speed { display: inline-block; vertical-align: middle; margin: calc(10 * var(--u)) calc(6 * var(--u)) 0; }
.bowler-badge .tile { width: calc(80 * var(--u)); height: calc(80 * var(--u)); padding: calc(14 * var(--u)); border-radius: calc(16 * var(--u)); background: #000a; }
.bowler-badge .tile svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bowler-badge .tile svg .solid { fill: #fff; stroke: none; }
.bowler-badge .speed { font-size: calc(36 * var(--u)); font-weight: 900; }
.bowler-badge .speed small { display: block; font-size: calc(20 * var(--u)); }

/* batting, bottom: a dark rounded track, and a glassy knob with arrows that walks the batter across */
/* The slider is sized by the screen's width (with a floor and a ceiling), not its height like the rest of the HUD: in a
   browser with its toolbars showing, the height-based unit made it a sliver too small to drag. Proportions as in the reference:
   52% of the width, centred, just above the home indicator. */
#bat-ctl { --s: calc(clamp(330px, 100vw, 560px) / 1179); left: 50%; bottom: max(calc(126 * var(--u)), calc(env(safe-area-inset-bottom) + 14px)); transform: translateX(-50%); width: calc(616 * var(--s)); }
#bat-ctl .move { display: block; }
#bat-ctl .move-track { height: calc(120 * var(--s)); }
#bat-ctl .move-track::before { left: 0; right: 0; top: calc(37 * var(--s)); height: calc(46 * var(--s)); border: 0; border-radius: calc(14 * var(--s)); background: #00000040; box-shadow: inset 0 0 0 calc(2 * var(--s)) #ffffff14; }
#bat-slider, #bat-slider::-webkit-slider-runnable-track, #bat-slider::-moz-range-track { height: calc(120 * var(--s)); }
#bat-slider::-webkit-slider-thumb {
  width: calc(190 * var(--s)); height: calc(100 * var(--s)); margin-top: calc(10 * var(--s)); border: 0; border-radius: 0; box-shadow: none;
  background: center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 100'%3E%3Ccircle cx='95' cy='50' r='46' fill='%23ffffff40' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M38 33 21 50l17 17-5-17z' fill='%23fff' stroke='%23a9a9a9' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M152 33l17 17-17 17 5-17z' fill='%23fff' stroke='%23a9a9a9' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bat-slider::-moz-range-thumb {
  width: calc(190 * var(--s)); height: calc(100 * var(--s)); border: 0; border-radius: 0; box-shadow: none;
  background: center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 100'%3E%3Ccircle cx='95' cy='50' r='46' fill='%23ffffff40' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M38 33 21 50l17 17-5-17z' fill='%23fff' stroke='%23a9a9a9' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M152 33l17 17-17 17 5-17z' fill='%23fff' stroke='%23a9a9a9' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#bat-ctl #bat-line { top: calc(37 * var(--s)); bottom: auto; height: calc(46 * var(--s)); width: calc(6 * var(--s)); margin-left: calc(-3 * var(--s)); box-shadow: 0 0 calc(8 * var(--s)) #ff3b47; }

/* the timing bar, batting and bowling alike: red, green, the pale sweet spot, green, amber, red, in a dark green frame */
.tbar { width: calc(59 * var(--u)); height: calc(792 * var(--u)); border: calc(4 * var(--u)) solid #24500e; border-radius: calc(12 * var(--u)); box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) #0005; }
#timing-dot, #timing-cursor, #meter-dot,
.bowl-meter.locked #meter-dot, .timing.perfect #timing-dot, .timing.good #timing-dot, .timing.late #timing-dot, .timing.miss #timing-dot {
  left: calc(-21 * var(--u)); right: calc(-21 * var(--u)); height: calc(7 * var(--u)); margin-top: calc(-3.5 * var(--u)); border-radius: calc(4 * var(--u)); background: #fff; box-shadow: 0 0 0 calc(1 * var(--u)) #0004;
}
.bowl-meter.locked #meter-dot::after, .timing #timing-dot::after { display: none; }
.bowl-meter { left: calc(77 * var(--u)); top: calc(972 * var(--u)); }
.bowl-meter .m-speed {
  position: absolute; left: calc(-71 * var(--u)); top: calc(-66 * var(--u)); width: calc(198 * var(--u)); height: calc(52 * var(--u)); display: grid; place-items: center;
  background: #3c3c3c8c; color: #5fe03a; font-size: calc(30 * var(--u)); font-weight: 800; text-shadow: none; white-space: nowrap;
}
.bowl-meter .m-speed b { display: none; }
.bowl-meter #meter-label { display: none; }
.timing { left: calc(77 * var(--u)); top: calc(972 * var(--u)); width: auto; }
/* batting (gameplay_assets/bat short end leg side.png): EARLY over the bar, LATE under it, and HIGHER for a shot in the air */
.timing { left: calc(46 * var(--u)); top: calc(965 * var(--u)); }
.timing .tbar { width: calc(67 * var(--u)); height: calc(670 * var(--u)); }
.timing .t-label { display: none; }
.timing .t-body { position: relative; display: block; }
.timing .t-legend { position: absolute; left: calc(-40 * var(--u)); width: calc(147 * var(--u)); top: calc(-52 * var(--u)); bottom: calc(-52 * var(--u)); display: flex; flex-direction: column; justify-content: space-between; align-items: center; pointer-events: none; }
.timing .t-legend span { flex: none; color: #fff; font: 900 calc(32 * var(--u))/1 'Nunito', sans-serif; letter-spacing: calc(1 * var(--u)); text-shadow: 0 calc(2 * var(--u)) calc(3 * var(--u)) #000a; }
.timing .t-loft { display: none; position: absolute; left: calc(-40 * var(--u)); top: calc(744 * var(--u)); }
.timing.higher .t-loft { display: block; }
.timing .t-loft svg { position: absolute; left: calc(110 * var(--u)); top: calc(-80 * var(--u)); width: calc(40 * var(--u)); height: calc(46 * var(--u)); }
.timing .t-loft b { display: block; padding: calc(10 * var(--u)) calc(26 * var(--u)); border-radius: calc(12 * var(--u)); background: #1c2a1ccc; color: #5fe03a; font: 900 calc(28 * var(--u))/1 'Nunito', sans-serif; letter-spacing: calc(1 * var(--u)); }

/* bowling, right: the field (a bowler and stumps) on brown, and the ball in use on blue */
.field-btn {
  position: absolute; right: calc(33 * var(--u)); bottom: calc(558 * var(--u)); width: calc(176 * var(--u)); height: calc(138 * var(--u)); padding: 0;
  border: 0; border-radius: calc(14 * var(--u)); background: #6a4a2cbf; cursor: pointer; pointer-events: auto;
}
.field-btn svg { display: block; width: 100%; height: 100%; transition: transform .2s; }
.field-btn.round svg { transform: scaleX(-1); }   /* round the wicket: the bowler on the other side of the stumps */
.field-btn b { position: absolute; left: 0; right: 0; bottom: calc(-34 * var(--u)); font: 900 calc(24 * var(--u))/1 'Nunito', system-ui, sans-serif; letter-spacing: .5px; color: #fff; text-shadow: 0 1px 3px #000; text-align: center; }
.ball-btn {
  right: calc(31 * var(--u)); bottom: calc(352 * var(--u)); width: calc(176 * var(--u)); height: calc(132 * var(--u)); padding: 0;
  border: 0; border-radius: calc(14 * var(--u)); background: linear-gradient(#1f8ff3, #0b62cc); box-shadow: inset 0 calc(-7 * var(--u)) 0 #0a4596, 0 calc(3 * var(--u)) calc(5 * var(--u)) #0006;
}
.ball-btn .ball-dot { width: calc(88 * var(--u)); height: calc(88 * var(--u)); margin: calc(18 * var(--u)) auto 0; box-shadow: 0 calc(6 * var(--u)) calc(5 * var(--u)) #0006; }
.ball-btn span { display: none; }
.ball-btn b {
  top: calc(-22 * var(--u)); right: calc(-14 * var(--u)); min-width: calc(48 * var(--u)); height: calc(48 * var(--u)); padding: 0 calc(6 * var(--u)); display: grid; place-items: center;
  border-radius: calc(24 * var(--u)); background: #d4252a; color: #fff; font-size: calc(30 * var(--u)); font-weight: 900; box-shadow: 0 0 0 calc(2 * var(--u)) #0003;
}

/* BOWL */
.bowl {
  left: 50%; bottom: calc(128 * var(--u)); width: calc(501 * var(--u)); height: calc(160 * var(--u)); padding: 0;
  font: 900 calc(92 * var(--u)) 'Nunito', system-ui, sans-serif; letter-spacing: calc(5 * var(--u)); color: #fff;
  background: linear-gradient(#2190f4, #0f6ad6 55%, #0a5cc4); border: calc(3 * var(--u)) solid #0a3a80; border-radius: calc(12 * var(--u));
  box-shadow: inset 0 calc(3 * var(--u)) 0 #ffffff40, inset 0 calc(-8 * var(--u)) 0 #0a4ea8, 0 calc(4 * var(--u)) calc(8 * var(--u)) #0006;
  text-shadow: 0 calc(5 * var(--u)) 0 #0a2d6b, 0 0 calc(2 * var(--u)) #0a2d6b;
}
.bowl:active { transform: translateX(-50%) translateY(calc(3 * var(--u))); box-shadow: inset 0 calc(3 * var(--u)) 0 #ffffff40, inset 0 calc(-4 * var(--u)) 0 #0a4ea8; }

/* bowling, bottom left: the active bowler's card, with the face as on the Team screen, the delivery and the side he bowls from.
   Tapped, it opens the bowling sheet: delivery, over or round the wicket, the aiming view, and the other bowlers. */
.bowlers { position: absolute; left: calc(24 * var(--u)); bottom: calc(347 * var(--u)); pointer-events: auto; }
.bcard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: clamp(92px, calc(270 * var(--u)), 128px);
  padding: 8px 6px 7px; border: 2px solid #9fe6ff; border-radius: 14px; background: linear-gradient(#2f8ff0, #1257c9); color: #fff;
  font-family: 'Nunito', system-ui, sans-serif; box-shadow: 0 4px 10px #0007; cursor: pointer;
}
.bcard:active { transform: translateY(1px); }
.bcard .bface, .bs-face, .bs-others .face { display: block; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 2px #1e8ff5, 0 3px 6px #0006; background: #0a1228; }
.bcard .bface { width: 58px; height: 58px; }
.bcard .bface .face, .bcard .bface svg, .bs-face .face, .bs-face svg { display: block; width: 100%; height: 100%; margin: 0; border: 0; box-shadow: none; }
.bcard .bst { position: absolute; right: 5px; top: 5px; min-width: 24px; padding: 1px 5px; border-radius: 999px; background: #36d11c; color: #04240f; font: 900 12px/1.3 'Nunito', sans-serif; font-style: normal; }
.bcard .bnm { font-weight: 900; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard .bdel { display: flex; align-items: center; gap: 3px; padding: 2px 7px 2px 4px; border-radius: 999px; background: #0008; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.bcard .bdel svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bcard .bdel svg .solid { fill: #fff; stroke: none; }
.bcard .bside { font-size: 9.5px; font-weight: 800; color: #cfe6ff; }
.bcard::after { content: '▲ tap to change'; font-size: 8.5px; font-weight: 800; color: #ffe08a; }

.bsheet {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 6; max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain;
  max-width: 520px; margin: 0 auto; padding: 14px; border-radius: 18px; border: 1px solid #ffffff2e;
  background: linear-gradient(#143a8cf2, #0c2462f5); color: #fff; font-family: 'Nunito', system-ui, sans-serif; box-shadow: 0 -6px 24px #000a;
  animation: bsheet-in .18s ease-out;
}
@keyframes bsheet-in { from { transform: translateY(24px); opacity: 0; } }
.bsheet h4 { margin: 12px 0 6px; font-size: 13px; font-weight: 900; letter-spacing: .3px; color: #bcd6ff; text-transform: uppercase; }
.bsheet h4 em { font-style: normal; font-weight: 700; text-transform: none; color: #ffe08a; }
.bs-head { display: flex; align-items: center; gap: 12px; }
.bs-face { flex: none; width: 64px; height: 64px; }
.bs-head .grow { flex: 1; min-width: 0; }
.bs-head b { display: block; font-size: 18px; font-weight: 900; }
.bs-head small { display: block; font-size: 12px; color: #cfe0ff; }
.bs-bar { display: block; height: 7px; margin: 5px 0 2px; border-radius: 4px; background: #0007; overflow: hidden; }
.bs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #36d11c, #b6f53a); }
.bs-x { flex: none; align-self: flex-start; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #0006; color: #fff; font-size: 16px; cursor: pointer; }
.bs-del { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.bs-del button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 92px; padding: 10px 6px; border-radius: 14px; border: 2px solid #ffffff33; background: linear-gradient(#2a62c4, #1b4596); color: #fff; font: inherit; cursor: pointer; }
.bs-del button svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bs-del button svg .solid { fill: #fff; stroke: none; }
.bs-del button b { font-size: 13.5px; font-weight: 900; }
.bs-del button small { font-size: 10.5px; line-height: 1.25; color: #d5e4ff; text-align: center; }
.bs-del button.on { border-color: #4ff02a; background: linear-gradient(#2fbf55, #138a3a); box-shadow: 0 0 12px #4ff02a88; }
.bseg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: #0006; }
.bseg button { flex: 1; min-height: 40px; padding: 8px 6px; border: 0; border-radius: 9px; background: none; color: #d5e4ff; font: 800 13px 'Nunito', system-ui, sans-serif; cursor: pointer; }
.bseg button.on { background: #fff; color: #0c2462; box-shadow: 0 2px 6px #0005; }
.bs-others { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; overscroll-behavior-x: contain; }
.bs-others button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; padding: 8px 4px; border-radius: 12px; border: 2px solid #ffffff2e; background: #0004; color: #fff; font: inherit; cursor: pointer; }
.bs-others .face { width: 48px; height: 48px; margin: 0; }
.bs-others b { font-size: 12px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-others small { font-size: 10.5px; color: #cfe0ff; }
.bs-others button:disabled { opacity: .45; }
#bowl-ctl.picking .bowl, #bowl-ctl.picking .field-btn, #bowl-ctl.picking .ball-btn { visibility: hidden; }

/* words that pop up on the pitch */
.quality.good { color: #b9ff8c; -webkit-text-stroke-color: #2c9b18; }
.quality.perfect { color: #c9fbff; -webkit-text-stroke-color: #12a8c4; }
.quality { font-family: 'Nunito', system-ui, sans-serif; font-size: calc(110 * var(--u)); font-weight: 900; font-style: normal; color: #fff7d6; -webkit-text-stroke: calc(3 * var(--u)) #e6a21c; text-shadow: 0 calc(5 * var(--u)) 0 #0006; }
.callout b { font-family: 'Nunito', system-ui, sans-serif; font-size: calc(150 * var(--u)); font-style: normal; }
.hint { bottom: calc(170 * var(--u)); font-size: calc(30 * var(--u)); }
.quality.miss { font-size: calc(100 * var(--u)); color: #fff; -webkit-text-stroke: calc(3 * var(--u)) #c98a13; }

/* result callouts (gameplay_assets/ScreenRecording, the "4 RUNS" after a boundary) */
.callout { top: calc(880 * var(--u)); }
.callout b { font-family: 'Nunito', system-ui, sans-serif; font-style: normal; font-weight: 900; line-height: 1; color: #fff; paint-order: stroke fill; }
.callout span { display: inline-block; font-family: 'Nunito', system-ui, sans-serif; font-weight: 900; }
.callout.runs b { font-size: calc(270 * var(--u)); -webkit-text-stroke: calc(16 * var(--u)) #1561d6; text-shadow: 0 0 calc(28 * var(--u)) #4aa8ffaa, 0 calc(6 * var(--u)) 0 #0b3a8a; }
.callout.runs span { margin-top: calc(14 * var(--u)); padding: calc(12 * var(--u)) calc(110 * var(--u)); font-size: calc(62 * var(--u)); letter-spacing: calc(2 * var(--u)); color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) #0b3a8a;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, #3a96f5e6 0%, #2a80e8a0 45%, #2a80e800 100%); }
.callout.runs.theirs b { -webkit-text-stroke-color: #d0181e; text-shadow: 0 0 calc(28 * var(--u)) #ff5a5aaa, 0 calc(6 * var(--u)) 0 #7a0b0b; }
.callout.runs.theirs span { background: radial-gradient(ellipse 50% 50% at 50% 50%, #e8343ae6 0%, #d0181ea0 45%, #d0181e00 100%); text-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) #7a0b0b; }
.callout.out b, .callout.word b { font-size: calc(150 * var(--u)); -webkit-text-stroke: calc(10 * var(--u)) #c0121a; }
.callout.word b { -webkit-text-stroke-color: #1561d6; }
.callout.out span, .callout.word span { margin-top: calc(10 * var(--u)); font-size: calc(46 * var(--u)); color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) #000c; }

/* the word for the stroke sits to the right of the batter's head, as in the reference (gameplay_assets/bat hitting ball.png) */
.quality { top: calc(48% - 60 * var(--u)); left: calc(260 * var(--u)); right: 0; }

/* ======================================================================================================
   Batting, matched to gameplay_assets/ScreenRecording_10-08-2026 19-00-56_1.mov (1180 x 2556 px; --u as above)
   ====================================================================================================== */
/* the word for the stroke: big, white, ringed in its colour, in the middle of the screen */
.quality { left: 0; right: 0; top: 50%; margin-top: calc(-82 * var(--u)); font-size: calc(163 * var(--u)); line-height: 1; color: #fff; paint-order: stroke fill; -webkit-text-stroke: calc(8 * var(--u)) #ffab00; text-shadow: 0 calc(4 * var(--u)) calc(6 * var(--u)) #0005; }
.quality.good { color: #fff; -webkit-text-stroke-color: #00f000; text-shadow: 0 0 calc(14 * var(--u)) #00f00080, 0 calc(4 * var(--u)) calc(6 * var(--u)) #0005; }
.quality.perfect { color: #fff; -webkit-text-stroke-color: #12b8e0; text-shadow: 0 0 calc(14 * var(--u)) #6af8f8a0, 0 calc(4 * var(--u)) calc(6 * var(--u)) #0005; }
.quality.miss { margin-top: calc(-42 * var(--u)); font-size: calc(84 * var(--u)); color: #fff; -webkit-text-stroke: 0; text-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) #0009, 0 0 calc(2 * var(--u)) #0006; }

/* no bar for a miss: only the word */
.timing.miss { opacity: 0; }
/* SLIGHTLY HIGHER (one chevron) for a shot only just in the air, HIGHER (two) for a big one */
.timing.slightly .t-loft svg .two { display: none; }
.timing.slightly .t-loft svg { top: calc(-56 * var(--u)); }
.timing.slightly .t-loft b { padding: calc(6 * var(--u)) calc(14 * var(--u)); font-size: calc(22 * var(--u)); line-height: 1.05; text-align: center; }

/* this over: a dot ball is a white dot in its ring */
.hud-top .chip.c0 i { display: block; width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: 50%; background: #fff; }

/* the bowler's badge fades once the ball has been played */
.bowler-badge { transition: opacity .3s; }
.bowler-badge.gone { opacity: 0; }

/* the dip to dark between balls, over the scene and the HUD */
.dip { position: absolute; inset: 0; z-index: 4; background: #000; opacity: 0; pointer-events: none; }

/* the menu's dialogs: deep blue panels with a title, a darker row, and glossy red and green buttons */
.mdlg { position: absolute; inset: 0; z-index: 6; background: #00000080; font-family: 'Nunito', system-ui, sans-serif; }
.mbox {
  position: absolute; left: calc(50% - 476 * var(--u)); top: calc(999 * var(--u)); width: calc(952 * var(--u)); padding: calc(40 * var(--u)) calc(38 * var(--u)) calc(48 * var(--u));
  border-radius: calc(16 * var(--u)); background: linear-gradient(#12287a, #143aa0); box-shadow: 0 calc(8 * var(--u)) calc(16 * var(--u)) #0008; color: #fff; text-align: center;
}
#menu-quit { top: calc(955 * var(--u)); }
.mbox h3 { position: relative; margin: 0 0 calc(42 * var(--u)); font-size: calc(58 * var(--u)); font-weight: 900; line-height: 1.2; }
.mbox h3::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: calc(-20 * var(--u)); height: calc(3 * var(--u)); background: linear-gradient(90deg, #fff0, #ffffff70, #fff0); }
.mbox .mx { position: absolute; z-index: 1; right: calc(32 * var(--u)); top: calc(30 * var(--u)); width: calc(60 * var(--u)); height: calc(60 * var(--u)); padding: 0; border: 0; background: none; color: #fff; font-size: calc(48 * var(--u)); font-weight: 900; line-height: 1; cursor: pointer; }
.mrow { display: flex; align-items: center; justify-content: space-between; min-height: calc(110 * var(--u)); padding: 0 calc(20 * var(--u)); border-radius: calc(12 * var(--u)); background: #0f2a76; font-size: calc(46 * var(--u)); font-weight: 800; }
.mrow.msg { justify-content: center; padding: calc(36 * var(--u)) calc(110 * var(--u)); color: #fff; font-size: calc(60 * var(--u)); font-weight: 800; line-height: 1.45; }
.mcheck { flex: none; width: calc(78 * var(--u)); height: calc(78 * var(--u)); padding: 0; border: 0; border-radius: calc(12 * var(--u)); background: #0a1d55; box-shadow: inset 0 0 0 calc(3 * var(--u)) #ffffff30; cursor: pointer; }
.mcheck.on { background: linear-gradient(#7fe04a, #3faa10); box-shadow: inset 0 calc(-5 * var(--u)) 0 #2c7f0a, 0 calc(2 * var(--u)) calc(3 * var(--u)) #0006; }
.mcheck.on::after { content: ''; display: block; width: 46%; height: 24%; margin: 26% auto 0; border: solid #fff; border-width: 0 0 calc(10 * var(--u)) calc(10 * var(--u)); transform: rotate(-45deg); }
.mbtn {
  min-width: calc(330 * var(--u)); height: calc(106 * var(--u)); padding: 0 calc(24 * var(--u)); margin-top: calc(66 * var(--u)); border: 0; border-radius: calc(14 * var(--u)); cursor: pointer;
  color: #fff; font: 900 calc(52 * var(--u)) 'Nunito', system-ui, sans-serif; text-shadow: 0 calc(3 * var(--u)) 0 #0006;
}
.mbtn.red { background: linear-gradient(#ff5a3a, #e12a12 45%, #c81a0c); box-shadow: inset 0 calc(3 * var(--u)) 0 #ffffff50, inset 0 calc(-6 * var(--u)) 0 #9a0e04, 0 calc(4 * var(--u)) calc(4 * var(--u)) #0006; }
.mbtn.green { background: linear-gradient(#8de43c, #4fb512 45%, #3c9a0c); box-shadow: inset 0 calc(3 * var(--u)) 0 #ffffff50, inset 0 calc(-6 * var(--u)) 0 #2b7406, 0 calc(4 * var(--u)) calc(4 * var(--u)) #0006; }
.macts { display: flex; justify-content: center; gap: calc(36 * var(--u)); }

/* how long the result stays up (as in the reference): the word and the bar for about a second and three quarters, the runs for two */
.quality { animation-duration: 1.8s; }
.callout { animation-duration: 2s; }
.timing.perfect, .timing.good, .timing.early, .timing.late { animation: hold 1.8s forwards; }
@keyframes hold { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- watching a live match and betting on it ---------- */
.w-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.w-player { flex: 1; min-width: 0; }
.w-player b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-player small, .bet-row small { display: block; color: var(--muted); font-size: 11px; }
.w-player + .w-vs + .w-player { text-align: right; }
.w-vs { color: var(--muted); font-weight: 900; }
.w-inn { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--panel2); }
.w-inn span:first-child { flex: 1; font-weight: 800; }
.w-inn b { font-size: 20px; }
.w-inn.now { outline: 2px solid var(--go); }
.dim { color: var(--muted); font-size: 12px; }
.w-balls { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 2px 2px; }
.w-balls .b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; background: #fff; color: #0b1530; font: 900 11px system-ui, sans-serif; font-style: normal; }
.w-balls .b.bd { background: var(--gold); }
.w-balls .b.w { background: #e23b3b; color: #fff; }
.w-status { margin: 10px 0; padding: 8px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; background: #0006; }
.w-status.done { background: var(--gold); color: #2e1d00; }
.w-mk { margin: 12px 0 6px; font-size: 14px; }
.odds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.odds.innings, .odds.winner { grid-template-columns: 1fr 1fr; }
.odd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: #fff; cursor: pointer; font: inherit; min-width: 0; }
.odd span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.odd b { font-size: 16px; color: var(--gold); }
.odd.on { background: var(--go); border-color: #1a9a53; }
.odd.on span, .odd.on b { color: #04240f; }
.odd:disabled { opacity: .45; cursor: default; }
.slip { margin-top: 12px; padding: 10px; border-radius: 12px; border: 1px dashed var(--gold); display: grid; gap: 8px; font-size: 14px; }
.slip .pair { display: flex; gap: 6px; }
.slip input { flex: 1; min-width: 0; background: #0a1228; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 16px; }
.slip .pair .btn { padding: 8px 9px; font-size: 12px; }
.bet-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--panel2); font-size: 13px; }
.bet-st { font-weight: 900; font-size: 12px; white-space: nowrap; }
.bet-row.won .bet-st { color: var(--go); }
.bet-row.lost .bet-st { color: #ff6b6b; }
.bet-row.open .bet-st { color: var(--gold); }
.bet-row.void .bet-st { color: var(--muted); }
.slip .btn.wide, .btn.wide[data-bet-history] { text-align: center; }
