/* Кэф: a dense odds board. Graphite panels, compact price cells, one lime accent. */
:root {
  color-scheme: dark;
  --bg: #0e1012;
  --panel: #16191c;
  --panel-raised: #1e2226;
  --row-hover: #1b1f22;
  --cell: #272c31;
  --cell-hover: #343a41;
  --field: #0b0d0f;
  --line: #262b30;
  --line-strong: #444c54;
  --text: #f0f3f5;
  --muted: #a0a9b2;
  --accent: #c8f031;
  --accent-hover: #d6f75f;
  --accent-soft: #2b3312;
  --accent-line: #55641c;
  --on-accent: #161c02;
  --green: #66dd94;
  --red: #ff8173;
  --blue: #8dbcff;
  --live: #ff6a5c;
  --post: #e6ebee;
  --ink-faint: rgb(255 255 255 / .06);
  --ink-soft: rgb(255 255 255 / .22);
  --ink-mid: rgb(255 255 255 / .35);
  --canvas: linear-gradient(180deg, #1c2620, #141b17);
  --red-soft: #3a1d19;
  --on-red: #2a0f0b;
  --blue-soft: #1d2b40;
  --radius: 6px;
  --radius-lg: 8px;
  --gutter: 16px;
  --top: 56px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/*
 * The light theme: the same board in daylight. Picked in the settings; «как в системе» follows the
 * device, resolved by /js/theme.js before the first paint. The accent darkens so text in it stays readable.
 */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f4; --panel: #ffffff; --panel-raised: #f3f5f8; --row-hover: #f6f8fa; --cell: #e8ecf0; --cell-hover: #dce2e8; --field: #ffffff;
  --line: #dfe4e9; --line-strong: #b4bdc6; --text: #14181c; --muted: #5b6670;
  --accent: #3b7600; --accent-hover: #336600; --accent-soft: #e4f1cd; --accent-line: #9fcb5a; --on-accent: #ffffff;
  --green: #177a41; --red: #c8352a; --blue: #2b6cb0; --live: #d63f2f;
  --post: #5b6670; --ink-faint: rgb(0 0 0 / .08); --ink-soft: rgb(0 0 0 / .28); --ink-mid: rgb(0 0 0 / .45);
  --canvas: linear-gradient(180deg, #e3ebe4, #d2dcd4); --red-soft: #fbe3e0; --on-red: #ffffff; --blue-soft: #dce9fb;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font-ui);
}
body.sheet-open { overflow: hidden; }

h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
h1 { font: 700 21px/1.2 var(--font-head); overflow-wrap: anywhere; }
h2 { font-size: 14px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; color: var(--muted); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }

.skip-link { position: absolute; left: 8px; top: -60px; padding: 8px 12px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); z-index: 50; }
.skip-link:focus { top: 8px; }
.noscript { padding: var(--gutter); }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px;
  min-height: var(--top); padding: 6px var(--gutter);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 36px; text-decoration: none; }
.logo-mark { display: block; width: 28px; height: 28px; }
.logo-name { font: 800 21px/1 var(--font-head); letter-spacing: -.01em; }

.nav { display: flex; gap: 0; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  flex: none; padding: 8px 9px; border-radius: var(--radius); text-decoration: none; white-space: nowrap;
  color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
}
.nav-link:hover { color: var(--text); background: var(--panel-raised); }
.nav-link[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius) var(--radius) 0 0; }

.account-area { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.balance { display: grid; justify-items: end; padding: 3px 10px; border-radius: var(--radius); background: var(--panel-raised); text-decoration: none; min-height: 40px; align-content: center; }
.balance:hover { background: var(--cell); }
.balance-name { font-size: 12px; line-height: 1.2; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-value { font-weight: 700; font-size: 14px; line-height: 1.25; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Layout ---------- */
.layout {
  flex: 1;
  width: 100%; max-width: 1720px;
  margin: 0 auto;
  padding: 12px var(--gutter) 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}
.main { min-width: 0; min-height: 60vh; }
.page { display: flex; flex-direction: column; gap: 12px; }
.sports { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: start; }
.sports-main, .results, .bets, .account, .match { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.side {
  position: sticky; top: calc(var(--top) + 12px);
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100dvh - var(--top) - 24px);
  overflow-y: auto; scrollbar-width: thin;
}
.side-cards { display: flex; flex-direction: column; gap: 12px; }

.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.list-count { color: var(--muted); font-size: 13px; min-height: 18px; }

/* ---------- Sports menu ---------- */
.rail {
  position: sticky; top: calc(var(--top) + 12px);
  display: flex; flex-direction: column; gap: 2px;
  max-height: calc(100dvh - var(--top) - 24px); overflow-y: auto; scrollbar-width: thin;
  padding: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.rail-title { padding: 4px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rail-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 6px 8px;
  border-radius: var(--radius); text-decoration: none; font-size: 13px; font-weight: 600;
}
.rail-item:hover { background: var(--panel-raised); }
.rail-item[aria-current] { background: var(--accent-soft); color: var(--accent); }
.rail-item[aria-current] { background: color-mix(in srgb, var(--sport, var(--accent)) 16%, var(--panel)); color: var(--sport, var(--accent)); }
.rail-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item-count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rail-item[aria-current] .rail-item-count { color: inherit; }
.rail-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 16px; padding-left: 6px; border-left: 1px solid var(--line-strong); }
.rail-sub .pill { min-height: 30px; padding: 4px 8px; font-size: 13px; }

.sport-icon {
  flex: none; display: block; width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url(/icons/generic.svg) center / contain no-repeat;
  mask: url(/icons/generic.svg) center / contain no-repeat;
}
.sport-icon[data-sport="all"] { -webkit-mask-image: url(/icons/all.svg); mask-image: url(/icons/all.svg); }
.sport-icon[data-sport="football"] { -webkit-mask-image: url(/icons/football.svg); mask-image: url(/icons/football.svg); }
.sport-icon[data-sport="hockey"] { -webkit-mask-image: url(/icons/hockey.svg); mask-image: url(/icons/hockey.svg); }
.sport-icon[data-sport="basketball"] { -webkit-mask-image: url(/icons/basketball.svg); mask-image: url(/icons/basketball.svg); }
.sport-icon[data-sport="tennis"] { -webkit-mask-image: url(/icons/tennis.svg); mask-image: url(/icons/tennis.svg); }
.sport-icon[data-sport="cs2"] { -webkit-mask-image: url(/icons/cs2.svg); mask-image: url(/icons/cs2.svg); }
.sport-icon[data-sport="dota2"] { -webkit-mask-image: url(/icons/dota2.svg); mask-image: url(/icons/dota2.svg); }
.sport-icon[data-sport="lol"] { -webkit-mask-image: url(/icons/lol.svg); mask-image: url(/icons/lol.svg); }
.sport-icon[data-sport="valorant"] { -webkit-mask-image: url(/icons/valorant.svg); mask-image: url(/icons/valorant.svg); }
.sport-icon[data-sport="cyberfootball"] { -webkit-mask-image: url(/icons/cyberfootball.svg); mask-image: url(/icons/cyberfootball.svg); }
.sport-icon[data-sport="volleyball"] { -webkit-mask-image: url(/icons/volleyball.svg); mask-image: url(/icons/volleyball.svg); }
.sport-icon[data-sport="tabletennis"] { -webkit-mask-image: url(/icons/tabletennis.svg); mask-image: url(/icons/tabletennis.svg); }
.sport-icon[data-sport="handball"] { -webkit-mask-image: url(/icons/handball.svg); mask-image: url(/icons/handball.svg); }
.sport-icon[data-sport="mma"] { -webkit-mask-image: url(/icons/mma.svg); mask-image: url(/icons/mma.svg); }
.sport-icon[data-sport="boxing"] { -webkit-mask-image: url(/icons/boxing.svg); mask-image: url(/icons/boxing.svg); }
.sport-icon[data-sport="futsal"] { -webkit-mask-image: url(/icons/futsal.svg); mask-image: url(/icons/futsal.svg); }
.sport-icon[data-sport="bandy"] { -webkit-mask-image: url(/icons/bandy.svg); mask-image: url(/icons/bandy.svg); }
.sport-icon[data-sport="baseball"] { -webkit-mask-image: url(/icons/baseball.svg); mask-image: url(/icons/baseball.svg); }
.sport-icon[data-sport="americanfootball"] { -webkit-mask-image: url(/icons/americanfootball.svg); mask-image: url(/icons/americanfootball.svg); }
.sport-icon[data-sport="rugby"] { -webkit-mask-image: url(/icons/rugby.svg); mask-image: url(/icons/rugby.svg); }
.sport-icon[data-sport="aussierules"] { -webkit-mask-image: url(/icons/aussierules.svg); mask-image: url(/icons/aussierules.svg); }
.sport-icon[data-sport="cricket"] { -webkit-mask-image: url(/icons/cricket.svg); mask-image: url(/icons/cricket.svg); }
.sport-icon[data-sport="waterpolo"] { -webkit-mask-image: url(/icons/waterpolo.svg); mask-image: url(/icons/waterpolo.svg); }
.sport-icon[data-sport="floorball"] { -webkit-mask-image: url(/icons/floorball.svg); mask-image: url(/icons/floorball.svg); }
.sport-icon[data-sport="fieldhockey"] { -webkit-mask-image: url(/icons/fieldhockey.svg); mask-image: url(/icons/fieldhockey.svg); }
.sport-icon[data-sport="billiards"] { -webkit-mask-image: url(/icons/billiards.svg); mask-image: url(/icons/billiards.svg); }
.sport-icon[data-sport="motorsport"] { -webkit-mask-image: url(/icons/motorsport.svg); mask-image: url(/icons/motorsport.svg); }
.sport-icon[data-sport="cycling"] { -webkit-mask-image: url(/icons/cycling.svg); mask-image: url(/icons/cycling.svg); }

/*
 * Every sport has a colour of its own, so the eye finds it in the menu, the league heads, the cards and
 * the match board. Set on any block that names its sport; neighbours in the menu never share a hue.
 */
[data-sport="football"] { --sport: #5ad17f; }
[data-sport="hockey"] { --sport: #74c0fc; }
[data-sport="basketball"] { --sport: #ff9f43; }
[data-sport="tennis"] { --sport: #ffe066; }
[data-sport="volleyball"] { --sport: #63e6be; }
[data-sport="tabletennis"] { --sport: #ff8fab; }
[data-sport="handball"] { --sport: #b197fc; }
[data-sport="mma"] { --sport: #ff6b6b; }
[data-sport="boxing"] { --sport: #f06543; }
[data-sport="futsal"] { --sport: #8ce99a; }
[data-sport="bandy"] { --sport: #a5d8ff; }
[data-sport="baseball"] { --sport: #ffd8a8; }
[data-sport="americanfootball"] { --sport: #d2a679; }
[data-sport="rugby"] { --sport: #e9c46a; }
[data-sport="aussierules"] { --sport: #c77dff; }
[data-sport="cricket"] { --sport: #e8d8b0; }
[data-sport="waterpolo"] { --sport: #22b8cf; }
[data-sport="floorball"] { --sport: #91a7ff; }
[data-sport="fieldhockey"] { --sport: #20c997; }
[data-sport="billiards"] { --sport: #c9a227; }
[data-sport="motorsport"] { --sport: #ced4da; }
[data-sport="cycling"] { --sport: #96f2d7; }
[data-sport="cs2"] { --sport: #fcc419; }
[data-sport="dota2"] { --sport: #e03131; }
[data-sport="lol"] { --sport: #5c7cfa; }
[data-sport="valorant"] { --sport: #ff4d6d; }
[data-sport="cyberfootball"] { --sport: #69db7c; }
/* On white the pale shades would vanish: the light theme has deeper ones of the same hues. */
:root[data-theme="light"] [data-sport="football"] { --sport: #2f9e44; }
:root[data-theme="light"] [data-sport="hockey"] { --sport: #2b7fd1; }
:root[data-theme="light"] [data-sport="basketball"] { --sport: #e8590c; }
:root[data-theme="light"] [data-sport="tennis"] { --sport: #b8a000; }
:root[data-theme="light"] [data-sport="volleyball"] { --sport: #0e9d78; }
:root[data-theme="light"] [data-sport="tabletennis"] { --sport: #e64980; }
:root[data-theme="light"] [data-sport="handball"] { --sport: #7950f2; }
:root[data-theme="light"] [data-sport="mma"] { --sport: #e03131; }
:root[data-theme="light"] [data-sport="boxing"] { --sport: #d9480f; }
:root[data-theme="light"] [data-sport="futsal"] { --sport: #37b24d; }
:root[data-theme="light"] [data-sport="bandy"] { --sport: #3a8fd6; }
:root[data-theme="light"] [data-sport="baseball"] { --sport: #c98a3a; }
:root[data-theme="light"] [data-sport="americanfootball"] { --sport: #8d6e3a; }
:root[data-theme="light"] [data-sport="rugby"] { --sport: #b08a1a; }
:root[data-theme="light"] [data-sport="aussierules"] { --sport: #9b4de0; }
:root[data-theme="light"] [data-sport="cricket"] { --sport: #a08a4a; }
:root[data-theme="light"] [data-sport="waterpolo"] { --sport: #0b7285; }
:root[data-theme="light"] [data-sport="floorball"] { --sport: #5c6fe0; }
:root[data-theme="light"] [data-sport="fieldhockey"] { --sport: #0f8f6a; }
:root[data-theme="light"] [data-sport="billiards"] { --sport: #9a7b14; }
:root[data-theme="light"] [data-sport="motorsport"] { --sport: #6c757d; }
:root[data-theme="light"] [data-sport="cycling"] { --sport: #1f9d7a; }
:root[data-theme="light"] [data-sport="cs2"] { --sport: #d29200; }
:root[data-theme="light"] [data-sport="dota2"] { --sport: #c92a2a; }
:root[data-theme="light"] [data-sport="lol"] { --sport: #4263eb; }
:root[data-theme="light"] [data-sport="valorant"] { --sport: #e0314f; }
:root[data-theme="light"] [data-sport="cyberfootball"] { --sport: #2b8a3e; }
.rail-item .sport-icon { color: var(--sport, currentColor); }

/* ---------- Filter bar ---------- */
.line-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.view-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--field); border-radius: var(--radius); }
.view-tab {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 12px;
  border-radius: 4px; text-decoration: none;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.view-tab:hover { color: var(--text); }
.view-tab[aria-current] { background: var(--cell); color: var(--text); }
.view-tab-count { font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.select {
  min-height: 36px; padding: 4px 8px;
  background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 13px;
}
.search {
  flex: 0 1 240px; margin-left: auto; min-width: 150px; min-height: 36px; padding: 6px 10px;
  background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 13px;
}
.search::placeholder, .input::placeholder { color: var(--muted); }

/* ---------- Odds table ---------- */
.line { container: line / inline-size; }
.event-list, .bet-list { display: flex; flex-direction: column; gap: 8px; }
.league {
  --cols: 90px minmax(130px, 1fr) repeat(3, 50px) 74px 66px 40px repeat(2, 50px) 34px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.league-head, .row { display: grid; grid-template-columns: var(--cols); column-gap: 3px; align-items: center; padding: 0 8px; }
.league-head { min-height: 34px; background: var(--panel-raised); }
/* A stripe and a faint tint in the sport's colour on every league head. */
.league[data-sport] .league-head { box-shadow: inset 3px 0 0 var(--sport, transparent); background: color-mix(in srgb, var(--sport, var(--panel-raised)) 7%, var(--panel-raised)); }
.league-name { grid-column: 1 / span 2; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 700; }
.league-name .sport-icon { width: 16px; height: 16px; color: var(--sport, var(--accent)); }
.league-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.league-note { flex: none; color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.col-label { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; }
.row-cells { display: contents; }
.row { min-height: 40px; border-top: 1px solid var(--line); }
.row:hover { background: var(--row-hover); }
.row-time { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-time time { font-size: 13px; font-weight: 600; }
.row-day { font-size: 11px; color: var(--muted); }
.live-mark { display: inline-flex; align-items: center; gap: 5px; color: var(--live); font-size: 12px; font-weight: 700; }
.live-mark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }
.row-teams {
  display: block; min-width: 0; padding: 10px 6px 10px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: none; font-size: 13px; font-weight: 600;
}
.row-teams:hover { color: var(--accent); }
.row-teams .vs { color: var(--muted); font-weight: 400; }
.row-teams .vs.is-live { color: var(--accent); font-weight: 700; }
.row-format { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px; background: var(--cell); color: var(--muted); font-size: 10px; font-weight: 700; vertical-align: 1px; }
.c-h1, .c-tl, .c-m1 { margin-left: 8px; }
.c-tl { text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-m1, .c-m2 { display: none; }
/* A series: no draw column, a wider clock, and the current map's winner. */
.league.is-series { --cols: 114px minmax(130px, 1fr) repeat(2, 50px) 74px 66px 40px repeat(2, 50px) 58px 50px 34px; }
.is-series .c-x { display: none; }
.is-series .c-m1, .is-series .c-m2 { display: flex; }
.is-series .col-label.c-m1, .is-series .col-label.c-m2 { display: block; }
.row-day { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Long tables stay cheap: rows off screen are not laid out or painted. */
.league { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.row { contain: layout style; }
.row-more { justify-self: end; padding: 8px 2px; color: var(--muted); font-size: 12px; text-decoration: none; font-variant-numeric: tabular-nums; }
.row-more:hover { color: var(--accent); }
.more-wrap { display: flex; justify-content: center; }

.price {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 0; min-height: 30px; padding: 2px 4px;
  background: var(--cell); border: 0; border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
button.price:hover:not(:disabled) { background: var(--cell-hover); }
.price-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.row .price-label { display: none; }
.price-line { font-size: 11px; color: var(--muted); white-space: nowrap; }
.price-value { font-size: 13px; font-weight: 700; white-space: nowrap; }
.price:disabled { opacity: .5; }
.price[aria-pressed="true"] { background: var(--accent); }
button.price[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent-hover); }
.price[aria-pressed="true"] .price-label, .price[aria-pressed="true"] .price-line, .price[aria-pressed="true"] .price-value { color: var(--on-accent); }
/*
 * A moved price: a light in the corner of its button, green when it went up and red when it went down,
 * on for six seconds; at first the value and the edge of the button take the same colour. Only
 * colour, shadow and opacity change, so nothing around it is laid out again. --light-delay lets a
 * button drawn later pick the light up where it was.
 */
.price { position: relative; }
.price.moved-up { --light: var(--green); }
.price.moved-down { --light: var(--red); }
.price.moved-up, .price.moved-down { animation: light-edge 2.4s ease-out var(--light-delay, 0s) both; }
.price.moved-up .price-value, .price.moved-down .price-value { animation: light-value 2.4s ease-out var(--light-delay, 0s) both; }
.price.moved-up::after, .price.moved-down::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; pointer-events: none;
  background: var(--light); box-shadow: 0 0 0 1.5px var(--panel), 0 0 9px 1px var(--light);
  animation: light-dot 6s linear var(--light-delay, 0s) both;
}
.price.moved-down::after { top: auto; bottom: 3px; }
@keyframes light-edge {
  0% { box-shadow: inset 0 0 0 1.5px var(--light), 0 0 12px -3px var(--light); }
  100% { box-shadow: inset 0 0 0 1.5px transparent, 0 0 12px -3px transparent; }
}
@keyframes light-value { from { color: var(--light); } }
@keyframes light-dot {
  0% { opacity: 0; transform: scale(.3); }
  4% { opacity: 1; transform: scale(1.5); }
  9% { transform: scale(1); }
  14% { opacity: .45; }
  19% { opacity: 1; }
  24% { opacity: .45; }
  29%, 88% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes light-dot-calm { 0%, 99% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .price.moved-up::after, .price.moved-down::after { animation-name: light-dot-calm; }
}

/* Column groups: a menu over each group picks the market it shows; a narrow screen switches groups instead. */
.col-groups {
  --cols: 90px minmax(130px, 1fr) repeat(3, 50px) 74px 66px 40px repeat(2, 50px) 34px;
  display: grid; grid-template-columns: var(--cols); column-gap: 3px; padding: 0 9px; margin-bottom: 6px;
}
.cg-lead { grid-column: span 2; }
.cg-outcomes { grid-column: span 3; }
.cg-handicaps { grid-column: span 2; margin-left: 8px; }
.cg-totals { grid-column: span 3; margin-left: 8px; }
.col-group { position: relative; min-width: 0; }
.col-group > summary {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 0 6px;
  list-style: none; cursor: pointer; background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.col-group > summary::-webkit-details-marker { display: none; }
.col-group > summary::after {
  content: ""; flex: none; width: 5px; height: 5px; margin-top: -3px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg);
}
.col-group[open] > summary { border-color: var(--accent-line); }
.col-group[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.col-group > summary:hover { background: var(--cell); }
.col-group-choice { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--accent); font-weight: 600; letter-spacing: 0; text-transform: none; }
.col-menu {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; min-width: 180px; padding: 4px;
  background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 28px rgb(0 0 0 / .45);
}
.col-choice { padding: 8px 10px; background: none; border: 0; border-radius: 5px; text-align: left; font-size: 13px; }
.col-choice:hover { background: var(--cell-hover); }
.col-choice[aria-pressed="true"] { color: var(--accent); font-weight: 700; }
.col-tabs, .col-variants { display: none; }
/* The total's line has its own column; inside the buttons it is only for narrow screens. */
.row .price.c-o .price-line, .row .price.c-u .price-line { display: none; }

@container line (max-width: 840px) {
  .league.is-series { --cols: 114px minmax(120px, 1fr) repeat(2, 50px) 74px 66px 40px repeat(2, 50px) 34px; }
  .is-series .c-m1, .is-series .c-m2, .is-series .col-label.c-m1, .is-series .col-label.c-m2 { display: none; }
}
@container line (max-width: 800px) {
  .league, .col-groups { --cols: 90px minmax(120px, 1fr) repeat(3, 50px) 40px repeat(2, 50px) 34px; }
  .league.is-series { --cols: 114px minmax(120px, 1fr) repeat(2, 50px) 40px repeat(2, 50px) 34px; }
  .c-h1, .c-h2, .cg-handicaps { display: none; }
}
@container line (max-width: 590px) {
  .league, .league.is-series { --cols: minmax(0, 1fr) auto; }
  .league-head { padding: 0 10px; }
  .league-head .row-cells { display: none; }
  .league-name { grid-column: 1 / -1; }
  .league-note { display: none; }
  .row { grid-template-areas: "time more" "teams teams" "cells cells" "bar bar"; padding: 8px 10px 10px; row-gap: 2px; }
  .row .match-bar { grid-area: bar; margin: 6px 0 0; }
  .row .match-bar[hidden] { display: none; }
  .row-time { grid-area: time; flex-direction: row; align-items: baseline; gap: 6px; }
  .row-teams { grid-area: teams; padding: 2px 0 6px; white-space: normal; font-size: 14px; }
  .row-more { grid-area: more; padding: 0 2px; }
  .row-cells { grid-area: cells; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
  .c-tl, .c-o, .c-u, .cell-blank, .is-series .c-m1, .is-series .c-m2 { display: none; }
  .row .price { justify-content: space-between; min-height: 42px; padding: 4px 10px; }
  .row .price-label { display: inline; }
  /* One group at a time, picked with the switches over the list. */
  .col-groups { display: none; }
  .col-tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .col-tab { flex: 1; min-height: 34px; padding: 4px 8px; background: none; border: 0; border-radius: var(--radius); font-size: 13px; font-weight: 600; color: var(--muted); }
  .col-tab[aria-pressed="true"] { background: var(--cell); color: var(--text); }
  .col-variants { display: block; margin-bottom: 8px; }
  .col-variant { display: none; width: 100%; }
  .line[data-group="outcomes"] .col-variant[data-group="outcomes"], .line[data-group="handicaps"] .col-variant[data-group="handicaps"],
  .line[data-group="totals"] .col-variant[data-group="totals"] { display: block; }
  .line[data-group="handicaps"] .row .c-1, .line[data-group="handicaps"] .row .c-x, .line[data-group="handicaps"] .row .c-2,
  .line[data-group="totals"] .row .c-1, .line[data-group="totals"] .row .c-x, .line[data-group="totals"] .row .c-2 { display: none; }
  .line[data-group="handicaps"] .row .price.c-h1, .line[data-group="handicaps"] .row .price.c-h2,
  .line[data-group="totals"] .row .price.c-o, .line[data-group="totals"] .row .price.c-u { display: flex; }
  .row .price.c-o .price-line, .row .price.c-u .price-line { display: inline; }
  .row .price.c-h1 .price-line, .row .price.c-h2 .price-line { display: none; }
}

/* ---------- Loading and small controls ---------- */
/* A placeholder shows only if the wait is noticeable: a fast page opens without a flash. */
.skeleton { display: flex; flex-direction: column; gap: 6px; opacity: 0; animation: skeleton-in .15s .15s forwards; }
@keyframes skeleton-in { to { opacity: 1; } }
.skeleton-row { display: block; height: 40px; border-radius: var(--radius); background: var(--panel); animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-row:first-child { height: 34px; background: var(--panel-raised); }
@keyframes skeleton-pulse { 50% { opacity: .55; } }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { color: var(--blue); }
.range { width: 100%; accent-color: var(--accent); }
.code-block { margin: 0; padding: 10px 12px; overflow-x: auto; background: var(--field); border-radius: var(--radius); font: 13px/1.6 ui-monospace, Consolas, monospace; white-space: pre; }
.notice-note { padding: 10px 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0; }
.result-maps { margin-top: 2px; font-size: 12px; color: var(--muted); }
button.pill { background: none; border: 0; cursor: pointer; }

/* ---------- Esports hub ---------- */
.hub-top, .hub-live { display: flex; flex-direction: column; gap: 8px; }
.live-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.live-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.live-card-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live-card-head .sport-icon { width: 15px; height: 15px; color: var(--sport, var(--accent)); }
.live-card-league { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card-head .live-mark { margin-left: auto; font-size: 11px; }
.live-card-head .row-format { flex: none; margin-left: 0; }
.live-card-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; text-decoration: none; font-size: 13px; }
.live-card-teams .team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card-teams .team:last-child { text-align: right; }
.live-card-score { color: var(--accent); font: 800 18px/1 var(--font-head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-card-clock { min-height: 17px; text-align: center; font-size: 12px; color: var(--muted); }
.live-card-prices { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.live-card .price { justify-content: space-between; min-height: 34px; padding: 2px 8px; }

/* ---------- Showcase: the main matches as large cards over the line ---------- */
.showcase { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.show-bar { display: flex; align-items: center; gap: 12px; }
.show-bar .day { margin: 0; }
.show-nav { display: flex; gap: 4px; margin-left: auto; }
.showcase.fits .show-nav { visibility: hidden; }
.show-arrow { width: 30px; height: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 50%; font-size: 20px; line-height: 1; }
.show-arrow:hover { background: var(--panel-raised); color: var(--accent); }
.show-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(238px, 268px); gap: 8px;
  overflow-x: auto; padding: 3px 3px 6px; margin: -3px -3px 0; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.show-card {
  position: relative; display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 12px 12px 10px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-raised), var(--panel) 65%); border: 1px solid var(--line); border-radius: var(--radius-lg);
  scroll-snap-align: start;
}
.show-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--sport, var(--accent)); }
.show-card.is-live::before { background: var(--live); }
.show-card:hover { border-color: var(--line-strong); }
.show-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.show-head .sport-icon { flex: none; width: 14px; height: 14px; color: var(--sport, var(--accent)); }
.show-league { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-head .row-format { flex: none; margin-left: 0; }
.show-head .row-time { flex: none; margin-left: auto; flex-direction: row; align-items: baseline; gap: 5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.show-head .row-time time { font-size: 12px; color: var(--text); }
.show-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; text-decoration: none; }
.show-teams:hover .show-team { color: var(--accent); }
.show-team { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font: 700 15px/1.2 var(--font-head); overflow-wrap: anywhere; }
.show-team:last-child { text-align: right; }
.show-mid { color: var(--muted); font: 800 20px/1 var(--font-head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.show-mid.is-live { color: var(--accent); }
.show-prices { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.show-card .price { flex-direction: column; gap: 1px; min-height: 46px; padding: 4px 6px; }
.show-card .price-label { font-size: 11px; }
.show-card .price-value { font-size: 15px; }
.show-closed { min-height: 46px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.show-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.show-more { font-size: 12px; color: var(--muted); text-decoration: none; }
.show-more:hover { color: var(--accent); }

/* ---------- The timeline of a match: time gone, the end of each part, a mark for every goal ---------- */
.match-bar { position: relative; height: 3px; border-radius: 2px; background: var(--cell); }
.match-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); transition: width .6s linear; }
.match-bar-part { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.match-bar-goal {
  position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--text); box-shadow: 0 0 0 1.5px var(--panel);
}
.match-bar-goal.away { background: var(--blue); }
.row .match-bar { grid-column: 1 / -1; margin: -3px 0 7px; }
.show-card .match-bar, .popular-item .match-bar { height: 4px; }
.board .match-bar { width: 100%; max-width: 520px; height: 8px; border-radius: 4px; margin-top: 2px; }
.board .match-bar-fill { border-radius: 4px; }
.board .match-bar-part { top: -3px; bottom: -3px; }
.board .match-bar-goal { width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--panel); }
/* The history of the main market's prices: a small step chart per outcome. */
.history-block { gap: 10px; }
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-row { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 40px; }
.history-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.history-label small { font-weight: 400; color: var(--muted); }
.spark { display: block; width: 100%; max-height: 48px; overflow: visible; }
.spark-run { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-run.is-up { stroke: var(--green); }
.spark-run.is-down { stroke: var(--red); }
.spark-dot { fill: var(--text); }
.history-now { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.history-now b { font-size: 15px; }
.history-now small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.history-now.is-up small { color: var(--green); }
.history-now.is-down small { color: var(--red); }
@media (max-width: 520px) { .history-row { grid-template-columns: minmax(64px, 100px) minmax(0, 1fr) auto; gap: 8px; } .history-label small { display: none; } }
/* The feed under the board. */
.feed { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.feed-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.feed-item:first-child { border-top: 0; }
.feed-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-text { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item.is-goal .feed-text::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.feed-item.is-goal.side-home .feed-text::before { background: var(--accent); }
.feed-item.is-goal.side-away .feed-text::before { background: var(--blue); }
.feed-item.is-part .feed-text, .feed-item.is-change .feed-text { color: var(--muted); }
.feed-item.is-now .feed-text { color: var(--accent); font-weight: 700; }
.feed-score { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .feed-item { grid-template-columns: 56px minmax(0, 1fr) auto; } }
@media (max-width: 799px) { .show-strip { grid-auto-columns: 84%; } }

/* ---------- Match page: maps and form ---------- */
.match-head { display: flex; flex-direction: column; gap: 8px; }
.board-clock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.map-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.map-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.map-card.live { border-color: var(--accent-line); background: var(--accent-soft); }
.map-card.skipped { opacity: .55; }
.map-name { font-size: 12px; font-weight: 600; }
.map-score { font: 800 18px/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
.map-score.muted { color: var(--muted); }
.map-status { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.won-home .map-side.home, .won-away .map-side.away { color: var(--accent); }
.form-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-side { display: flex; flex-direction: column; gap: 6px; }
.form-list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.form-result { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: var(--cell); font-size: 11px; font-weight: 700; }
.form-result.W { color: var(--green); }
.form-result.L { color: var(--red); }

/* ---------- Lotteries ---------- */
.lot-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 10px; align-items: start; }
.lot-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.lot-next { display: flex; flex-direction: column; align-items: flex-end; }
.lot-countdown { font: 800 22px/1.1 var(--font-head); color: var(--accent); font-variant-numeric: tabular-nums; }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; }
.lot-number { min-height: 38px; background: var(--cell); border: 0; border-radius: 5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lot-number:hover:not(:disabled) { background: var(--cell-hover); }
.lot-number:disabled { opacity: .4; }
.lot-number[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); opacity: 1; }
.lot-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.lot-columns h3 { margin-bottom: 4px; }
.lot-history, .lot-tickets { display: flex; flex-direction: column; gap: 6px; }
.lot-history li { display: flex; align-items: center; gap: 8px; }
.lot-balls { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.lot-ball { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cell); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lot-ball.hit { background: var(--accent); color: var(--on-accent); }
.lot-ticket { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--panel-raised); border-radius: var(--radius); }

/* ---------- Games ---------- */
.game-board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.game-stage { display: grid; place-items: center; min-height: 330px; padding: 16px; background: var(--field); border-radius: var(--radius-lg); }
.game-controls { display: flex; flex-direction: column; gap: 10px; }
.dice-display { font: 800 72px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.dice-display.won { color: var(--green); }
.dice-display.lost { color: var(--red); }
.mine-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: min(100%, 320px); }
/* Penalty: a goal of six zones; the ball flies to the chosen one, the keeper's zones light up. */
.goal {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px;
  width: min(100%, 380px); aspect-ratio: 3 / 1.7; margin-bottom: 44px; padding: 8px;
  border: 6px solid var(--post); border-bottom: 0; border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(0deg, transparent 0 13px, var(--ink-faint) 13px 14px), repeating-linear-gradient(90deg, transparent 0 13px, var(--ink-faint) 13px 14px);
}
.goal::after { content: ""; position: absolute; left: -40px; right: -40px; bottom: -2px; height: 2px; background: var(--ink-mid); }
.goal-zone { min-height: 0; background: transparent; border: 1px dashed var(--ink-soft); border-radius: 4px; }
.goal-zone:hover { background: var(--ink-faint); }
.goal-zone[aria-pressed="true"] { background: var(--accent-soft); border: 2px solid var(--accent); }
.goal-zone.keeper { background: rgb(141 188 255 / .3); border-color: var(--blue); }
.goal-ball {
  position: absolute; z-index: 1; width: 24px; height: 24px; left: calc(50% - 12px); top: calc(100% + 12px); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #fff 0 40%, #c9d0d6 70%, #8f989f); box-shadow: 0 2px 6px rgb(0 0 0 / .5);
  transition: left .42s cubic-bezier(.2,.7,.3,1), top .42s cubic-bezier(.2,.7,.3,1);
}
.goal-ball[data-zone="0"] { left: calc(17% - 12px); top: calc(26% - 12px); }
.goal-ball[data-zone="1"] { left: calc(50% - 12px); top: calc(26% - 12px); }
.goal-ball[data-zone="2"] { left: calc(83% - 12px); top: calc(26% - 12px); }
.goal-ball[data-zone="3"] { left: calc(17% - 12px); top: calc(74% - 12px); }
.goal-ball[data-zone="4"] { left: calc(50% - 12px); top: calc(74% - 12px); }
.goal-ball[data-zone="5"] { left: calc(83% - 12px); top: calc(74% - 12px); }
.goal.scored { border-color: var(--green); }
.goal.saved { border-color: var(--red); }
/* Ring: two corners and the board between them. */
.ring {
  display: grid; grid-template-columns: 1fr 1.6fr 1fr; align-items: center; gap: 10px; width: min(100%, 440px); padding: 22px 14px;
  background: var(--canvas); border: 4px solid #6b4b3f; border-radius: 10px;
  box-shadow: inset 0 0 0 5px rgb(255 255 255 / .05), inset 0 0 0 9px rgb(107 75 63 / .45);
}
.ring-corner { padding: 10px 6px; border-radius: var(--radius); font-size: 12px; font-weight: 800; text-align: center; letter-spacing: .02em; }
.ring-corner.red { background: rgb(255 129 115 / .16); color: var(--red); }
.ring-corner.blue { background: rgb(141 188 255 / .16); color: var(--blue); }
.ring-board { font: 700 15px/1.3 var(--font-head); color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.ring.red-won .ring-corner.red, .ring.blue-won .ring-corner.blue { outline: 2px solid currentColor; }
.ring.decision .ring-board { color: var(--accent); }
.ring-picks { display: flex; flex-direction: column; gap: 6px; }
.ring-pick {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--cell); border: 1px solid transparent; border-radius: var(--radius); text-align: left; font-size: 13px;
}
.ring-pick:hover { background: var(--cell-hover); }
.ring-pick[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ring-pick b { color: var(--text); font-variant-numeric: tabular-nums; }
.ring-pick small { color: var(--muted); font-size: 12px; }
.ring-pick.is-red span { color: var(--red); }
.ring-pick.is-blue span { color: var(--blue); }
.segments.wrap { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mine-cell { aspect-ratio: 1; background: var(--cell); border: 0; border-radius: 6px; font-size: 20px; font-weight: 800; transition: transform .12s ease-out, background-color .12s; }
.mine-cell:hover:not(:disabled) { background: var(--cell-hover); transform: translateY(-1px); }
.mine-cell.safe { background: var(--accent-soft); color: var(--accent); }
.mine-cell.mine { background: var(--red-soft); color: var(--red); }
.mine-cell.hit { background: var(--red); color: var(--on-red); }
.wheel-holder { position: relative; width: min(100%, 300px); }
.wheel { display: block; width: 100%; height: auto; }
.wheel-disc { transform-origin: 100px 100px; }
.wheel-pointer { position: absolute; left: 50%; top: -4px; z-index: 1; width: 0; height: 0; margin-left: -9px; border: 9px solid transparent; border-top: 16px solid var(--accent); }
.wheel-legend { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.wheel-key { display: inline-flex; align-items: center; gap: 6px; }
.wheel-swatch { width: 11px; height: 11px; }

/* ---------- Media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.media-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; }
.media-card:hover { border-color: var(--line-strong); }
.media-title { font: 700 16px/1.25 var(--font-head); }
.media-summary { flex: 1; font-size: 13px; color: var(--muted); }
.media-results { display: flex; flex-direction: column; gap: 6px; }
.article { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.article-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.article-summary { font-size: 16px; color: var(--muted); }
.article-body { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.55; }
.article-body h2 { margin-top: 8px; font: 700 18px/1.3 var(--font-head); }
.article-list { display: flex; flex-direction: column; gap: 4px; padding-left: 20px; list-style: disc; }
.article-input { font-family: var(--font-ui); line-height: 1.5; }

/* ---------- App, promotions, clubs, help ---------- */
.app-hero { flex-direction: row; align-items: flex-start; gap: 16px; }
.app-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.app-icon { flex: none; border-radius: 16px; }
.help-steps { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; font-size: 13px; }
.promo-daily { align-items: flex-start; background: linear-gradient(140deg, var(--accent-soft), var(--panel) 60%); border-color: var(--accent-line); }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.promo-card { align-items: flex-start; gap: 6px; font-size: 13px; }
.promo-code code { padding: 2px 8px; background: var(--field); border-radius: 4px; font: 700 13px ui-monospace, Consolas, monospace; user-select: all; }
.promo-form { display: flex; flex-wrap: wrap; gap: 8px; }
.promo-input { flex: 1 1 200px; width: auto; text-transform: uppercase; }
.clubs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; align-items: start; }
.clubs-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.club-place { color: var(--muted); font-variant-numeric: tabular-nums; }
.user-row.is-mine { border-color: var(--accent-line); }
.help-sections { display: flex; flex-direction: column; gap: 10px; }
.help-item { border-top: 1px solid var(--line); padding-top: 8px; }
.help-item summary { min-height: 26px; cursor: pointer; font-weight: 600; font-size: 13px; }
.help-item p, .help-item form { margin-top: 6px; color: var(--muted); font-size: 13px; }

/* ---------- Back office: manual control ---------- */
.admin-switch { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.admin-event-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.admin-market { background: var(--panel-raised); }
.admin-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.price-input { min-height: 34px; padding: 4px 8px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.map-table .input.score { width: 62px; min-height: 34px; padding: 2px 4px; font-size: 14px; }
.admin-history { display: flex; flex-direction: column; gap: 6px; }
.admin-history li { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.admin-article { padding: 8px 0; border-top: 1px solid var(--line); align-items: flex-start; gap: 4px; }
.mode-list { display: grid; gap: 4px; }
.mode-option { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.mode-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.agent-actions { display: flex; flex-direction: column; gap: 8px; }
.agent-action { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--panel-raised); border-radius: var(--radius); font-size: 13px; }

/* ---------- Pills ---------- */
.rail-group { display: flex; flex-direction: column; gap: 2px; }
.pills-row { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.pill {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 34px; padding: 5px 10px;
  border-radius: var(--radius); text-decoration: none; color: var(--muted); font-size: 13px;
}
.pill:hover { background: var(--panel-raised); color: var(--text); }
.pill[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pills-row .pill { border: 1px solid var(--line); }
.pills-row .pill[aria-current] { border-color: var(--accent-line); }
.pill-count { font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- Results ---------- */
.day { margin: 10px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day:first-child { margin-top: 0; }
.result {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
  padding: 7px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
}
.result:hover { border-color: var(--line-strong); }
.result-date { font-size: 12px; color: var(--muted); }
.result-teams { display: flex; flex-direction: column; min-width: 0; }
.result-score { display: grid; gap: 2px; }
.team { font-weight: 600; overflow-wrap: anywhere; }
.event-meta { margin-top: 2px; font-size: 12px; color: var(--muted); }
.digit {
  display: grid; place-items: center;
  min-width: 32px; height: 22px; padding: 0 6px;
  background: var(--cell);
  font-weight: 700; font-size: 13px; line-height: 1; font-variant-numeric: tabular-nums;
  border-radius: 4px;
}
.digit.big { min-width: 56px; height: 62px; font-size: 38px; font-family: var(--font-head); }

/* ---------- Match ---------- */
.back { align-self: flex-start; color: var(--muted); text-decoration: none; padding: 2px 0; font-size: 13px; }
.back:hover { color: var(--text); }
.board { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius-lg); }
.board[data-sport] { border-top-color: var(--sport, var(--accent)); }
.board-meta, .board-status { color: var(--muted); font-size: 13px; }
.board-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; }
.board-team { text-align: right; }
.board-team.away { text-align: left; }
.board-score { display: flex; gap: 4px; }
.board-vs { padding: 8px 12px; background: var(--cell); border-radius: var(--radius); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.match-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; align-items: start; }
.market { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.market h2 { font-size: 13px; overflow-wrap: anywhere; }
.market-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 4px; }
.market-prices .price { justify-content: space-between; flex-wrap: wrap; min-height: 36px; padding: 4px 8px; }
.price.settled { opacity: 1; }
.price.settled .price-value { color: var(--muted); }
.price.won { box-shadow: inset 0 0 0 1px var(--green); }
.price.won .price-value, .price-result { color: var(--green); }
.price-result { flex-basis: 100%; font-size: 11px; text-align: right; }
.price.lost .price-result { color: var(--muted); }
.price.void .price-result { color: var(--blue); }

/* ---------- Buttons and forms ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 38px; padding: 6px 14px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.button:hover:not(:disabled) { background: var(--panel-raised); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.primary:disabled { background: var(--panel-raised); border-color: var(--line); color: var(--muted); opacity: 1; }
.button:disabled { opacity: .6; }
.button.small { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.button.more { align-self: center; margin-top: 4px; }
.link-button { min-height: 30px; padding: 4px 2px; background: none; border: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; flex: none; background: none; border: 0; border-radius: var(--radius); color: var(--muted); font-size: 21px; line-height: 1; }
.icon-button:hover { background: var(--panel-raised); color: var(--text); }

.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 13px; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--muted); }
.input { width: 100%; min-height: 42px; padding: 8px 12px; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 16px; }
.input:disabled { opacity: .6; }
.form-message { font-size: 13px; color: var(--green); }
.form-message:empty { display: none; }
.form-message.error { color: var(--red); }

.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; background: var(--field); border-radius: var(--radius); }
.segment { min-height: 34px; padding: 4px 8px; background: none; border: 0; border-radius: 4px; color: var(--muted); font-size: 13px; }
.segment[aria-pressed="true"] { background: var(--cell); color: var(--text); font-weight: 600; }

/* ---------- Figures and chips ---------- */
.figures { display: flex; flex-direction: column; gap: 4px; }
.figures > div { display: flex; justify-content: space-between; gap: 12px; }
.figures dt { color: var(--muted); font-size: 13px; }
.figures dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.positive { color: var(--green); }
.negative { color: var(--red); }
/* A field only robots fill in: out of sight, out of the tab order. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* The second factor, the statistics and the data panels in the account. */
.security { display: flex; flex-direction: column; gap: 10px; }
.codes { white-space: pre; font-size: 15px; line-height: 1.5; }
.stats { display: flex; flex-direction: column; gap: 12px; }
.week-bars { display: block; width: 100%; height: 90px; }
.week-axis { stroke: var(--line-strong); stroke-width: 1; }
.week-bar.up { fill: var(--green); }
.week-bar.down { fill: var(--red); }
.week-bar.zero { fill: var(--line-strong); }
/* The health panel's problems and the error log in the admin. */
.problems { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.error-report { gap: 6px; }
.error-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.error-message { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.error-detail { margin: 6px 0 0; padding: 8px; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--panel-raised); border-radius: var(--radius); }
.summary { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.summary > div { flex: 1 1 150px; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.summary dd { font-weight: 700; font-size: 18px; line-height: 1.25; text-align: left; }

.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--panel-raised); white-space: nowrap; }
.chip.small { padding: 1px 6px; font-size: 11px; }
.chip.open { color: var(--accent); background: var(--accent-soft); }
.chip.won { color: var(--green); }
.chip.lost { color: var(--red); }
.chip.void { color: var(--blue); }
.chip.cashed { color: var(--accent); }

/* ---------- Cards under the coupon ---------- */
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--muted); font-size: 13px; }
.card-accent { background: linear-gradient(140deg, var(--accent-soft), var(--panel) 72%); border-color: var(--accent-line); }
.card-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.card-figure { font: 800 26px/1.1 var(--font-head); color: var(--accent); font-variant-numeric: tabular-nums; }
.card .button { width: 100%; }

/* ---------- Coupon ---------- */
.slip {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.slip-head { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.slip-head h2 { font: 700 16px/1.2 var(--font-head); }
.slip-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; background: var(--accent); color: var(--on-accent); border-radius: 10px; font-size: 12px; font-weight: 700; }
.slip-count:empty { display: none; }
.slip-head .link-button { margin-left: auto; align-self: center; font-size: 13px; }
.sheet-close { display: none; }
.slip-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.slip-empty-icon { width: 34px; height: 34px; margin-bottom: 4px; background: var(--line-strong); -webkit-mask: url(/icons/coupon.svg) center / contain no-repeat; mask: url(/icons/coupon.svg) center / contain no-repeat; }
.slip-empty-title { color: var(--text); font-weight: 600; font-size: 14px; }
.slip-list { display: flex; flex-direction: column; gap: 4px; }
.slip-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px; align-items: start; padding: 7px 2px 7px 10px; background: var(--panel-raised); border-radius: var(--radius); border-left: 2px solid var(--accent); }
.slip-item.unavailable { border-left-color: var(--red); }
.slip-item.unavailable .slip-price { color: var(--muted); text-decoration: line-through; }
.slip-item-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.slip-event { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.slip-pick { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.slip-warn { font-size: 12px; color: var(--red); }
.slip-price { padding-top: 2px; font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
/* A moved price in the coupon: its light stays on until the new price is accepted. */
.slip-price.is-up, .slip-warn.is-up { color: var(--green); }
.slip-price.is-down, .slip-warn.is-down { color: var(--red); }
.slip-price.is-up::before, .slip-price.is-down::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 2px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 8px 1px currentColor; animation: light-blink 1.2s ease-in-out 3;
}
@keyframes light-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .slip-price.is-up::before, .slip-price.is-down::before { animation: none; } }
body.no-flash .slip-price.is-up::before, body.no-flash .slip-price.is-down::before { animation: none; }
.slip-item .icon-button { width: 26px; height: 26px; font-size: 17px; }
.slip-form { display: flex; flex-direction: column; gap: 8px; }
.stake-input { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.quick { min-height: 32px; background: var(--cell); border: 0; border-radius: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.quick:hover:not(:disabled) { background: var(--cell-hover); }
.place { width: 100%; }
.slip-message { font-size: 13px; color: var(--red); }
.slip-message:empty { display: none; }
.slip-message .link-button { display: inline; }
.receipt { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--panel-raised); border-left: 2px solid var(--green); border-radius: var(--radius); }
.receipt:focus { outline: none; }
.receipt-title { font-size: 15px; font-weight: 700; color: var(--green); }
.state-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 29; background: rgb(0 0 0 / .6); }
.slip-bar { display: none; }

/* ---------- Bets ---------- */
.bet { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.bet-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.bet-type { font-weight: 600; }
.bet-legs { display: flex; flex-direction: column; gap: 6px; }
.bet-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 7px 10px; background: var(--panel-raised); border-radius: var(--radius); }
.bet-leg a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.bet-leg a:hover { color: var(--accent); }
.bet-price { grid-column: 2; grid-row: 1; font-size: 14px; font-weight: 700; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.bet-pick, .bet-note { grid-column: 1; font-size: 13px; color: var(--muted); }
.bet-leg .chip { grid-column: 2; grid-row: 2 / span 2; align-self: end; justify-self: end; }
.bet-date { font-size: 12px; color: var(--muted); }
.cashout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cashout-button { border-color: var(--accent-line); color: var(--accent); }
.cashout-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.system-size { width: 100%; margin-top: 6px; }
.one-click-note { margin: 0 0 6px; padding: 6px 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); color: var(--text); }
.price.placing { opacity: .6; }

/* ---------- Account ---------- */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.wallet-balance { font: 800 32px/1.1 var(--font-head); color: var(--accent); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sessions { display: flex; flex-direction: column; gap: 6px; }
.session { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 10px; background: var(--panel-raised); border-radius: var(--radius); }
.session-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.session .field-hint { grid-column: 1; }
.session .button { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- Back office ---------- */
body.admin-mode .layout { grid-template-columns: minmax(0, 1fr); max-width: 1180px; }
body.admin-mode .side, body.admin-mode .slip-bar { display: none !important; }
body.admin-mode.has-slip-bar .footer { padding-bottom: 20px; }
.admin, .admin-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.admin .day { margin: 6px 0 0; }
.notice { padding: 10px 12px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.notice:hover { background: color-mix(in srgb, var(--accent-soft) 85%, var(--accent)); }
.admin-event { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.admin-event-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.admin-event-head a { text-decoration: none; }
.admin-event-head a:hover { color: var(--accent); }
.admin-event .event-meta { margin: 0; }
.event-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 6px; }
.score-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.input.score { width: 72px; text-align: center; font-size: 16px; font-weight: 700; }
.user-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; }
.user-row:hover { border-color: var(--line-strong); }
.user-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-row .event-meta { grid-column: 1; margin: 0; }
.user-figures { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.user-balance { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.button.danger { border-color: var(--red); color: var(--red); }
.button.danger:hover:not(:disabled) { background: var(--red-soft); }
.table td.wrap { white-space: normal; min-width: 220px; }
.table a { color: var(--blue); }
.secret { display: block; padding: 12px; background: var(--field); border-radius: var(--radius); color: var(--accent); font: 600 17px/1.3 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }

/* ---------- Support ---------- */
.textarea { min-height: 104px; resize: vertical; font-family: var(--font-ui); line-height: 1.45; }
.conversation { display: flex; flex-direction: column; gap: 12px; }
.messages { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.message { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; max-width: min(640px, 88%); padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.message.mine { align-self: flex-end; background: var(--panel-raised); border-color: var(--line-strong); }
.message-meta { font-size: 12px; color: var(--muted); }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.state-note { padding: 10px 12px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.footer a { color: var(--blue); }

/* ---------- Dialog, states, footer ---------- */
.auth { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; }
.auth::backdrop { background: rgb(0 0 0 / .65); }
.auth[open] { display: flex; flex-direction: column; gap: 14px; }
.auth h2 { font: 700 20px/1.2 var(--font-head); padding-right: 36px; }
.auth-close { position: absolute; top: 14px; right: 14px; }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 18px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.state-title { color: var(--text); font-weight: 600; font-size: 16px; }
.footer { display: flex; flex-direction: column; gap: 2px; padding: 14px var(--gutter) 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer p:first-child { font-weight: 600; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: var(--radius); font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / .45); }
body.has-slip-bar .toasts { bottom: 84px; }
@media (min-width: 800px) { body.has-slip-bar .toasts { bottom: 20px; } }

/* ---------- Narrower screens ---------- */
@media (max-width: 1179px) {
  .layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .sports { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rail { position: static; flex-direction: row; align-items: center; max-height: none; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .rail-title { display: none; }
  .rail-item { flex: none; white-space: nowrap; }
  .rail-item-count { margin-left: 2px; }
  .rail-sub { flex-direction: row; flex: none; margin: 0 4px; padding-left: 6px; }
  .rail-sub .pill { flex: none; white-space: nowrap; }
}

@media (max-width: 899px) {
  .game-board, .clubs-layout { grid-template-columns: minmax(0, 1fr); }
  .game-stage { min-height: 260px; }
}

@media (max-width: 799px) {
  .topbar { position: static; flex-wrap: wrap; gap: 6px 12px; padding: 8px var(--gutter); }
  .nav { order: 3; flex: 0 0 100%; }
  .nav-link { padding: 9px 10px; }
  .dice-display { font-size: 56px; }
  .lot-games { grid-template-columns: minmax(0, 1fr); }
  .app-hero { flex-direction: column; }
  .account-area .button { min-height: 38px; padding: 6px 12px; font-size: 13px; }
  .layout { display: block; padding: 10px var(--gutter) 16px; }
  h1 { font-size: 19px; }
  .side { position: static; display: block; max-height: none; overflow: visible; margin-top: 14px; }
  .line-bar { padding: 6px; }
  .view-tabs { display: flex; flex: 1 0 100%; }
  .view-tab { flex: 1; justify-content: center; min-height: 38px; }
  .select { flex: none; min-height: 40px; }
  .search { flex: 1 1 140px; margin-left: 0; min-height: 40px; font-size: 16px; }
  .result { grid-template-columns: minmax(0, 1fr) auto; }
  .result-date { grid-column: 1 / -1; }
  .board { padding: 14px 12px; }
  .board-teams { gap: 8px; font-size: 17px; }
  .digit.big { min-width: 44px; height: 52px; font-size: 32px; }
  .board-vs { font-size: 13px; padding: 6px 8px; white-space: normal; max-width: 92px; }
  .match-markets { grid-template-columns: minmax(0, 1fr); }
  .market-prices .price { min-height: 44px; }
  .button { min-height: 42px; }
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .footer { padding: 12px var(--gutter) 18px; }
  body.has-slip-bar .footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  .slip {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30;
    max-height: 88dvh; overflow-y: auto;
    padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .2s ease-out, visibility .2s;
  }
  /* Visible at once on opening: a hidden element could not take focus. */
  .slip.open { transform: none; visibility: visible; transition: transform .2s ease-out; }
  .sheet-close { display: grid; margin-left: auto; }
  .slip-head .link-button:not([hidden]) + .sheet-close { margin-left: 0; }
  .slip-bar {
    position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    min-height: 52px; padding: 8px 16px;
    background: var(--accent); color: var(--on-accent);
    border: 0; border-radius: var(--radius-lg);
    font-weight: 700;
    box-shadow: 0 6px 24px rgb(0 0 0 / .5);
  }
  .slip-bar[hidden] { display: none; }
  .slip-bar-value { font-variant-numeric: tabular-nums; }
}

/* ---------- Favourites, top, header tools ---------- */
.sport-icon[data-sport="top"] { -webkit-mask-image: url(/icons/top.svg); mask-image: url(/icons/top.svg); }
.sport-icon[data-sport="star"] { -webkit-mask-image: url(/icons/star.svg); mask-image: url(/icons/star.svg); }
.row-when { display: flex; align-items: center; gap: 2px; min-width: 0; }
.star {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  background: none; border: 0; border-radius: var(--radius); color: var(--line-strong);
}
.star::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: url(/icons/star.svg) center / contain no-repeat; mask: url(/icons/star.svg) center / contain no-repeat; }
.star:hover { color: var(--muted); background: var(--panel-raised); }
.star[aria-pressed="true"] { color: var(--accent); }
.star[aria-pressed="true"]::before { -webkit-mask-image: url(/icons/star-filled.svg); mask-image: url(/icons/star-filled.svg); }
.league-name .star { margin-left: auto; }
.pick-note { padding: 2px 2px 0; }
.tool-search::before, .tool-gear::before { content: ""; width: 19px; height: 19px; background: currentColor; -webkit-mask: url(/icons/search.svg) center / contain no-repeat; mask: url(/icons/search.svg) center / contain no-repeat; }
.tool-gear::before { -webkit-mask-image: url(/icons/gear.svg); mask-image: url(/icons/gear.svg); }
.tool-lang { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.tool-form { display: flex; gap: 8px; }
.tool-form .input { flex: 1; min-width: 0; }
.setting { align-items: flex-start; padding: 8px 0; color: var(--text); }
.setting > span { display: flex; flex-direction: column; gap: 2px; }
body.no-flash .price.moved-up, body.no-flash .price.moved-down,
body.no-flash .price.moved-up .price-value, body.no-flash .price.moved-down .price-value { animation: none; }
body.no-flash .price.moved-up::after, body.no-flash .price.moved-down::after { content: none; }

.help-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 24;
  display: grid; place-items: center; width: 48px; height: 48px;
  background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 50%;
  box-shadow: 0 6px 20px rgb(0 0 0 / .45); color: var(--accent);
}
.help-fab::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url(/icons/chat.svg) center / contain no-repeat; mask: url(/icons/chat.svg) center / contain no-repeat; }
.help-fab:hover { background: var(--cell); }
body.admin-mode .help-fab { display: none; }

/* ---------- Side panels ---------- */
.side-panel { align-items: stretch; gap: 10px; }
.side-panel .link-button { align-self: flex-start; }
.mini-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tab { padding: 4px 9px; min-height: 28px; background: var(--cell); border: 0; border-radius: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.mini-tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.popular-list { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none; }
.popular-item { display: flex; flex-direction: column; gap: 5px; padding: 8px; background: var(--panel-raised); border-radius: var(--radius); }
.popular-head { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.popular-head .sport-icon { width: 14px; height: 14px; color: var(--sport, var(--accent)); }
.popular-league { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-head .row-time { margin-left: auto; flex-direction: row; gap: 5px; align-items: baseline; }
.popular-head .row-time time { font-size: 12px; }
.popular-teams { display: flex; flex-wrap: wrap; gap: 0 4px; color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.popular-teams:hover { color: var(--accent); }
.popular-teams .vs { color: var(--muted); font-weight: 400; }
.popular-prices { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.popular-prices .price { justify-content: space-between; padding: 3px 7px; }
/* Tabs at the top of a section (promo, media, help): each opens a page of its own. */
.section-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 14px; }
.section-tab {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.section-tab strong { color: var(--text); font-size: 15px; }
.section-tab span { font-size: 12px; color: var(--muted); }
.section-tab:hover { border-color: var(--line-strong); }
.section-tab[aria-current="page"] { background: linear-gradient(135deg, var(--accent-soft), var(--panel) 75%); border-color: var(--accent-line); }
.section-tab[aria-current="page"] strong { color: var(--accent); }
@media (max-width: 520px) { .section-tab { padding: 8px 10px; } .section-tab span { display: none; } }
/* Help: theory and glossary. */
.theory p + p { margin-top: 8px; }
.glossary { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 4px; }
.glossary-item { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.glossary-item:first-child { border-top: 0; }
.glossary-item dt { color: var(--text); font-weight: 700; }
.glossary-item dd { margin: 0; }
@media (max-width: 560px) { .glossary-item { grid-template-columns: 1fr; } }
/* Forecasts: the chances behind the site's own prices, one card per match. */
.forecast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.forecast { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.forecast-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--muted); }
.forecast-meta .sport-icon { width: 14px; height: 14px; color: var(--sport, var(--accent)); }
.forecast[data-sport] { border-left: 3px solid var(--sport, var(--line)); }
.forecast-meta time { margin-left: auto; }
.forecast-teams { font: 700 17px/1.25 var(--font-head); color: var(--text); text-decoration: none; }
.forecast-teams:hover { color: var(--accent); }
.forecast-bar { display: flex; gap: 3px; min-height: 30px; }
.forecast-part {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 4px; overflow: hidden;
  background: var(--cell); border-radius: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.forecast-part b { font-weight: 600; opacity: .75; }
.forecast-part.is-home { background: var(--accent-soft); color: var(--accent); }
.forecast-part.is-away { background: var(--blue-soft); color: var(--blue); }
.forecast-verdict { font-size: 13px; color: var(--text); }
.forecast-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.forecast-pick .price { min-width: 92px; padding: 4px 8px; }
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-panel-head .link-button { min-height: 0; padding: 0; }
/* Promotions as cards: what is given, the figure, how long, and one button. */
.offer-list { display: flex; flex-direction: column; gap: 8px; }
.offer {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--panel-raised) 62%); border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
}
.offer::after {
  content: ""; position: absolute; right: -26px; top: -26px; width: 92px; height: 92px; border-radius: 50%;
  border: 14px solid color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none;
}
.offer-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.offer-figure { font: 800 22px/1.15 var(--font-head); color: var(--accent); font-variant-numeric: tabular-nums; }
.offer-text { font-size: 12px; }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.offer-left { font-size: 11px; color: var(--muted); }
.offer-foot .button { margin-left: auto; }
/* Weekly tournaments as a strip of cards that scrolls sideways. */
.tour-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.tour-strip > * { scroll-snap-align: start; }
.tour-card {
  display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 10px 12px;
  background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none;
}
.tour-card:hover { border-color: var(--accent-line); }
.tour-card-status {
  align-self: flex-start; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.tour-card-title { color: var(--text); font-size: 14px; }
.tour-card-fact { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.tour-card-fact b { color: var(--text); font-variant-numeric: tabular-nums; }
.tour-card-left { margin-top: auto; padding-top: 4px; font-size: 11px; color: var(--muted); }
.deal-list { display: flex; flex-direction: column; gap: 6px; padding: 0; list-style: none; }
.deal-list a { display: flex; flex-direction: column; gap: 1px; padding: 7px 8px; background: var(--panel-raised); border-radius: var(--radius); text-decoration: none; }
.deal-list a:hover { background: var(--cell); }
.deal-list strong { color: var(--text); font-size: 13px; }
.deal-list span { font-size: 12px; }

/* ---------- Results, tournaments, information ---------- */
.result-league { display: flex; align-items: center; gap: 6px; margin: 4px 2px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.result-league .sport-icon { width: 14px; height: 14px; color: var(--sport, var(--accent)); }
.date-input { min-height: 36px; padding: 4px 8px; }
.tournaments, .info { display: flex; flex-direction: column; gap: 12px; }
.lead { color: var(--muted); max-width: 820px; }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.tour-board { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: calc(var(--top) + 12px); }
.tour-head { display: flex; flex-direction: column; gap: 2px; }
.tour-prizes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.tour-prizes li { display: flex; flex-direction: column; padding: 5px 9px; background: var(--panel-raised); border-radius: var(--radius); font-size: 11px; color: var(--muted); }
.tour-prizes strong { color: var(--accent); font-size: 13px; }
.tour-table tr.is-me td { background: var(--accent-soft); }
.tour-last { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tour-last ol { padding-left: 20px; color: var(--muted); }
.info { max-width: 860px; }
.info-section { display: flex; flex-direction: column; gap: 6px; }
.info-section p { color: var(--muted); }

/* Text for screen readers only */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* A match with a broadcast */
.row-video { display: inline-block; margin-left: 6px; color: var(--live); font-size: 10px; vertical-align: 1px; }

/* The player's own limits */
.limit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.exclusion { display: flex; flex-direction: column; gap: 8px; }
.exclusion .select { max-width: 160px; }

/* League winners */
.sport-icon[data-sport="trophy"] { -webkit-mask-image: url(/icons/trophy.svg); mask-image: url(/icons/trophy.svg); }
.outrights-page, .outrights, .outright-group { display: flex; flex-direction: column; gap: 12px; }
.outright-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; align-items: start; }
.outright-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.outright-title a { color: var(--text); }
.outright-title a:hover { color: var(--accent); }
.outright-title .sport-icon { width: 16px; height: 16px; color: var(--sport, var(--accent)); flex: none; }
.outright-heading { font-size: 22px; text-align: center; }
.outright-prices { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* League tables and match statistics */
.league-table-link { flex: none; color: var(--blue); font-size: 11px; font-weight: 600; white-space: nowrap; }
.league-table-link:hover, .league-table-link:focus-visible { text-decoration: underline; }
.standings-page { display: flex; flex-direction: column; gap: 12px; }
.standings caption { text-align: left; font-size: 13px; font-weight: 700; padding: 2px 8px 8px; }
.standings .pos { width: 34px; color: var(--muted); }
.standings tbody th { color: var(--text); font-weight: 600; border-bottom: 1px solid var(--line); padding: 7px 8px; }
.standings tbody tr.mine td, .standings tbody tr.mine th { background: var(--accent-soft); }
.standings tbody tr.mine th { color: var(--accent); }
.zone-top { --zone: var(--green); }
.zone-euro { --zone: var(--blue); }
.zone-playoff { --zone: #e7c066; }
.zone-down { --zone: var(--red); }
.standings tbody tr[class*="zone-"] .pos { box-shadow: inset 3px 0 0 var(--zone); }
.standings.short { max-width: 560px; }
.zone-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--muted); }
.zone-legend li { display: flex; align-items: center; gap: 6px; }
.zone-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--zone); }
.table-block .button, .stats-block .button { align-self: flex-start; }
.stats-list { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.stat-row { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--muted); text-align: center; }
.stat-values { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-away { text-align: right; }
.stat-bar { display: block; height: 6px; border-radius: 3px; background: var(--blue); overflow: hidden; }
.stat-fill { display: block; height: 100%; background: var(--accent); }

@media (max-width: 799px) {
  .help-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }
  body.has-slip-bar .help-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .account-area .icon-button { width: 38px; height: 38px; }
}
@container line (max-width: 590px) {
  .row-when { grid-area: time; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
