/* Catalogue pages: /casino, /live-casino, /sports(/x), /event/x.
 * Built on the mockup's components (chips, gcard, events, odd, tags); new
 * layouts — toolbar, sport nav, match head, market cards — use the same tokens
 * and the 12° seam. */

.head-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 28px; }
.head-stats b { display: block; font: 800 1.9rem/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--casino-text); }
.is-sports .head-stats b { color: var(--accent); }
.head-stats span { font-size: var(--fs-xs); color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.toolbar__search { position: relative; flex: 1 1 280px; max-width: 460px; display: flex; align-items: center; }
.toolbar__search .ic { position: absolute; left: 16px; color: var(--text-2); pointer-events: none; }
.toolbar__search input, .toolbar__select select { width: 100%; height: 48px; border: 0; border-radius: var(--radius-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text); font: 500 var(--fs-sm)/1 var(--font-text); transition: box-shadow .2s; }
.toolbar__search input { padding: 0 18px 0 46px; }
.toolbar__search input::placeholder { color: var(--text-2); }
.toolbar__search input:focus, .toolbar__select select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.is-sports .toolbar__search input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.toolbar__select select { appearance: none; padding: 0 44px 0 18px; min-width: 210px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.toolbar__count { margin-left: auto; color: var(--text-2); font-size: var(--fs-sm); }
.toolbar__count b { color: var(--text); font-variant-numeric: tabular-nums; }
.catalog .chips { margin-bottom: 26px; }
.catalog__h { margin: 48px 0 20px; }

/* live lobby picker */
.live-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.live-pick__tile { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: 180px; padding: 18px; border-radius: var(--radius-3); text-align: left; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--hair); transition: transform .25s var(--spring), box-shadow .25s; }
.live-pick__tile picture { position: absolute; inset: 0; z-index: -2; }
.live-pick__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.live-pick__tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, rgb(16 19 28 / .92)), color-mix(in oklab, var(--brand) 14%, transparent); }
.live-pick__tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--casino-line); }
.live-pick__tile:hover img { transform: scale(1.05); }
.live-pick__tile b { display: block; font: 800 1.5rem/1 var(--font-display); font-stretch: 84%; }
.live-pick__tile small { color: var(--text-2); font-weight: 600; }

/* ---------- sportsbook layout ---------- */
.sportsbook__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.sport-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 10px; border-radius: var(--radius-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
.sport-nav__h { padding: 10px 12px 8px; font: 700 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.sport-nav ul { display: grid; gap: 2px; }
.sport-nav a { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-2); font: 600 var(--fs-sm)/1.2 var(--font-text); color: var(--text-2); transition: background-color .2s, color .2s; }
.sport-nav a .ic { width: 18px; height: 18px; }
.sport-nav a b { font-size: 11px; font-variant-numeric: tabular-nums; padding: 4px 7px; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-2); }
.sport-nav a:hover { color: var(--text); background: color-mix(in oklab, #fff 4%, transparent); }
.sport-nav a[aria-current] { color: var(--on-sports); background: var(--accent); }
.sport-nav a[aria-current] b { background: color-mix(in oklab, var(--on-sports) 14%, transparent); color: var(--on-sports); }
.sportsbook .toolbar .chips { flex: 1 1 auto; }
.sportsbook .toolbar__search { flex: 0 1 280px; }
.league-h { padding: 18px 16px 8px; font: 800 var(--fs-sm)/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.league-h span { font-size: 11px; color: var(--text-2); font-weight: 700; }
.league-h + .ev { box-shadow: none; }
.board-block + .board-block { margin-top: 36px; }
.board-block__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.board-block__head h2 { display: flex; align-items: center; gap: 12px; }
.board-block__head h2 .ic { color: var(--accent); width: 26px; height: 26px; }
.board-block__head > span { color: var(--text-2); font-size: var(--fs-sm); }
.h3 em { color: var(--accent); }
.is-casino .h3 em { color: var(--casino-text); }

/* ---------- event page: match head ---------- */
.match-head { position: relative; isolation: isolate; overflow: hidden; padding: 56px 0 calc(var(--cut-sm) + 56px); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-sm)), 0 100%); background: var(--surface-1); }
.match-head__media { position: absolute; inset: 0; z-index: -1; }
.match-head__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.match-head__media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--accent); mix-blend-mode: color; }
.match-head__media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(70% 90% at 50% 40%, rgb(16 19 28 / .78), rgb(16 19 28 / .94)); }
.match-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.match-head__league { font-weight: 700; color: var(--text-2); }
.match-head__title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin: 28px 0 20px; font-size: clamp(1.8rem, 1rem + 2.8vw, 3.6rem); font-stretch: 82%; font-weight: 800; letter-spacing: -.03em; }
.side { display: flex; align-items: center; gap: 18px; min-width: 0; }
.side > span { overflow-wrap: anywhere; }
.side--away { justify-content: flex-end; text-align: right; }
.crest--lg { width: clamp(52px, 4vw + 20px, 76px); height: clamp(52px, 4vw + 20px, 76px); border-radius: var(--radius-2); font-size: clamp(1rem, .7rem + .8vw, 1.5rem); background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--sports-line); transform: skewX(calc(-1 * var(--angle))); }
.match-head__vs { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; font-size: 1rem; font-stretch: 100%; text-transform: uppercase; color: var(--on-sports); background: var(--accent); transform: skewX(calc(-1 * var(--angle))); }
.match-head__when { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.match-head__when span { display: inline-flex; align-items: center; gap: 8px; }
.match-head__when .ic { color: var(--accent); }
.countdown { color: var(--accent); }
.match-head__odds { max-width: 720px; margin: 28px auto 0; }
.match-head__odds .odd { min-height: 56px; padding: 0 16px; font-size: 1.05rem; }
.match-head__odds .odd small { font-size: var(--fs-sm); color: var(--text-2); }

/* markets */
.markets-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.markets__head { display: grid; gap: 16px; margin-bottom: 20px; }
.markets__n { display: block; margin-top: 8px; font: 600 var(--fs-sm)/1 var(--font-text); letter-spacing: 0; color: var(--text-2); }
.markets__list { display: grid; gap: 12px; }
.market { border-radius: var(--radius-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
.market__q { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; text-align: left; font: 700 1rem/1.3 var(--font-text); border-radius: var(--radius-3); transition: color .2s; }
.market__q small { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.market__q:hover { color: var(--accent); }
.market__q .ic { flex: none; width: 20px; height: 20px; color: var(--text-2); transition: transform .3s var(--ease); }
.market__q[aria-expanded="false"] .ic { transform: rotate(-90deg); }
.market__odds { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 8px; padding: 0 18px 18px; }
.market__odds .odd { min-height: 50px; padding: 0 14px; }
.market__odds .odd small { font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
.market__odds .odd[aria-pressed="true"] small { color: var(--on-sports); }

.markets-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.info-card__h { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }
.info-card dl { display: grid; gap: 10px; margin: 0; }
.info-card dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); font-size: var(--fs-sm); }
.info-card dt { color: var(--text-2); }
.info-card dd { margin: 0; font-weight: 700; text-align: right; }
.info-card__note { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-2); }
.more-card ul { display: grid; gap: 4px; margin-bottom: 14px; }
.more-card li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--radius-2); font: 700 var(--fs-sm)/1.3 var(--font-text); transition: background-color .2s; }
.more-card li a:hover { background: var(--surface-3); }
.more-card small { display: block; margin-top: 3px; font-weight: 500; color: var(--text-2); font-size: var(--fs-xs); }
.more-card .ic { flex: none; color: var(--accent); width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .sportsbook__grid { grid-template-columns: 1fr; }
  .sport-nav { position: static; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .sport-nav::-webkit-scrollbar { display: none; }
  .sport-nav__h { display: none; }
  .sport-nav ul { display: flex; gap: 6px; width: max-content; }
  .sport-nav a { grid-template-columns: 18px auto auto; white-space: nowrap; }
  .markets-page__grid { grid-template-columns: 1fr; }
  .markets-side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  .live-pick { grid-template-columns: 1fr; }
  .live-pick__tile { min-height: 140px; }
  .toolbar__search { max-width: none; }
  .toolbar__select { flex: 1 1 100%; }
  .toolbar__select select { min-width: 0; }
  .toolbar__count { margin-left: 0; }
  .sportsbook .toolbar__search { flex: 1 1 100%; }
  .grid-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-games .gcard { padding: 8px 8px 12px; }
  .grid-games .gcard__body { padding: 10px 4px 0; }
  .grid-games .gcard__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .grid-games .details { justify-content: center; }
  .match-head { padding: 32px 0 calc(var(--cut-sm) + 40px); }
  .match-head__title { grid-template-columns: 1fr; gap: 12px; font-size: clamp(1.7rem, 1rem + 4vw, 2.4rem); }
  .side--away { flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
  .match-head__vs { width: 40px; height: 40px; font-size: .8rem; }
  .match-head__when { justify-content: flex-start; }
  .match-head__odds .odd { min-height: 50px; font-size: .95rem; }
  .match-head__odds .odd small { overflow: hidden; text-overflow: ellipsis; }
  .market__odds { --cols: 2 !important; padding: 0 12px 14px; }
  .market__q { padding: 14px 14px; }
}
@media (max-width: 389px) {
  .grid-games { grid-template-columns: 1fr; }
}
/* grid items may shrink below their content (sport nav scrolls inside) */
.sportsbook__grid { grid-template-columns: 260px minmax(0, 1fr); }
.sportsbook__grid > * { min-width: 0; }
@media (max-width: 1180px) { .sportsbook__grid { grid-template-columns: minmax(0, 1fr); } }
/* market labels wrap instead of being cut; head odds show 1/X/2 only on phones */
.market__odds .odd small, .match-head__odds .odd small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; padding-block: 8px; }
@media (max-width: 900px) { .o-n { display: none; } }
.head-stats__link { margin-top: 18px; }
