:root {
  color-scheme: dark;
  --bg: #05080b;
  --panel: #0b131a;
  --panel-2: #101923;
  --line: rgba(154, 179, 204, .16);
  --text: #edf3fa;
  --muted: #8c98a6;
  --green: #52df8b;
  --red: #ff5b72;
  --yellow: #ffbd36;
  --blue: #7bb8ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #05080b;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
  overscroll-behavior-y: none;
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% -10%, rgba(60, 147, 209, .14), transparent 30%),
    linear-gradient(180deg, #05070a, #081018 55%, #05080b);
}

.standalone body {
  background: #05080b;
}

.standalone .app::before {
  background:
    radial-gradient(circle at 82% -8%, rgba(82, 223, 139, .12), transparent 28%),
    radial-gradient(circle at 20% 0%, rgba(60, 147, 209, .12), transparent 34%),
    linear-gradient(180deg, #05070a, #081018 55%, #05080b);
}

body.sheet-open {
  overflow: hidden;
  touch-action: none;
}

body.history-open {
  overflow: hidden;
  touch-action: none;
}

button, input { font: inherit; }
button { cursor: pointer; }

.pull-refresh {
  --pull-progress: 0;
  --pull-offset: -18px;
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(154, 179, 204, .18);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(82, 223, 139, .18) calc(var(--pull-progress) * 100%), rgba(13, 22, 31, .88) 0),
    rgba(13, 22, 31, .88);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, var(--pull-offset), 0) scale(calc(.94 + var(--pull-progress) * .06));
  transition: opacity .18s ease, transform .24s cubic-bezier(.2, .8, .2, 1), color .18s ease, border-color .18s ease;
  will-change: opacity, transform;
}

.pull-refresh.visible {
  opacity: calc(.24 + var(--pull-progress) * .76);
}

.pull-refresh.dragging {
  transition: opacity .08s linear, color .18s ease, border-color .18s ease;
}

.pull-refresh.ready,
.pull-refresh.loading {
  color: var(--green);
  border-color: rgba(82, 223, 139, .34);
}

.pull-refresh i {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(140, 152, 166, .38);
  border-top-color: currentColor;
  border-radius: 50%;
  transform: rotate(calc(var(--pull-progress) * 260deg));
}

.pull-refresh.loading i {
  animation: refreshSpin .72s linear infinite;
}

.pull-refresh.loading {
  --pull-offset: 0px;
  --pull-progress: 1;
}

.pull-refresh.finishing {
  opacity: 0;
  transform: translate3d(-50%, var(--pull-offset), 0) scale(.98);
}

.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(96px, env(safe-area-inset-top)) 14px max(84px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

body.sheet-open .app {
  pointer-events: none;
}

body.history-open .app {
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 4px 18px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
}

.online {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 700;
}

.online.online-slow {
  color: var(--yellow);
}

.online.online-offline {
  color: var(--red);
}

.online i, .sheet-title i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(82, 223, 139, .6);
}

.online.online-slow i {
  background: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 189, 54, .5);
}

.online.online-offline i {
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 91, 114, .5);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  margin-bottom: 10px;
}

.stats div {
  min-height: 74px;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(16, 30, 42, .95), rgba(9, 17, 24, .95));
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  white-space: nowrap;
}

.stats strong {
  color: var(--green);
  font-size: 18px;
}

.tabs {
  --tab-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 20, .92);
  overflow: hidden;
  margin: 0 0 12px;
}

.tabs::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: linear-gradient(180deg, rgba(82, 223, 139, .055), rgba(82, 223, 139, .018));
  transform: translate3d(calc(var(--tab-index) * 100%), 0, 0);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.tabs::after {
  content: "";
  position: absolute;
  left: calc((100% / 4) * var(--tab-index) + 14px);
  bottom: 0;
  width: calc(25% - 28px);
  height: 2px;
  border-radius: 999px;
  background: var(--green);
  transition: left .28s cubic-bezier(.2, .8, .2, 1);
  will-change: left;
}

.tab {
  position: relative;
  z-index: 1;
  min-height: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #8e98a6;
  font-weight: 750;
  transition: color .2s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab:last-child { border-right: 0; }
.tab.active { color: var(--green); }
.tab:active { transform: scale(.985); }

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 34%);
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.hidden { display: none !important; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 18, 26, .94);
  color: var(--muted);
}

.search span {
  font-size: 21px;
  line-height: 1;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 18, 26, .94);
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 4px 8px;
  color: var(--muted);
}

.section-head strong {
  color: var(--text);
  font-size: 15px;
}

.content {
  display: grid;
  gap: 10px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity .16s cubic-bezier(.2, .8, .2, 1), transform .16s cubic-bezier(.2, .8, .2, 1);
  will-change: opacity, transform;
}

.content.switching {
  opacity: 0;
  transform: translate3d(var(--switch-x, 12px), 0, 0);
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 25, 35, .96), rgba(8, 14, 20, .96));
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
  animation: cardIn .22s ease both;
}

.card.finished {
  opacity: 1;
}

.card.finished::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(140, 152, 166, .025);
}

.card-head {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 102px 10px 14px;
}

.card.no-actions .card-head {
  padding-right: 14px;
}

.card.copy-only .card-head {
  padding-right: 58px;
}

.card.full-actions .card-head {
  padding-right: 132px;
}

.time {
  font-size: 20px;
  font-weight: 800;
}

.country {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.matchbox {
  min-width: 0;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.match {
  min-width: 0;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 850;
}

.status-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.badge {
  border: 1px solid currentColor;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.up { color: var(--green); background: rgba(82, 223, 139, .08); }
.badge.down { color: var(--red); background: rgba(255, 91, 114, .08); }

.rows {
  border-top: 1px solid var(--line);
}

.odds-history-trigger {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .16s ease;
}

.odds-history-trigger:active {
  background: rgba(82, 223, 139, .035);
}

.row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(154, 179, 204, .1);
}

.row:last-child { border-bottom: 0; }
.label { color: var(--muted); font-weight: 700; }
.value { font-size: 19px; font-weight: 850; }
.odds { white-space: nowrap; font-size: 18px; }
.green { color: var(--green); }
.red { color: var(--red); }
.yellow { color: var(--yellow); }
.muted { color: var(--muted); }

.card-actions {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.card-actions button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(5, 8, 11, .62);
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.card-actions button:active { transform: scale(.94); }

.card-actions .card-delete {
  color: var(--red);
  border-color: rgba(255, 91, 114, .35);
  font-size: 0;
  position: relative;
}

.card-actions .card-delete::before,
.card-actions .card-delete::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 4px;
  border-radius: 999px;
  background: var(--red);
  transform-origin: center;
}

.card-actions .card-delete::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-actions .card-delete::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.card-copy {
  position: relative;
}

.card-copy::before,
.card-copy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 12px;
  border: 2px solid var(--muted);
  border-radius: 3px;
  background: #071016;
  transition: border-color .16s ease, transform .16s ease;
}

.card-copy::before {
  opacity: .62;
  transform: translate(-68%, -68%);
}

.card-copy::after {
  opacity: 1;
  transform: translate(-32%, -32%);
}

.card-copy.copied {
  border-color: rgba(82, 223, 139, .48);
}

.card-copy.copied::before,
.card-copy.copied::after {
  border-color: var(--green);
}

.card-actions .card-more {
  font-size: 0;
  position: relative;
}

.card-actions .card-more::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transform: translate(-50%, -50%);
  box-shadow: -8px 0 0 var(--muted), 8px 0 0 var(--muted);
}

.delete-menu {
  position: absolute;
  z-index: 5;
  top: 42px;
  right: 10px;
  width: 180px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 15, 22, .98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .36);
}

.delete-menu b { font-size: 13px; }
.delete-menu label {
  display: flex;
  gap: 8px;
  color: var(--muted);
}
.delete-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #06100a;
  font-weight: 850;
}

.heartbeat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 25, 35, .96), rgba(8, 14, 20, .96));
}

.heartbeat span,
.heartbeat em {
  color: var(--muted);
  font-style: normal;
}

.heartbeat strong {
  color: var(--green);
}

.last-alert {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px 56px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 25, 35, .96), rgba(8, 14, 20, .96));
  color: var(--text);
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.last-alert-copy {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(5, 8, 11, .62);
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.last-alert span,
.last-alert em {
  color: var(--muted);
  font-style: normal;
}

.last-alert strong {
  color: var(--text);
  line-height: 1.25;
}

.last-alert b {
  color: var(--green);
}

.last-alert.is-clickable {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.last-alert.is-clickable:active {
  transform: scale(.985);
  border-color: rgba(82, 223, 139, .45);
}

.card.focus-pulse {
  animation: focusPulse 1.8s ease both;
}

.empty, .denied {
  display: grid;
  gap: 6px;
  padding: 26px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 22, 31, .86);
  color: var(--muted);
  line-height: 1.45;
}

.empty strong {
  color: var(--text);
  font-size: 17px;
}

.empty span {
  color: var(--muted);
}

.login-panel {
  gap: 12px;
}

.login-panel strong {
  color: var(--text);
  font-size: 22px;
}

.login-panel span,
.login-panel em {
  color: var(--muted);
  font-style: normal;
}

.login-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.login-panel input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: 0;
  background: rgba(5, 8, 11, .42);
  color: var(--text);
}

.login-panel button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--green);
  color: #06100a;
  font-weight: 850;
}

.login-panel em {
  min-height: 18px;
  color: var(--red);
}

.status-grid {
  display: grid;
  gap: 10px;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 25, 35, .96), rgba(8, 14, 20, .96));
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.health {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 22px;
  font-weight: 850;
}

.health.warn {
  color: var(--yellow);
}

.health.danger {
  color: var(--red);
}

.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(154, 179, 204, .1);
}

.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { text-align: right; }

.kv.cooldown strong {
  color: var(--yellow);
}

.reason-panel {
  margin: 0 0 8px;
  padding: 9px 0 10px;
  border-bottom: 1px solid rgba(154, 179, 204, .1);
}

.reason-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.reason-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.reason-panel code {
  display: block;
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 189, 54, .06);
  color: var(--yellow);
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.errors-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(154, 179, 204, .1);
}

.errors-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.errors-panel p {
  margin: 8px 0 0;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 189, 54, .06);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.push-state {
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(154, 179, 204, .1);
}

.push-state strong {
  display: block;
  color: var(--muted);
  font-size: 18px;
}

.push-state.on strong {
  color: var(--green);
}

.push-state.warn strong {
  color: var(--yellow);
}

.push-state span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.notify-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(154, 179, 204, .1);
  color: var(--text);
}

.notify-row strong {
  display: block;
  font-size: 16px;
}

.notify-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.notify-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notify-row i {
  width: 52px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  transition: border-color .18s ease, background .18s ease;
}

.notify-row i::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 3px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), background .18s ease;
}

.notify-row input:checked + i {
  border-color: rgba(82, 223, 139, .42);
  background: rgba(82, 223, 139, .14);
}

.notify-row input:checked + i::after {
  background: var(--green);
  transform: translateX(22px);
}

.notify-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.notify-actions button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font-weight: 850;
}

.summary {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 492px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 12, 18, .9);
  backdrop-filter: blur(18px);
}

.summary span {
  padding: 12px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.summary b { color: var(--green); }

.sheet-backdrop,
.history-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity .18s ease;
  backdrop-filter: blur(2px);
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate3d(-50%, 105%, 0);
  width: min(100%, 520px);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  padding: 10px 14px max(14px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #0b131b;
  z-index: 30;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), height .24s cubic-bezier(.2, .8, .2, 1), max-height .24s cubic-bezier(.2, .8, .2, 1), border-radius .24s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .42);
  will-change: transform;
  touch-action: pan-y;
}

.sheet.open { transform: translate3d(-50%, 0, 0); }
.sheet.full {
  max-height: calc(100vh - 128px);
  height: calc(100vh - 128px);
  border-radius: 24px 24px 0 0;
  padding-top: 10px;
}

.sheet.dragging {
  transition: none;
}
.sheet-backdrop.open,
.history-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.history-backdrop {
  z-index: 34;
}

.history-sheet {
  --history-sheet-y: 105%;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate3d(-50%, var(--history-sheet-y), 0);
  width: min(100%, 520px);
  height: min(84vh, 720px);
  max-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  padding: 10px 14px max(14px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #0b131b;
  z-index: 40;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .48);
  transition:
    transform .24s cubic-bezier(.2, .8, .2, 1),
    height .24s cubic-bezier(.2, .8, .2, 1),
    border-radius .24s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
  touch-action: pan-y;
}

.history-sheet.open {
  --history-sheet-y: 0px;
}

.history-sheet.full {
  height: calc(100vh - 58px);
  border-radius: 18px 18px 0 0;
}

.history-sheet.dragging {
  transition: none;
}

.history-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.history-sheet.dragging .history-title {
  cursor: grabbing;
}

.history-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
}

.history-title p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.25;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.history-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  padding: 0 2px 2px 0;
  -webkit-overflow-scrolling: touch;
}

.history-step {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 25, 35, .98), rgba(8, 14, 20, .98));
}

.history-step-head {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.history-step-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(82, 223, 139, .42);
  border-radius: 50%;
  background: rgba(82, 223, 139, .09);
  color: var(--green);
  font-weight: 850;
}

.history-step-head strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.history-step-head em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.history-rows {
  border-top: 1px solid rgba(154, 179, 204, .1);
}

.history-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(154, 179, 204, .08);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row > span {
  color: var(--muted);
  font-weight: 750;
}

.history-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.history-row.wide strong {
  font-size: 15px;
  line-height: 1.35;
}

.handle {
  width: 56px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(237, 243, 250, .22);
  touch-action: none;
  cursor: grab;
}

.history-sheet.dragging .handle {
  cursor: grabbing;
}

.sheet-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.sheet-title h2 {
  margin: 0;
  font-size: 24px;
}

.sheet-title p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  padding: 0 0 3px;
}

.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.mode button {
  min-height: 42px;
  border: 0;
  background: rgba(13, 22, 31, .95);
  color: var(--muted);
  font-weight: 750;
}

.mode .selected {
  color: var(--green);
  background: rgba(82, 223, 139, .08);
}

.quick {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.quick button, .secondary, .primary {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 14px;
  font-weight: 800;
}

.quick button, .secondary {
  background: rgba(255, 255, 255, .03);
  color: var(--text);
}

.primary {
  border-color: transparent;
  background: var(--green);
  color: #06100a;
}

.sheet-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet-actions p {
  margin: 0 0 10px;
  color: var(--muted);
  text-align: center;
}

.sheet-actions div {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

@media (max-width: 430px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(104px, 32%);
  }
  .chip {
    padding: 0 9px;
    font-size: 13px;
  }
  .card-head { grid-template-columns: 88px 1fr; }
  .badge { justify-self: start; padding: 7px 10px; }
  .match { font-size: 18px; }
  .row { grid-template-columns: 70px 1fr; }
  .value, .odds { font-size: 16px; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

@keyframes focusPulse {
  0%, 100% {
    border-color: var(--line);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
  }
  25%, 70% {
    border-color: rgba(82, 223, 139, .75);
    box-shadow: 0 0 0 3px rgba(82, 223, 139, .16), 0 14px 38px rgba(0, 0, 0, .2);
  }
}
