/* Existing content keeps its own styles inside the tournament v2 shell. */
.tournament-v2-page { --tournament-header-height: 72px; --tournament-bottom-space: 0px; }
.tournament-v2-page .content { margin-left: 0; color: #334155; }
.tournament-v2-page :is(.tdv2-sidebar, .tdv2-topbar, .tdv2-bottom-nav, .tdv2-more-sheet) { color: var(--td-ink); }
.tournament-scorer-darts .scorer-content {
  height: calc(100dvh - var(--tournament-header-height) - var(--tournament-bottom-space));
}
.tournament-presentation .presentation-shell {
  height: calc(100dvh - var(--tournament-header-height) - var(--tournament-bottom-space));
}
/* Let the grid shrink while wide elimination brackets scroll inside the panel. */
.tournament-presentation :is(.presentation-topbar, .presentation-stage, .presentation-main, .presentation-content) { min-width: 0; }
.tournament-presentation .groups-tv-grid { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.tournament-v2-page:is(.scorer-fullscreen, .presentation-fullscreen) :is(.tdv2-sidebar, .tdv2-topbar, .tdv2-bottom-nav, .tdv2-more-sheet, .tdv2-more-overlay) { display: none !important; }
.tournament-v2-page:is(.scorer-fullscreen, .presentation-fullscreen) .tdv2-shell { margin-left: 0; }
.tournament-scorer-darts-v2.scorer-fullscreen .scorer-content,
.tournament-presentation-v2.presentation-fullscreen .presentation-shell { height: 100dvh; }
@media (max-width: 980px) {
  .tournament-presentation .presentation-shell { height: auto; }
}
@media (max-width: 820px) {
  .tournament-v2-page { --tournament-bottom-space: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); }
  .tournament-v2-page .tdv2-shell { margin-left: 0; }
  .tournament-v2-page .content { padding-bottom: calc(var(--tournament-bottom-space) + 16px); }
  .tournament-scorer-darts .scorer-content { padding-bottom: 0; }
  .tournament-presentation .presentation-shell { padding-bottom: calc(var(--tournament-bottom-space) + 18px); }
  .tournament-presentation .presentation-brand { bottom: calc(var(--tournament-bottom-space) + 20px); }
  .tournament-v2-page .btn-fullscreen { bottom: calc(var(--tournament-bottom-space) + 16px); }
  .tournament-v2-page:is(.scorer-fullscreen, .presentation-fullscreen) { --tournament-bottom-space: 0px; }
}
@media (max-width: 620px) {
  .tournament-v2-page { --tournament-header-height: 64px; }
  .tournament-presentation .presentation-shell { padding-inline: 8px; gap: 10px; }
  .tournament-presentation .presentation-controls { width: 100%; justify-self: stretch; }
  .tournament-presentation .presentation-controls label { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .tournament-presentation .presentation-controls select { min-width: 0; max-width: 100%; }
  .tournament-presentation .presentation-panel-head { padding: 12px 10px; flex-wrap: wrap; }
  .tournament-presentation .presentation-panel-head h1 { font-size: 24px; overflow-wrap: anywhere; }
  .tournament-presentation .presentation-content { padding: 10px 8px 150px; }
  .tournament-presentation .ranking-tv-table :is(th, td) { padding: 8px 2px; font-size: 12px; overflow-wrap: anywhere; }
  .tournament-presentation .ranking-tv-table th { font-size: 10px; }
  .tournament-presentation .ranking-tv-table :is(th, td):nth-child(2) { width: 34%; }
  .tournament-presentation .rank-pos { width: 22px; }
  .tournament-presentation .team-inline { gap: 4px; }
  .tournament-presentation .team-inline img { width: 22px; height: 22px; flex-shrink: 0; }
  .tournament-presentation .tv-match-card { padding: 12px 8px; }
  .tournament-presentation .tv-match-meta { flex-wrap: wrap; }
  .tournament-presentation .tv-match-teams { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
  .tournament-presentation .tv-match-teams .team-inline { font-size: 14px; }
  .tournament-presentation .tv-match-score { min-width: 60px; font-size: 24px; }
}
