/* =====================================================================
   BETROX terminal · view-home.css — Start (#/) + Top-Ligen (#/topligen)
   Prefixes: .home-* (Start), .tl-* (Top-Ligen list, checkbox, selection
   bar — also used by the Start page's league tab on phones).
   Structure from refs 01–04, Betrox look (tokens.css).
   ===================================================================== */

/* =====================================================================
   START
   ===================================================================== */
.home { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.home-h {
  margin: 0 0 14px; font-family: var(--cond); font-weight: 800; font-size: 32px; line-height: 1.05;
  letter-spacing: .05em; text-transform: uppercase;
}
.home-h--sub { margin: 26px 0 12px; font-size: 26px; color: var(--ink-2); }

/* ---- 8 yellow tiles ---- */
.home-tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.home-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  aspect-ratio: 1 / 1; min-height: 112px; padding: 12px 6px 14px; border-radius: var(--r-xl);
  background: linear-gradient(180deg, #FFD94D 0%, var(--accent) 52%, #F0B400 100%);
  color: var(--on-accent); text-decoration: none; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .12), 0 8px 22px rgba(0, 0, 0, .35);
  touch-action: manipulation; transition: transform .08s ease, filter .15s ease;
}
.home-tile::before {   /* soft highlight, top-left */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 20% 0%, rgba(255, 255, 255, .28), transparent 60%);
}
.home-tile:hover { filter: brightness(1.05); }
.home-tile:active { transform: scale(.97); }
.home-tile-ic { position: relative; display: flex; }
.home-tile-ic .bx-ic { stroke-width: 1.8; }
.home-tile-l {
  position: relative; max-width: 100%; overflow-wrap: break-word; hyphens: manual;
  font-family: var(--cond); font-weight: 800; font-size: 20px; line-height: 1.02; letter-spacing: .04em; text-transform: uppercase; text-align: center;
}

/* ---- TOP-SPIELE carousel ---- */
.home-car { position: relative; }
.home-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0;
}
.home-track::-webkit-scrollbar { display: none; }
.home-card {
  scroll-snap-align: start; min-width: 0;
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
}
.home-card-top { display: flex; align-items: baseline; gap: 12px; min-width: 0; font-size: 15px; font-weight: 600; }
.home-path { min-width: 0; flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-when { flex-shrink: 0; color: var(--ink-2); font-weight: 700; }
.home-match {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px;
  min-height: 76px; padding: 4px 6px; border: 0; border-radius: var(--r); background: transparent; color: var(--ink);
  font-size: 21px; font-weight: 700; line-height: 1.15; touch-action: manipulation;
}
.home-match:hover { background: rgba(255, 255, 255, .03); }
.home-match .h { text-align: right; }
.home-match .a { text-align: left; }
.home-match .h, .home-match .a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.home-match .vs { font-family: var(--cond); font-weight: 700; font-size: 24px; color: var(--muted); white-space: nowrap; }
.home-odds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-odds .bx-odd .k { font-size: 20px; }
.home-arr {
  position: absolute; top: 50%; z-index: 2; width: 60px; height: 60px; margin-top: -30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-3); border-radius: 50%; background: rgba(15, 18, 26, .92); color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); touch-action: manipulation;
}
.home-arr:hover { background: var(--tile-hover); }
.home-arr.prev { left: -14px; }
.home-arr.next { right: -14px; }
.home-car .bx-empty { padding: 28px 16px; }

/* ---- AKTIONEN card ---- */
.home-promo-row { display: flex; }
.home-promo {
  position: relative; display: flex; align-items: center; gap: 18px;
  width: calc((100% - 32px) / 3); min-width: 380px; min-height: 120px; padding: 18px 20px; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--accent-line);
  background: linear-gradient(125deg, #2A2410 0%, var(--accent-tint) 45%, var(--card) 100%);
  color: var(--ink); text-decoration: none; touch-action: manipulation;
}
.home-promo::after {   /* typographic stripe accent */
  content: ''; position: absolute; right: -40px; top: -30px; width: 140px; height: 180px; transform: rotate(18deg);
  background: repeating-linear-gradient(90deg, rgba(255, 199, 0, .10) 0 10px, transparent 10px 22px); pointer-events: none;
}
.home-promo:hover { border-color: var(--accent); }
.home-promo-ic {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 76px; height: 76px;
  border-radius: 16px; background: var(--accent); color: var(--on-accent);
}
.home-promo-tx { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.home-promo-tx b { font-family: var(--cond); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: .04em; text-transform: uppercase; }
.home-promo-tx small { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.home-promo > .bx-ic { position: relative; z-index: 1; margin-left: auto; flex-shrink: 0; color: var(--accent); }

/* ---- tabs Top-Ligen | Top-Events | Live (also Top-Ligen page tabs) ---- */
.home-tabs, .tl-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-tab, .tl-tab {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--bx-tap); padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--tile); color: var(--ink-2);
  font-family: var(--cond); font-weight: 700; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  touch-action: manipulation; transition: background-color .15s ease, color .15s ease;
}
.home-tab:hover, .tl-tab:hover { color: var(--ink); background: var(--tile-hover); }
.home-tab[aria-selected="true"], .tl-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.home-tab-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px;
  border-radius: 999px; background: var(--live); color: #FFF; font-size: 17px; font-weight: 800; letter-spacing: 0;
}

/* ---- tab 1: league grid with checkboxes ---- */
.home-panel {
  display: flex; flex-direction: column; gap: 16px; padding: 18px;
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
}
.home-lggrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.home-lg {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
  padding: 12px 4px 10px; border-radius: var(--r); border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.home-lg.is-on { background: var(--accent-tint); border-color: var(--accent-line); }
.home-lg-flag {
  display: flex; align-items: center; justify-content: center; width: 92px; height: 76px;
  border-radius: 16px; background: var(--tile); border: 1px solid var(--line-2);
}
.home-lg-flag:hover { border-color: var(--line-3); background: var(--tile-hover); }
.home-lg-flag .flag { border-radius: 5px; }
.home-lg .tl-check { min-height: var(--bx-tap); padding: 0 12px; }
.home-lg-name {
  display: flex; flex-direction: column; align-items: center; max-width: 100%; min-height: 40px;
  color: var(--ink); text-decoration: none; text-align: center;
  font-size: 16px; font-weight: 700; line-height: 1.15;
}
.home-lg-name small { font-size: 13px; font-weight: 600; color: var(--muted); }
.home-bar:empty { display: none; }

/* yellow bar "ALLE TOP-LIGEN ANZEIGEN ›" (and "Alle Top-Events / Live-Spiele anzeigen") */
.home-all, .tl-go {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--bx-tap); padding: 0 16px 0 22px; border-radius: var(--r);
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font-family: var(--cond); font-weight: 800; font-size: 24px; letter-spacing: .05em; text-transform: uppercase;
  touch-action: manipulation;
}
.home-all:hover, .tl-go:hover { background: var(--accent-hover); }
.home-all:active, .tl-go:active { background: var(--accent-press); }
.home-all--out { margin-top: 12px; }

/* ---- tab 2 / 3: compact 1X2 table (core .mt) ---- */
.home-mt { --mt-cols-w: 1.25fr; }
.home-row .mt-info { gap: 14px; }
.home-ri { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.home-rl { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.home-rl > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row .score { margin-left: auto; }
.home-tabbox .bx-empty { padding: 36px 16px; }

/* =====================================================================
   TOP-LIGEN page (+ league rows on the phone Start page)
   ===================================================================== */
.tl { width: 100%; max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; }
.tl .vh { margin-bottom: 14px; }
.tl-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; margin: 10px 0 8px; }
.tl-meta { font-size: 16px; font-weight: 600; color: var(--muted); }
.tl-all {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--bx-tap); padding: 0 10px; margin-right: -10px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--accent);
  font-family: var(--cond); font-weight: 700; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; touch-action: manipulation;
}
.tl-all:hover { background: var(--tile); }
.tl-list { display: flex; flex-direction: column; gap: 8px; }
.tl-sub { margin: 18px 4px 4px; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tl-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: stretch;
  min-height: 80px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: background-color .15s ease, border-color .15s ease;
}
.tl-row.is-on { background: var(--accent-tint); border-color: var(--accent-line); }
.tl-open {
  display: flex; align-items: center; gap: 18px; min-width: 0; padding: 8px 12px 8px 20px;
  color: var(--ink); text-decoration: none; border-radius: var(--r) 0 0 var(--r);
}
.tl-open:hover { background: rgba(255, 255, 255, .025); }
.tl-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-name b { font-size: 22px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name small { font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* count + checkbox (one big touch target) */
.tl-check {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--bx-tap); padding: 0 16px; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink); touch-action: manipulation;
}
.tl-row > .tl-check { align-self: center; }
.tl-check:hover:not(:disabled) { background: rgba(255, 255, 255, .04); }
.tl-check:disabled { opacity: .4; cursor: not-allowed; }
.tl-n { min-width: 2ch; text-align: right; font-family: var(--cond); font-weight: 700; font-size: 26px; line-height: 1; }
.tl-box {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 8px; border: 2px solid var(--line-3); background: var(--tile); color: transparent;
  transition: background-color .12s ease, border-color .12s ease;
}
.tl-box .bx-ic { stroke-width: 3; }
.tl-check[aria-checked="true"] .tl-box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tl-check:active:not(:disabled) .tl-box { transform: scale(.92); }
.tl-chev {
  display: flex; align-items: center; justify-content: center; width: 72px;
  border-left: 1px solid var(--line); color: var(--muted); border-radius: 0 var(--r) var(--r) 0;
}
.tl-chev:hover { color: var(--accent); background: rgba(255, 255, 255, .025); }

/* "Auswählen (N Spiele)" + "Leeren" */
.tl-bar-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.tl-go span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-clear {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--bx-tap); padding: 0 24px; border: 1px solid var(--line-3); border-radius: var(--r);
  background: var(--tile); color: var(--ink);
  font-family: var(--cond); font-weight: 700; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; touch-action: manipulation;
}
.tl-clear:hover { background: var(--tile-hover); }
.tl-clear .bx-ic { color: var(--muted); }
.tl-bar {
  position: sticky; z-index: 5; bottom: 0;
  margin: 8px calc(var(--pad) * -1) 0; padding: 14px var(--pad) 14px;
  background: linear-gradient(to top, var(--bg) 72%, rgba(11, 13, 18, 0));
}
/* #main already reserves the bottom nav + summary bar with its padding; sticky bottom: 0 sits right above them */

/* =====================================================================
   Portrait kiosk / tablet (761–1199)
   ===================================================================== */
body.is-portrait .home { gap: 26px; }
body.is-portrait .home-lggrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.is-portrait .home-promo { width: auto; min-width: 0; max-width: 560px; flex: 1; }
@media (max-width: 899px) {
  .home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-tile { aspect-ratio: 5 / 4; }
  .home-track { grid-auto-columns: 64%; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .home-tiles { gap: 12px; }
  .home-tile-l { font-size: 18px; }
  .home-card { padding: 14px 12px; }
  .home-odds { gap: 6px; }
  .home-odds .bx-odd { padding: 0 10px; gap: 4px; }
  .home-odds .bx-odd .k { flex-shrink: 0; font-size: 17px; }
  .home-odds .bx-odd .v { font-size: 25px; }
}
@media (min-width: 1200px) and (max-width: 1500px) {
  .home-tiles { gap: 10px; }
  .home-tile { gap: 8px; }
  .home-tile-l { font-size: 15px; letter-spacing: .02em; }
  .home-tile-ic .bx-ic { width: 40px; height: 40px; }
  .home-track { grid-auto-columns: calc((100% - 16px) / 2); }
  .home-promo { width: calc((100% - 16px) / 2); min-width: 0; }
  .home-lggrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =====================================================================
   Phone (≤ 760)
   ===================================================================== */
body.is-phone .home { gap: 22px; }
body.is-phone .home-h { font-size: 24px; margin-bottom: 10px; }
body.is-phone .home-h--sub { font-size: 20px; margin: 18px 0 10px; }
body.is-phone .home-tiles { gap: 8px; }
body.is-phone .home-tile { aspect-ratio: auto; min-height: 84px; gap: 6px; padding: 10px 2px; border-radius: var(--r-lg); }
body.is-phone .home-tile-ic .bx-ic { width: 32px; height: 32px; }
body.is-phone .home-tile-l { font-size: 13px; letter-spacing: .02em; }
body.is-phone .home-track { grid-auto-columns: 88%; gap: 10px; }
body.is-phone .home-card { padding: 12px; gap: 10px; }
body.is-phone .home-card-top { font-size: 13px; }
body.is-phone .home-match { min-height: 60px; font-size: 17px; gap: 10px; }
body.is-phone .home-match .vs { font-size: 20px; }
body.is-phone .home-odds { gap: 6px; }
body.is-phone .home-odds .bx-odd { min-height: 48px; padding: 0 10px; }
body.is-phone .home-odds .bx-odd .v { font-size: 22px; }
body.is-phone .home-odds .bx-odd .k { font-size: 16px; }
body.is-phone .home-arr { display: none; }
body.is-phone .home-promo { width: 100%; min-width: 0; min-height: 88px; padding: 12px 14px; gap: 14px; }
body.is-phone .home-promo-ic { width: 56px; height: 56px; border-radius: 12px; }
body.is-phone .home-promo-ic .bx-ic { width: 30px; height: 30px; }
body.is-phone .home-promo-tx b { font-size: 21px; }
body.is-phone .home-promo-tx small { font-size: 14px; }
body.is-phone .home-tabs, body.is-phone .tl-tabs { gap: 6px; }
body.is-phone .home-tab, body.is-phone .tl-tab { min-height: 48px; padding: 0 6px; font-size: 17px; gap: 6px; }
body.is-phone .home-tab-n { min-width: 22px; height: 20px; font-size: 13px; padding: 0 5px; }
body.is-phone .home-panel { padding: 8px; gap: 8px; }
body.is-phone .home-lgrows { gap: 6px; }
body.is-phone .home-all, body.is-phone .tl-go { min-height: 52px; padding: 0 10px 0 14px; font-size: 18px; letter-spacing: .03em; }
body.is-phone .tl-go { justify-content: center; padding: 0 10px; }
body.is-phone .tl-go .bx-ic { display: none; }
body.is-phone .home-row .mt-info { gap: 10px; }

body.is-phone .tl-tools { margin: 6px 0 4px; }
body.is-phone .tl-meta { font-size: 14px; }
body.is-phone .tl-all { min-height: 44px; font-size: 17px; }
body.is-phone .tl-list { gap: 6px; }
body.is-phone .tl-row { min-height: 60px; }
body.is-phone .tl-open { gap: 12px; padding: 6px 6px 6px 12px; }
body.is-phone .tl-open .flag { width: 30px; height: 20px; }
body.is-phone .tl-name b { font-size: 17px; }
body.is-phone .tl-name small { font-size: 13px; }
body.is-phone .tl-check { min-height: 52px; padding: 0 8px; gap: 8px; }
body.is-phone .tl-n { font-size: 20px; }
body.is-phone .tl-box { width: 28px; height: 28px; border-radius: 7px; }
body.is-phone .tl-box .bx-ic { width: 16px; height: 16px; }
body.is-phone .tl-chev { width: 44px; }
body.is-phone .tl-chev .bx-ic { width: 22px; height: 22px; }
body.is-phone .tl-bar-in { gap: 8px; }
body.is-phone .tl-clear { min-height: 52px; padding: 0 12px; gap: 6px; font-size: 17px; }
body.is-phone .tl-bar { padding: 10px var(--pad); }
