:root {
  color-scheme: dark;
  --bg: #080a0e;
  --surface: #121820;
  --card: #1a212b;
  --card-2: #202833;
  --gold: #ffd700;
  --text: #f4f5f7;
  --muted: #9299a5;
  --line: rgba(255, 255, 255, 0.09);
  --green: #4caf50;
  --blue: #2196f3;
  --purple: #9c27b0;
  --pink: #e91e63;
  --orange: #ff9800;
  --red: #f44336;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

.ranking-app {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 10px 14px 28px;
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand h1 {
  margin: 0;
  color: var(--gold);
  font-size: 0.92rem;
  letter-spacing: 0.035em;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.top-actions { display: flex; }

.icon-btn, .close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
}

.close-btn { color: var(--gold); font-size: 1.5rem; }

.search-bar {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.search-bar input {
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.ranking-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.view-tabs {
  display: flex;
  border-radius: 6px;
  background: #1e1e1e;
  padding: 2px;
}

.view-tab {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 900;
}

.view-tab.active { background: var(--gold); color: #111; }

.toolbar-options {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.live-control input { position: absolute; opacity: 0; }
.live-control i {
  width: 34px;
  height: 19px;
  display: block;
  border-radius: 999px;
  background: #414750;
  padding: 3px;
}
.live-control i::after {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #aaa;
  transition: 0.2s;
}
.live-control input:checked + i { background: rgba(255, 215, 0, 0.35); }
.live-control input:checked + i::after {
  background: var(--gold);
  transform: translateX(15px);
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
}

.filter-control select {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: #1e1e1e;
  color: white;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.view { display: grid; gap: 12px; }
.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-state button, .add-card {
  border: 1px dashed rgba(255, 215, 0, 0.55);
  border-radius: 12px;
  background: rgba(255, 215, 0, 0.05);
  color: var(--gold);
  font-weight: 900;
}

.table-shell {
  overflow: auto;
  max-height: calc(100vh - 180px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101419;
}

.ranking-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.62rem;
}

.ranking-matrix th, .ranking-matrix td {
  width: 66px;
  min-width: 66px;
  max-width: 66px;
  height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3px 2px;
  text-align: center;
}

.ranking-matrix th {
  position: sticky;
  z-index: 3;
  background: #141920;
}

.ranking-matrix .participant-header-row th {
  top: 0;
  height: 86px;
}

.ranking-matrix .summary-position-row th {
  top: 86px;
  height: 32px;
}

.ranking-matrix .summary-points-row th {
  top: 118px;
  height: 32px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.ranking-matrix th:first-child, .ranking-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  background: #141920;
  padding-inline: 2px;
  text-align: left;
}

.ranking-matrix thead th:first-child {
  z-index: 5;
}

.ranking-matrix td.historical-first {
  background: rgba(255, 215, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.35);
}

.ranking-matrix td.historical-second {
  background: rgba(33, 150, 243, 0.18);
  box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.35);
}

.participant-head {
  display: grid;
  justify-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: white;
  width: 100%;
  min-height: 80px;
  padding: 0;
}

.participant-head .avatar {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #555;
  font-weight: 900;
}

.participant-head.user, .participant-head.comparison { color: var(--gold); }
.participant-head.loaded { color: var(--blue); }
.participant-head > span:not(.avatar),
.participant-head small {
  max-width: 60px;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.05;
}
.participant-head > span:not(.avatar) { font-size: 0.56rem; }
.participant-head small { color: currentColor; opacity: 0.72; font-size: 0.52rem; }
.participant-head.pinned .avatar { box-shadow: 0 0 0 2px var(--category); }

.match-label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.group-leader-flag {
  margin-left: auto;
  min-width: 1em;
  font-size: 1rem;
  text-align: center;
}
.match-label .official-result,
.match-label .simulated-result,
.match-label .live-result {
  border-radius: 4px;
  padding: 3px 6px;
}
.match-label .official-result {
  margin-left: auto;
  color: var(--green);
  background: rgba(76, 175, 80, 0.12);
}
.match-label .simulated-result {
  color: var(--orange);
  background: rgba(255, 152, 0, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 152, 0, 0.35);
}
.match-label .live-result {
  color: var(--pink);
  background: rgba(233, 30, 99, 0.14);
  box-shadow: inset 0 0 0 1px rgba(233, 30, 99, 0.35);
}
.match-label .score-trigger {
  min-width: 30px;
  min-height: 30px;
  margin-left: auto;
  border: 0;
  border-radius: 4px;
  appearance: none;
  padding: 3px 6px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.match-label .score-trigger:not(.simulated-result):not(.live-result) {
  background: transparent;
  color: var(--text);
}
.match-label .score-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.inline-score {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-left: auto;
  font-weight: 900;
}

.inline-score input {
  width: 24px;
  height: 26px;
  min-height: 26px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 4px;
  background: #0d1117;
  color: var(--text);
  padding: 0;
  text-align: center;
  font: inherit;
  font-weight: 950;
  outline: none;
}

.inline-score input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.14);
}

.mobile-score-trigger {
  display: inline-grid;
}

.point-tag {
  display: inline-block;
  margin-left: 2px;
  border-radius: 3px;
  padding: 1px 2px;
  font-size: 0.5rem;
  font-weight: 900;
}
.point-2 { color: var(--green); background: rgba(76, 175, 80, 0.15); }
.point-1 { color: var(--orange); background: rgba(255, 152, 0, 0.15); }
.point-5 { color: var(--gold); background: rgba(255, 215, 0, 0.16); }
.point-8 { color: var(--orange); background: rgba(255, 152, 0, 0.16); }
.point-0 { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

.rank-badge {
  display: inline-block;
  min-width: 22px;
  border-radius: 4px;
  background: #333;
  padding: 2px 3px;
  font-weight: 950;
}
.rank-badge.first { background: var(--gold); color: #111; }
.rank-badge.second { background: #c0c0c0; color: #111; }
.rank-badge.loaded { background: rgba(33, 150, 243, 0.55); }

.date-strip, .match-strip, .participant-strip, .scenario-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 0 7px;
}
.date-strip::-webkit-scrollbar, .match-strip::-webkit-scrollbar,
.participant-strip::-webkit-scrollbar, .scenario-strip::-webkit-scrollbar { display: none; }

.date-chip {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #1d2229;
  color: white;
  padding: 0 11px;
  font-size: 0.66rem;
  font-weight: 900;
}
.date-chip.active { background: var(--gold); color: #111; }
.date-chip.finished:not(.active) {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(0, 77, 64, 0.9);
  box-shadow: 0 0 13px rgba(76, 175, 80, 0.24);
}
.date-chip.live:not(.active) {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px rgba(233, 30, 99, 0.35);
}
.date-chip.simulated::after { content: " \2022"; color: var(--orange); }

.cards-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#cardsView .match-strip {
  margin-bottom: 10px;
}

#cardsView .section-title {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

#cardsView .participant-strip {
  padding-top: 6px;
}

.day-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #1d2229;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.66rem;
  font-weight: 900;
}
.day-toggle.active { color: var(--gold); border-color: rgba(255, 215, 0, 0.45); }

.match-card, .today-leaders-card, .participant-card, .ranking-card, .impact-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}

.match-card {
  flex: 0 0 145px;
  min-height: 175px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 10px;
  text-align: center;
}
.match-card.live { border-color: var(--pink); }
.match-card.simulated { border-color: var(--orange); }
.match-card.confirmed { border-color: var(--green); }
.match-card.live .score { color: var(--pink); }
.match-card.simulated .score { color: var(--orange); }
.match-card.confirmed .score { color: var(--green); }
.match-card.confirmed > span { color: var(--green); }
.match-card .flags {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 1.18rem;
  white-space: nowrap;
}
.match-card .flags img.flag-asset {
  width: 1.55em;
  height: 1.05em;
}
.match-card .score { font-size: 1.35rem; font-weight: 950; }
.extra-time-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}
.extra-time-row strong {
  color: var(--gold);
  font-size: 0.72rem;
}
.match-card .card-inline-score {
  margin: 0;
}
.match-card .card-inline-score input {
  width: 32px;
  height: 32px;
  min-height: 32px;
  font-size: 0.92rem;
}
.match-card small { color: var(--muted); }
.match-stats {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.match-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  padding: 0;
}
.match-stat i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.match-stat.point-2 i { background: var(--green); }
.match-stat.point-1 i { background: var(--blue); }
.match-stat.point-0 i { background: #8b929e; }
.small-btn.ghost-btn {
  background: transparent;
  color: var(--gold);
  min-height: 22px;
}

.today-leaders-card {
  flex: 0 0 130px;
  min-height: 175px;
  display: grid;
  align-content: center;
  gap: 9px;
  border-color: rgba(255, 215, 0, 0.3);
  background: #121212;
  padding: 10px;
}
.today-leaders-title {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: 0.6rem;
}
.today-leaders-title > span { font-size: 1.4rem; }
.today-leaders-list { display: grid; gap: 6px; }
.today-leader-row {
  display: grid;
  grid-template-columns: 18px 1fr 24px;
  align-items: center;
  text-align: center;
}
.today-leader-row > b { color: var(--muted); font-size: 0.75rem; }
.today-leader-flag {
  min-height: 24px;
  font-size: 1.25rem;
}
.today-leader-row > small {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
}
.favorite-row {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 2px 0;
}
.favorite-row b {
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 900;
}
.favorite-row span {
  min-height: 24px;
  font-size: 1.25rem;
}
.favorite-row small {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
}

.small-btn {
  min-height: 29px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  padding: 0 9px;
  font-size: 0.68rem;
  font-weight: 900;
}

.participant-card {
  flex: 0 0 190px;
  padding: 12px;
}
.participant-card.comparison { border-color: var(--gold); }
.participant-card h3 { margin: 0; font-size: 0.84rem; }
.participant-card p { margin: 3px 0; color: var(--muted); font-size: 0.68rem; }
.winner-predictions {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 22px;
  margin-top: 5px;
}
.winner-prediction {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.winner-prediction > span { font-size: 0.9rem; }
.winner-prediction i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(146, 153, 165, 0.55);
}
.winner-prediction i.correct { background: var(--green); }
.card-score { display: flex; justify-content: space-between; align-items: end; margin: 10px 0; }
.card-score strong { color: var(--gold); font-size: 1.25rem; }
.prediction-list { display: grid; gap: 5px; }
.prediction-row {
  display: grid;
  grid-template-columns: 34px 1fr 38px;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  font-size: 0.66rem;
}
.prediction-row .point-tag {
  justify-self: center;
  margin-left: 0;
}
.prediction-row > b {
  justify-self: end;
  color: var(--gold);
}
.prediction-row > i {
  width: 1px;
  height: 1px;
}

.add-card {
  flex: 0 0 160px;
  min-height: 160px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.section-title h2 { margin: 0; color: var(--gold); font-size: 0.78rem; }
.pill { color: var(--muted); font-size: 0.66rem; }

.featured-matches {
  display: grid;
  gap: 10px;
  width: 100%;
}
.featured-match {
  position: relative;
  width: 100%;
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  background: #111418;
  overflow: hidden;
}
.featured-match.simulated {
  border-color: rgba(255, 152, 0, 0.45);
  background: #1a1408;
}
.featured-match.live {
  border-color: rgba(233, 30, 99, 0.5);
  background: rgba(233, 30, 99, 0.07);
}
.featured-match.confirmed {
  border-color: rgba(76, 175, 80, 0.45);
  background: #081a08;
}
.featured-match-main {
  width: 100%;
  min-height: 112px;
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 14px;
  cursor: pointer;
}
.featured-match-main:disabled {
  cursor: default;
  opacity: 1;
}
.featured-match-status {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.featured-match.simulated .featured-match-status { color: var(--orange); }
.featured-match.live .featured-match-status { color: var(--pink); }
.featured-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.featured-match-row > strong {
  font-size: 1.7rem;
  white-space: nowrap;
}
.featured-match.simulated .featured-match-row > strong { color: var(--orange); }
.featured-match.live .featured-match-row > strong { color: var(--pink); }
.featured-match.confirmed .featured-match-row > strong { color: var(--green); }
.featured-distribution {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.featured-team {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.featured-team.home { justify-content: flex-end; text-align: right; }
.featured-team.away { justify-content: flex-start; text-align: left; }
.featured-team > span { font-size: 1.55rem; }
.featured-team > b {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clear-featured-simulation {
  position: absolute;
  top: 4px;
  right: 5px;
  z-index: 2;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 2px 7px;
  font-size: 0.58rem;
  font-weight: 900;
  cursor: pointer;
}

.ranking-filter-toggle {
  border: 0;
  border-radius: 6px;
  background: #1e232b;
  color: white;
  padding: 5px 9px;
  font-size: 0.66rem;
  font-weight: 900;
}

.ranking-card { overflow: hidden; }
.ranking-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 62px 52px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-row.user { background: rgba(255, 215, 0, 0.07); }
.ranking-row small { color: var(--muted); display: block; }
.ranking-predictions {
  display: grid;
  gap: 2px;
  justify-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}
.ranking-predictions i { font-style: normal; }
.move.up { color: var(--green); }
.move.down { color: var(--red); }
.move.same { color: var(--muted); }

.impact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.impact-card { padding: 11px; }
.impact-card h3 { margin: 0 0 8px; font-size: 0.7rem; }
.impact-card.good h3 { color: var(--green); }
.impact-card.bad h3 { color: var(--red); }
.impact-item { display: flex; justify-content: space-between; margin: 7px 0; font-size: 0.7rem; }

.scenario {
  flex: 0 0 62px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1e232b;
  color: white;
  font-weight: 950;
}
.scenario.active { background: var(--gold); color: #111; }

.dialog {
  width: min(470px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  background: #171d25;
  color: var(--text);
  padding: 18px;
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 2px 0 12px; color: var(--gold); font-size: 1.05rem; }
.dialog-heading small { color: var(--muted); font-size: 0.62rem; font-weight: 900; }
.dialog-note { color: var(--muted); font-size: 0.74rem; }
.score-editor { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; }
.score-editor label, .dialog-field { display: grid; gap: 6px; color: var(--muted); font-size: 0.74rem; }
.score-editor input, .dialog-field select, .inline-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1117;
  color: white;
  padding: 0 10px;
}
.score-editor input { text-align: center; font-size: 1.1rem; font-weight: 900; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.primary, .ghost, .dialog-list-btn {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 0 12px;
  font-weight: 900;
}
.primary { background: var(--gold); color: #111; }
.ghost { background: #292f38; color: white; }
.select-list, .settings-actions { display: grid; gap: 8px; }
.dialog-list-btn {
  width: 100%;
  background: #252c36;
  color: white;
  text-align: left;
}
.dialog-list-btn.active { color: var(--gold); border: 1px solid rgba(255, 215, 0, 0.4); }
.dialog-list-btn.danger { color: #ff7770; }
.dialog-field { margin: 10px 0; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 12px 0; }

.toast {
  position: fixed;
  left: 50%; bottom: 101px;
  z-index: 20;
  max-width: calc(100vw - 28px);
  transform: translate(-50%, 18px);
  border-radius: 999px;
  background: #242c37;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  text-align: center;
  font-size: 0.78rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1024px) {
  .ranking-matrix th:first-child,
  .ranking-matrix td:first-child {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
  }

  .inline-score {
    display: inline-flex;
  }

  .mobile-score-trigger {
    display: none;
  }
}

@media (max-width: 620px) {
  .ranking-app { padding-inline: 9px; }
  .ranking-toolbar { align-items: stretch; flex-direction: column; }
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; }
  .toolbar-options { justify-content: space-between; }
  .impact-grid { grid-template-columns: 1fr; }
  .ranking-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 48px 38px;
    gap: 6px;
    padding-inline: 8px;
  }
  .ranking-predictions { font-size: 0.62rem; }

  body:has(#cardsView:not([hidden])) {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .ranking-app:has(#cardsView:not([hidden])) {
    min-height: calc(100dvh - 96px - env(safe-area-inset-bottom));
    overflow: visible;
    display: grid;
    grid-template-rows: auto auto auto auto;
    padding-bottom: 8px;
  }

  #cardsView:not([hidden]) {
    min-height: 0;
    overflow: visible;
    align-content: start;
    gap: 10px;
  }

  #cardsView:not([hidden]) .cards-options,
  #cardsView:not([hidden]) .match-strip,
  #cardsView:not([hidden]) .participant-strip {
    min-width: 0;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  #cardsView:not([hidden]) .cards-options {
    display: block;
  }

  #cardsView:not([hidden]) .date-strip {
    min-width: 0;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  #cardsView:not([hidden]) .participant-strip {
    min-height: 0;
    align-items: start;
    padding-bottom: 14px;
  }

  #cardsView:not([hidden]) .section-title {
    min-height: 26px;
  }
}
